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
def reverseInteger(val): | |
sign = -1 if val < 0 else 1 | |
val = abs(val) | |
rev = 0 | |
while val > 0: | |
num = val % 10 | |
val = val // 10 | |
rev = rev * 10 + num |
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
### Download Cmake | |
Download the CMake `Windows win32-x86 Installer`: | |
https://cmake.org/download/ | |
### Download latest Google Test release | |
Download latest release of Google Test: | |
https://github.com/google/googletest/releases | |
### Build for MinGW | |
After downloading Google Test navigate to the `src/` folder and use CMake to build the library files (I'm using [Git Bash](https://git-scm.com/downloads)): |
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
{ | |
"selector": "source.lua", | |
"file_regex": "^Error: (?:[^:]+: )?([^: ]+?):(\\d+):() ([^:]*)$", | |
"windows": { | |
"cmd": ["C:/Program Files/LOVE/love.exe", "${folder:${file_path}}"], | |
"shell": true | |
}, | |
"osx": { | |
"cmd": ["/Applications/love.app/Contents/MacOS/love", "${file_path}"] | |
}, |
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
{ | |
"cmd": ["python3", "-u", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python, source.py" | |
} |
NewerOlder