piątek, grudnia 31, 2004

Koniec usługi MS Passport dla firm

Dzisiaj właśnie odpadł ostatni klient korzystającyu z uwierzytelniania swoich klientów poprzez mechanizm MS Passport. Usługa ta planowo została wygaszona dla zewnętrznych firm. Będzie nadal stosowana do dostępu do MSN oraz innych witryn MS (np. MSDN). Większość firm opowiada się za mechanizmem "federated" tzn. podobnie jak państwa świata, każda firma ma swój "paszport" i decyduje czy uznać "paszport" innej firmy. Najpopularniesze wdrożenie takiego machanizmu to Liberty Alliance firmowany przez SUN-a. Mechanizm ten popierają firmy Fidelity and American Express i konsortium to ma około 150 członków.

poniedziałek, grudnia 27, 2004

Nowy artykuł na DNJOnLine

Tim Anderson interviews Craig Symonds, general manager of the Visual Studio product team, on forthcoming versions of Visual Studio, Microsoft's relationship with the Open Source community, the problems of migrating from Visual Basic 6.0, and whether Visual C++ really is faster than C#. Visit http://dnjonline.com to find out more.


You are being sent this email because you have registered with us in the past. As a registered user you can view the 'locked' articles on our site using your unique login details:

Your user ID is: 5022
Your Password is: ivjxmcm

Please take this opportunity to update your registration details with us. If you would prefer not to receive emails from us, please email remove@mattmags.com with the subject line 'opt-out'.

I hope this email has been useful to you,
Matt Nicholson, Editor DNJ Online

ODBC żyje nadal

ODBC is not dead

One of the .NET Framework features often highlighted is its new data access model, ADO.NET. Some of its improvements over its predecessors include scalability, speed, and its disconnected nature features. A .NET data provider is used to access a database system; a good example is the Oracle Data Provider for .NET. One problem is some systems don't have a data provider available, so, thankfully, you can easily add support for the older ODBC (Open DataBase Connectivity) technology. ODBC is an established industry standard with ODBC drivers available for most systems in use.

Working with ODBC

ODBC is a uniform interface standard that you may use to access database systems. It's a database access library that enables applications to work with data contained in a database. One aspect of ODBC is that you may use it to access almost any type of database, albeit Oracle, Access, Sybase, mySQL, spreadsheets, text files, and so forth. It's a mature technology, so locating an ODBC driver for a particular database system is usually not a problem.

ODBC .NET Data Provider

The ODBC .NET Data Provider is an add-on component to the Microsoft .NET Framework Software Development Kit (SDK). It provides access to native ODBC drivers the same way that the OLE DB .NET Data Provider provides access to native OLE DB Providers. The ODBC .NET Data Provider is intended to work with all compliant ODBC drivers, but the Microsoft site states that it has only been tested with the Microsoft SQL ODBC Driver, Microsoft ODBC driver for Oracle, and the Microsoft Jet ODBC driver.

ODBC setup

ODBC consists of a driver and driver manager. The driver is specific to a database vendor's product. For instance, Oracle provides a driver for working with an Oracle system. The driver manager is used to install the necessary driver files and configure data sources (that take advantage of the driver) to be used in applications. On Windows-based systems, the ODBC Data Source Administrator is used to create and maintain ODBC connections. You may utilize an ODBC driver in a .NET application once it is property installed and set up.

ODBC classes

Once you install the ODBC .NET Data Provider, you can utilize it in an application. If you're using Visual Studio .NET, you may add a reference to its dll file, Microsoft.Data.Odbc.dll. If you're developing from the command line, you can add a reference during compilation or copy the dll file into the application's bin directory.

The ODBC classes are contained in the Microsoft.Data.Odbc namespace. It includes the following classes:

  • OdbcConnection: Used to connect to an ODBC data source. The name assigned to the ODBC data source, during its setup, is used to access it.
  • OdbcCommand: Used to execute a command against a connection.
  • OdbcDataReader: Allows you to loop through the results of a query against a data source.
  • OdbcParameter: Used to bind a parameter to a command.
  • OdbcDataAdapter: Used to fill a DataSet object from an ODBC data source.
  • OdbcCommandBuilder: Creates default Insert, Update, and Delete statements for an ODBC data adapter.

The next example takes advantage of a few of these classes. It utilizes a previously established ODBC data source (aptly called Test). The DSN name is used in the connection string, along with the user id and password to access the database. A basic SQL statement is used to retrieve all rows from the Customers table with the column values displayed. Finally, the connection is closed and all other objects are disposed. The C# code follows:

