Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
[
{"Departure_2011":"February","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":78.91,"Supplier_name":"FLYBE BRITISH EUROPEAN","Directorate":"CRB"},
{"Departure_2011":"February","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":59.03,"Supplier_name":"EASYJET","Directorate":"CRB"},
{"Departure_2011":"February","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":71.98,"Supplier_name":"FLYBE BRITISH EUROPEAN","Directorate":"CRB"},
{"Departure_2011":"February","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":59.03,"Supplier_name":"EASYJET","Directorate":"CRB"},
{"Departure_2011":"January","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":88.01,"Supplier_name":"FLYBE BRITISH EUROPEAN","Directorate":"IPS"},
{"Departure_2011":"January","Ticket_class_description":"Economy","Departure":"UK","Destination":"UK","Paid_fare":276.62,"Supplier_name":"B
@JamieChung
JamieChung / gist:4679354
Created January 31, 2013 02:11
Flashlight
<phone:PhoneApplicationPage
x:Class="Flashlight.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
@JamieChung
JamieChung / gist:1590169
Created January 10, 2012 17:37
Microsoft Internet Explorer's "smart error messages"
<!--
- Unfortunately, Microsoft has added a clever new
- "feature" to Internet Explorer. If the text of
- an error's message is "too small", specifically
- less than 512 bytes, Internet Explorer returns
- its own error message. You can turn that off,
- but it's pretty tricky to find switch called
- "smart error messages". That means, of course,
- that short error messages are censored by default.
- IIS always returns error messages that are long
--
-- Table structure for table `charges`
--
DROP TABLE IF EXISTS `charges`;
CREATE TABLE IF NOT EXISTS `charges` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`stamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`record_id` int(11) NOT NULL DEFAULT '0',
`w_no` varchar(15) CHARACTER SET latin1 NOT NULL DEFAULT '',
namespace Fuel\Tasks;
class Pipe
{
public function run ()
{
// read from stdin
$fd = fopen("php://stdin", "r");
$email_raw = "";
while (!feof($fd))
@JamieChung
JamieChung / gist:1427555
Created December 3, 2011 16:54
Basic email piping
#!/usr/bin/php -q
<?php
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd))
{
$email .= fread($fd, 1024);
}
#include <stdio.h>
## To detect the arguments from the command line
int main ( int argc, char *argv[] )
## Argument Count
## Array of Argument Values
// First argument is assumed to be the name of the program (problem2)
// Second argument would be the input file
Aug 2, 2011 3:24:12 PM
HISTORY: Downloaded "http://www.telemundo51.com/index.html"
HISTORY: Downloaded "http://www.telemundo51.com/css/28035021,23245398/style.css"
HISTORY: Downloaded "http://www.telemundo51.com/css/layouts;telev3;index;css/style.css"
HISTORY: Downloaded "http://www.telemundo51.com/alamano/index.html"
HISTORY: Downloaded "http://www.telemundo51.com/_public/css/miami-min.css"
HISTORY: Downloaded "http://www.telemundo51.com/rss/index.html"
HISTORY: Downloaded "http://www.telemundo51.com/emailnewsletters/index.html"
HISTORY: Downloaded "http://www.telemundo51.com/noticias/24789434/detail.html"
0.007988475456276185
0.007988475456276185
0.005322879933958639
0.005322879933958639
0.003991121965092112
0.003991121965092112
0.0031923995695572844
0 0.5
0.1 0.4601721627
0.2 0.4207402906
0.3 0.3820885778
0.4 0.3445782584
0.5 0.3085375387
0.6 0.2742531178
0.7 0.2419636522
0.8 0.2118553986
0.9 0.1840601253