Skip to content

Instantly share code, notes, and snippets.

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ch.pharno.swirae;
import java.util.Vector;
import org.lwjgl.opengl.GL11;
function fetch($id=null) {
if (!is_null($id)) {
$where = "WHERE id = " . $id;
} else {
$where = " ";
}
$sql = "Select * from bug " . $where . ";";
print $sql . "\n";
@philippTheCat
philippTheCat / gist:954151
Created May 3, 2011 20:26
notification.php
<?php
/*
* Generated with SQLize v0.1
*/
class object:
faces = []
def __init__(self):
pass
def addFace(self,face):
self.faces.append(face)
def draw(self):
for i in self.faces:
code:
class face:
vertexes = []
def __init__(self):
pass
def addVertex(self,vertex):
if len(self.vertexes) >= 4:
from construct import *
import functools
from collections import namedtuple
from ucs2 import ucs2
from codecs import register
register(ucs2)
from numpy import uint8
class DoubleAdapter(LengthValueAdapter):
00000000 00 05 08 00 00 05 5b 00 00 05 5f ......[. .._
0000000B 00 0d 23 01 00 20 4d 6d 32 4c 31 61 7e 48 7a 21 ..#.. Mm 2L1a~Hz!
0000001B 5d 4f 48 6c 4c 76 50 70 38 6e 38 7d 5d 4f 47 3c ]OHlLvPp 8n8}]OG<
0000002B 26 40 3b 30 44 62 &@;0Db
00000000 00 11 34 02 03 07 89 1c 00 00 00 06 70 68 61 72 ..4..... ....phar
00000010 6e 6f 00 20 33 65 61 63 35 33 62 39 62 31 62 34 no. 3eac 53b9b1b4
00000020 30 37 31 39 35 36 66 39 35 64 61 38 37 61 64 39 071956f9 5da87ad9
00000030 61 37 32 39 00 00 01 a729...
00000031 00 51 01 02 .Q..
@philippTheCat
philippTheCat / MetaObject.php
Created August 31, 2011 09:50 — forked from CHH/MetaObject.php
properties can now not overwrite $methods anymore (changed $this->{$name} to $this->variables[$name])
<?php
namespace CHH;
trait MetaObject
{
protected static $metaClass;
static function setMetaClass(MetaClass $metaClass)
{
key_friend is imported ASCII of the public Key:
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
lQOYBE6qnEkBCACevD9JFYzcnW1sjfZUrWywtC3dE3pKSE5Ev/yFHk1aS0Y8bhdq
.
.
.
A5AythtbrHSGsmKg+XLFZebC3TV1UaJROKmdUrcO3w==
=LEXo
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: 164022
#
# Created: 07.12.2011
# Copyright: (c) 164022 2011
# Licence: <your licence>
#-------------------------------------------------------------------------------