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
// Workingdays - Calculate the number of business days in a given year | |
// Copyright (c) 2014 Max Weller | |
// COMPILE AND RUN: | |
// $ gcc -o workingdays workingdays.c | |
// $ ./workingdays -h | |
// Tested with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) (x86_64-apple-darwin13.1.0) | |
// and gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) (x86_64-linux-gnu) |
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/node | |
// A = (alphabet, states, q0, Delta, Z) | |
//--> Deterministic Finite Automaton | |
function Automaton(alphabet, Q, q0, Delta, Accept) { | |
this.alphabet = alphabet; | |
this.Q = Q; | |
this.q0 = q0; |
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
Imports System.Text.RegularExpressions | |
Imports System.Reflection | |
Public Class BatchProcessor | |
Event TraceEvent(ByVal varName As String, ByVal varData As String, ByVal codeLine As Integer) | |
Event PrintEvent(ByVal text As String, ByVal codeLine As Integer, ByVal lineBreak As Boolean) | |
Private Shared rJumpTarget As New Regex("^\s*([a-zA-Z0-9_]+):\s*") | |
Private Shared rCall As New Regex("^\s*[a-zA-Z]+\s+(([a-zA-Z0-9_]+(\[.*\])?)\s*=\s*)?(([a-zA-Z0-9_.]+::)|([a-zA-Z0-9_]+\.))([a-zA-Z0-9_]+)\s*(.*)") | |
Private Shared rCallSet As New Regex("^\s*SET\s+(([a-zA-Z0-9_.]+::)|([a-zA-Z0-9_]+\.))([a-zA-Z0-9_]+)\s*(.*)\s*=\s*(.*)", RegexOptions.IgnoreCase) |
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
2013-09-24 22:49:42.625 node-webkit[94806:3513] assertion on /SourceCache/DataDetectorsCore/DataDetectorsCore-354/Sources/Lookup/DDABSource.m:226 "(typeAsNumber != NULL) && (CFGetTypeID(typeAsNumber) == CFNumberGetTypeID()) && (CFNumberGetType(typeAsNumber) == kCFNumberSInt64Type)" failed :DDABAddRecord should not be called with NULL type | |
2013-09-24 22:49:42.625 node-webkit[94806:3513] DDABAddRecord should not be called with NULL type | |
2013-09-24 22:49:42.625 node-webkit[94806:3513] An uncaught exception was raised | |
2013-09-24 22:49:42.625 node-webkit[94806:3513] condition "DDABAddRecord should not be called with NULL type" | |
2013-09-24 22:49:42.626 node-webkit[94806:3513] ( | |
0 CoreFoundation 0x9bf706b1 __raiseError + 193 | |
1 libobjc.A.dylib 0x9ac7a091 objc_exception_throw + 162 | |
2 CoreFoundation 0x9bf705cb +[NSException raise:format:] + 139 | |
3 DataDetectorsCore 0x91a88e72 DDRaiseException + 66 | |
4 DataDetectorsCore |
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 | |
// Pretty Printer for PHP source code | |
// Edit the (relative or absolute) path to your project here: | |
$root = "../../Notendb/notendb2/"; | |
// Edit the page title here: | |
$pageTitle = "Notendb - Anhang B: Quelltext"; |
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
/** | |
* By TooTallNate, originally posted at https://gist.github.com/1785026 | |
* A quick little thingy that takes a Stream instance and makes | |
* it emit 'line' events when a newline is encountered. | |
* Modified by Max Weller to accept custom line feed characters (e.g. \r\n) | |
* | |
* Usage: | |
* ‾‾‾‾‾ | |
* var emitLines = require('./emitLines'); | |
* emitLines(process.stdin, "\n") |
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 | |
/* | |
* File: SimpleImage.php | |
* Author: Simon Jarvis | |
* Copyright: 2006 Simon Jarvis | |
* Date: 08/11/06 | |
* Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
* | |
* This program is free software; you can redistribute it and/or |
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 | |
use strict; | |
use warnings; | |
use Switch; | |
use LWP::Simple qw($ua); | |
# changing User Agent string because Wikipedia.org blocks default LWP::Simple User Agent | |
$ua->agent("WikiBot/0.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
$ perl -e "$_=shift;while($_>1){if($_%2){$_*=3;$_++;}else{$_/=2;}print++$c,\"# $_\n\"}" 12345 |
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
use LWP::UserAgent; | |
my $ua = LWP::UserAgent->new; | |
sub tryit { | |
print "trying $_[0]:$_[1] ... "; | |
my $r = $ua->post("http://www.rise-of-light.de/secure/login.php", | |
Content => "username=".$_[0]."&passwd=".$_[1]); | |
if($r->header("Location") =~ /welcome/) { |