Friday, November 30, 2007

Crypto++ Library 5.5.2 - a Free C++ Class Library of Cryptographic Schemes

Crypto++ Library 5.5.2 - a Free C++ Class Library of Cryptographic Schemes




high speed stream ciphers:
Panama, Salsa20, Sosemanuk
AES and AES candidates
AES (Rijndael), RC6, MARS, Twofish, Serpent, CAST-256
other block ciphers
IDEA, Triple-DES (DES-EDE2 and DES-EDE3), Camellia, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2
block cipher modes of operation
ECB, CBC, CBC ciphertext stealing (CTS), CFB, OFB, counter mode (CTR)
message authentication codes
VMAC, HMAC, CBC-MAC, DMAC, Two-Track-MAC
hash functions
SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and SHA-512), Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320
public-key cryptography
RSA, DSA, ElGamal, Nyberg-Rueppel (NR), Rabin, Rabin-Williams (RW), LUC, LUCELG, DLIES (variants of DHAES), ESIGN
padding schemes for public-key systems
PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363 EMSA2 and EMSA5
key agreement schemes
Diffie-Hellman (DH), Unified Diffie-Hellman (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, XTR-DH
elliptic curve cryptography
ECDSA, ECNR, ECIES, ECDH, ECMQV

insecure or obsolescent algorithms retained for backwards compatibility and historical value
MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square


9/24/2007 - Version 5.5.2 released

Speed Comparison of Popular Crypto Algorithms

Speed Comparison of Popular Crypto Algorithms

Crypto++ 5.5 Benchmarks
Here are speed benchmarks for some of the most commonly used cryptographic algorithms. All were coded in C++, compiled with Microsoft Visual C++ 2005 SP1 (whole program optimization, optimize for speed), and ran on an Intel Core 2 1.83 GHz processor under Windows XP SP 2 in 32-bit mode. x86/MMX/SSE2 assembly language routines were used for integer arithmetic, AES, VMAC, Sosemanuk, Panama, Salsa20, SHA-512, Tiger, and Whirlpool. (OpenMP support was disabled so only one core of the CPU was used for this benchmark.)
The results from the same binary running on an Intel Pentium 4 (Northwood) CPU are available here.
Also available are benchmarks that ran on an AMD Opteron 2.4 GHz processor under Linux 2.6.18. Those were compiled with GCC 4.1.1 using -O2 optimization, and x86-64/MMX/SSE2 assembly language routines were used for integer arithmetic, AES, VMAC, Sosemanuk, Panama, Salsa20, and Whirlpool.

adler32 - Tcl implementation of Adler32

adler32 -- hping network security tool

Adler-32 checksum calculation - C# Algorithms

Adler-32 checksum calculation - The Code Project - C# Algorithms

Download CheckAdler_Doc.zip - 83.0 KB
Download CheckAdler_Src.zip - 2.1 KB
Download CheckAdler_Test.zip - 106.7 KB
Introduction
Checksums are a common way to ensure data integrity. Adler-32 checksum may be used for revealing the damaged files or compare two files for identity.
Background (from en.wikipedia.org)
Adler-32 is a checksum algorithm which was invented by Mark Adler. It is almost as reliable as a 32-bit cyclic redundancy check for protecting against accidental modification of data, such as distortions occurring during a transmission. ....

Adler-32 - Wikipedia

List of hash functions - Wikipedia

List of hash functions - Wikipedia

Cyclic redundancy check:
Adler-32, crc16, crc32, crc32 mpeg2, crc64

Checksums:
xor8, Luhn algorithm

Non-cryptographic hash functions:
Fowler Noll Vo hash, Jenkins One-at-a-time hash, Jenkins lookup3 hash, Zobrist hashing, hash127, Java hashCode()

cryptographic hash function:
HAVAL, MD2, MD4, MD5, RIPEMD-64, RIPEMD-160, RIPEMD-320, SHA1, SHA256, SHA384, HA512, Tiger, WHIRLPOOL

Adler-32 - Wikipedia

Adler-32 - Wikipedia, the free encyclopedia

SlavaSoft FSUM 2.52 - Fast File Integrity Checker

SlavaSoft FSUM - Fast File Integrity Checker

FSUM 2.52
A fast and handy command line utility for file integrity verification. It offers a choice of 13 of the most popular hash and checksum functions for file message digest and checksum calculation.
Version: 2.52

File Size: 92KB
OS: Windows 95/98/Me/NT/2000/XP
Implemented using:
SlavaSoft QuickHash Library
Major Features:
Possibility to calculate a file message digest and/or a checksum using any of the 12 well-known and documented hash and checksum algorithms: MD2, MD4, MD5, SHA-1, SHA-2( 256, 384, 512), RIPEMD-160, PANAMA, TIGER, ADLER32, CRC32;
Support of a custom hash algorithm (MD4-based) used in eDonkey and eMule applications;
Possibility to act recursively. FSUM can operate not only on files from a specific directory, but also on files from all subdirectories of the specified directory;
Work with large size files. (Tested on file sizes of up to 15 GB);
Full compatibility with md5sum utility;
Full .MD5 and .SFV file formats support;
Automatic recognition of checksum file format (.MD5 or .SFV) while checking;
Generates/verifies hashes/checksums for files of any type: music, audio, sound, video, image, icon, text, compression, etc., with the extensions: .mp3, .wav, .avi, .mpg, .midi, .mov, .dvd, .ram, .zip, .rar, .ico, .gif, .pif, .pic, .tif, .tiff, .txt, .doc, .pdf, .wps, .dat, .dll, .hex, .bin, .iso, .cpp, .dss, .par, .pps, .cue, .ram, .md5, .sfv, etc.
Details:
The most common use for FSUM is checking data files for corruption. A message digest or checksum calculation might be performed on data before transferring it from one location to another. Making the same calculation after the transfer and comparing the before and after results, you can determine if the received data is corrupted or not. If the results match, then the received data is likely accurate.

InterSystems Caché - World's fastest database

InterSystems Caché - World's fastest database

InterSystems Caché® is the high-performance object database that runs SQL five times faster than relational databases. Caché enables rapid Web application development, extraordinary transaction processing speed, massive scalability, and real-time queries against transactional data – with minimal maintenance and hardware requirements.
Caché objects can be used with many popular development technologies including Java, .NET, C++, XML, and others.

Comparing Tables Organized with Clustered Indexes versus Heaps - Technet / SQL Server Best Practices Article

Comparing Tables Organized with Clustered Indexes versus Heaps: SQL Server Best Practices Article

SQL Server Best Practices - Technet

rg443: Technet - SQL Server Best Practices

Thursday, November 29, 2007

Cities of the world database donated by MaxMind.com

Cities of the world database donated by MaxMind.com

HOW-TO Import the MaxMind GeoIP Free Country CSV file into MySQL and save diskspace

HOW-TO Import the MaxMind GeoIP Free Country CSV file into MySQL and save diskspace

Increase IIS/WinXP connection limit (or how to avoid HTTP 403.9 error)

Increase IIS/WinXP connection limit (or how to avoid HTTP 403.9 error)
40 simultaneous connections!! Couple that with no HTTP Keep-Alives and it may actually work for you... From that post (for my own reference, as it was down some days ago):
Alot of people were pinging me today about getting 403.9's when trying to access my website (Access Forbidden: Too many users are connected Internet Information Services). It turns out that the IIS on Windows XP comes configured out of the box for a maximum of 10 HTTP connections. What's worse, IE (actually URLMON) seems to use up 2 connections when hitting a website. I tried figuring out how to raise the connection limit, but there didn't seem to be a documented way of doing this on a non-server version of Windows. Fortunately, my good friend Geoff is the Architect of IIS and was able to help me out. Here's his tip:
This can be bumped up to 40 but not higher (40 is the hardcoded limit).
To do this, find the adsutil.vbs script (should be in c:\inetpub\AdminScripts or similar) and run the following command:
adsutil set w3svc/MaxConnections 40
You can also try to prevent individuals from hogging a bunch of connections and thereby blocking out other users. (IE will normally use 2 connections to a web site.) To do this, launch the IIS admin tool (under control panel / administrative tools), right click on your ‘default web site’ (under ‘web sites’ in the outline control), and mess with the settings in the “connections” part of the “web site” tab. Lowering the timeout (default is 5 min) will cause idle connections to get dropped quicker. Disabling keep alives will cause connections to disconnect immediately after the request is handled instead of waiting for new requests on the same connection. This is a little extreme but you probably don’t care that much about responsiveness, so you might want to just try that and see if it solves the problem.

Coding Horror: Uncrippling Windows XP's IIS 5.1 - 403.9 ERROR

Uncrippling Windows XP's IIS 5.1
Scott Mitchell says the best new ASP.NET feature in VS.NET 2005 is the integrated webserver. I agree. No more ditzing around with annoying IIS dependencies and install issues: aspnet_regiis, anyone? Tight coupling of VS.NET to IIS is also number three in K Scott Allen's worst of the .NET 1.x years. Good riddance IIS, hello Son of Cassini!
Unfortunately, we're still stuck with VS.NET 2003 in the meantime, and Windows XP's IIS 5.1 is thoroughly crippled out of the box. It allows only one root website, and a maximum of ten concurrent connections to that website. Microsoft really, really doesn't want us hosting slashdot.org on our XP Pro box. These limits are so aggressive that they can get in the way of legitimate localhost development. But there are workarounds.
Increase the 10 concurrent connection limit
Are you getting 403.9 "Access Forbidden: Too many users are connected" errors on an XP Pro website? You're limited by default to 10 concurrent connections by design, but this can be increased. First, make sure your default windows script host is set to the console (cscript.exe) one.
cscript //h:cscript
Next, let's increase the connection limit to 40.
C:\Inetpub\AdminScripts\adsutil set w3svc/MaxConnections 40
Note that this is a hard-coded limit; it can't be increased any further unless you like patching windows system files. You can, however, make the IIS connection timeout more aggressive so connections don't last as long.
Run more than one root website
IIS 5.1 only allows one root website. This is fine if your websites run under subfolders:
http://localhost/MyWebsite1
http://localhost/MyWebsite2
But it's kind of a pain if your websites must run as root, or need to be tested when running as root:
http://MyWebsite1/
http://MyWebsite2/
In that case, you'd have to edit your hosts file, and switch the default home directory for the default website. But there's a better way. You can hack up multiple web sites in IIS 5.1 via command line tricks, or you can use this nifty little GUI utility which automates that for you. It works great-- you'll even see multiple websites show up in the IIS manager. But bear in mind that, unlike the server versions of IIS, only one website can be active at any given time.

hostip.info - Using the Database - IP Address Lookup - Community Geotarget IP Addresses Project

Using the Database - IP Address Lookup - Community Geotarget IP Addresses Project

Simple GET
T hat said, there is an easy HTTP oriented API to locate IP addresses and Geocode them. If you don't supply the "?ip=aa.bb.cc.dd" bit, then the ip address lookup of the calling machine will be located instead (here, the aa,bb,cc,dd are decimal digits). If you add &position=true to the end of the URL then latitude and longitude will be returned also. Both HTML and XML formats are supplied for your convenience.

http://api.hostip.info/country.php
US


http://api.hostip.info/get_html.php?ip=12.215.42.19
Country: UNITED STATES (US)
City: Sugar Grove, IL


http://api.hostip.info/get_html.php?ip=12.215.42.19&position=true
Country: UNITED STATES (US)
City: Sugar Grove, IL
Latitude: 41.7696
Longitude: -88.4588


http://api.hostip.info/?ip=12.215.42.19

Country Flag
Paste the following code into your HTML to get a country flag of the ip address. The database is significantly more accurate (it ought to be 100%) for countries than for cities. It would be nice if y'all would make the flag a link to the www.hostip.info home page (http://www.hostip.info/) so they can come by if they're interested - it'll only benefit you in the long run. After all, the results get more accurate as more visitors submit their IP addresses!
Flag of visitor's location:

IP Address Lookup

Flag of any IP address:

IP Address Lookup


Embedded Applet
The following is designed to be embedded within another HTML page using the OBJECT tag. This will reproduce the zoom-in applet, (or an explanatory message with a link to fix, if the IP address lookup is unknown). Which means you can embed the applet in your own site without needing to have the local database and map data (which runs to a few gigabytes...) All you need do is include the OBJECT block below in your HTML. Note, you can also add "?ip=aaa.bbb.ccc.ddd" to the frame.html url below to map a specific IP address.
TYPE='text/html' BORDER=0
WIDTH=610 HEIGHT=330 HSPACE=0 VSPACE=0>



Commercial Geodatabase
MaxMind - If you're looking for a commercial option, this database maintains a great level of accuracy.

Visual Basic 6 - Technical Articles

Visual Basic 6 Technical Articles @ msdn2

Access the File System with .NET Framework Classes from Visual Basic 6Automatically Updating Visual Basic 6 Applications: Part IAutomatically Updating Visual Basic 6 Applications: Part IIAutomating the Creation of Data-Rich Business Documents with Word 2007 and Visual Basic 2005Calling Web Services from Visual Basic 6, the Easy WayConverting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 1Converting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 2Converting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 3Debugging Hybrid Visual Basic 6.0/Visual Basic .NET ApplicationsDeconstructing the Visual Basic Upgrade WizardSimplifying Application Maintenance with Visual Basic 2005Language Enhancements in Visual Basic 2005My WalkthroughsUsing Threading to Build a Responsive Application with Visual Studio 2005Defining and Using Generics in Visual Basic 2005My.Internals: Examining the Visual Basic My FeatureUsing My.Settings in Visual Basic 2005Operator Overloading in Visual Basic 2005Getting Started with My.BlogsUser Interface Controls in Visual Basic 6 and Visual Basic 2005Moving Your Legacy Hardware Code to Visual Basic 2005An Overview of Visual Basic 2005Overview of Visual Basic 9.0A Visual Basic Developer's Introduction to ASP.NET 2.0Deploying Contemporary Applications with ClickOnceIncreasing Productivity with Visual Basic 2005Visual Basic 6 Asynchronous File IO Using the .NET FrameworkIntroducing Microsoft Visual Basic 2005 for DevelopersExtending Visual Basic 6 ActiveX EXEs With Visual Basic 2005 and the Interop Forms ToolkitSharing ADO Recordsets Between Visual Basic 6 and Visual Basic 2005What's New in Help for Visual Basic 2005 Beta 1What's New with the Visual Basic Upgrade Wizard in Visual Basic 2005Where Did My Icons Go?What's in Visual Basic 2005 for the Visual Basic 6.0 DeveloperVisual Basic Fusion: Best Practices to Use Visual Basic 6 and Visual Basic .NET TogetherA Visual Basic Developer's Introduction to Web Development


Visual Basic
Access the File System with .NET Framework Classes from Visual Basic 6
Automatically Updating Visual Basic 6 Applications: Part I
Automatically Updating Visual Basic 6 Applications: Part II
Automating the Creation of Data-Rich Business Documents with Word 2007 and Visual Basic 2005
Calling Web Services from Visual Basic 6, the Easy Way
Converting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 1
Converting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 2
Converting a Data-Oriented Application from Visual Basic 6 to Visual Basic 2005, Part 3
Debugging Hybrid Visual Basic 6.0/Visual Basic .NET Applications
Deconstructing the Visual Basic Upgrade Wizard
Simplifying Application Maintenance with Visual Basic 2005
Language Enhancements in Visual Basic 2005
My Walkthroughs
Using Threading to Build a Responsive Application with Visual Studio 2005
Defining and Using Generics in Visual Basic 2005
My.Internals: Examining the Visual Basic My Feature
Using My.Settings in Visual Basic 2005
Operator Overloading in Visual Basic 2005
Getting Started with My.Blogs
User Interface Controls in Visual Basic 6 and Visual Basic 2005
Moving Your Legacy Hardware Code to Visual Basic 2005
An Overview of Visual Basic 2005
Overview of Visual Basic 9.0
A Visual Basic Developer's Introduction to ASP.NET 2.0
Deploying Contemporary Applications with ClickOnce
Increasing Productivity with Visual Basic 2005
Visual Basic 6 Asynchronous File IO Using the .NET Framework
Introducing Microsoft Visual Basic 2005 for Developers
Extending Visual Basic 6 ActiveX EXEs With Visual Basic 2005 and the Interop Forms Toolkit
Sharing ADO Recordsets Between Visual Basic 6 and Visual Basic 2005
What's New in Help for Visual Basic 2005 Beta 1
What's New with the Visual Basic Upgrade Wizard in Visual Basic 2005
Where Did My Icons Go?
What's in Visual Basic 2005 for the Visual Basic 6.0 Developer
Visual Basic Fusion: Best Practices to Use Visual Basic 6 and Visual Basic .NET Together
A Visual Basic Developer's Introduction to Web Development

Free Charting for ASP.NET

Open Flash Chart is an open source charting flash control that now contains an ASP.NET library.

read more | digg story

Wednesday, November 28, 2007

Method Overloading using JavaScript

John Resig, has explained us a better and interesting way of Method Overloading. Here he has discussed about the ability to run different code depending on the number of arguments passed into the same function. More at developer snippets

read more | digg story

javascript trim frunction (String prototype)

// Quick string trim function
String.prototype.trim = function() { return this.replace(/^\s+\s+$/g, ''); }

AJAX Wikipedia Browser - A browser inside a browser?

Gollum is a neat "browser within a browser" app specialised for wikipedia reading. Multiple languages available.

read more | digg story

Tuesday, November 27, 2007

Death Proof - Todsicher

 

Death Proof - Todsicher

Deutsch Dolby Digital 5.1 / DTS 5.1, Englisch Dolby Digital 5.1

Die drei Freundinnen Jungle Julia (Sydney Poitier), Butterfly (Vanessa Ferlito) und Shanna (Jordan Ladd) lassen es richtig krachen, feiern und trinken in ihrer Lieblingskneipe. Da tritt der vernarbte Stuntman Mike (Kurt Russell) in Erscheinung. Zunächst wirkt er sympathisch, was sich jedoch recht bald als Fassade erweist: Der Psychopath lockt die arglose Pam (Rose McGowan) in sein aufgepimptes Muscle Car und fährt sie und die anderen Girls mit einem Frontalcrash zu Tode. Als er sein Spiel bei einem anderen Trio wiederholen will, trifft er unerwartet auf Widerstand. "Pulp Fiction"-Kultregisseur Quentin Tarantinos Beitrag zum Grindhouse-Doppelschlag birst geradezu vor lässigen Dialogen, brachialer Gewalt und skurrilen Ideen. Neben spektakulären Autoverfolgungsjagden glänzt hier das vermeintlich schwache Geschlecht mit echter Frauenpower.

Dhoom 2 - Back in Action

 

Dhoom 2 - Back in Action

Deutsch Dolby Digital 2.0, Hindi Dolby Digital 5.1

Seit seine Frau ein Kind erwartet, ahnt der Polizist Jay Dixit, dass es Zeit ist, in punkto Draufgängerei ein wenig kürzer zu treten. Doch kann der beste nicht in Frieden Schreibtischdienst leisten, wenn draußen ein frecher Meisterdieb namens Mr. A Kronjuwelen am Meter plündert und den Behörden eine lange Nase nach der anderen dreht. Gemeinsam mit seinen Partnern, dem Ex-Knacki Ali und der Spezialagentin Shonali, folgt er dem Gegner über alle Kontinente bis zum finalen Showdown an der Copacabana.

This Is England

 

This Is England

Deutsch Dolby Digital 5.1, Englisch Dolby Digital 5.1

England in den frühen 80ern. Als der zwölfjährige Shaun mal wieder so einen richtigen Scheißtag erlebt, sind es ausgerechnet die in der Unterführung herumlungernden Skinheads, die ihn aufbauen und ihm eine Ersatzfamilie bieten. Zunächst orientiert sich Shaun an dem spaßorientierten Rüpel Woody, doch findet er bald einen interessanteren und gefährlicheren Ersatz-Daddy, als der rechtsnational gewirkte Combo aus dem Knast zurück kehrt und seine alte Führungsrolle in der Gang beansprucht.

Der verlorene Schatz der Tempelritter II

 

Der verlorene Schatz der Tempelritter II

Deutsch Dolby Digital 5.1, Dänisch Dolby Digital 5.1

Seit dem 14. Jahrhundert fechten auf den Ostseeinseln Mönche, Fürsten und Vitalienbrüder bzw. deren Rechtsnachfolger um die Lüftung bzw. Bewahrung des Geheimnisses des Templerorden. In der Gegenwart nun folgen die aufgeweckten Teenager Fie, Mathias, Nis und Katrine der Spur des Geheimnisses (und Katrines verschwundenem Vater) von Bornholm nach Gotland, wo ein alljährlich stattfindendes Mittelalter-Kostümspektakel gute und böse Jäger des verlorenen Schatzes zur Entscheidungsschlacht vereint.

K-M-P-D: Krass-Mann Police Departement

 

K-M-P-D: Krass-Mann Police Departement

Deutsch Dolby Digital 2.0 / 5.1

Hauptkommissar Rudi Krassmann schwört auf Kojaklollis und Ahoi-Brause während sein schießwütiger Kollege Trash kaukasisches Gras bevorzugt. Gemeinsam bilden sie das Rückrat der neu gegründeten Polizei -Specialeinheit K-M-P-D (Krass-Mann-Police-Department). Als unkonventionelles Duo werden die Beiden auf Fälle angesetzt, die sonst mit dem Stempel "haben wir weder Zeit noch Lust für " ad acta gelegt werden würden. Dabei treffen sie im ständigen Kampf gegen die Unterwelt und ihre eigenen Macken nicht nur im krimenellen Millieu auf die merkwürdigsten Typen.

Next

 

Next

Deutsch Dolby Digital 5.1, Englisch Dolby Digital 5.1

Der Magier und Hellseher Cris Johnson (Nicolas Cage) hat eine übersinnliche Gabe: Er kann tatsächlich vorhersehen, was in unmittelbarer Zukunft geschehen wird. Das ist gut fürs Geschäft und gut für mühelose Bargeldbesorgung. Denn Cris macht sich gerne einen Spaß daraus, sich - bei dem ein oder anderen finanziellen Engpass - seiner phänomenalen Fähigkeit am Black Jack-Tisch in Las Vegas zu bedienen. Das ruft irgendwann sogar die attraktive FBI-Agentin Callie Ferris (Julianne Moore) auf den Plan. Doch die interessiert nicht etwa für Cris’ paranormale Schummeleien am Spieltisch - sie braucht ihn für eine lebensbedrohliche Mission: Eine Terror-Organisation will nämlich auf Los Angeles einen Anschlag verüben - mit Atomwaffen! Die Atombombe tickt also - und Cris Johnson könnte der Schlüssel sein, um den nuklearen Holocaust zu verhindern. Denn wenn er seine Gabe nicht einsetzt, um durch die richtigen Zeitportale in die Vergangenheit zu reisen und damit die Gegenwart zu verändern, dann könnte seine Zukunft - und damit die Zukunft von hunderttausenden Menschen - schon bald der Vergangenheit angehören…

Dhoom 2 - Back in Action

 

Dhoom 2 - Back in Action

Deutsch Dolby Digital 2.0, Hindi Dolby Digital 5.1

Seit seine Frau ein Kind erwartet, ahnt der Polizist Jay Dixit, dass es Zeit ist, in punkto Draufgängerei ein wenig kürzer zu treten. Doch kann der beste nicht in Frieden Schreibtischdienst leisten, wenn draußen ein frecher Meisterdieb namens Mr. A Kronjuwelen am Meter plündert und den Behörden eine lange Nase nach der anderen dreht. Gemeinsam mit seinen Partnern, dem Ex-Knacki Ali und der Spezialagentin Shonali, folgt er dem Gegner über alle Kontinente bis zum finalen Showdown an der Copacabana.

Herzen

 

Herzen

Deutsch Dolby Digital 5.1, Französisch Dolby Digital 5.1

Nicole (Laura Morante) sucht mit Hilfe des Brokers Thierry (Andre Dussollier) nach einer gemeinsamen Wohnung für sie und ihren Verlobten Dan (Lambert Wilson), der seit seinem Rauswurf aus der Armee zum depressiven Alkoholiker wurde. Thierry hat ein Auge auf seine Kollegin geworfen, die religiöse Charlotte (Sabine Azema), die ihn zu erotischen Spielchen einlädt. Seine jüngere Schwester Gaelle (Isabelle Carre) sucht verzweifelt nach Liebe und gerät ausgerechnet durch eine Kontaktanzeige an Dan, auf den sie vergebens wartet.

Man nennt mich Bruce

 

Man nennt mich Bruce

Deutsch Dolby Digital 2.0, Englisch Dolby Digital 2.0

Ein junger Asiate folgt der Empfehlung seines siechen Großvaters und reist nach Amerika, um so viele heiße Frauen wie möglich zu vernaschen. Weil der vollendete Tölpel über eine gewisse Ähnlichkeit mit der Kung-Fu-Legende Bruce Lee verfügt und bei einigen Auseinandersetzungen unverschämtes Glück hat, hält ihn die Mafia für einen Superschläger und beauftragt in mit der Überführung einer größeren Menge Kokain von der West- an die Ostküste. FBI, Konkurrenz und schrille Zufallsbekanntschaften sind mit von der turbulenten Partie.

Shoppen

 

Shoppen

Deutsch Dolby Digital 5.1

Eine fast bombensichere Methode, Single zu bleiben, heißt "Speed-Dating". 18 Menschen nehmen an solch einem Kennenlern-Event teil. Neun Männer und neun Frauen sitzen sich gegenüber, um sich unter Zeitdruck optimal zu verkaufen und einen Partner zu finden. Sie suchen ein Date - und haben sonst nichts gemein. Man redet über Allergien, Cappuccino, Konsumverhalten, Linienbusse und Designerkleidung: Die Liste hanebüchener Verlegenheitsthemen ist lang. Doch noch hat keiner der einsamen Herzen die Hoffnung auf Romantik aufgegeben. Mit intelligenten Pointen und lockerem Humor ausgestattetes Portrait einer neuen Single-Generation. Die hippen Städter bergen hinter ihrer Fassade so manche romantische Vorstellung, verrät Regisseur Ralf Westhoffs Talent-Show der deutschen Schauspielszene.

The Last Minute

 

  • The Last Minute
  • Deutsch Dolby Digital 5.1, Englisch Dolby Digital 5.1
  • Billy Byrne ist der Shooting Star der hippen Londoner Kunstszene und als solcher gerngesehener Gast bei allerhand bizarren Medien- und Szenefestivitäten. Noch bevor er aber die Früchte des Ruhms ernten kann, werfen ihn schlechte Kritiken postwendend aus dem Rampenlicht, und Byrne, dessen Lebensgefährtin schon vorher das Weite suchte, muss sich plötzlich wieder auf der untersten Sprosse der gesellschaftlichen Leiter mit Diebesgesindel und gemeingefährlichen Drogendealern herum schlagen.

SqlBulkCopy Class (System.Data.SqlClient)

SqlBulkCopy Class (System.Data.SqlClient)
Lets you efficiently bulk load a SQL Server table with data from another source.

Namespace: System.Data.SqlClient
Assembly: System.Data (in system.data.dll)



Imports System.Data.SqlClient

Module Module1
Sub Main()
Dim connectionString As String = GetConnectionString()

' Open a connection to the AdventureWorks database.
Using sourceConnection As SqlConnection = _
New SqlConnection(connectionString)
sourceConnection.Open()

' Perform an initial count on the destination table.
Dim commandRowCount As New SqlCommand( _
"SELECT COUNT(*) FROM dbo.BulkCopyDemoMatchingColumns;", _
sourceConnection)
Dim countStart As Long = _
System.Convert.ToInt32(commandRowCount.ExecuteScalar())
Console.WriteLine("Starting row count = {0}", countStart)

' Get data from the source table as a SqlDataReader.
Dim commandSourceData As SqlCommand = New SqlCommand( _
"SELECT ProductID, Name, ProductNumber " & _
"FROM Production.Product;", sourceConnection)
Dim reader As SqlDataReader = commandSourceData.ExecuteReader

' Open the destination connection. In the real world you would
' not use SqlBulkCopy to move data from one table to the other
' in the same database. This is for demonstration purposes only.
Using destinationConnection As SqlConnection = _
New SqlConnection(connectionString)
destinationConnection.Open()

' Set up the bulk copy object.
' The column positions in the source data reader
' match the column positions in the destination table,
' so there is no need to map columns.
Using bulkCopy As SqlBulkCopy = _
New SqlBulkCopy(destinationConnection)
bulkCopy.DestinationTableName = _
"dbo.BulkCopyDemoMatchingColumns"

Try
' Write from the source to the destination.
bulkCopy.WriteToServer(reader)

Catch ex As Exception
Console.WriteLine(ex.Message)

Finally
' Close the SqlDataReader. The SqlBulkCopy
' object is automatically closed at the end
' of the Using block.
reader.Close()
End Try
End Using

' Perform a final count on the destination table
' to see how many rows were added.
Dim countEnd As Long = _
System.Convert.ToInt32(commandRowCount.ExecuteScalar())
Console.WriteLine("Ending row count = {0}", countEnd)
Console.WriteLine("{0} rows were added.", countEnd - countStart)

Console.WriteLine("Press Enter to finish.")
Console.ReadLine()
End Using
End Using
End Sub

Private Function GetConnectionString() As String
' To avoid storing the sourceConnection string in your code,
' you can retrieve it from a configuration file.
Return "Data Source=(local);" & _
"Integrated Security=true;" & _
"Initial Catalog=AdventureWorks;"
End Function
End Module

Sunday, November 25, 2007

RRD graph generation using rrdtool and rrd.cgi

RRD graph generation using rrdtool and rrd.cgi

OpenNMS

Main Page - OpenNMS

OpenNMS is the world's first enterprise grade network management platform developed under the open source model. It consists of a community supported open-source project as well as a commercial services, training, and support organization.
You should have read access to all content on this wiki, but you will need to register to add or edit pages, or upload files or images. OpenNMS is community supported, so you are welcome and encouraged to add content to this website. Your registration information will not be used outside of this wiki.
....

JRobin

Main Page - JRobin
Welcome to JRobin, a Java port of RRDTool by Sasa Markovic.
This is the much overdue new home of JRobin. The old pages will be migrated here as time allows:
Home
Library
JRobin API
Utilities
Support
About Us
Forum
The latest release of JRobin is 1.5.8 (released on 14/09/2007), which can be downloaded as a Maven dependency from OpenNMS repository:

...


org.jrobin
jrobin
1.5.8




opennms-repo
OpenNMS Repository
http://repo.opennms.org/maven2

false




Previous release of JRobin was 1.5.4, which can be downloaded through JRobin SourceForge project. For more info on older releases, see the news archive.
See also rrd4j, a Java 5 port of JRobin.

RRD4J :: RRDTool Choice for the Java World

rrd4j: RRD4J :: RRDTool Choice for the Java World :: Tutorial
IMPORTANT: The following tutorial was taken from RRDTool's web site in its unchanged form. RRD4J related comments are placed in separate light-blue boxes like this one.
In April 2004. I asked Alex van den Bogaerdt (author of this tutorial) for his permission to mirror his tutorial here, with some comments on my own, but I got no response from him. His text was not changed in any way, so I hope he will approve this sooner or later. 0:-)04/05/2007: This tutorial has been updated for RRD4J version 2.0.2
RRD4J is written by Sasa Markovic and Arne Vandamme as a pure Java alternative to Tobi's RRDTool set of command line utilities. RRD4J is a pure Java API (with a number of additional utilities) for RRD file handling and related graph creation.
....

