Install Apache on Windows Vista

10.31.07 (12:31 pm)   [edit]

Installing Apache under Windows XP was trivial. Not so, under Vista. Creation of the Apache service fails. The conf directory can’t be set up by the installer, probably due to permission problems.

I finally got it working with the following procedure. I used the latest version of Apache (2.2.4) and Windows Vista Home Premium.

  1. Uninstall any previous installations of Apache Web server (Start > Control Panel > Programs and Features).
  2. Turn off your firewall (Control Panel).
  3. Stop User Account Control (UAC).
  4. Get the most recent version of apache from http://httpd.apache.org/downl... and put it on your desktop. Rename it to apache.msi
  5. Start > All Programs > Accessories
  6. Right-Click “Command Prompt” and choose “Run as Administrator”
  7. Manually remove directories containing previous apache installations (like C:Program FilesApache Software Foundation…)
  8. Change to your desktop folder (At prompt type cd desktop)
  9. Type “msiexec /i apache.msi” on the command prompt.
  10. Run through the Apache installer. I’m running a development server, so I left the domain and computer name blank. Choose the default server on port 80 for all users option. Change the installation directory to c:apache.
  11. Reboot.
  12. The little Apache feather won’t appear on the task bar under Vista with the present version of Apache (2.2.4). To remove the “error” box that says ‘the operation completed successfully” on startup, go to All Programs > Startup, and remove the Apache item there.
  13. Browse to http://localhost. It should say “It works!” If it doesn’t, check your httpd.conf file by going to All Programs > Apache HTTP Server 2.2.x > Configure Apache Server > Test Configuration. Follow the directions for fixing the configuration file.
  14. Turn your firewall back on. You can turn UAC back on too, if you like (mine is off, and it’s staying off!)
Original Source http://senese.wordpress.com/2...

Fingerprint biometrics

10.30.07 (9:54 am)   [edit]

Principles of fingerprint biometrics

A fingerprint is made of a a number of ridges and valleys on the surface of the finger. Ridges are the upper skin layer segments of the finger and valleys are the lower segments. The ridges form so-called minutia points: ridge endings (where a ridge end) and ridge bifurcations (where a ridge splits in two). Many types of minutiae exist, including dots (very small ridges), islands (ridges slightly longer than dots, occupying a middle space between two temporarily divergent ridges), ponds or lakes (empty spaces between two temporarily divergent ridges), spurs (a notch protruding from a ridge), bridges (small ridges joining two longer adjacent ridges), and crossovers (two ridges which cross each other).

The uniqueness of a fingerprint can be determined by the pattern of ridges and furrows as well as the minutiae points. There are five basic fingerprint patterns: arch, tented arch, left loop, right loop and whorl. Loops make up 60% of all fingerprints, whorls account for 30%, and arches for 10%.

Fingerprints are usually considered to be unique, with no two fingers having the exact same dermal ridge characteristics.

How does fingerprint biometrics work

The main technologies used to capture the fingerprint image with sufficient detail are optical, silicon, and ultrasound.

There are two main algorithm families to recognize fingerprints:

  • Minutia matching compares specific details within the fingerprint ridges. At registration (also called enrollment), the minutia points are located, together with their relative positions to each other and their directions. At the matching stage, the fingerprint image is processed to extract its minutia points, which are then compared with the registered template.
  • Pattern matching compares the overall characteristics of the fingerprints, not only individual points. Fingerprint characteristics can include sub-areas of certain interest including ridge thickness, curvature, or density. During enrollment, small sections of the fingerprint and their relative distances are extracted from the fingerprint. Areas of interest are the area around a minutia point, areas with low curvature radius, and areas with unusual combinations of ridges.

Issues with fingerprint systems

The tip of the finger is a small area from which to take measurements, and ridge patterns can be affected by cuts, dirt, or even wear and tear. Acquiring high-quality images of distinctive fingerprint ridges and minutiae is complicated task.

People with no or few minutia points (surgeons as they often wash their hands with strong detergents, builders, people with special skin conditions) cannot enroll or use the system. The number of minutia points can be a limiting factor for security of the algorithm. Results can also be confused by false minutia points (areas of obfuscation that appear due to low-quality enrollment, imaging, or fingerprint ridge detail).

