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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
willInsertElement() { | |
console.log("willInsertElement", this.get('name')); | |
}, | |
didInsertElement() { | |
console.log("didInsertElement", this.get('name')); | |
} | |
}); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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 Ember from 'ember'; | |
const { Helper, inject, get } = Ember; | |
/* stolen from Ember.LinkComponent */ | |
export default Helper.extend({ | |
_routing: inject.service('-routing'), | |
compute([qualifiedRouteName, ...models], queryParams) { | |
let routing = get(this, '_routing'); |
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
// g++ -shared -o /tmp/test.so -I/usr/include/mysql /tmp/tmp.cpp -fPIC -lgeos -rdynamic | |
//CREATE AGGREGATE FUNCTION udf_wkb_union RETURNS STRING SONAME 'udf_wkb_union.so'; | |
//SELECT GeomFromWKB(udf_wkb_union(AsWKB(SHAPE))) FROM new_table; | |
#ifdef STANDARD | |
#include <stdio.h> | |
#include <string.h> | |
#ifdef __WIN__ |
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
i686-w64-mingw32-cmake .. | |
make | |
#zip everything | |
mkdir gtox-win32 | |
#Copy everything we need | |
cp -rT /usr/i686-w64-mingw32 ./gtox-win32 | |
cp -r ./share ./gtox-win32/ | |
cp gtox.exe ./gtox-win32/bin/gtox.exe |
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
Stack<Character> stack = new Stack<>(); | |
int last_split = 0; | |
boolean ignore_next = false; | |
for(int i = 0; i < full_cmd.length(); ++i) { | |
if (ignore_next){ | |
ignore_next = false; | |
continue; | |
} | |
char c = full_cmd.charAt(i); | |
if (c == ']') { |
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
//Luca Béla Palkovics 27.01.2014 - Luca.Bela.Palkovics@gmail.com | |
/* | |
Renders gears in Canvas | |
Copy & Past into http://htmlivecode.com/canvas-animation-playground/ | |
*/ | |
function gear(ctx, settings) { | |
var acc = 10; | |
if (typeof settings.cache === "undefined") { | |
settings.cache = {}; |
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
/** | |
* Delayed add,sub,mul,div of a Matrix | |
* mul,div is by element. Not a real Matrix mul,div ! | |
* | |
* Just shows the idea of delaying calculations.. | |
*/ | |
//Should never be used outside, is a helper class | |
class MatAccess { | |
public: |
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
#ifndef CDYNAMICSTRUCT | |
#define CDYNAMICSTRUCT | |
#pragma GCC push_options | |
#pragma GCC optimize (3) | |
#include <iostream> | |
#include <type_traits> | |
#include <string> | |
#include <vector> |