This file contains 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
# | |
# Downloads all files directly linked within a webpage that are of a given list of extensions. | |
# | |
# The webpage in question is to be provided as the first argument for the program. | |
# The formats shall be specified as a single, second argument by the user, like so: "pdf txt tar.gz" | |
# | |
# If a third argument is given, it will be used as a target folder in which to save downloaded files. | |
# | |
# example: getfiles.pl http://google.com "gif js" | |
# |
This file contains 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 - ROT-13 | |
# | |
# guidjos | |
use warnings; | |
use strict; | |
die "\n\n\t $0 [-e | -d] [text]\n" unless @ARGV > 1; | |
my $option = shift; |
This file contains 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 SimpleBenchmark | |
{ | |
private Runnable task; | |
public Benchmark(Runnable target) | |
{ | |
task = target; | |
} | |
public long perform() |
This file contains 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
function derivator(func, step) { | |
step = step || Number.MIN_VALUE; | |
return function (x) { | |
return (func(x + step) - func(x)) / step; | |
}; | |
} | |
This file contains 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
#include <time.h> | |
unsigned int uirndrng(unsigned int low, unsigned int high) | |
{ | |
static char randomized; | |
if (low >= high) | |
{ | |
exit(EXIT_FAILURE); | |
} |
This file contains 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
// gcc -std=c99 -Wall -Wextra -pedantic list.c -o list | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct node | |
{ | |
void *value; | |
struct node *tail; | |
} list_t; |
This file contains 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
{- | |
- Some functionality related to Poisson Processes. | |
- | |
- gpn | |
-} | |
module Poisson ( | |
Process(..) | |
, pNt | |
, eNt |
This file contains 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
/** | |
* Takes C source code as input and removes comments. | |
* | |
* gcc -std=c99 -Wall -Wextra -Wall -pedantic stripcomments.c -o sc | |
*/ | |
#include <errno.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains 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 simplest implementation I can write. | |
function qsort(array) { | |
var lower, upper, pivot; | |
if (array.length <= 1) { | |
return array; | |
} |
This file contains 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
trivial :: [(Int, String)] | |
trivial = [ | |
{- Bridge values -} | |
(1, "I"), (5, "V"), (10, "X"), (50, "L"), | |
(100, "C"), (500, "D"), (1000, "M"), | |
{- Subtractions -} | |
(4, "IV"), (9, "IX"), (40, "XL"), (90, "XC"), | |
(400, "CD"), (900, "CM") | |
] |
OlderNewer