This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Aliases for argparse positional arguments.""" | |
import argparse | |
class AliasedSubParsersAction(argparse._SubParsersAction): | |
class _AliasedPseudoAction(argparse.Action): | |
def __init__(self, name, aliases, help): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.App = Ember.Application.create({}); | |
document.title = "Olp Contracting"; | |
// Routes | |
App.Router = { | |
project_index: function (){ | |
document.title = "Projects"; | |
var theview = App.ProjectView.create(); | |
theview.append(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.App = Ember.Application.create({}); | |
document.title = "Olp Contracting"; | |
// Routes | |
App.Router = { | |
project_index: function (){ | |
document.title = "Projects"; | |
App.ProjectView.append(); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = "SELECT mapid, kills, games, kills/games as kpg, connections, connections/games as cpg FROM ps_c_map_data ORDER BY kpg IS NOT NULL DESC, kpg DESC, games desc"; | |
$result = mysql_query($query) | |
or die('Sorry, we could not retrieve pending from the database. Please try again.'); | |
$totalmaps = mysql_num_rows($result); | |
while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) | |
{ | |
$mapid = $row['mapid']; | |
$kills = (int)$row['kills']; | |
$games = (int)$row['games']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = "SELECT mapid, kills, games, connections FROM ps_c_map_data ORDER BY games desc"; | |
$result = mysql_query($query) | |
or die('Sorry, we could not retrieve pending from the database. Please try again.'); | |
$totalmaps = mysql_num_rows($result); | |
$mapdata = array(); | |
$kpgdata = array(); | |
while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) | |
{ | |
$mapdata[$row['mapid']] = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function scheduleLinkGetScheduleId($id = false) { | |
$query = " | |
SELECT | |
schedule_id | |
FROM | |
schedule_links | |
WHERE | |
deleted = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |