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 | |
/* | |
t(p) = max {n: n mod k = 0 for all k such that k^p <=n} | |
From https://twitter.com/republicofmath/status/574618883111411713 | |
Basically, the question is, "is this function always finite?" | |
*/ |
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/perl | |
# Written by Dormando. | |
# PUBLIC DOMAIN. | |
# No guarantees it won't eat your cat. | |
# From http://consoleninja.net/code/memcached/mc_conn_tester.pl via https://code.google.com/p/memcached/wiki/Timeouts | |
use warnings; | |
use strict; | |
use IO::Socket::INET; |
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
# The next line updates PATH for the Google Cloud SDK. | |
#source '/Users/wogsland/Projects/google-cloud-sdk/path.bash.inc' | |
# The next line enables shell command completion for gcloud. | |
#source '/Users/wogsland/Projects/google-cloud-sdk/completion.bash.inc' | |
## Aliases | |
alias ls='ls -la' | |
alias grep='grep -r -n' | |
alias composer='php ~/composer.phar' |
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
'exception-reporting': | |
'userId': 'd92042ac-d007-9956-fb27-59debd2b80e6' | |
'welcome': | |
'showOnStartup': false | |
'metrics': | |
'userId': '09f13261ac75c440adcbafbb995b6d88ea8c5468' | |
'editor': | |
'fontSize': 12 | |
'showIndentGuide': true | |
'showInvisibles': true |
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 | |
use Rhumsaa\Uuid\Uuid; | |
class BaseModel | |
extends Eloquent | |
{ | |
// Make sure errors are available for when validation fails | |
public $errors; | |
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
/** | |
* Class p1info.java -- an information file for assignment 1 | |
* in CS4812. This file is formatted as a .java file, with | |
* extensive comment fields, so that it might be harmlessly | |
* added to a project file in most popular IDEs. This allows | |
* for more convenient consultation of the assignment | |
* specifications during development. | |
* | |
* @author <A HREF="mailto:[email protected]">David Dagon</A> | |
* @version 1.1 |
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 echo HighRoller::setHighChartsLocation("highcharts.js");?> | |
<!-- $data is an array of 4 arrays: dates & vars on those dates --> | |
<?// Bar Chart | |
$barchart = new HighRollerAreaChart(); | |
$barchart->chart->renderTo = 'history'; | |
$barchart->chart->zoomType = 'x'; | |
$barchart->title->text = 'History'; | |
$barchart->yAxis->stackLabels = 'true'; |
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
class RubyParser | |
#Creates a hash table as the parser object given a file name. | |
def initialize(filename) | |
#open the file | |
@filename = filename | |
toparse = File.open(@filename,"r") | |
#build the hash table | |
@sections = Hash.new |
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
#------------------------------------------------------------------------- | |
# This script fixes an almost fixed width file farked on a number of lines. | |
# It outputs a nicer space-delimited one. | |
#------------------------------------------------------------------------- | |
#!/usr/local/bin/perl | |
print "Starting...\n"; | |
$rowcount = 0; | |
open(MRFILE, "broken.txt"); |
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/perl | |
open (FOO, "file_with_bad_line.csv") || | |
die "ERROR Unable to open test: $!\n"; | |
open (BAR, ">badlines.csv"); | |
$rowcount=0; | |
while (<FOO>) { | |
$rowcount++; |