😶🌫️
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 ( | |
"bufio" | |
"fmt" | |
"math/rand" | |
"os" | |
"strconv" | |
"strings" | |
"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
async function cacheDo() { | |
return await cache.do(key, async () => { | |
return await db.findOne(); | |
}); | |
} | |
(async () => { | |
let missyou = await cacheDo(); | |
})() |
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
defmodule Hangman do | |
def hangman(secret_word, inputs) do | |
MapSet.subset?(MapSet.new(String.graphemes(secret_word)), MapSet.new(inputs)) | |
end | |
end |
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 hangman | |
import "strings" | |
func Hangman(word string, inputs []string) bool { | |
for _, input := range inputs { | |
if word = strings.Replace(word, input, "", -1); word == "" { | |
return 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
$ git diff | |
diff --git a/check.go b/check.go | |
index 6a25548..485f92e 100644 | |
--- a/check.go | |
+++ b/check.go | |
@@ -2,6 +2,10 @@ package main | |
func check(input string) bool { | |
for i := 0; i < len(input); i++ { | |
+ if input[len(input)-1] == '{' { |
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 ( | |
"io" | |
"log" | |
"net/http" | |
"os" | |
"github.com/ant0ine/go-json-rest/rest" | |
) |
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
#!/bin/sh | |
docker run -d -p 4444:4444 --name selenium-hub selenium/hub:3.4.0-dysprosium | |
docker run -d --link selenium-hub:hub selenium/node-chrome:3.4.0-dysprosium | |
docker run -d --link selenium-hub:hub selenium/node-firefox:3.4.0-dysprosium |
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
protocol A { | |
func doSomething() -> String | |
} | |
// AbstractA | |
extension A { | |
func doSomething() -> String { | |
return "Hello from AbstractA" | |
} | |
} |
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
#include <stdio.h> | |
int count_vowe(const char *text) { | |
const char *ch = text; | |
int count = 0; | |
for (; *ch != '\0'; ch++) { | |
switch (*ch) { | |
case 'a': | |
case 'e': |
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
*** Settings *** | |
Library Selenium2Library | |
*** Test Cases *** | |
เพิ่ม Todo เข้าไปใน List | |
[Setup] Open Browser http://todomvc.com/examples/polymer/index.html browser=gc | |
พิมพ์ Learn AngularJs | |
กด Enter | |
ผู้ใช้จะเห็น Learn AngularJs อยู่ใน List | |
[Teardown] Close Browser |