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 | |
namespace WSL\BaseBundle\Util\Helper; | |
use Doctrine\ORM\Query; | |
use Doctrine\ORM\QueryBuilder; | |
use Symfony\Component\Security\Acl\Permission\MaskBuilder; | |
/* | |
* To change this template, choose Tools | Templates |
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
/** | |
* source : http://snipplr.com/view/22741/slugify-a-string-in-php/ | |
* | |
* @static | |
* @param $text | |
* @return mixed|string | |
*/ | |
static public function slugify($text) | |
{ | |
// replace non letter or digits by - |
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
varying lowp vec4 DestinationColor; // 1 | |
void main(void) { // 2 | |
gl_FragColor = DestinationColor; // 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
typedef struct { | |
float Position[3]; | |
float Color[4]; | |
} Vertex; | |
const Vertex Vertices[] = { | |
{{1, -1, -7}, {1, 0, 0, 1}}, | |
{{1, 1, -7}, {0, 1, 0, 1}}, | |
{{-1, 1, -7}, {0, 0, 1, 1}}, | |
{{-1, -1, -7}, {0, 0, 0, 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
// | |
// Created by JohnPoison <[email protected]> on 1/17/13. | |
#import <Foundation/Foundation.h> | |
#import "CCSprite.h" | |
@interface CCSpriteHue : CCSprite { |
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
Ther is a class | |
class Boo : public SuperBoo { | |
Foo* fFoo1; | |
Foo* fFoo2; | |
// ... | |
} | |
where foo is a monomorphic class, and Boo owns pointers fFoo1 and fFoo2 | |
task: overload operator= for Boo | |
that's all >_< |
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
#!/usr/bin/env ruby | |
# | |
# hiero2sparrow.rb | |
# Sparrow | |
# | |
# Created by Daniel Sperl on 11.02.2010 | |
# Copyright 2010 Incognitek. All rights reserved. | |
# | |
# This program is free software; you can redistribute it and/or modify |
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 <iostream> | |
#include <chrono> | |
int main() | |
{ | |
auto t1 = std::chrono::high_resolution_clock::now(); //Used in testing execution duration. | |
auto t2 = std::chrono::high_resolution_clock::now(); | |
std::cout << "test function took " | |
<< std::chrono::duration_cast<std::chrono::nanoseconds>(t2 - t1).count() |
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
export NDK=/tmp/android-ndk-r8b | |
# Create the standalone toolchain | |
$NDK/build/tools/make-standalone-toolchain.sh \ | |
--platform=android-9 \ | |
--install-dir=/tmp/my-android-toolchain | |
export PATH=/tmp/my-android-toolchain/bin:$PATH | |
export SYSROOT=/tmp/my-android-toolchain/sysroot | |
export CC="arm-linux-androideabi-gcc --sysroot $SYSROOT" |
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 <iostream> | |
#include <unordered_map> | |
#include <string> | |
#include <assert.h> | |
using namespace std; | |
class ServiceInterface { | |
public: | |
virtual ~ServiceInterface() {} |
OlderNewer