using System;
using Microsoft.Data.Odbc;
namespace BuilderODBC {
class TestClass {
static void Main(string[] args) {
string connectionString = "DSN=Test;UID=Chester;Pwd=Tester;";
string sql = "SELECT CustomerID, ContactName, ContactTitle FROM Customers";
OdbcConnection conn= new OdbcConnection(connectionString);
conn.Open();
OdbcCommand comm = new OdbcCommand(sql, conn);
OdbcDataReader dr = comm.ExecuteReader();
while (dr.Read()) {
Console.WriteLine(dr.GetValue(0).ToString());
Console.WriteLine(dr.GetValue(1).ToString());
Console.WriteLine(dr.GetValue(2).ToString());
}
conn.Close();
dr.Close();
comm.Dispose();
conn.Dispose();
} } }

The equivalent VB .NET code follows:

Imports Microsoft.Data.Odbc
Module Module1
Sub Main()
Dim conn As OdbcConnection
Dim comm As OdbcCommand
Dim dr As OdbcDataReader
Dim connectionString As String
Dim sql As String
connectionString = "DSN=PracticalLotusScriptTest;UID=Chester;Pwd=Tester;"
sql = "SELECT CustomerID, ContactName, ContactTitle FROM Customers"
conn = New OdbcConnection(connectionString)
conn.Open()
comm = New OdbcCommand(sql, conn)
dr = comm.ExecuteReader()
While (dr.Read())
Console.WriteLine(dr.GetValue(0).ToString())
Console.WriteLine(dr.GetValue(1).ToString())
Console.WriteLine(dr.GetValue(2).ToString())
End While
conn.Close()
dr.Close()
comm.Dispose()
conn.Dispose()
End Sub
End Module

Dealing with ODBC errors

The Microsoft.Data.Odbc namespace includes the OdbcException class for handling any errors that may occur when interacting with ODBC data sources. We can alter our example to utilize this class to handle any runtime exceptions that may occur. The altered C# code follows:

using System;
using Microsoft.Data.Odbc;
namespace BuilderODBC {
class TestClass {
static void Main(string[] args) {
string connectionString =
"DSN=PracticalLotusScriptTest;UID=Chester;Pwd=Tester;";
string sql = "SELECT CustomerID, ContactName, ContactTitle FROM Customers";
OdbcConnection conn = null;
OdbcCommand comm = null;
OdbcDataReader dr = null;
try {
conn= new OdbcConnection(connectionString);
conn.Open();
comm = new OdbcCommand(sql, conn);
dr = comm.ExecuteReader();
while (dr.Read()) {
Console.WriteLine(dr.GetValue(0).ToString());
Console.WriteLine(dr.GetValue(1).ToString());
Console.WriteLine(dr.GetValue(2).ToString());
}
dr.Close();
}
catch (OdbcException oe){
Console.WriteLine("An ODBC exception occurred: " + oe.Message.ToString());
} catch (Exception e) {
Console.WriteLine("An exception occurred: " + e.Message.ToString());
} finally {
if (conn.State == System.Data.ConnectionState.Open) {
conn.Close();
}
comm.Dispose();
conn.Dispose();
} } } }

You'll notice the ODBC objects are declared outside the try/catch block, so they may be utilized in the finally block. ODBC exceptions are handled separately from generic errors. The connection is checked to see if it is open before closing it.

Every data source available

ODBC has been around for numerous years. Consequently, ODBC drivers exist for almost any data source imaginable. The ODBC .NET Data Provider providers ODBC access within .NET applications through the Microsoft.Data.Odbc namespace. Use this data provider when you cannot find a native data provider for the data system used in your application.

Tony Patton began his professional career as an

Mocniejszy Linux w teście miodowej pułapki

Unpatched Linux systems are surviving longer on the Internet before being compromised, according to a report from the Honeynet Project released this week.

The data, from a dozen networks, showed that the average Linux system lasts three months before being compromised, a significant increase from the 72 hours life span of a Linux system in 2001. Unpatched Windows systems continue to be compromised more quickly, sometimes within minutes, the Honeynet Project report stated.

The results are probably due to two trends, said Lance Spitzner, president of Honeynet, which develops software for deploying computer systems as bait for online attackers. The default installations of new Linux systems are much more secure than previous versions of the open-source operating system, he said. Secondly, attackers seem to be much more concentrated on Windows systems than on Linux systems, and on attempting to fool desktop users, of which the vast majority use Windows.

"Everybody is focused on Windows," Spitzner said. "There is more money (for an attacker) to be made on the Windows systems."

The study is the latest data on the relative security of Linux systems versus Microsoft Windows. Last week, students found dozens of flaws in software that runs on Linux systems, and a research report stated that a thorough analysis of the Linux kernel turned up hundreds of flaws. However, in relative terms, those numbers are low compared to commercial applications.

Honeynets, a term coined by the project, are networks of computers that are placed on the Internet with the expectation that they will be compromised by attackers. The networks are heavily monitored, and the data is used to research the latest tactics of online miscreants.

While some of the Windows XP systems on the honeynets used for the latest study were compromised within minutes of being placed on the Internet, newer versions of the Linux operating system from Red Hat failed to be compromised by random attacks for more than two months.

Debbie Fry Wilson, director of product management for the security response center at Microsoft, told CNET News.com that the company's latest operating system is more secure than the report suggests.