rrd4j - 100% pure java implementation of RRDTool's functionality

rrd4j: Home

RRD4J is a 100% pure java implementation of RRDTool's functionality. It follows the same logic and uses the same data sources, archive types and definitions as RRDTool does. RRD4J supports all standard operations on Round Robin Database (RRD) files: CREATE, UPDATE, FETCH, LAST, DUMP, XPORT and GRAPH. RRD4J's API is made for those who are familiar with RRDTool's concepts and logic, but prefer to work with pure java. If you provide the same data to RRDTool and RRD4J, you will get exactly the same results and graphs. RRD4J is made from the scratch and it uses very limited portions of RRDTool's original source code. RRD4J does not use native functions and libraries, has no Runtime.exec() calls and does not require RRDTool to be present. RRD4J is distributed as a software library (jar files) and comes with full java source code (LGPL licence).
You will not understand a single thing here if you are not already familiar with RRDTool. Basic concepts and terms (such as: datasource, archive, datasource type, consolidation functions, archive steps/rows, heartbeat, RRD step, RPN, graph DEFs and CDEFs) are not explained here because they have exactly the same meaning in RRD4J and RRDTool. If you are a novice RRDTool/RRD4J user, this annotated RRDTool tutorial is a good place to start.
RRD4J and JRobin
RRD4J is a JDK 1.5 port of JRobin 1.5.3 (version not available on the JRobin website). Several major changes were introduced to make the API easier to use (Enums, Varargs, no more RrdException) and performance is up by 15 percent.
Why RRD4J?
Nothing can be compared with RRDTool. Period. Tobi Oetiker did such an excellent work that any attempt to write something similar to RRDTool will probably look pathetic.
Several years ago I used RRDTool for Internet traffic monitoring in a complex, commercial project. Front-end application (data sampling and validation) was written in Java, but RRDTool did all the hard work. No doubt that RRDTool is a wonderful and very useful tool especially for those inclined to pure C/C++ or scripting languages like Perl or PHP, but I am a Java addict since I discovered this superior programming language. Java does not prohibit usage of external tools, scripts and native libraries but such practice breaks the basic Java motto ("code once, run everywhere") and should be avoided whenever possible. Having finished some swift researches I was astonished that nobody tried to implement the same concept in pure Java. Even OpenNMS, excellent Java application for network monitoring used its own JNI library as a wrapper around RRDTool. And something that uses JNI will never become something that is easily portable - we are talking about different world here.
RRDTool raises some issues if you try to use it with Java. RRDTool is written in good old C, and at the present moment there is no complete, official, and bullet-proof Java interface to RRDTool functions. You have only several options:
To spawn RRDTool commands as external processes, through Runtime.exec() calls. I don't like it, because - it's not pure Java, and it's slow. Your application will have to carry the source code of RRDTool everywhere around and it has to be recompiled for different platforms. I used this approach in several of my applications and managed to crash Sun's JVM from time to time, usually under heavy loads ("an error has happened outside of JVM", that's all you'll get from dying JVM)
To use some native Java library as a wrapper for RRDTool functions. This approach is much faster than ordinary Runtime.exec() call.You could try my RRDJTool library or the library bundled with OpenNMS, but it's still not pure Java. And you will have a growing headache whenever your native library has to be moved from one platform to another.
To make things even worse, Runtime.exec() is probably the weakest and the most complicated part of the entire J2SE. It just looks simple, but to use it properly you'll have to read javadoc very carefully. It's surprisingly easy to write java code with Runtime.exec() which works well on Windows or Solaris, but crashes or blocks JVM on Linux. There are several excellent articles on the Web to help you with this issue, and this one is probably mandatory. But, sooner or later you'll end with a conclusion that support for external processes in Java is unnecessarily complicated and somewhat unnatural.
I choose deliberately to look pathetic, but I could not resist to create a complete, pure Java replacement for RRDTool. So, RRD4J is here. I'll try to make my point here:
RRD4J is a free software library (API) for RRD files management and graphing. RRD4J is not a set of command line utilities like RRDTool.
It comes with full source code (100% pure Java).
RRD4J guarantees the following: If you perform the same sequence of RRD create, update and fetch operations using RRDTool and RRD4J API, you will get exactly the same results. Without this feature, RRD4J would be pointless. However, we deliberately introduced some minor differences in data processing between RRD4J and RRDTool. We believe that in some rare special cases RRD4J should have more processing power than RRDTool.
RRD4J supports exactly the same data source types (COUNTER, ABSOLUTE, DERIVE, GAUGE) and consolidation functions (AVERAGE, MIN, MAX, LAST) as RRDTool does.
RRD4J API is written to be fully compatible with the syntax and logic of key RRDTool commands (update, fetch, graph). If you are familiar with RRDTool and Java, you will have no problem to use RRD4J API to manipulate RRD files.
RRD4J is made from the scratch. RRD4J is not a port of RRDTool's C source code to Java. In fact, RRDTool source code is used in RRD4J in very small doses (for example, for rollover detection with COUNTER data types, but even Tobi borrowed that part of the code from someone else ;)
RRD4J files have fixed sizes, as RRDTool files. However, RRD4J uses its own binary file format: you cannot use RRD4J API to manage RRDTool files and vice versa.
RRD4J RRD files are portable, RRDTool files are not. Try to copy a RRDTool file from Linux to Windows platform and fetch data from it. It does not work! But with RRD4J you are free to create your RRD files on Solaris and transfer them to Windows or Linux platform for further processing. It works! That is why I had to define my own file format which is different from the format used in RRDTool - there is no point in creating portable Java application backed by non-portable data files.
RRD4J uses the same XML format for RRD dump as RRDTool. You can dump your RRD4J file to an XML file which can be imported by RRDTool. And vice versa.
RRDTool is such a great tool because of its 'scripting' capabilities: graph and database definitions could be easily isolated from the source code. When you want to change the look of your RRDTool graphs, you don't have to recompile the whole source. At the present moment it is possible to create RRD4J RRD files and graphs starting from external XML template files. You change the template, not the source code when you want to change creation parameters of your RRD files and graphs.
RRD4J is a standalone Java library which supports DEF, CDEF, GPRINT, COMMENT and other important graph directives found in RRDTool's graph command (even RPN extensions). Thanks to Arne, RRD4J graphs now have almost the same look&feel like RRDTool graphs. To be honest, RRDTool is still a little more flexible, but just a little :) We plan to add more functionality and power to the graph.* package of RRD4J later but right now, we like it the way it is - it suits even complex everyday tasks we used to handle with RRDTool.
Performance issues
It would be quite unfair to compare RRD4J and RRDTool when it comes to benchmarks. RRDTool is written in C and you should not be surprised that C-code runs considerably faster than its Java counterpart. Things will get even worse if you try to use RRD4J in the most obvious but also the slowest way.
For example, here is the code to update the same RRD file 10.000 times in a row. It's really slow. It takes some 50 seconds (on my poor computer) to do the job on a RRD file with two datasources (named 'input' and 'output'), four AVERAGE and four MAX archives defined....

