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
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> /* link with -lm */ | |
#define NETWORK_WIDTH 5 | |
#define NETWORK_HEIGHT 4 | |
#define NUMBER_NETWORKS 80 |
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
function interpolate(str){ | |
/* Interpolate on {[0-9]+} */ | |
if (arguments.length < 2) | |
return str; | |
/* Break string by it's interpolation parts */ | |
var split = str.split(/\{([0-9]+)\}/gm); | |
var numex = /^\d+$/ | |
for (var i = split.length - 1; i >= 0; i--) { | |
if(numex.test(split[i])){ |
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
#include <sys/wait.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <string.h> | |
#define GENERATIONS 4 | |
#define POPULATION_SIZE 80 | |
int main(){ |
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
<script type="text/javascript"> | |
/* Javascript to force incremental changes | |
* If checkbox 1,2, 5 are checked then all | |
* migrations 1,2,3,4,5 should be applied. | |
* If checkbox 3 is unchecked, all checkboxes | |
* after 3 should be unchecked as well. | |
*/ | |
var inputs = document.getElementsByName("migrations[]"); | |
for (var i = inputs.length - 1; i >= 0; i--) { | |
inputs[i].onclick = function(evt){ |
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
#------------------------------------------------------------------------------- | |
# Name: get_image_size | |
# Purpose: extract image dimensions given a file path using just | |
# core modules | |
# | |
# Author: Paulo Scardine (based on code from Emmanuel VAÏSSE), Ethan Eldridge (ICO) | |
# | |
# Created: 26/09/2013 | |
# Copyright: (c) Paulo Scardine 2013 | |
# Licence: MIT |
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/python | |
# -*- coding: iso-8859-15 -*- | |
""" | |
Script to find image references | |
Authors | |
------------------------------- | |
- Ethan J. Eldridge [01/2014] | |
Looks through images directory to find list of files |
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 | |
// in wordpress theme: functions.php add this in | |
function log_sql_queries($text_query){ | |
/* //Uncomment me if you want a lot of info about where the sql query comes from and what action started it off | |
$traces = debug_backtrace(); | |
$i = 0; | |
foreach ($traces as $tobj => $trace) { | |
if($trace['function'] == 'do_action'){ |
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
/************************************************************************* | |
* * | |
* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * | |
* All rights reserved. Email: [email protected] Web: www.q12.org * | |
* * | |
* This library is free software; you can redistribute it and/or * | |
* modify it under the terms of EITHER: * | |
* (1) The GNU Lesser General Public License as published by the Free * | |
* Software Foundation; either version 2.1 of the License, or (at * | |
* your option) any later version. The text of the GNU Lesser * |
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
#include <stdio.h> | |
#include <stdlib.h> | |
struct node | |
{ | |
struct node * next; | |
int seq; | |
}; |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
type String string | |
type Struct struct { |