"While it is not clear which version of Windows was used during the study, we feel that a Windows XP SP2 configuration with the Windows firewall enabled is the most resilient client operating system available in the market and can withstand attack much longer," Wilson said. "We are pleased that the report indicates that two Windows-based honeynets in Brazil withstood attack for several months. However, we are not certain that the report provides conclusive data based on a controlled and scientific study comparing the two operating systems."

Every Windows system compromised during the study had its security breached by a worm.

However, Spitzner stressed that the Honeynet Project does not have enough Windows systems deployed to offer meaningful data on that operating system's security. Moreover, the report does not specify what version of Windows XP had been running on the systems that had been compromised and whether any Service Pack upgrades had been installed.

The study did find that more recent versions of the Linux operating system lasted longer on the Internet without patching.

Dla moich dzieci

  • http://www.pcworld.pl/witryna/1321/17.html - serwis "starych" gier, które można pobrać legalnie
  • różnorodne wtyczki do Total Commander (iso, przeglądarka plików graficznych, odtwarzacz wielu formatów muzycznych, ściąganie stron, dostęp do ext oraz raifs)
  • serwer z MS SQL - konto marekw/Trava16
  • serwer T-SQL - konto marekw/piotrola
  • cacheman - optymalizator dla pamięci CACHE w XP, serwer - outertech.

niedziela, grudnia 26, 2004

Różnica między profesjonalistą a pracownikiem

n this section I'll cover the things every professional Database Administrator should know: business matters that are outside the strictly technical realm.

What separates a professional from the average employee? An employee feels that work is useful, and normally appreciates at least the social aspects (and the paycheck) of his job. He is not usually interested in the subject of their work outside of the office or place of work, but is quite competent at their job.

The professional feels that her work is important. She spends time outside her job learning more about the craft. She tries out new ideas, and is highly motivated to promote her part of the whole.

But there's more to being a professional than extensive subject knowledge and enthusiasm. Professionals are defined by what they do, not just what they know. Professionals respect themselves and others, and are always looking for the best solution to the problem at hand, even if it's not their solution. They don't care whether they "win" or not; they only care whether the problem is solved.

In this section, we'll explore ways to develop your professional database administrator career. I use the term DBA to refer to the development, administration, and data architect roles of the job. This section has less to do then with pure technical knowledge than it does with other professional aspects of database technology.

czwartek, grudnia 23, 2004

Zbadaj zmiany w Windows XP

Have you ever been in the process of troubleshooting and needed to know what configuration changes the system has recently experienced? Knowing this kind of information can go a long way in helping track down the cause of the problem you're investigating.

Windows XP's System Information tool takes a daily snapshot of your system's configuration, and it records all changes to key elements. In fact, System Information compiles and stores a month's worth of data in its history file. As such, System Information provides a beneficial troubleshooting database.

You can easily investigate System Information's configuration change history. Follow these steps:

  1. Open the System Information tool by typing Msinfo32.exe at the command prompt. (You can also access it by going to Start | All Programs | Accessories | System Tools | System Information.)
  2. From the View menu, select System History.
  3. Select a category from the System Summary tree on the left.
  4. Select a date from the View Changes Since drop-down list.

When you do so, you'll see a listing that displays the date and time of the change along with detailed information on the exact nature of the change.

If you know what you're looking for, you can use the System Information tool's Find feature to quickly scan through the listing.

Wykorzystanie ID w HTML-u

Linking to IDs

You probably know that you can link to a specific place in an HTML document by marking that place with a named anchor (e.g. ) and then referring to the name in the link URL (e.g. ). What you may not know is that you can also link to any element that has an ID assigned to it.

The id attribute is supported by every single HTML tag, so you can assign an ID to any part of the page. IDs are most commonly used to single out HTML elements to control the way they look and behave using Cascading Style Sheets (CSS) and JavaScript, respectively.

But assigning an ID to an element also lets you link directly to it. For example, this paragraph has an ID of "intro":

id="intro">This is an
introductory paragraph.

To link to this paragraph from within the same document, simply point to the ID:

#intro">Go to the

introduction

To link to it from another document, also include the document's file name, or full URL as you normally would:

href="example.html#intro">Introduction

Internet Explorer for Windows actually takes this convenience one step further. If you use this method to link to a form field, the browser will give that field focus when the user clicks on the link!


id="email" />


Don't forget to fill in your
email address!

Unfortunately, Internet Explorer for Windows is the only browser to do this, but other browsers will still scroll to the field as with other HTML elements.

MS SQL server - indeksy

Artykuł na temat indeksów grupowych (cluster) : www.databasejournal.com/features/oracle/article.php/3429281

Stare dane z Access'a w Linux

Dzięki tej bibliotece jest możliwe aby dane z baz .mdb były dostępne z poziomu środowiska Linux, przykład artykuł na otn:

Projekt Unii wspomagający tworzenie oprogramowania typu open-source

