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 VHost | |
attr_accessor :hostname | |
attr_accessor :file | |
attr_accessor :changed | |
attr_accessor :config | |
attr_accessor :id | |
@changed=false | |
def initialize(config,hostname,id=0) |
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
#!/bin/bash | |
# Author: Fabian Becker <[email protected]> | |
# | |
# Extracts a database of an sql dump | |
# usage: ./grep-db.sh dump.sql dbname | |
line=`grep -n "CREATE DATABASE $2" $1 | cut -d ":" -f 1` | |
next=`sed 1,${line}d $1|grep -m 1 -n "CREATE DATABASE" |cut -d ":" -f 1` | |
end=$(($line + $next - 1)) | |
sed -n ${line},${end}p $1 |
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
2010-10-01 10:29:12: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9000 | |
2010-10-01 10:29:12: (mod_fastcgi.c.3356) response not received, request sent: 1010 on socket: tcp:127.0.0.1:9000 for /index.php?module=about&show=&id=&action=&page=&value=&subid=&sortorder=, closing connection | |
2010-10-01 10:29:14: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9000 | |
2010-10-01 10:29:14: (mod_fastcgi.c.3356) response not received, request sent: 1010 on socket: tcp:127.0.0.1:9000 for /index.php?module=about&show=&id=&action=&page=&value=&subid=&sortorder=, closing connection | |
2010-10-01 10:29:33: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9000 | |
2010-10-01 10:29:33: (mod_fastcgi.c.3356) response not received, request sent: 1010 on socket: tcp:127.0.0.1:9000 for /index.php?module=about&show=&id=&action=&page=&value=&subid=&sortorder=, closi |
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
<?php | |
class CreateUsers extends ActiveRecord\Migration { | |
public function up() { | |
$this->create_table('users', array( | |
// <field> => array(<type>, <length>, <nullable>) | |
'name' => array('varchar', 12, FALSE), | |
'email' => array('varchar', 255, FALSE) | |
)); |
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 <stdbool.h> | |
#include <stdio.h> | |
bool test = false; | |
int main(void) { | |
if(test) { | |
printf("Test is true"); | |
} | |
else { |
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
// Generate random genes | |
ts.genes = make([]ga.Gene, ts.nGenes) | |
var proto = make([]int, ts.geneLength) | |
var i int = 0 | |
for key, _ := range coords { | |
proto[i] = key | |
i++ | |
} | |
// Initialize all len(genes) and shuffle |
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
18 2 23 4 25 6 7 21 9 34 | |
36 0 0 0 0 0 0 0 0 16 | |
35 0 0 0 0 0 0 0 0 12 | |
10 0 0 0 0 0 0 0 0 27 | |
33 0 0 0 0 0 0 0 0 14 | |
15 0 0 0 0 0 0 0 0 32 | |
31 0 0 0 0 0 0 0 0 11 | |
30 0 0 0 0 0 0 0 0 17 | |
19 0 0 0 0 0 0 0 0 1 | |
28 13 26 3 24 5 22 8 20 29 |
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
// Programm | |
void f(boolean b) { | |
local integer a1; | |
local integer a2; | |
if (b) { | |
a1 = 2; | |
a2 = 22; | |
} else { | |
a1 = 3; |
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
/* | |
* semant.c -- semantic analysis | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdbool.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
public class Main extends Object { | |
public static void main() { | |
local Integer x; | |
local Integer y; | |
x = 42.add(23); | |
y = 42.add(23); | |
System.writeInteger(x); | |
System.writeInteger(y); | |
} | |
} |
OlderNewer