Code:
group by
group by
package MyEncoder;
use strict;
use Exporter qw(import)
use vars qw(@EXPORT);
@EXPORT = qw(encode decode);
sub encode { ... }
sub decode { ... }
1;
$('html,body').animate({ scrollTop: $(this.hash).offset().top - $(window).height() / 2 + $(this.hash).height() / 2}, 2000)
my $counter = 0;
my @positions;
while ($file =~ /(ScanStructures|\{|\}|\"[^\"]*\")/g) {
if ($1 eq '{') {
$counter++;
}
elsif ($1 eq '}') {
$counter--;
}
elsif ($1 eq 'ScanStructures') {
$counter = 0;
}
elsif (!index $1, '"') {
# push @positions, $-[1] if $counter == 1; # if nested ones not required
push @positions,
function disableTextSelect(node) {
node = node || document.body;
if (node.nodeType != 1) return;
if (node.getElementsByTagName('input').length + node.getElementsByTagName('textarea').length) {
for (var i = 0; i < node.childNodes.length; i++) {
if (!node.childNodes[i].nodeName.match(/^(input|textarea)$/i)) disableTextSelect(node.childNodes[i]);
<?php
do_cookie_manipulation();
header('content-type', 'text/javascript');
?>
//javascript starts here ...
//save the values got from cookies to JS variables if required in the page
$surname = preg_replace(ucfirst(strtolower($dataField)), "/\'([a-z]{1})/i", ucfirst("$1"));
document.getElementById('show_all_links').onmouseover = function() {
var a = document.getElementsByTagName('a');
for (var i = 0; i <a.length; i++) if (a[i].href != "") a[i].style.color = 'blue';
}
function call_custom_function($function_name, $arg1, $arg2, $arg3) {
if (function_exists($function_name)) {
$result = $function_name($arg1, $arg2, $arg3);
//function (that was passed as argument) executed
}
//do something if function does not exist
}
Leave a comment: