-
Main loop
while (true) { for (unsigned int i = 0; i < N; i++) { } }
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
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-5 g++-5 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
There is no template for a game after intalling Unreal Engine from Visual Studio 2015. The plugin simple install "Epic Games Launcher".
You should run "Epic Games Launcher", then sign up or log in, then choose "Unreal Engine / Library / Engine Versions / Add Versions", then click install.
After installing Unreal Engine click choose "Unreal Engine / Launch / New Project / C++ / Basic Code / Create project.
For windows only!
-
Install MinGW (http://www.mingw.org/) or Git (https://git-scm.com/). That is you will get "sh.exe".
-
Add path to the system variables: System / Advanced System Settings / Enviroment Variables.
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
__debug__ | |
# This constant is true if Python was not started with an -O option. See also the assert statement. | |
# link: https://docs.python.org/2/library/constants.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
# link: https://docs.python.org/2/library/functions.html | |
class C(object): | |
def __init__(self): | |
self._x = None | |
@property | |
def x(self): | |
"""I'm the 'x' property.""" | |
return self._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
If you face with an error like this while use "super": | |
"TypeError: must be type, not classobj" | |
link: | |
http://stackoverflow.com/questions/489269/python-super-raises-typeerror-why | |
Solution: add inheratence from the "object" class in the base class. | |
class Class1(object): | |
def __init__(self): |
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
http://forum.jetbrains.com/thread/PyCharm-1675 | |
http://blog.jetbrains.com/pycharm/2012/08/gevent-debug-support/ | |
Enable Gevent support. | |
In recent versions of PyCharm, the option has moved to the main settings dialog. You can enable it under Settings | Python Debugger | Gevent compatible debugging. |
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
# Due to lack support of "Class Diagram/View" in the PyCharm Community Edition you could install "PlantUML integration" plugin to create a # class diagram by yourself. | |
# https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html | |
# Install "PlantUML integration" plugin for PyCharm Community Edition through "Settings/Plugins" | |
https://plugins.jetbrains.com/plugin/7017 | |
# Install "graphviz" and "libgraphviz4", that requires for "graphviz" | |
# Add repository for "libgraphviz4" | |
http://www.graphviz.org/Download..php |
NewerOlder