Do you know this example tricks?

Php / Graphics

Simple class that uses GD to draw pie charts

Java / Threads

Pause the execution

Delphi / ADO Database

Informix support

JavaScript Tutorial / Drag Drop

Ondrop event handler (IE)

Android / UI

Baseline alignment includes a android widget LinearLayout within another android widget LinearLayout

Python / String

Degenerate slice indices

Java / XML

Apply some indentiation to some XML

Java / 3D Graphics

Geometry By Reference

Ruby / Class

Extending Specific Objects with Modules

Flash ActionScript / Statement

Perform more complex initializations and increments by adding additional expressions separated by commas

Java / J2ME

Goodbye World

Delphi / Algorithm Math

Insertion Sort

Sample Android Codes

Android / 2D Graphics

Using Image icon as the background resource

Android / Core Class

Example that shows finding a preference from the hierarchy and a custom preference type

Android / Network

Cookie Cache

Android / Hardware

Using Timer to control Camera

Android / 2D Graphics

Sweep

Android / Hardware

Screen Short

Android / File

File read and write

Android / UI

Demonstration of using fragments to implement different activity layouts

Android / Network

File Download Service

Android / Hardware

Using SensorManager to calculate acceleration and check if it is still

Android / Core Class

Use Fragment to propagate state across activity instances when an activity needs to be restarted due to a configuration change.

Android / Date Type

Get the string of the date using format yyyy-MM-dd HH

Sample C# Codes

C# / ADO Database

MinPoolSize

C# / ADO Database

Query more columns and read result set

C# / XML

Writes out the given white space

C# / XML

Gets an XmlAttributeCollection containing the attributes of this node

C# / Data Types

Format integer with float points

C# / XML

Read XML data from file into DataGrid

C# / WPF

Overlapping Videos with Effects

C# / File Stream

Returns an enumerable collection of file names that match a search pattern in a specified path

C# / GUI Windows Form

RadioCheck MenuItem

C# / WPF

TextBox PreviewKeyDown

C# / WPF

Discrete Point Jumps

C# / Date Time

Create a new TimeSpan to the specified number of ticks

Sample Java Codes

Java / Swing Components

Use this modal dialog to let the user choose one string from a long list

Java / Internationalization

Get localized name suitable for display to the user

Java / Data Type

Split on word boundaries, but allow embedded periods and @

Java / Hibernate

HQL Object Named Parameters

Java / GWT

Node Titles Tree Sample (Smart GWT)

Java / XML

Using ranges in DOM tree

Java / 2D Graphics GUI

Draw centered BufferedImage

Java / Data Type

Checks the day, month and year are equal

Java / Regular Expressions

Matcher group with parameter 2

Java / Collections Data Structure

Format a Map

Java / PDF RTF

Add Page Numbers to Existing PDF document

Java / Advanced Graphics

A rudimentary chart library

Purposes of this site

Includes detail codes for any language desired for beginners

  • Benefits
  • C#
  • Java
  • Andorid
  • Xml
  • Databases

Quick and simple examples suitable for everyone


The content of the site is updated from time to time. Does not require membership. It is prepared for students to assist in the fields of computer engineering and software engineering.