Codes from Developers

Delphi

log,failed,assertions,event,log,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#

c#,bitwise,operations

This Code Shows How to Illustrate Bitwise Operations


C#

c#,combine,delegate,delegates

This Code Combines Two Delegates


C#

c#,event,interface

This Code Shows How to IIlustrate Handling an Event Declared in an Interface


Java

Get,Current,Time,java

Get The Current Time in java


JavaScript

input,check,checked,status,get,set,prop,checkbox

This code show how to get check status or set check status for checkbox controls.


Delphi

Bounds,routine,TRect,object,deplhi

This example illustrates how to use the Bounds routine to assign coordinates to a TRect object


PHP

Timer,class,that,uses,microtime,provide,easy,calculation,elapsed,times,php

Timer - a class that uses microtime() to provide easy calculation of elapsed times in PHP


Delphi

FishFacts,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,php

Google like search function with bolded search terms in PHP


PHP

Add,Edit,Update,All,in,one,Contact,Management,Form,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

focus,end,js,focus,place,caret,at,end

this code will let you move caret at the end of text, focus end of text


CSS HTML JavaScript

resize,image,base64,javascript

This code block resizes base64 image on client side using javascript


PHP

Check,number,characters,range,php

Check number of characters in a range in php


Delphi

use,of,ADO,for,database,conectivity,delphi

This example demostrates the use of ADO for database conectivity. The example assumes that a TDBGrid is placed on the form.


C#

c#,binary,search,tree,linked,list

This Code Implements Binary Search Tree using Linked List


Java

Using,layout,managers,java

Using layout managers in Java


Delphi

ancestry,component,ClassType,ClassParent,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

Authenticator,with,Cookies,and,Redirect

An Authenticator with Cookies and Redirect in php


JavaScript

store,transfer,data,between,page,over,javascript

Here is how you can transfer a value between pages over javascript