Konsortium firm europejskich stworzyło program dotowany przez EU pod nazwą EDOS (Environment for Development and Distribiution of Open Source). Projekt ma na celu zapanowanie nad zarządzaniem projektami Open Source z uwagi na specyfikę tworzenia aplikacji w środowisku Linux. Chodzi głównie od wielorakie zależności między pakietami wchodzącymi w skład dystrybucji Linux.

środa, grudnia 22, 2004

SQL Server Alter Evey Table

Alter every table in a database

Notice to subscribers: Due to the holiday, the SQL Server newsletter will not be delivered on Tuesday, Dec. 28, 2004. Look for your next edition of SQL Server on Tuesday, Jan. 4, 2005.

All developers make mistakes from time to time; sometimes this happens because we fail to build in obvious but unstated requirements.

Here's an example: Your database is up and running successfully but various errors in data entry and updating mandate a new requirement: add two columns (LastUpdated and UpdatedBy) to every table. There are hundreds of tables, so it's impractical to perform this task by hand.

This is clearly a chunk of reusable code, so you want to write it once and ensure that it can work on every database. (You might have to refine it slightly for each new database by, for example, changing the column names. But the idea is, you want a procedure to walk all the tables in a database and add one or more columns.)

It's easy to obtain the list of user tables:

SELECT Name FROM sysobjects WHERE Type = 'U' ORDER BY Name

The result set is more conveniently handled as a user-defined function that returns a table:

CREATE FUNCTION dbo.UserTables_fnt
()
RETURNS TABLE
AS
RETURN
(SELECT TOP 100 PERCENT name
FROM dbo.sysobjects
WHERE type = 'U')
ORDER BY name
)

Suppose that you want to add a column called LastUpdated (of type TimeStamp) to every table in the database. To add such a column to any given table, e.g., Customers, your command would look like this:

ALTER TABLE MyDB.dbo.Customers ADD LastUpdated TimeStamp NULL

Now you create a query (view, stored procedure, UDF) that manufactures the statements you need to accomplish your task:

SELECT
'ALTER TABLE NorthwindTest.dbo.[' + name + '] ADD LastUpdated TimeStamp NULL'
AS CommandText
FROM dbo.UserTables_fnt()

Assuming that you make a copy of the Northwind sample database called NorthwindTest and run this code against it, the results look like this:

ALTER TABLE NorthwindTest.dbo.[Categories] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[CustomerCustomerDemo] ADD LastUpdated TimeStamp
NULL
ALTER TABLE NorthwindTest.dbo.[CustomerDemographics] ADD LastUpdated TimeStamp
NULL
ALTER TABLE NorthwindTest.dbo.[Customers] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[dtproperties] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Employees] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[EmployeeTerritories] ADD LastUpdated TimeStamp
NULL
ALTER TABLE NorthwindTest.dbo.[Order Details] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Orders] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Products] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Region] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Shippers] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Suppliers] ADD LastUpdated TimeStamp NULL
ALTER TABLE NorthwindTest.dbo.[Territories] ADD LastUpdated TimeStamp NULL

I used brackets around the table names because they guard against a problematic table name: Order Details. In the absence of spaces, the parser doesn't care about the brackets; but in the presence of spaces, the generated SQL will cause an error.

You can deal with this result set in a variety of ways, including paste it into Query Analyzer and execute it, turn it into a stored procedure, or turn it into an updateable view. Given its one-off nature, I prefer the first choice.

I love writing code that writes code because then I don't have to do it--and it never misspells anything. You can extend this concept to perform just about any DML action that you could perform by hand.

If you're going to try this technique, I strongly encourage you to create a SELECT query first, which manufactures the desired DML, so you can inspect it and check its syntax before running it.

Arthur Fuller has been developing database applications for more than 20 years. He frequently works with Access ADPs, Microsoft SQL 2000, MySQL, and .NET.

Pseudo grafika z css

Styling text with pseudo-elements

Notice to subscribers: Due to the holiday, the Design and Usability Tactics newsletter will not be delivered on Wednesday, Dec. 29, 2004. Look for your next edition of Design and Usability Tactics on Wednesday, Jan. 5, 2005.

Most Web builders are familiar with using CSS pseudo-class selectors to style the different states of hyperlinks in order to achieve rollover effects. However, you may not be aware of another "pseudo" selector that you can use to create text effects, such as initial caps.

The selector constructs I'm referring to are the :first-letter and :first-line pseudo-elements, and they enable you to create styles that apply to the first letter or first line of a text element such as a paragraph. They're called pseudo-elements because they work as if there was an extra markup tag (such as a tag) defining the first letter or first line as a separate element that can then receive its own styling.

Creating an initial letter effect

