I hereby claim:
- I am xosofox on github.
- I am xosofox (https://keybase.io/xosofox) on keybase.
- I have a public key whose fingerprint is A529 3A15 8FEA 4D76 C33C 87DC 39C0 237A 4B11 62BC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
if (Meteor.isServer) { | |
// update the appropriate rsvp entry with $ | |
Parties.update( | |
{_id: partyId, "rsvps.user": this.userId}, | |
{$set: {"rsvps.$.rsvp": rsvp}}); | |
} else { | |
// minimongo doesn't yet support $ in modifier. as a temporary | |
// workaround, make a modifier that uses an index. this is | |
// safe on the client since there's only one thread. | |
var modifier = {$set: {}}; |
//had to add these prefixes to my autoload for the php-unit tests to run | |
//app/autoload.php | |
$loader->registerPrefixes(array( | |
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', | |
'Twig_' => __DIR__.'/../vendor/twig/lib', | |
'BaseObject' => __DIR__.'/../vendor/propel/runtime/lib/om', | |
'Persistent' => __DIR__.'/../vendor/propel/runtime/lib/om', | |
'Propel' => __DIR__.'/../vendor/propel/runtime/lib', |
// | |
$aussetzen = 2 // oder ZZZ aus der SPielangabe | |
$possibles=0; //Anzahl möglicher Züge | |
//Und hier kommt der ZZZ-Berechner-Teil | |
//Grundidee: Schau, ob überhaupt schon so viele Züge gemacht wurden, wie ZZZ gesetzt ist. Wenn ja, dann lauf ZZZ züge zurück und hol von dort die neue Position | |
//Wenn beim zurücklaufen ein Crash auftritt, wird die anzahl der zurückzulaufenden Züge nochmals erhöht.... und dabei passt wohl was nicht? | |
if ($possibles==0) |
<?php | |
//erst die Klasse | |
class Vector | |
{ | |
private $x; | |
private $y; |
<?php | |
//erst die Klasse | |
class Vector | |
{ | |
private $x; | |
private $y; |
<?php | |
function randwik() | |
{ | |
#retrieves a random page title from wikipedia | |
$ch = curl_init("http://de.wikipedia.org/wiki/Spezial:Random"); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
// I can never remember the "stdClass" - but it's extremely handy when creating an object that needs to be converted to JSON afterwards... | |
$c = new stdClass; |