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" | |
} |
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
### 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
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
def divisors(num): | |
return [x in range(1, num // 2) if num % x == 0]; |
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
# Simple Node definition with value and next pointer. | |
class Node: | |
def __init__(self, value = 0): | |
self.value = value | |
self.next = None | |
for v in values: | |
self.add(v) | |
def __iter__(self): |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | |
</configSections> | |
<log4net> | |
<appender name="TraceAppender" type="log4net.Appender.TraceAppender"> | |
<layout type="log4net.Layout.PatternLayout"> | |
<conversionPattern value="[%date] %level (%logger:%line) - %message%newline" /> | |
</layout> |
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
using System; | |
using System.Collections.Generic; | |
using Microsoft.Xna.Framework; | |
using MonoGame.Extended; | |
using MonoGame.Extended.Shapes; | |
namespace EGen.Map | |
{ | |
public class Grid | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using Microsoft.Xna.Framework; | |
using MonoGame.Extended; | |
using MonoGame.Extended.Shapes; | |
namespace EGen.Map | |
{ | |
public class Grid | |
{ |
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 ListNode: | |
def __init__(self, x): | |
self.val = x | |
self.next = None | |
class MergeSort: | |
def __init__(self, head: ListNode): | |
self.head = None | |
def sortList(self, head: ListNode): |
OlderNewer