A classic typographic effect that is often used to add emphasis to the beginning of a text passage is to accentuate the first letter of the first word with some distinctive formatting. Ancient manuscripts were famous for their elaborate initial letters at the beginning of each chapter or verse, but we don't see that treatment much anymore. The modern initial letter effect is usually more sedate, with an initial letter that is just a little bigger and bolder than the normal text that follows. We can create this effect easily with the :first-letter pseudo-element.

Suppose you want to accentuate the beginning of each paragraph of text as shown in Figure A. You could start with the following XHTML markup. (The text within the

tags has been abbreviated to make the example code easier to read.)

<..body>

Or bends with the remover ... nor no man ever loved.


Which alters ... no man ever loved.


Love's not time's fool, ... it is an ever fixed mark.


And then you could apply the following CSS styles to achieve the effect:

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 16px;
color: #000000;
}
p:first-letter {
font-size: 30px;
font-weight: bold;
color: #FF0000;
}

There's nothing in the markup that separates the first letter from the rest of the text, but you can still apply distinctive styling to the first letter of each paragraph by defining that formatting in the p:first-letter style. The rules in the p:first-letter style override the corresponding rules in the p style, but only for the first letter in each paragraph.

Combining and controlling the effects

Now, suppose you want to combine the initial letter effect with one that accents the first line of text as well--but you only want the effect to appear on the first paragraph, not on the paragraphs that follow.

The combined effect shown in Figure B may look tricky, but it's fairly easy to accomplish. The :first-line pseudo-element enables you to format the first line of a paragraph just as the :first-letter pseudo-element does for the initial letter. The :first-line pseudo-element works better than tags for selecting the first line of text because the selection adapts automatically to changes in line lengths as the browser window is resized. Combining the :first-letter and :first-line pseudo-elements with a class (or ID) applied to a specific paragraph tag in the markup enables you to restrict the effect to that paragraph.

Here's the XHTML markup for Figure B (with the text abbreviated as before):

<..body>

Or bends with the remover to remove .... nor no man ever
loved.


Which alters ... no man ever loved.


Love's not time's fool, ... it is an ever fixed mark.


And here are the CSS styles that create the effect:

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 16px;
color: #000000;
}
p.firstgraf:first-letter {
font-size: 30px;
font-weight: bold;
color: #FF0000;
}
p.firstgraf:first-line {
font-size:18px;
font-weight:bold;
line-height:18px;
}

Caveats and notes and browser compatibility (oh my)

You need to keep a few things in mind as you work with the :first-letter and :first-line pseudo-elements. First, the pseudo-element must be the last construct in the selector portion of your CSS code. For example, div#main p.firstgraf:first-line is a valid use of the pseudo-element, but p:first-line a:link is not.

Secondly, when you create an initial letter effect with :first-letter, the initial letter is still part of the main text block, so you can't really position it independent of the rest of the text. As a result, this technique isn't a good way to create drop cap effects where a large initial letter should extend below the text baseline and the following text lines should flow around it. Letter spacing is also hard to control with the :first-letter pseudo-element, so it doesn't work well for large, heavily undercut letters (such as T and W) followed by small text.

Finally, you need to consider browser support for the pseudo-elements. Generally, browser support for these selectors is reasonably good among the current versions of the major browsers. However, the same can't be said for older versions of those same browsers.

Fortunately, selectors containing the :first-letter and :first-line pseudo-elements are generally ignored by the older browsers, which means that the text appears normally, without the initial letter (or line) effect. Since these effects are usually optional visual enhancements, you can often accept the loss of the effect in the deficient browsers without resorting to hacks or alternate formatting to compensate for those deficiencies.

Michael Meadhra has been working in the field since the earliest days of the Web. His book credits span some three dozen titles, including How to Do Everything with Dreamweaver MX 2004, published by Osborne/McGraw-Hill.

Pseudo grafika z css

Styling text with pseudo-elements

Notice to subscribers: Due to the holiday, the Design and Usability Tactics newsletter will not be delivered on Wednesday, Dec. 29, 2004. Look for your next edition of Design and Usability Tactics on Wednesday, Jan. 5, 2005.

Most Web builders are familiar with using CSS pseudo-class selectors to style the different states of hyperlinks in order to achieve rollover effects. However, you may not be aware of another "pseudo" selector that you can use to create text effects, such as initial caps.

The selector constructs I'm referring to are the :first-letter and :first-line pseudo-elements, and they enable you to create styles that apply to the first letter or first line of a text element such as a paragraph. They're called pseudo-elements because they work as if there was an extra markup tag (such as a tag) defining the first letter or first line as a separate element that can then receive its own styling.

Creating an initial letter effect

A classic typographic effect that is often used to add emphasis to the beginning of a text passage is to accentuate the first letter of the first word with some distinctive formatting. Ancient manuscripts were famous for their elaborate initial letters at the beginning of each chapter or verse, but we don't see that treatment much anymore. The modern initial letter effect is usually more sedate, with an initial letter that is just a little bigger and bolder than the normal text that follows. We can create this effect easily with the :first-letter pseudo-element.

