Skip to content

Instantly share code, notes, and snippets.

View gsmcwhirter's full-sized avatar

Gregory McWhirter gsmcwhirter

View GitHub Profile
<?php
$qry_str = 'publisher=9284102052512106';
$url = "http://api.indeed.com/ads/apisearch?". $qry_str . '&q=' . $_GET['q'] . '&l=' . $_GET['l'];
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return into a variable
//curl_setopt($ch, CURLOPT_TIMEOUT, 3); // times out after 4s
//curl_setopt($ch, CURLOPT_POST, true); // set POST method
<?php
$p = new Person();
$methods = array(
'getContactInfo',
'getIdentification',
);
foreach($methods as $m) {
<?php
$Wildcard_Usage = false;
if((isset($_POST["articlesearch"]) && substr_count($_POST["articlesearch"],'%') > 0) || (isset($_POST["authorsearch"]) && substr_count($_POST["authorsearch"],'%') > 0))
{
$Wildcard_Usage = true;
}
<?php
$OrderPart = "timestamp DESC";
if($Articlesearch!='' && $Wilcard!=true && $Authorsearch=='')
{
$WherePart = "name='$Articlesearch'";
}
elseif($Articlesearch!='' && $Wilcard==true && $Authorsearch=='')
{
$WherePart = "name LIKE '%$Articlesearch%'";
<?php
function FileMimeType($file)
{
static $finfo;
if(extension_loaded("fileinfo") || @dl("fileinfo.so"))
{
if(!($finfo instanceOf finfo))
{
$finfo = new finfo(FILEINFO_MIME|FILEINFO_SYMLINK|FILEINFO_PRESERVE_ATIME, SETTINGS::$MimeMagicFile);
CREATE TABLE IF NOT EXISTS tests(
id INT unsigned not null auto_increment,
PRIMARY KEY(id),
name VARCHAR(255) not null,
description TEXT not null
);
sage: (graphs.FruchtGraph()).clustering_coeff(nbunch=[0,1,2],with_labels=True,weights=True)
Expected:
({0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.0}, {0: 0.083333333333333329, 1: 0.083333333333333329, 2: 0.083333333333333329})
Got:
({0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.0}, {0: 0.33333333333333331, 1: 0.33333333333333331, 2: 0.33333333333333331})
/home/gmcwhirt/Documents/Sources/desigle-fork/desiglewindows/maingui.py:75: GtkWarning: gtk_toolbar_set_icon_size: assertion `icon_size != GTK_ICON_SIZE_INVALID' failed
self.ui = gtk.glade.XML(RUN_FROM_DIR + 'desigle.glade')
Error: Kid object (page 2) is wrong type (null)
Error: Kid object (page 2) is wrong type (null)
Error (7469): Illegal character '}'
Error: Kid object (page 2) is wrong type (null)
Error: Kid object (page 2) is wrong type (null)
Error: Kid object (page 2) is wrong type (null)
Error (15737): Illegal character '}'
Error: Kid object (page 2) is wrong type (null)
<IfModule mod_php5.c>
php_flag magic_quotes_gpc On
</IfModule>
<IfModule mod_php4.c>
php_flag magic_quotes_gpc On
</IfModule>
We couldn’t find that file to show.