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
// Ivan Prisyazhnyy <[email protected]>, 2016 | |
// Package implements example of parallel URL fetcher counting Go entries. | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | cargo run | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | cargo run | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | cargo run | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | cargo run | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | cargo run | |
// | |
// Cargo.toml |
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
// Ivan Prisyazhnyy <[email protected]>, 2016 | |
// Package implements example of parallel URL fetcher counting Go entries. | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | go run main.go -debug -k 0 | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | go run main.go -debug -k 1 | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | go run main.go -debug -k 2 | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | go run main.go -debug -k 3 | |
// Test: echo 'https://golang.org\nhttps://golang.org\nars\nhttps://golang.org\n' | go run main.go -debug -k 4 | |
package main |
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
[19:05:22:088] [8430:8431] [INFO][com.freerdp.client.x11] - Property 419 does not exist | |
[19:05:22:088] [8430:8431] [DEBUG][com.freerdp.client.x11] - Searching for XInput pointer device | |
[19:05:22:088] [8430:8431] [DEBUG][com.freerdp.client.x11] - Pointer device: 9 | |
[19:05:22:088] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling security layer negotiation: TRUE | |
[19:05:22:088] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling restricted admin mode: FALSE | |
[19:05:22:089] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling RDP security: TRUE | |
[19:05:22:089] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling TLS security: TRUE | |
[19:05:22:089] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling NLA security: TRUE | |
[19:05:22:089] [8430:8431] [DEBUG][com.freerdp.core.nego] - Enabling NLA extended security: FALSE | |
[19:05:22:089] [8430:8431] [DEBUG][com.freerdp.core.nego] - state: NEGO_STATE_NLA |
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
// ==UserScript== | |
// @name slither debug | |
// @version 0.1 | |
// @description install with Tampermonkey (https://tampermonkey.net/) | |
// @author john.koepi / sitano, stacs | |
// @match http://slither.io | |
// @grant none | |
// ==/UserScript== | |
/*jshint esnext: true */ |
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
// Ivan Prisyazhnyy <[email protected]>, 2016 | |
// Package implements simple in-memory single threaded key value database | |
// with nested transactions support. Interactive input support based on stdin. | |
// Program reads command from stdin, evaluates them and prints output to stdout. | |
// Errors are printed to stderr. Author missed readline emacs shortcuts while | |
// developing this. | |
package main | |
import ( |
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
package main | |
import ( | |
_ "unsafe" | |
"fmt" | |
"runtime/pprof" | |
"os" | |
"time" | |
) |
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
// proc_test.s | |
#include "go_asm.h" | |
#include "go_tls.h" | |
#include "funcdata.h" | |
#include "textflag.h" | |
TEXT runtime·ProcYield(SB),NOSPLIT,$0-0 | |
MOVL cycles+0(FP), AX | |
again: |
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
<# | |
.SYNOPSIS | |
This is PowerShell script execution wrapper which can dynamically setup args and read $input. | |
.EXAMPLE | |
If you need read input. This would not work in Consul config because of "" in -Command. | |
echo 'ars {blah,tatata}' | PowerShell.exe -NoProfile -NonInteractive -Command "$input | ./Run.ps1 -ScriptName ... -Arg1 val1 -Arg2 val2 ..." | |
.EXAMPLE |
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
class Solution { | |
private: | |
int flags[3][3] = {{0}}; | |
int rows[9] = {0}; | |
int cols[9] = {0}; | |
int count = 0; | |
deque<pair<int, int>> s; | |
public: | |
void solveSudoku(vector<vector<char>>& board) { |
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
class Solution { | |
public: | |
void solveSudoku(vector<vector<char>>& board) { | |
for (int row = 0; row < 9; row ++) { | |
auto rowi = &board[row]; | |
for (int col = 0; col < 9; col ++) { | |
if ((*rowi)[col] == '.') { | |
for (char a = '1'; a <= '9'; ++ a) { | |
if (can(board, col, row, a)) { | |
(*rowi)[col] = a; |