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 Obj(){ | |
this.prop = 'PROP'; | |
} | |
Obj.prototype.refToProp = function(){ | |
// Only self can refer to the Obj instance object. | |
// So if you want to refer in other function, self variable is need to be defined. | |
var self = this; | |
setTimeout(function(){ | |
console.log(self.prop); |
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
// Generate Vertex array object | |
glGenVertexArraysOES(1, &_triangleArray); | |
// Binding VAO | |
glBindVertexArrayOES(_triangleArray); | |
// Generate Vertex buffer object | |
glGenBuffers(1, &_triangleBuffer); | |
// Binding VBO | |
glBindBuffer(GL_ARRAY_BUFFER, _triangleBuffer); | |
// Send buffer data |
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
_projectionMatrix = GLKMatrix4MakePerspective(GLKMathDegreesToRadians(65.0f), aspect, 0.1f, 100.0f); | |
_baseViewMatrix = GLKMatrix4Translate(GLKMatrix4Identity, 0.0f, 0.0f, _nearness); | |
_modelViewMatrix = GLKMatrix4Multiply(GLKMatrix4Identity, _baseViewMatrix); |
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
$ time ./regexTime | |
real 0m0.005s | |
user 0m0.002s | |
sys 0m0.002s |
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
- (MyClass*)init:(double)paramA with:(double)paramB; |
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
@interface MyClass() : NSObject{ | |
} | |
- (void)myMethod; | |
@end |
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
$ git rm necessary_file.txt | |
Oops!! | |
$ git reset HEAD necessary_file.txt | |
$ git checkout necessary_file.txt |
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
$ git remote origin :branch_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
@class MyClass; | |
@protocol MyClassDelegate | |
@optional | |
-(void)optionDelegateMethod:(MyClass*)myClass; | |
@required | |
-(void)requiredDelegateMethod:(MyClass*)myClass; |
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
CXX=g++ | |
LIBS=-lcppunit | |
SOURCES=someTest.cc some.cc | |
TARGETS=mainTest | |
all : | |
g++ -o mainTest mainTest.cc $(SOURCES) $(LIBS) | |
clean : | |
rm $(TARGET) |
OlderNewer