This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| function jsonToEmber(obj) { | |
| if (obj instanceof Array) { | |
| return Ember.A(obj.map(y => jsonToEmber(y))); | |
| } else if (obj instanceof Object) { | |
| let tmp = {}; | |
| for (const x of Object.keys(obj)) { | |
| if (obj[x] instanceof Array) { | |
| tmp[x] = Ember.A(obj[x].map(y => jsonToEmber(y))); | |
| } else if (obj[x] instanceof Object) { | |
| tmp[x] = jsonToEmber(obj[x]); |
This file contains hidden or 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
| [rerender] { | |
| transition: background 1s; | |
| } | |
| [rerender="2"] { | |
| background: #ffd7d7 !important; | |
| transition: background 0s; | |
| } | |
| [rerender="1"] { | |
| background: #d7deff !important; | |
| transition: background 0s; |
This file contains hidden or 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 events = [ | |
| //keyboard | |
| 'keydown', | |
| 'keyup', | |
| 'keypress', | |
| //im | |
| 'compositionstart', | |
| 'compositionupdate', |
This file contains hidden or 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
| https://www.freepik.com/index.php?goto=2&k=patterns&isCat=1&isKeyword=1&type=1&vars=1&is_selection=1 | |
| https://stackoverflow.com/a/44906668/362904 |
This file contains hidden or 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
| https://stackoverflow.com/questions/46234722/initialize-keras-placeholder-as-input-to-a-custom-layer | |
| https://github.com/bckenstler/CLR | |
| https://blog.evjang.com/2016/11/tutorial-categorical-variational.html |
This file contains hidden or 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++ test.cpp `sdl2-config --cflags --libs` -lGLEW -lGL | |
| #define NO_SDL_GLEXT | |
| #include <GL/glew.h> | |
| #include <SDL2/SDL.h> | |
| #include <stdexcept> | |
| #include <iostream> | |
| template<typename T> struct Vec2 { | |
| T x; |