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
$ProgressPreference = 'SilentlyContinue' | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
Invoke-WebRequest "https://update.code.visualstudio.com/latest/win32-x64-user/stable" -OutFile $env:Temp/codesetup.exe; | |
Invoke-Expression "$env:Temp/codesetup.exe /VERYSILENT /mergetasks=!runcode"; |
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
# Solves the SEND + MORE = MONEY letter substituion puzzle as a constraint satisfaction problem using backtracking search, | |
# searching variables (letters) in the least constrained ordering and values (digits) in the most constrained ordering, | |
# making the algorithm thousands of times faster. | |
from pprint import pprint | |
s1 = 'send' | |
s2 = 'more' | |
s3 = 'money' |
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 swap(a, i, j): | |
a[i], a[j] = a[j], a[i] | |
def is_heap(a): | |
n = 0 | |
m = 0 | |
while True: | |
for i in [0, 1]: | |
m += 1 | |
if m >= len(a): |
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
private function ShowPopup(message:String) | |
{ | |
const notification = new System.Windows.Forms.NotifyIcon(); | |
notification.Visible = true; | |
var icon = System.Drawing.SystemIcons.Information; | |
notification.Icon = icon; | |
notification.BalloonTipText = message; | |
const durationDisplayedInSeconds = 4; |
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
#include <stdio.h> | |
#include <setjmp.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
#define SECOND 1000000 | |
#define STACK_SIZE 4096 |
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
ERROR: (no-implicit-dependencies) src/client/banner.ts[4, 24]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-implicit-dependencies) src/client/extension.ts[10, 25]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-implicit-dependencies) src/client/extension.ts[11, 60]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-duplicate-imports) src/client/extension.ts[11, 1]: Multiple imports from 'vscode' can be combined into one. | |
ERROR: (no-duplicate-imports) src/client/extension.ts[14, 1]: Multiple imports from './common/configSettings' can be combined into one. | |
ERROR: (no-unnecessary-type-assertion) src/client/extension.ts[131, 47]: This assertion is unnecessary since it does not change the type of the expression. | |
ERROR: (no-implicit-dependencies) src/client/sortImports.ts[2, 25]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-unnecessary-type-assertion) src/client/sortImports.ts[36, 29]: This assertion is unnecessary sinc |
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
ERROR: (no-implicit-dependencies) src/client/banner.ts[4, 24]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-implicit-dependencies) src/client/extension.ts[10, 25]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-implicit-dependencies) src/client/extension.ts[11, 60]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-duplicate-imports) src/client/extension.ts[11, 1]: Multiple imports from 'vscode' can be combined into one. | |
ERROR: (no-duplicate-imports) src/client/extension.ts[14, 1]: Multiple imports from './common/configSettings' can be combined into one. | |
ERROR: (no-unnecessary-type-assertion) src/client/extension.ts[131, 47]: This assertion is unnecessary since it does not change the type of the expression. | |
ERROR: (no-implicit-dependencies) src/client/sortImports.ts[2, 25]: Module 'vscode' is not listed as dependency in package.json | |
ERROR: (no-unnecessary-type-assertion) src/client/sortImports.ts[36, 29]: This assertion is unnecessary sinc |
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
#!/bin/python3 | |
import sys | |
def left(x): | |
return 2*x + 1 | |
def right(x): | |
return 2*x + 2 |
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
from typing import Any, Dict, Optional, Sequence, Tuple | |
class BaseClass(object): | |
def __init__(self, foo: str, *args: Any, **kwargs: Any) -> None: | |
self.foo = foo | |
super().__init__(*args, **kwargs) | |
class Mixin(object): | |
def __init__(self, bar: str, baz: Optional[str]=None, *args: Any, **kwargs: Any) -> None: | |
self.bar = bar |
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
⋊> ~/m/p/project3 on master ⨯ gs 20:54:28 | |
## master...origin/master | |
M Kernel.cc | |
M Kernel.h | |
?? .vscode/ | |
?? cmake-build-debug/ | |
?? filesys.dat | |
?? fsck.cc | |
?? ln | |
⋊> ~/m/p/project3 on master ⨯ git sync 20:55:06 |
NewerOlder