Delphi
The following code is a self-contained unit that you can add to a project that logs failed assertions to the event log rather than raising an exception. If /Debug is passed to the application as a command-line parameter, all failed Assert calls cause a call to OutputDebugString, which sends a messages to the Event Log window if run from Delphi, or does nothing if run outside the IDE (OutputDebugString is a no-op if not run from within a debugger). A nice side benefit is that all the line numbers and unit names can be stripped from the EXE by turning off assertions and rebuilding the project. Build the executable in the IDE by pressing Run. Then go to the debug directory for the project and execute the command line "AssertErrorProc_proj /Debug". Note: AssertErrorHandler should do as little as possible. This routine does no cleanup and no variables. Procedure calls are OK. Note: This example was originally provided by Brian Long.
C#
This Code Shows How to Illustrate Bitwise Operations
C#
This Code Combines Two Delegates
C#
This Code Shows How to IIlustrate Handling an Event Declared in an Interface
Java
Get The Current Time in java
JavaScript
This code show how to get check status or set check status for checkbox controls.
Delphi
This example illustrates how to use the Bounds routine to assign coordinates to a TRect object
PHP
Timer - a class that uses microtime() to provide easy calculation of elapsed times in PHP
Delphi
The following example copies the data in the Graphic field of Table1 or SQLDataSet1 to the Pictures field of ClientDataSet1.
PHP
Google like search function with bolded search terms in PHP
PHP
Add, Edit & Update All in one Contact Management Form
Here is a fun example on how to use functions to squeeze the most out of one page. This page lists users, adds users and edits users.
JavaScript
this code will let you move caret at the end of text, focus end of text
CSS
HTML
JavaScript
This code block resizes base64 image on client side using javascript
PHP
Check number of characters in a range in php
Delphi
This example demostrates the use of ADO for database conectivity. The example assumes that a TDBGrid is placed on the form.
C#
This Code Implements Binary Search Tree using Linked List
Java
Using layout managers in Java
Delphi
This example shows how to obtain the ancestry of a component using the ClassType and ClassParent properties. It uses a button and a list box on a form. When you click the button, the name of the button's class and the names of its parent classes are added to the list box.
PHP
An Authenticator with Cookies and Redirect in php
JavaScript
Here is how you can transfer a value between pages over javascript
Contact Us