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 X{ | |
public function __construct(){ | |
$this->x = this; | |
} | |
} |
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 Mock{ | |
private $context; | |
public function __construct($a){ | |
$this->context = new Context($a); | |
} | |
public function __destruct(){ | |
Context::destroyContext($this->context); |
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
import resources.lib.utils as utils | |
import xbmc | |
from ctypes import * | |
block_duration = 60*1000#1 minute | |
#Listens for changes in the selected libraries. | |
#If a change occurs in some folder of some library all | |
#selected libraries are updated. | |
def listen(): |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package org.docpresso.templating; | |
import org.docpresso.util.Tuples.Pair; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.Function; | |
import org.mozilla.javascript.Scriptable; |
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
double frame(){ | |
double t = glfwGetTime(); | |
static double oldt; | |
double dt = t - oldt; | |
oldt = t; | |
static double time_between_frames; | |
//Determine the weight on the amount of fps, so that every second always has a equal weight. | |
int weight = (int) (1.0/time_between_frames); | |
weight /= 10; | |
if(weight < 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
// | |
// main.cpp | |
// GLFWtest | |
// | |
// Created by Kay Lukas on 26-06-12. | |
// Copyright (c) 2012 TU/e. All rights reserved. | |
// | |
#include <iostream> | |
#include <GL/glfw.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
void MessageDisplayer::draw(){ | |
glRasterPos2i(xOffset, yOffset); | |
//Loop through all messages, starting with the first added one | |
//up to the last added one | |
for(int i=0; i < 10; i++){ | |
int ai = (curr+i)%10; | |
Handle<DisplayMessage> mh = messages[ai]; | |
if(!mh) continue; | |
DisplayMessage *m = &*mh; |