gdata-javascript-client.googlecode.com

Blog This - simple editor using the Blogger JavaScript API

Wednesday, November 21, 2007

SNMPTT

 

SNMPTT (SNMP Trap Translator) is an SNMP trap handler written in Perl for use with the Net-SNMP / UCD-SNMP snmptrapd program (www.net-snmp.org).

6/16/2007

SNMPTT v1.2 has been released

Various database improvements have been added such as support for proper date/time data types, statistics logging and custom columns. The formatting for unknown_trap_exec can now be changed and support has been added to MATCH for bitwise AND. A new log file has been added for logging system messages to a text file for users without access to syslog. Various bug fixes have been applied including support for Net-SNMP 5.4 traphandle, daemon mode pid file, REGEX captures, MATCH modifiers and others.

See the Change Log for more details

SNMPTT

Using COALESCE to Build Comma-Delimited String

 

Using COALESCE to Build Comma-Delimited String

Written by Garth Wells on 01 February 2001 | 21 Comments
Tagged with Application Design

Garth is back with another article. This one talks about building a comma-separated value string for use in HTML SELECT tags. It's also handy anytime you need to turn multiple records into a CSV field. It's a little longer and has some HTML but a good read.

I was reading the newsgroups a couple of days ago and came across a solution posted by Itzik Ben-Gan I thought was really smart. In order for you to understand why I like it so much I have to give you a little background on the type of applications I work on. Most of my projects for the past 2.5 years have focused on developing browser-based applications that access data stored in SQL Server. On almost all the projects I have worked on there has been at least one Add/Edit screen that contained a multi-select list box.

