Gearman can be installed on Windows through cygwin.
Install cygwin packages (through setup.exe):
- gcc
- make
- libuuid1-devel
- libiconv
sadjghasghdhjasgdfhs |
function custom_json_decode(&$contents=NULL, $normalize_contents=true, $force_array=true){ | |
//---------------decode contents--------------------- | |
$decoded_contents=NULL; | |
if(is_string($contents)){ | |
$decoded_contents=json_decode($contents,$force_array); | |
<?php | |
$curl = curl_init('http://www.livescore.com/soccer/england/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10'); | |
$html = curl_exec($curl); | |
curl_close($curl); | |
if (!$html) { |
function get_array_value($array=array(), $path=array()){ | |
foreach($path as $key) { | |
if(isset($array[$key])){ | |
$array=$array[$key]; | |
} | |
else{ | |
install Boost headers
debian
apt-get install libboost-all-dev
fedora
yum install boost-devel
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
token_get_all()
and token_name()
wrape_function_name
to control the behavoregetcwd()
to store the current directory and chdir()
to reset it to the original location so the static resources will be dowloaded from the originechdir()
to restore the previous directory location<?php | |
if (!isset($_SESSION['user'])) { | |
require_once( COMPONENTS . "/user/class.user.php" ); | |
$_SESSION['user'] = $_SERVER['PHP_AUTH_USER']; | |
$_SESSION['lang'] = 'en'; | |
$_SESSION['theme'] = 'default'; | |
$_SESSION['project'] = '/var/www'; | |
$User = new User(); |
function strip_single_tag($str,$tag=''){ | |
if(is_array($tag)){ | |
foreach($tag as $t){ | |
$str=strip_single_tag($str,$t); | |
} | |
} | |
else{ |