Suppose you want to accentuate the beginning of each paragraph of text as shown in Figure A. You could start with the following XHTML markup. (The text within the

tags has been abbreviated to make the example code easier to read.)


Or bends with the remover ... nor no man ever loved.


Which alters ... no man ever loved.


Love's not time's fool, ... it is an ever fixed mark.


And then you could apply the following CSS styles to achieve the effect:

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 16px;
color: #000000;
}
p:first-letter {
font-size: 30px;
font-weight: bold;
color: #FF0000;
}

There's nothing in the markup that separates the first letter from the rest of the text, but you can still apply distinctive styling to the first letter of each paragraph by defining that formatting in the p:first-letter style. The rules in the p:first-letter style override the corresponding rules in the p style, but only for the first letter in each paragraph.

Combining and controlling the effects

Now, suppose you want to combine the initial letter effect with one that accents the first line of text as well--but you only want the effect to appear on the first paragraph, not on the paragraphs that follow.

The combined effect shown in Figure B may look tricky, but it's fairly easy to accomplish. The :first-line pseudo-element enables you to format the first line of a paragraph just as the :first-letter pseudo-element does for the initial letter. The :first-line pseudo-element works better than tags for selecting the first line of text because the selection adapts automatically to changes in line lengths as the browser window is resized. Combining the :first-letter and :first-line pseudo-elements with a class (or ID) applied to a specific paragraph tag in the markup enables you to restrict the effect to that paragraph.

Here's the XHTML markup for Figure B (with the text abbreviated as before):


Or bends with the remover to remove .... nor no man ever
loved.


Which alters ... no man ever loved.


Love's not time's fool, ... it is an ever fixed mark.


And here are the CSS styles that create the effect:

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 16px;
color: #000000;
}
p.firstgraf:first-letter {
font-size: 30px;
font-weight: bold;
color: #FF0000;
}
p.firstgraf:first-line {
font-size:18px;
font-weight:bold;
line-height:18px;
}

Caveats and notes and browser compatibility (oh my)

You need to keep a few things in mind as you work with the :first-letter and :first-line pseudo-elements. First, the pseudo-element must be the last construct in the selector portion of your CSS code. For example, div#main p.firstgraf:first-line is a valid use of the pseudo-element, but p:first-line a:link is not.

Secondly, when you create an initial letter effect with :first-letter, the initial letter is still part of the main text block, so you can't really position it independent of the rest of the text. As a result, this technique isn't a good way to create drop cap effects where a large initial letter should extend below the text baseline and the following text lines should flow around it. Letter spacing is also hard to control with the :first-letter pseudo-element, so it doesn't work well for large, heavily undercut letters (such as T and W) followed by small text.

Finally, you need to consider browser support for the pseudo-elements. Generally, browser support for these selectors is reasonably good among the current versions of the major browsers. However, the same can't be said for older versions of those same browsers.

Fortunately, selectors containing the :first-letter and :first-line pseudo-elements are generally ignored by the older browsers, which means that the text appears normally, without the initial letter (or line) effect. Since these effects are usually optional visual enhancements, you can often accept the loss of the effect in the deficient browsers without resorting to hacks or alternate formatting to compensate for those deficiencies.

Michael Meadhra has been working in the field since the earliest days of the Web. His book credits span some three dozen titles, including How to Do Everything with Dreamweaver MX 2004, published by Osborne/McGraw-Hill.

Wykorzystanie możliwości Oracle w zakresie zarządzania hasłami

Use profiles to create a password management policy

Notice to subscribers: Due to the holiday, the Oracle newsletter will not be delivered on Wednesday, Dec. 29, 2004. Look for your next edition of Oracle on Wednesday, Jan. 5, 2005.

Most Oracle database users create user accounts with the default profile. Since Oracle 8, it's possible to lock an account by creating a profile and assigning it to a user with either of these two statements:

CREATE USER myuser . . . PROFILE myprofile;
ALTER USER myuser PROFILE myprofile;

A typical attempt to break into a database account is to try several commonly used passwords, such as "welcome" or the username. You can prevent multiple failed attempts at logging in by using the profile tag FAILED_LOGIN_ATTEMPTS:

CREATE PROFILE myprofile LIMIT
FAILED_LOGIN_ATTEMPTS 5
PASSWORD_LOCK_TIME 1;

Users assigned to this profile will be locked out of their accounts after five login attempts with an incorrect password. The account will be inaccessible for one day or until a DBA issues the command ALTER USER ACCOUNT UNLOCK.

Even after several years, I've found that my old password still works on previous projects. This makes a good case for placing a limit on a password's lifetime so it will expire after a certain period (e.g., at the end of a contract). There's also an option to allow a specific grace period, which is useful for projects that aren't used very often. If the user doesn't log in until after the password expires, the user can still connect, but a warning will display until the grace period expires. Use the PASSWORD_LIFE_TIME and PASSWORD_GRACE_TIME tags on a profile to enable these features.

