## Integer Arrays Snippets

11 May, 2017

The following code uses bitwise operators to determine if an unsigned integer, x, is a power of two.

Source code to convert an integer into binary representation

28 January, 2013

Converts integer to left-zero padded string, len chars long.

Function of an integer raised in a power * and the calculation of the sum of a series of integers

Delphi code example to rotate a TBitmap at any angle

01 February, 2011

Associative Array Syntax

Function of an integer raised in a power * and the calculation of the sum of a series of integers (1^e+2^e....+n^e) raised in a power.

In Delphi, procedural types (method pointers) allow you to treat procedures and functions as values that can be assigned to variables or passed to other procedures and functions. Here's how to call a function (or procedure) as a parameter of another function (or procedure) : Declare the function (or procedure) that will be used as a...

19 June, 2012

Adjusts the brightness of a color by a specified amount in range -255..255.

When creating a new object, pass the initial variables as an array. Then use this code to quickly assign the array vars to the class vars. This will mean importing large arrays into the object in three lines of code.

19 June, 2012

Changes the brightness of a bitmap by a given Delta value in range -255..+255.

Very useful Java code snippets for Java developers - Converting Strings to int and int to String

01 March, 2011

The following code snippet paints a gradient between 2 colors on the entire form. It uses Win32 API in order to get the best performances. 'You can change the colors of the gradient by changing the RGB values passed to PaintGradient function. Written by Nir Sofer

07 May, 2012

An example code to Copy data into dotNet array

Fortran programmer should always write new code in Fortran 90 or Fortran 95, but for those of you stuck on a desert island with only a FORTRAN 77 compiler at your disposal, here's a way to write a recursive subroutine. FORTRAN 77 subroutines and functions are not allowed to call themselves directly. Attempting to do such will result in a compile...

19 September, 2013

Function to test for the existence of at least 1 matching row, without having to count them all!

Example code for merge sort of an integer list

23 September, 2013

Convert an IP address to an integer for easier storage. Also, convert an integer back to an IP address.

06 October, 2012

Tested on multiline textbox and listview.