View Class.sublime-snippet
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
<snippet> | |
<content><![CDATA[ | |
var ${1:Class} = ${2:Base}.extend({ | |
initialize: function ${1:Class}(${3}) { | |
${4} | |
}, | |
}); | |
]]></content> |
View Convex Hull
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
/* | |
* Copyright (c) 2014 Krzysztof Pachulski | |
* License: The MIT License (MIT) | |
* MIT License page: http://opensource.org/licenses/MIT | |
* | |
* getConvexHull() function calculates a convex hull of a cloud | |
* of points defined as a vector of points. | |
* | |
* getConvexHull() function uses Point and Edge classes | |
* provided below. |
View VSyncForCocos2dX.cpp
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
... | |
... | |
... | |
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) | |
// Turn on vertical screen sync under Windows. | |
// (I.e. it uses the WGL_EXT_swap_control extension) | |
typedef BOOL(WINAPI *PFNWGLSWAPINTERVALEXTPROC)(int interval); | |
PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; | |
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT"); |
View GetAllBoolPropertyValues.cpp
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
for (TFieldIterator<UProperty> prop_It(this->GetClass()); prop_It; ++prop_It) | |
{ | |
if (UBoolProperty* BoolProperty = Cast<UBoolProperty>(*prop_It)) | |
{ | |
UE_LOG(LogTemp, Log, TEXT("%s: %s"), *BoolProperty->GetName(), BoolProperty->GetPropertyValue(this) ? TEXT("true") : TEXT("false")); | |
} | |
} |