For those of you with limited experience working with HTML, I need to explain that the values selected in a multi-select list box are concatenated in a comma-delimited string. The following HTML creates a multi-select list box that displays retail categories.

<SELECT name="RetailCategory" multiple>
<OPTION value=1>Shoes
<OPTION value=2>Sporting Goods
<OPTION value=3>Restaurant
<OPTION value=4>Women's Clothes
<OPTION value=5>Toys
</SELECT>

If a user selects more than one option the value associated with RetailCategory is a comma-delimited string. For example, if the user selects Shoes, Women's Clothes and Toys, the value associate with RetailCategory is 1, 4, 5. When the user Submits their form I call a stored procedure to insert the data into the appropriate tables. The comma-delimited string is processed with a WHILE loop and the individual values are inserted into a dependent table.

Now that we have covered the Add part, let's take a look at what happens when a user wants to Edit a row. When editing a row, you need to populate the form with the existing values--this includes making sure all the multi-select list box values that are associated with the row are shown as selected. To show an option as selected, you use the "selected" attribute. If we were editing the row associated with the previous example the final HTML would look like the code shown here.

<SELECT name="RetailCategory" multiple>
<OPTION value=1 selected>Shoes
<OPTION value=2>Sporting Goods
<OPTION value=3>Restaurant
<OPTION value=4 selected>Women's Clothes
<OPTION value=5 selected>Toys
</SELECT>

