This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.

This Is A Custom Widget

This Sliding Bar can be switched on or off in theme options, and can take any widget you throw at it or even fill it with your custom HTML Code. Its perfect for grabbing the attention of your viewers. Choose between 1, 2, 3 or 4 columns, set the background color, widget divider color, activate transparency, a top border or fully disable it on desktop and mobile.
28 09, 2009

in_array

By | 2009-10-14T13:03:32+00:00 September 28th, 2009|Categories: PHP, Ruby|Tags: , , , |Comments Off on in_array

The in_array() function in PHP checks if a value exists in an array – returning true if it does, or false otherwise.

The last argument in this function forces a strict type check of the value in PHP. Since Ruby does not consider a Fixnum of 1 and a String of ‘1’ to be the same – it always operates as if the last argument were set to true.

PHP

$my_array = array('a', 'b', 'c', 'd');
if('a', in_array($a), true) {
	echo 'Found it in the array';
}
// => Found it in the array

Ruby

my_array = [ "a", "b", "c", "d" ];
if( my_array.include?('a') ) {
	 puts 'Found it in the array';
}
# => Found it in the array
29 04, 2009

include

By | 2009-04-27T10:08:20+00:00 April 29th, 2009|Categories: PHP, Ruby|Tags: , |Comments Off on include

The include() statement includes and evaluates a specified file. The difference between include() and require() is that require() results in a Fatal Error upon failure, whereas include() does not, it only produces a Warning.

include() is not a function in PHP, it is a language construct.

PHP

include('../config.php');

Ruby

include('../config.rb');
26 04, 2009

require

By | 2009-04-24T13:52:18+00:00 April 26th, 2009|Categories: PHP, Ruby|Tags: , |Comments Off on require

The require() statement includes and evaluates a specified file. The difference between require() and include() is that require() results in a Fatal Error upon failure, whereas include() does not, it only produces a Warning.

require() is not a function in PHP, it is a language construct.

PHP

require ('../config.php');

Ruby

require ('../config.rb');