Note: There is some controversy over the uniqueness of fingerprints. The quality of partial prints is however the limiting factor. As the number of defining points of the fingerprint become smaller, the degree of certainty of identity declines. There have been a few well-documented cases of people being wrongly accused on the basis of partial fingerprints.

Benefits of fingerprint biometric systems

  • Easy to use
  • Cheap
  • Small size
  • Low power
  • Non-intrusive
  • Large database already available

Applications of fingerprint biometrics

Fingerprint sensors are best for devices such as cell phones, USB flash drives, notebook computers and other applications where price, size, cost and low power are key requirements. Fingerprint biometric systems are also used for law enforcement, background searches to screen job applicants, healthcare and welfare.

VB6 connect to mysql

10.29.07 (3:25 pm)   [edit]
Private Sub cmdConnectMySQL_Click()

Dim cnMySql As New rdoConnection
Dim rdoQry  As New rdoQuery
Dim rdoRS   As rdoResultset

' set up a remote data connection
' using the MySQL ODBC driver.
' change the connect string with your username,
' password, server name and the database you
' wish to connect to.

cnMySql.CursorDriver = rdUseOdbc
cnMySql.Connect = "uid=YourUserName;pw d=YourPassword;
    server=YourServerName;&qu ot; & _
    "driver={MySQL ODBC 3.51 Driver};
    database=YourDataBase;dsn =;"
cnMySql.EstablishConnection

' set up a remote data object query
' specifying the SQL statement to run.

With rdoQry
    .Name = "selectUsers"
    .SQL = "select * from user"
    .RowsetSize = 1
    Set .ActiveConnection = cnMySql
    Set rdoRS = .OpenResultset(
    & nbsp;   &n bsp;   rdOpenKeyset, rdConcurRowVer)
End With
   
' loop through the record set
' processing the records and fields.

Do Until rdoRS.EOF
    With rdoRS

    ' your code to process the fields
    ' to access a field called username you would
    ' reference it like !username

    & nbsp;   rdoRS.MoveNext
    End With
Loop

' close record set
' close connection to the database

rdoRS.Close
cnMySql.Close

End Sub

Parsing and Formatting a Byte Array into Binary, Octal, and Hexadecimal

10.04.07 (3:36 pm)   [edit]
This example uses a BigInteger to convert a byte array to a string of binary, octal, or hexadecimal values.
    // Get a byte array
byte[] bytes = new byte[]{(byte)0x12, (byte)0x0F, (byte)0xF0};

// Create a BigInteger using the byte array
BigInteger bi = new BigInteger(bytes);

// Format to binary
String s = bi.toString(2); // 100100000111111110000

// Format to octal
s = bi.toString(8); // 4407760

// Format to decimal
s = bi.toString(); // 1183728

// Format to hexadecimal
s = bi.toString(16); // 120ff0
if (s.length() % 2 != 0) {
// Pad with 0
s = "0"+s;
}


// Parse binary string
bi = new BigInteger("1001000001111111100 00", 2);

// Parse octal string
bi = new BigInteger("4407760", 8);

// Parse decimal string
bi = new BigInteger("1183728");

// Parse hexadecimal string
bi = new BigInteger("120ff0", 16);

// Get byte array
bytes = bi.toByteArray();

How to open/read/write a local file from an applet

10.02.07 (3:15 pm)   [edit]

OK, here we go:

'keytool' is delivered with Sun's development kit.

 keytool -genkey -keyalg rsa -alias yourkey
Follow the instructions and type in all needed information.

Now we make the certificate:
 keytool -export -alias yourkey -file yourcert.crt

Now we have to sign the applet:

Just make a *.bat file including this:

javac yourapplet.java
jar cvf yourapplet.jar yourapplet.class
jarsigner yourapplet.jar yourkey

The batch-file compiles the applet, makes a jar-archive and signs the jar-file.

The HTML-code to display the applet:

<applet code="yourapplet.class" archive="yourapplet.jar" width="600" height="500">
</applet>


Now we are done! The applet is signed and if the user accepts
the certificate, the applet is allowed to access local files.
If the user doesn't agree, this appears in the console:
Original Source:: http://www.captain.at/program...