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
function clone(object) | |
local lookup_table = {} | |
local function _copy(object) | |
if type(object) ~= "table" then | |
return object | |
elseif lookup_table[object] then | |
return lookup_table[object] | |
end | |
local new_table = {} | |
lookup_table[object] = new_table |
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
package codelab.gdg.watchfacehack; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.support.wearable.watchface.CanvasWatchFaceService; | |
import android.view.SurfaceHolder; | |
public class AnalogWatchFaceService extends CanvasWatchFaceService { | |
@Override |
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 <stdio.h> | |
#include <limits.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#define Random0to1 ((double) rand() / (RAND_MAX)) + 1 | |
#define ITERATION 100000000 |
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
HCOPY 000000001033 | |
DBUFFER000033BUFEND001033LENGTH00002D | |
RRDREC WRREC | |
T0000001D1720274B1000000320232900003320074B1000003F2FEC0320160F2016 | |
T00001D0D0100030F200A4B1000003E2000 | |
T00003003454F46 | |
M00000405+RDREC | |
M00001105+WRREC | |
M00002405+WRREC | |
E000000 |
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 <stdio.h> | |
int main() | |
{ | |
int sum = 0; | |
int i; | |
for( i=0; i<5; i++ ) | |
{ | |
sum = sum + i; |
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 init( int arr[], int size, int value ) | |
{ | |
int i; | |
for( i=0; i<size; i++ ) | |
arr[i] = value; | |
} | |
void merge( int arr[], int leftstart, int leftend, int rightstart, int rightend ) | |
{ | |
int* tmp = new int[ rightend - leftstart + 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
/** | |
* Delegate method called before the text has been changed. | |
* @param textField The text field containing the text. | |
* @param range The range of characters to be replaced. | |
* @param string The replacement string. | |
* @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. | |
*/ | |
- (BOOL)textField:(UITextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
NSUInteger oldLength = [textField.text lengthOfBytesUsingEncoding:(0x80000000 + kCFStringEncodingDOSKorean)]; |
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
// Create animatino class and run it | |
CCNode *anim = MyAnimation::create( "gamescene/star_sprite_animation.json" ); | |
anim->PlayWithSequence( "eaten" ); |
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 "PanZoomLayer.h" | |
PanZoomLayer::PanZoomLayer() | |
{ | |
} | |
PanZoomLayer::~PanZoomLayer() |
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
@app.route('/oauth/login', methods=['GET']) | |
def oauth_login(): | |
form_data = { | |
'code': request.args['code'], | |
'redirect_uri': url_for('oauth_login', _external=True), | |
'grant_type': 'authorization_code', | |
'client_id': app.config.get('OAUTH_CLIENT_ID'), | |
'client_secret': app.config.get('OAUTH_CLIENT_SECRET'), | |
'scope': 'god' | |
} |
OlderNewer