ALTER PROFILE myprofile LIMIT
PASSWORD_LIFE_TIME 30
PASSWORD_GRACE_TIME 3;

Users assigned to that profile will be locked out of their accounts 30 days after the last time the password is changed. After 30 days, attempting to log in will result in warning messages for three more days before the account is locked.

Many users will see these limits and simply try to reset their passwords to what they were previously using rather than using a new password each time. You can prevent users from reusing a password with the PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX tags.

ALTER PROFILE myprofile LIMIT
PASSWORD_REUSE_TIME 30
PASSWORD_REUSE_MAX 100;

Users with this profile will not be able to reuse a password for 30 days, or until after they change the password 100 times.

Finally, some users will use passwords that are easy to guess. It's possible to restrict a password's format (such as checking for a minimum width, letters, numbers, or mixed case, or verifying that the password isn't a variation of the username) by creating a PL/SQL procedure that validates passwords. You must format the procedure like this:

CREATE OR REPLACE FUNCTION verify_password
(
userid varchar(30),
password varchar(30),
old_password varchar(30)
) RETURN BOOLEAN
. . .

You can assign this function (which can be any name, but it must be owned by the SYS account) with the following:

ALTER PROFILE myprofile LIMIT
PASSWORD_VERIFY_FUNCTION verify_password;

Scott Stephens worked for Oracle for more than 13 years in technical support, e-commerce, marketing, and software development.

Projekt biblioteki GUI dla aplikacji Webowych

Elementy interfejsu graficznego i interakcji:
  • menu hierarchiczne,
  • menu kontekstowe,
  • podpowiedzi opcji (dymki-ballon-hints)
  • ustawianie fokusa na wybranym elemencie
  • biblioteka obsługująca poprawność pola i poprawność pól (submit)
  • elementy dhtml
  • wybór z listy do listy
  • wyszukiwanie na liście (zawężania zgodnie z postępem zgodnie z wybranym prefiksem)
  • arkusze styli css
  • raporty na poziomie korporacyjnym z serwera (Agata/PHP lub RL/Python)
  • sposób zapamietania stanu (cookies/MS persistant)
  • pobranie dynamiczne danych bez konieczności przeładowania strony wykorzystania HTTPXML (obsługuje już Firefox)

Wewnętrzne złączenie na jednej tablicy

Działa, tablica wygląda tak:
CREATE TABLE [dbo].[hierarchia] (
[nr] [numeric](18, 0) NULL ,
[Nazwisko] [char] (10) COLLATE Polish_CI_AS NULL ,
[kier] [numeric](18, 0) NULL
) ON [PRIMARY]
GO
select a.nr, a.nazwisko,b.nazwisko,b.kier from hierarchia a inner join hierarchia b
on a.nr = b.kier where a.kier=5 order by b.kier

Uawga: bardzo ważna, przy MS DTS i łączeniu się z bazą Oracle należy pamiętać o podaniu nazwy użytkownika dużymi literami (zawsze), hasło podajemy bez zamiany. Inaczej nie uda się przenieść tabel z MS SQL Servera na Oracle 9i

wtorek, grudnia 21, 2004

Programować można wszystko, nawet MS Office

Microsoft plans first Office System developer eventFebruary conference aims to train developers on Office System productsBy Paul Krill December 20, 2004
Microsoft (Profile, Products, Articles) is inviting approximately 800 specially selected developers to attend the first-ever Microsoft Office System Developer Conference from Feb. 2 through Feb. 4 in Redmond, Wash.
The conference is intended to help developers and architects build enterprise-class solutions using Office System products and enabling technologies, the company said.
“This is to train developers on Office System products and technologies, and it’s really an opportunity to learn about the Office System directly from those who built it,” said Adam LeVasseur, group product manager for the information workgroup product management group at Microsoft. The company’s message about Office is that it is “a genuine platform for enterprise solutions,” LeVasseur said.
Products such as the 2003 editions of SharePoint Portal, Exchange Server, and Visio are part of Office System. Tools being used with the Office System include Visual Studio Tools for the Microsoft Office System and Microsoft Office Information Bridge Framework.
Prospective attendees at the conference are “field-nominated,” meaning Microsoft personnel will select them, according to LeVasseur. The event is being limited to about 800 persons because of the capacity of the venue, the Microsoft Conference Center.
Microsoft Chairman and Chief Software Architect Bill Gates will provide a keynote address at the event. Partner solutions also will be showcased.

poniedziałek, grudnia 20, 2004

Czeski... case?

The Best Day Ever To Design A Database StructureBy Vladimira SikorovaContributing WriterArticle Date: 2004-12-08Have you ever been faced with the challenge of designing a new database structure? Do you have to redevelop an existing database?The truth is that creating or developing a database structure requires at least basic knowledge of SQL scripts. If you have to design a very complicated database structure with a lot of tables (entities), plenty of information (attributes) and complicated relationships among them, it' s very uneasy... Overall, whatever you have to do with databases, it has always been difficult, time-demanding and expensive. Computer aided software engineering (CASE) is a technique that using some of its tools enables you to create softwares more easily. CASE tools assist software engineering managers and practicioners in every activity associated with the software process, e. g. in systematic analysis, design, coding, implementation, testing work, maintenance etc. Using CASE tools, the architecture and design of the software become more apparent and easier to understand and modify. Charonware, s. r. o., a software company based in the Czech Republic, specializes in designing high-quality database modeling CASE tools. Its flagship product CASE Studio 2 new version 2.18 has just been released. "CASE Studio 2 helps companies create or redevelop their database structures easily, quickly and at a very reasonable price in comparison to other similar competitive products," says Vaclav Frolik, Charonware's Sales and Marketing Manager. In other words, instead of many hours spent on writing SQL scripts, CASE Studio 2 allows you to draw large Entity relationship diagrams and generate SQL scripts automatically, even for various databases (and at a reasonable price). Other powerful CS2 features are: reverse engineering, generation of HTML and RTF documentation, data flow diagrams, export into XML format and many more. "CASE Studio 2 is a highly customizable CASE tool that respects individual requirements of each customer. It supports more than twenty databases and is being used in more than sixty countries," adds Vaclav Frolik. Key enhancements of the CS 2 new version 2.18 are: Full support for PostgreSQL 8.0, Sybase Anywhere 9 and MySQL 4.1, a new HTML report and new graphics of relationship lines. "The new version 2.18 includes more than 80 significant improvements, however, we expect that CS 2 users will mainly appreciate the possibility to move relationship lines and add break points", says Vaclav Frolik. With this feature, Charonware wanted to respond to its customers' needs. To get practical insight on how to work with CASE Studio 2 and its newly added features, Charonware offers very helpful instructional movies on its website. Other useful documentation like the CS2 White Paper and manual are also available. Finally, to consider whether CASE Studio 2 meets customer's requirements and runs without any problems, it is possible to test the CS2 demo version. Charonware provides time-unlimited, free demo version and at the same time free email support. "Charonware provides highly professional and customizable, smoothly integrated database modeling and reporting tool at unmatched price. Our aim is to make software products that would be beneficial for database designers, developers and all who want to accomplish all their database-related tasks with greater productivity and higher quality," concludes Vaclav Frolik. Well, it seems like it's a piece of cake to develop a database structure with CASE Studio 2!? I would give it a try.

Coroczne nagrody Cringely

The “Mission Accomplished” Award goes to Oracle for rescuing PeopleSoft from the throes of a brutal dictatorship … or is that the other way around? As part of the deal, PeopleSoft agreed to drop its poison-pill defense against the takeover, and Oracle’s Larry Ellison agreed to enroll in an ego management program.
The “Hot Time in the Old Town Tonight” Award goes to Dell Computer. The makers of the original flaming laptop continue a proud tradition with the recent recall of nearly a million AC power adapters, which ran so hot users had to wear asbestos skivvies.
The “Fire Down Below” Award goes to the researchers at the State University of New York at Stonybrook who discovered that using a laptop in your lap could cause infertility by, um, overcooking your eggs. And if you’re using a Dell laptop, get ready to serve up some huevos rancheros.
The “If It Wasn’t for Bad Luck” Award goes to SCO, which got ditched by its last remaining investor, saw its licensing revenue drop by more than 90 percent, and had its Web site defaced by fiendishly sardonic hackers. (“We own all your code. Pay us all your money.”) I think somebody needs to give CEO Darl McBride a hug.
The “No Such Thing as Bad Publicity” Award goes to the Motion Picture Association of America, which filed its first lawsuits against file swappers in November. Frankly, that seems a little harsh — don’t you think downloading and watching Star Wars I: The Phantom Menace is punishment enough?
The “Show Me the Money” Award goes to Microsoft, naturally. During the past year, the cash-rich Redmondites settled disputes with InterTrust ($440 million), Novell ($536 million), Sun Microsystems ($1.6 billion), disgruntled shareholders (a $32 billion dividend), and a host of others. Maybe money can’t buy you love, but it can produce new and improved forms of loathing.
The “Andy Grove Humanitarian” Award goes, not surprisingly, to Intel. In 2004, the $30 billion chipmaker canceled two planned processors, issued a recall of one chip, delayed production of another, and saw its CPU market share dip dangerously close to 82 percent. Thanks for giving the little guys a chance to catch up.
The “That’s Not Writing, That’s Typing” Award goes to the bleary-eyed denizens of the blogosphere. From the cadre of font geeks who ripped the lid off “Rathergate” to the congressional assistant who lost her job for writing about her bedroom escapades with Bush administration officials, America’s 4 million bloggers served with distinction. Please remove your tin-foil helmets and take a bow.
Got hot tips or eggnog recipes? Share them with cringe@infoworld.com; you may win a screaming yellow “I Spy 4 Cringely” messenger bag in 2004.