I say final, because the actual HTML is built on-the-fly using VBScript. To determine which options are shown as selected, you must return a comma-delimited string to IIS so you can manipulate it with VBScript. I use the Split function and a For loop to determine which options should be shown as selected. The following VBScript shows how this is done.

<%
EmpArray = Split(rs("EmployeeList"))
For Each i In EmpArray
If rs2("Emp_UniqueID") = CInt(i) Then
response.write "selected"
End If
Next
%>

The remainder of this article shows the inefficient way I used to build the string along with the new, efficient way I learned from the newsgroup posting.

The Old, Inefficient Approach

Let's create and populate some tables so we have some data to work with. Assume you have a sales effort management (SEM) system that allows you to track the number of sales calls made on a potential client. A sales call is not a phone call, but a get together such as lunch or another type of person-to-person meeting. One of the things the VP of Sales wants to know is how many of his sales personnel participate in a call. The following tables allow you to track this information.

CREATE TABLE Employees
(
Emp_UniqueID smallint PRIMARY KEY,
Emp_FName varchar(30) NOT NULL,
Emp_LName varchar(30) NOT NULL,
)
go

CREATE TABLE SalesCalls
(
SalCal_UniqueID smallint PRIMARY KEY,
SalCal_Desc varchar(100) NOT NULL,
SalCal_Date smalldatetime NOT NULL,
)
go

CREATE TABLE SalesCallsEmployees
(
SalCal_UniqueID smallint NOT NULL,
Emp_UniqueID smallint NOT NULL,
)
go

A limited number of columns are used in order to make this article easier to digest. The SalesCallsEmployees table is a junction table (aka associative table) that relates the employees (sales personnel) to a particular sales call. Let's populate the tables with sample data using these INSERT statements.

INSERT Employees VALUES (1,'Jeff','Bagwell')
INSERT Employees VALUES (2,'Jose','Lima')
INSERT Employees VALUES (3,'Chris','Truby')
INSERT Employees VALUES (4,'Craig','Biggio')

INSERT SalesCalls VALUES (1,'Lunch w/ John Smith','01/21/01')
INSERT SalesCalls VALUES (2,'Golfing w/ Harry White','01/22/01')

INSERT SalesCallsEmployees VALUES (1,1)
INSERT SalesCallsEmployees VALUES (1,2)
INSERT SalesCallsEmployees VALUES (1,4)
INSERT SalesCallsEmployees VALUES (2,2)

The first sales call (Lunch w/ John Smith) had three employees participate. Using the old approach, I used the code shown here (inside a stored procedure) to build the comma-delimited string. The resultset shows the output when the "Lunch w/ John Smith" sales call is edited.

DECLARE @Emp_UniqueID int,
@EmployeeList varchar(100)

SET @EmployeeList = ''

DECLARE crs_Employees CURSOR
FOR SELECT Emp_UniqueID
FROM SalesCallsEmployees
WHERE SalCal_UniqueID = 1

OPEN crs_Employees
FETCH NEXT FROM crs_Employees INTO @Emp_UniqueID

WHILE @@FETCH_STATUS = 0
BEGIN
SELECT @EmployeeList = @EmployeeList+CAST(@Emp_UniqueID AS varchar(5))+ ', '
FETCH NEXT FROM crs_Employees INTO @Emp_UniqueID
END

SET @EmployeeList = SUBSTRING(@EmployeeList,1,DATALENGTH(@EmployeeList)-2)

CLOSE crs_Employees
DEALLOCATE crs_Employees

SELECT @EmployeeList

--Results--

---------
1, 2, 4

This code may look a little complicated, but all it's doing is creating a cursor that holds the Emp_UniqueID values associated with the sales call and processing it with a WHILE to build the string. The important thing for you to note is that this approach takes several lines of code and uses a cursor. In general, cursors are considered evil and should only be used as a last resort.

The New and Improved Approach

The new and improved approach can create the same resultset with a single SELECT statement. The following code shows how it's done.

DECLARE @EmployeeList varchar(100)

SELECT @EmployeeList = COALESCE(@EmployeeList + ', ', '') +
CAST(Emp_UniqueID AS varchar(5))
FROM SalesCallsEmployees
WHERE SalCal_UniqueID = 1

SELECT @EmployeeList

--Results--

---------
1, 2, 4

The COALESCE function performs the magic here. When @EmployeeList is NULL (the first row processed), it returns an empty string. On subsequent rows, it concatenates the @EmployeeList value with a comma and the current @Emp_UniqueID value

Using COALESCE to Build Comma-Delimited String - SQLTeam.com

Another Dynamic SQL CrossTab Stored Procedure

Another Dynamic SQL CrossTab Stored Procedure

First off, before going any further make sure you have read the hall of fame SQLTeam article by Rob Volk on generating crosstab results using a flexible, dynamic stored procedure that has been viewed over 100,000 times!  This entire concept and pretty much all of the ideas I've had regarding this topic and this techinique in general are all due to Rob's great work and his very clever stored procedure.

It must be crosstab season or something, because lately I've been getting quite a few emails and comments about an alternative stored procedure that I've posted in the comments to that article that has been helping quite a few users.   To potentially help others out there with this common request (which I still feel should be mostly done at the presentation layer, but I suppose it's not always possible) here's a quick recap/reprint of my adaptation of Rob's excellent idea and some notes.

The main difference between Rob's original stored procedure and mine are that

  • you can summarize multiple values
  • it only creates columns based on your actual select statement ( not based on all rows in a table)
  • it works fine for multi-users (no global temp tables)
  • it allows you to easily specify default values for your pivots

Note that if you read the comments from the article, you'll see lots of modifications and adaptations of Rob's original that do address some of these issues, but I am proud of the brevity and flexibility of my code and I feel that it works well and is easily modified (see the end of this article for one idea).  Depending on your needs, it may be useful to incorporate some of the other ideas presented in the article and the comments, so be sure to do some research if necessary or if you are interested in learning more.

First, here's the code for the procedure:


create procedure CrossTab (@Select varchar(1000),

    @PivotCol varchar(100),

@Summaries varchar(100),

@GroupBy varchar(100),

@OtherCols varchar(100) = Null)

AS

set nocount on

set ansi_warnings off

declare @Vals varchar(8000);

set @Vals = '';

set @OtherCols= isNull(', ' + @OtherCols,'')

create table #temp (Pivot varchar(100))

insert into #temp

exec ('select distinct convert(varchar(100),' + @PivotCol + ') as Pivot FROM (' + @Select + ') A')

select @Vals = @Vals + ', ' +

replace(replace(@Summaries,'(','(CASE WHEN ' + @PivotCol + '=''' +

Pivot + ''' THEN '),')[', ' END) as [' + Pivot )

from #Temp
order by Pivot

drop table #Temp

exec ( 'select ' + @GroupBy + @OtherCols + @Vals +

' from (' + @Select + ') A GROUP BY ' + @GroupBy)

set nocount off

set ansi_warnings on


And here's a description of the parameters and how to use it:

  • Select - This is the SQL statement or table you are querying. It can be any valid SELECT statement, with JOINS, WHERE clauses, TOP, etc -- anything that you can cut and paste into query analyzer and execute.  (And, in fact, you should always do this when testing things out).
  • PivotCol - This is the column (or a valid expression) that you wish to pivot on.
  • Summaries - The summaries you wish to perform. Note that this is plural; you can summarize multiple columns if you wish.  See below for more information.
  • GroupBy - This is the list of the non-pivot columns you wish to group by and return, separated by commas.
  • OtherCols (optional) - Any other columns to return that you are not grouping by, also separated by commas. Make sure that this list does not contain references to columns that are not being summarized or grouped.

Here's the format you should use when specifying the Summaries parameter:

SUM(Field ELSE DefaultValue)[Prefix], ....

First, list the aggregate function you wish to use, and within that function put the column you wish to summarize, and add an ELSE clause with what that column's default value is. For example, put 0 if you wish to display all 0's for empty columns, or NULL if you wish to display nulls.

Next, immediately following the aggregate function (with no spaces) put the prefix for the column name in brackets. This is what will be appended to the beginning of the column name, followed by the value from the pivot column. Leave as [] to just use the pivot column's value as the field name.

Finally, you may have multiple summaries just seperate them by comma's. Remember if you have many pivot values, you will probably end up with too many columns and/or a T-SQL statement > 8000 characters so you may get an error.

Examples:

If the pivot column is "Employee", with values of 001, 002, 003 and 004:

SUM(Hours ELSE 0)[]

returns column headings of 001, 002, 003, 004, and returns a 0 in all "empty" fields.

SUM(Hours ELSE 0)[Hours], MAX(Date ELSE Null)[MaxDate]

returns column headings of Hours001, MaxDate001, Hours002, MaxDate002, Hours003, MaxDate003, ..etc ...

SUM(Amount ELSE Null)[]

returns column headings of 001,002,003,004 and returns a NULL in all "empty" fields.  Note that you can use SUM(Amount)[] as a shortcut, since ELSE NULL is redundant and is the default behavior.

SUM(Amount ELSE 0)[Amount], COUNT(Amount)[Qty]

returns column headings of Amount001, Qty001, Amount002, Qty002, ... etc ...


Here are some samples using either Northwind or Pubs:

exec CrossTab

'SELECT LastName, OrderDate FROM northwind..Employees Employees INNER JOIN northwind..Orders Orders ON (Employees.EmployeeID=Orders.EmployeeID) ',

'Year(OrderDate)',

'Count(LastName)[]',

'LastName'

exec CrossTab

'select titles.*, stores.stor_name, sales.qty, sales.stor_id from pubs..titles titles

inner join pubs..sales sales on

(sales.title_id=titles.title_id)

inner join pubs..stores stores on sales.stor_id = stores.stor_id ',

'stor_id',

'SUM(qty ELSE 0)[Qty], MAX(stor_name ELSE '''')[MaxStoreName], COUNT(1 ELSE 0)[Count]',

'title',

'Count(*) as TotalCount'


Modification Ideas

A common problem with these procedures is when there are too many columns and the SQL statement stored in the variable ends up with a length of more than 8000 characters, causing truncation problems and syntax errors.

Click here for a modification of the stored procedure which allows you to extend the length of the SQL that can be generated fairly easily that seems to work well:

Another Dynamic SQL CrossTab Stored Procedure

Performance Research, Part 2: Browser Cache Usage - Exposed!

Performance Research, Part 2: Browser Cache Usage - Exposed! » Yahoo! User Interface Blog

Best Practices for Speeding Up Your Web Site

Best Practices for Speeding Up Your Web Site

Tuesday, November 20, 2007

Regular Expressions in T-SQL

Regular Expressions in T-SQL - SQLTeam.com

A set of ADO classes - version 2.20

A set of ADO classes - version 2.20 - The Code Project - Database

xp_pcre - Regular Expressions in T-SQL - The Code Project - Database

xp_pcre - Regular Expressions in T-SQL - The Code Project - Database

SQLskills Whitepaper: SQL Server DBA Guide to the SQLCLR

SQLskills Whitepaper: SQL Server DBA Guide to the SQLCLR
The Database Administrator’s Guide to the SQL Server Database Engine .NET Common Language Runtime Environment

Regular Expressions in T-SQL

Ken Henderson's WebLog : Regular Expressions in T-SQL

SQL Server 2005: CLR Integration : Working with Regular Expressions

SQL Server 2005: CLR Integration : Working with Regular Expressions

SQLCLR - Create CLR User-Defined Function ( UDF ) - Check Constraint on EmailAddress Column Using RegEx

SQLCLR - Create CLR User-Defined Function ( UDF ) - Check Constraint on EmailAddress Column Using RegEx

Implementing Remote Calling Without Using AJAX

Creating an In-Memory Database Using XML and XPath

15 Seconds : Creating an In-Memory Database Using XML and XPath -- Part 1

ASP URL Rewriting like MOD_Rewrite

Best Coding Practices - ASP URL Rewriting like MOD_Rewrite

Tigerland

 

Tigerland
Tigerland.German.2000.AC3.DVDRiP.iNTERNAL.XViD
-
Tigerland
-
1971. Die amerikanische Nation wird durch den eskalierenden Krieg in Vietnam geteilt. Tausende junger Amerikaner liegen tot im Dreck eines fremden Landes, und in Fort Polk, Louisiana, bereiten sich tausende weitere Soldaten darauf vor, ihnen Gesellschaft zu leisten. Der Schatten des Kriegs hängt über den Männern der A-Company des zweiten Platoons, als sie die letzten Hürden des Infanterietrainings nehmen. Sie werden in den Krieg geschickt, und jeder geht mit diesen Aussichten anders um...
-
IMDb: klick | File: XViD | Größe: 700 MB

The Sentinel - Wem kannst du trauen?

 

The Sentinel - Wem kannst du trauen?
The.Sentinel.German.2006.DVDRIP.XVID.iNTERNAL-MFi
-
The Sentinel - Wem kannst du trauen?
-
Pete Garrison ist eine Legende im Secret Service. Vor über 20 Jahren warf er sich in die Kugeln eines Attentäters und rettete so dem Präsidenten das Leben. In seinem Job ist Instinkt oft alles. Als jedoch ein Mordkomplott gegen den Präsidenten auffliegt bekommt Garrisons ehemaliger Schützling David Breckinridge den Fall zugewiesen.
-
IMDb: klick | File: XViD | Größe: 700 MB

Surf School

 

Surf School
Surf.School.German.2006.DVDRiP.XViD-RETR0
-
Surf School
-
Jordan ist der neue Typ an der Laguna Beach Highschool, wo alle auf Surfen stehen. Ständig nimmt ihn der Lokalbösewicht Tyler auf den Arm und stempelt ihn zum Außenseiter ab. Jordan wird von der Mehrheit seiner Mitschüler gemieden und auch nicht zum exklusiven Frühjahrsferientrip eingeladen.
Um surfen zu lernen rekrutieren sie den mit allen Wassern gewaschenen Surfstar Rip. Sie fangen an sich auf einen Wettkampf mit dem arroganten Tyler und seiner Gang vorzubereiten.
-
IMDb: klick | File: XViD | Größe: 700 MB

Begotten

 

Begotten
Begotten.1991.Uncut.XViD.DVDRiP
-
Begotten
-
Düsternis bricht über den Bildschirm herab. Grobkörnige, zitterige Schwarzweiß-Bilder, so ursprünglich und erschreckend, wie irreal und verstörend. Schier abschreckend. Überall Schatten, überall Unklarheiten, nirgendwo Dialog. Dann sehen wir eine in Laken gehüllte Kreatur, die von den Credits als "God Killing Himself" identifiziert wird. Dieses Wesen erbricht seine Gedärme, und schneidet seinen Leib in einer quälend langen Einstellung auf. Aus dem kaum erkennbaren Mischmasch aus Blut, Fleisch und Gott entsteht eine zweite Kreatur, diesmal "Mother Earth", die, sich den Busen haltend, durch die verstörende Umgebung läuft. Nach ihrer Reise durch erschreckende Bildhintergründe entnimmt sie dem erigierten Geschlechtsorgan eines anderen Gottes den Samen und befruchtet sich selbst. Sie gebiert "Son of Earth - Flesh on Bone", der draußen in der Wüste von Nomaden-artigen Wesen gefoltert und zerstückelt wird.
-
IMDb: klick | File: XViD | Größe: 700 MB

Being Julia

Being Julia
Being.Julia.GERMAN.DVDRiP.XViD-GWL
-
Being Julia
-
Im London der späten 30er feiert die Schauspielerin Julia Lambert (Annette Bening) auf der Bühne einen Triumph nach dem anderen, während im Privatleben die Ehe mit dem Theateragenten Michael Gosselyn (Jeremy Irons) längst jeden Reiz verloren hat. Da trifft es sich gut, als der junge Amerikaner Tom Fennel (Shaun Evans) auf der Bildfläche erscheint, sich als Julias größter Fan zu erkennen gibt und gegen eine heiße Affäre mit dem doppelt so alten Star wenig einzuwenden hätte. Als sich jedoch herausstellt, dass er Julia nur für seine Zwecke benutzt, nimmt kühl kalkulierte Rache ihren Lauf.
-
IMDb: klick | File: XViD | Größe: 700 MB

Verliebt in eine Hexe

 

Verliebt in eine Hexe
Verliebt.in.eine.Hexe.German.2005.DVDRiP.XViD
-
Verliebt in eine Hexe
-
Schauspieler Jack Wyatt (Will Ferrell) hat schon bessere Tage gesehen, als ihm das Schicksal quasi als letzten Strohhalm die männliche Hauptrolle im Remake der beliebten TV-Show "Verliebt in eine Hexe" in den Schoß weht. Jetzt braucht er nur noch eine Partnerin, die ihm hoffentlich nicht die Show stiehlt, in der alten Serie wurde der Hauptdarsteller nämlich mal ausgewechselt. In der schönen Zufallsbekanntschaft Isabel (Nicole Kidman) wird er fündig - ohne zu ahnen, dass er vor einer richtigen Hexe auf der Suche nach bürgerlicher Normalität und mit starken Entzugserscheinungen steht.
-
IMDb: klick | File: XViD | Größe: 700 MB

This Code Goes to Eleven: Rewriting URLs in ASP.NET without using ISAPI.

This Code Goes to Eleven: Rewriting URLs in ASP.NET without using ISAPI.

Uro - Brutalität hat einen neuen Namen...

 

Uro - Brutalität hat einen neuen Namen...

Deutsch Dolby Digital 5.1, Norwegisch Dolby Digital 5.1

Der aus desolaten Familienverhältnissen stammende Hans-Peter ist Mitglied eines eingeschwornen Polizeiteams namens URO und in dieser Funktion Drogendealern auf der Spur. Als er im Zuge seiner Arbeit auf seine ehemalige Schulfreundin Mette trifft, verliebt er sich in das Mädchen, obwohl Mette die Tochter eines stadtbekannten Gangsterbosses ist. Mit Hilfe von Mette und dem Dealer Marco gelingt es ihm, die Bande zu unterwandern, doch weil er eigenmächtig vorgeht, gibt's bald Ärger mit den eigenen Leuten.

The Cold Hour

 

The Cold Hour

Deutsch Dolby Digital 5.1, Spanisch Dolby Digital 5.1

In einem Silo unter der Erde kauern die letzten Überlebenden des dritten Weltkriegs und harren ihres baldigen Todes aufgrund von akutem Nahrungs- und Medikamentemangel. Heraus kann man nicht, weil die Oberfläche bevölkert ist von verseuchten Kriegsopfern, deren Berührung unweigerlich zur Ansteckung führt. Außerdem gibt es da noch jene unruhigen Seelen, die Nachts durch die Gänge streifen und die Temperaturen auf Eiseskälte fallen lassen. Ein aufgeweckter Knabe will ihr Geheimnis lüften.

Shoppen

 

Shoppen

Deutsch Dolby Digital 5.1

Eine fast bombensichere Methode, Single zu bleiben, heißt "Speed-Dating". 18 Menschen nehmen an solch einem Kennenlern-Event teil. Neun Männer und neun Frauen sitzen sich gegenüber, um sich unter Zeitdruck optimal zu verkaufen und einen Partner zu finden. Sie suchen ein Date - und haben sonst nichts gemein. Man redet über Allergien, Cappuccino, Konsumverhalten, Linienbusse und Designerkleidung: Die Liste hanebüchener Verlegenheitsthemen ist lang. Doch noch hat keiner der einsamen Herzen die Hoffnung auf Romantik aufgegeben. Mit intelligenten Pointen und lockerem Humor ausgestattetes Portrait einer neuen Single-Generation. Die hippen Städter bergen hinter ihrer Fassade so manche romantische Vorstellung, verrät Regisseur Ralf Westhoffs Talent-Show der deutschen Schauspielszene.

Man nennt mich Bruce

 

Man nennt mich Bruce

Deutsch Dolby Digital 2.0, Englisch Dolby Digital 2.0

Ein junger Asiate folgt der Empfehlung seines siechen Großvaters und reist nach Amerika, um so viele heiße Frauen wie möglich zu vernaschen. Weil der vollendete Tölpel über eine gewisse Ähnlichkeit mit der Kung-Fu-Legende Bruce Lee verfügt und bei einigen Auseinandersetzungen unverschämtes Glück hat, hält ihn die Mafia für einen Superschläger und beauftragt in mit der Überführung einer größeren Menge Kokain von der West- an die Ostküste. FBI, Konkurrenz und schrille Zufallsbekanntschaften sind mit von der turbulenten Partie.

Herr Bello

 

Herr Bello

Deutsch Dolby Digital 5.1 / DTS 5.1

Sie sind ein eingespieltes Team: Der verwitwete Apotheker Sternheim (August Zirner) und sein zwölfjähriger Sohn Max (Manuel Steitz). Mit Unterstützung der neuen Nachbarin Verena Lichtblau (Sophie von Kessel) erfüllt Sternheim seinem Max dessen größten Wunsch und schenkt ihm einen Hund. Max tauft den liebenswerten Mischling Bello. Als der Vater in seinem Laden eine Flasche mit geheimnisvollem blauem Inhalt zerbricht, trinkt der Vierbeiner davon und verwandelt sich in einen Menschen. Doch "Herr Bello" (Armin Rohde) hat noch die Manieren eines Hundes. Familientaugliche und begeisternde Unterhaltung haben Ben Verbong, Paul Maar und Ulrich Limmer bereits mit den beiden "Sams"- Filmen abgeliefert. Mit dem gleichen Elan und Humor nimmt sich das Trio diese klassische Family Fantasy vor.

Der verlorene Schatz der Tempelritter II

 

Der verlorene Schatz der Tempelritter II

Deutsch Dolby Digital 5.1, Dänisch Dolby Digital 5.1

Seit dem 14. Jahrhundert fechten auf den Ostseeinseln Mönche, Fürsten und Vitalienbrüder bzw. deren Rechtsnachfolger um die Lüftung bzw. Bewahrung des Geheimnisses des Templerorden. In der Gegenwart nun folgen die aufgeweckten Teenager Fie, Mathias, Nis und Katrine der Spur des Geheimnisses (und Katrines verschwundenem Vater) von Bornholm nach Gotland, wo ein alljährlich stattfindendes Mittelalter-Kostümspektakel gute und böse Jäger des verlorenen Schatzes zur Entscheidungsschlacht vereint.

Der Calamari Wrestler

 

Der Calamari Wrestler

Deutsch Dolby Digital 2.0, Japanisch Dolby Digital 2.0

Koji Taguchi, frischgebackener Champion des japanischen Ringerverbandes, sieht der Herausforderung seines Lebens entgegen, als eines Tages ein tadellos japanisch parlierender, mannshoher Oktopus den Ring besteigt und dem menschlichen Kontrahenten vor laufenden TV-Kameras eine demütigende Lektion erteilt. Doch nicht genug damit, dass der "Calamari Wrestler" Koji sportlich heraus forderte und ihm Fans abspenstig macht: Obendrein interessiert sich der Kopffüßler auch auffallend für Kojis junge Frau.

Das Kovak Labyrinth

 

Das Kovak Labyrinth

Deutsch Dolby Digital 5.1 / DTS 5.1, Englisch Dolby Digital 5.1

David Norton, amerikanischer Autor vielgelesener Science-Fiction-Stories, reist nach Mallorca zur Schriftstellerkonferenz, doch wird sein Aufenthalt überschattet vom Freitod seiner Lebensgefährtin, die sich nach einem mysteriösen Telefonanruf scheinbar grundlos aus dem nächsten Hotelfenster stürzt. Norton forscht nach und erhält Unterstützung von einer jungen Frau, die einen ähnlichen Anruf bekam, ihren Sprung überlebte und nun von Unbekannten verfolgt wird. Verblüffenderweise führt die Spur direkt in Nortons literarisches Werk.

Crash Test Dummies

 

Crash Test Dummies

Deutsch Dolby Digital 5.1, Englisch Dolby Digital 5.1, Rumänisch Dolby Digital 5.1

Das junge rumänische Pärchen Ana (Maria Popistasu) und Nicolae (Bogdan Dumitrache) reist nach Wien. Sie sollen dort einen gestohlenen Wagen überstellen und so zum schnellen Geld kommen. Kaum in der Stadt, löst sich der "Auftrag" in Luft auf und beide sitzen mittellos fest. Nach einem Streit sucht jeder das Glück auf eigenem Wege. Ana trifft Kaufhausdetektiv Jan (Simon Schwarz), der mit Martha (Kathrin Resetarits) zusammenlebt und unter Trennungsschmerz leidet. Nicolae freundet sich mit der lebenslustigen Dana (Viviane Bartsch) an.

Cookers - Tödlicher Wahn (FSK18)

 

Cookers - Tödlicher Wahn (FSK18)

Deutsch Dolby Digital 2.0, Englisch Dolby Digital 2.0

Drei Cristal-Meth-Süchtige auf der Flucht verschanzen sich auf einem Bauernhof. Die Dinge auf dem Hof werden schnell sonderbar für das Trio, weil Sie beginnen, Furcht erregende und gräßliche Erscheinungen zu sehen. Ist der es der übermässige Drogenkonsum, oder passieren dort wirklich Dinge., welche die Drei an Ihrem Verstand zweifeln lassen? Von da an nimmt der blutige Horror seinen Lauf. Auf mehreren Fantasyfestivals ausgezeichneter Horror-Albtraum.

BloodRayne 2: Deliverance (FSK18)

 

BloodRayne 2: Deliverance (FSK18)

Deutsch Dolby Digital 5.1, Englisch Dolby Digital 5.1

Noch ist Deliverance ein verschlafener Kuhweiler im Wilden Westen, doch das soll sich ändern, wenn erst die Eisenbahnstrecke das Nest erreicht. Vorboten sind bereits eingetroffen in Gestalt von Billy the Kid und seiner wilden Horde vampirisierter Revolverhelden. Die nehmen Deliverance in Beschlag, töten nach Gusto und entführen alle Kinder. Da eilt aus großer Ferne die schöne Rayne herbei. Die besitzt alle Stärken der Vampire, aber keine ihrer Schwächen, und hat mit Kid noch eine jahrhundertealte Rechnung offen.

Alle nennen mich Bruce

 

Alle nennen mich Bruce

Deutsch Dolby Digital 2.0

Der Koreaner Bruce sucht in Amerika nach seinem einstigen Lebensretter, dem G.I. Brown. Mit heiliger Einfalt gerät er dabei in verquere Abenteuer. Er wird ohne einschlägige Kenntnisse Leiter einer Karateschule, hält einen Gangsterboß für den Gesuchten, verliebt sich in eine Prostituierte, nimmt sich väterlich eines Waisenknaben an, muß sich in einem Karatekampf bewähren und findet seinen Retter schließlich in einem fürsorglichen Polizisten.

Subinterface link status logging

 

If you're still stuck with frame-relay connections (or use them in test environment, because it's easy to set up any-to-any connectivity between a larger number of routers), you were probably used to subinterface logging events reporting when the line protocol on a point-to-point subinterface would go up or down based on LMI DLCI status.
Very quietly, these logging events disappeared, first on 7500-series routers in IOS release 12.1(14), now they're gone by default on all platforms. If you still want to see what's going on with your frame-relay subinterfaces, you have to enter logging event subif-link-status configuration command on every subinterface.
I can only guess that some people that used the syslog events for network management were very surprised by the first (undetected) frame-relay failure following an IOS upgrade :)

Managing your routers with HTTP ... more information

If you've found the description of how to store your router configuration on a web server interesting, you'll probably enjoy the full article documenting the step-by-step solution including the web server configuration.

ANSI to Unicode by Lewis E. Moten III

ANSI to Unicode by Lewis E. Moten III



'************************************** ' Name: ANSI to Unicode
' Description:Converts from ANSI to Unic
' ode very fast. Inspired by code found in
' UltraFastAspUpload by Cakkie (on PSC). T
' his should work slightly faster then Cak
' kies due to how some of the code has bee
' n arranged.
' By: Lewis E. Moten III
'
'This code is copyrighted and has ' limited warranties.Please see http://w
' ww.Planet-Source-Code.com/vb/scripts/Sho
' wCode.asp?txtCodeId=7266&lngWId=4 'for details. '**************************************

<%
' make a sample binary string of 2000 ra
' ndom letters
Dim test
Dim c
For i = 1 to 2000
c = 65 + Int(Rnd * 25)
test = test & ChrB(AscB(Chr(c)))
If i Mod 4 = 0 Then
test = test & ChrB(AscB(" "))
End If
Next
Response.Write ANSIToUnicode(test)
Function ANSIToUnicode(ByRef pbinBinaryData)
Dim lbinData ' Binary Data (ANSI)
Dim llngLength ' Length of binary data (byte count)
Dim lobjRs ' Recordset
Dim lstrData ' Unicode Data
' VarType Reference
'8 = Integer (this is expected var type)
'17 = Byte Subtype
' 8192 = Array
' 8209 = Byte Subtype + Array

Set lobjRs = Server.CreateObject("ADODB.Recordset")
If VarType(pbinBinaryData) = 8 Then
' Convert integers(4 bytes) to Byte Subtype Array (1 byte)
llngLength = LenB(pbinBinaryData)
If llngLength = 0 Then
lbinData = ChrB(0)
Else
Call lobjRs.Fields.Append("BinaryData", adLongVarBinary, llngLength)
Call lobjRs.Open()
Call lobjRs.AddNew()
Call lobjRs.Fields("BinaryData").AppendChunk(pbinBinaryData & ChrB(0)) ' + Null terminator
Call lobjRs.Update()
lbinData = lobjRs.Fields("BinaryData").GetChunk(llngLength)
Call lobjRs.Close()
End If
Else
lbinData = pbinBinaryData
End If
' Do REAL conversion now!
llngLength = LenB(lbinData)
If llngLength = 0 Then
lstrData = ""
Else
Call lobjRs.Fields.Append("BinaryData", adLongVarChar, llngLength)
Call lobjRs.Open()
Call lobjRs.AddNew()
Call lobjRs.Fields("BinaryData").AppendChunk(lbinData)
Call lobjRs.Update()
lstrData = lobjRs.Fields("BinaryData").Value
Call lobjRs.Close()
End If

Set lobjRs = Nothing
ANSIToUnicode = lstrData

End Function
%>

Best Coding Practices - ASP Post data to URL

Best Coding Practices - ASP Post data to URL


The first time I needed this function it was for posting data to Authorize.net for payment processing but there are many uses. The only caveat is the data sent must be formatted correctly. I've given a simple example of how it's used also.

Here it is:

Code:
Function PostTo(Data, URL)
Dim objXMLHTTP, xml
On Error Resume Next
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
xml.Open "POST", URL, False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xml.Send Data
If xml.readyState <> 4 then
xml.waitForResponse 10
End If
If Err.Number = 0 AND http.Status = 200 then
PostTo = xml.responseText
else
PostTo = "Failed"
End If
Set xml = Nothing
End Function

PostData = "encoding=UTF-8&firstname=" & firstname & "&lastname=" & lastname & "&email=" & email & ""
rslt = PostTo(PostData,"http://www.myurl.com/formhandler.asp")