😶🌫️
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
function! TrailingWhiteSpace() | |
silent! %s/\s\+$// | |
endfunction | |
autocmd FileWritePre,BufWritePre * call TrailingWhiteSpace() |
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
package main | |
import "fmt" | |
type MoneyNotEnoughError string | |
func (m MoneyNotEnoughError) Error() string { | |
return string(m) | |
} |
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
var sheet = SpreadsheetApp.getActiveSheet(); | |
function Account(_id, _name, _email, _isSend) { | |
this.id = _id; | |
this.name = _name; | |
this.email = _email; | |
var isSend = _isSend; // private scope | |
this.isSend = function() { return isSend === "SENDED" ? true : false; }; | |
this.isNotSend = function() { return isSend !== "SENDED" ? true : false; }; |
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
package main | |
import "fmt" | |
type List interface { | |
ForEach(f func(v int)) | |
} | |
type IntList []int |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Playground</title> | |
<link rel="stylesheet" type="text/css" href="http://www.x3dom.org/download/x3dom.css"></link> | |
<script src="http://www.x3dom.org/download/x3dom.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<h1>Playground</h1> | |
<x3d width="500px" height="400px"> |
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
package karate | |
func Chop(n int, items []int) int { | |
if len(items) == 0 { | |
return -1 | |
} | |
var key = len(items) / 2 | |
var keyFound int | |
switch { |
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
Show hidden characters
{ | |
"extensions": | |
[ | |
"xml", | |
"xsd", | |
"xslt", | |
"svg", | |
"zul", // zk framework | |
"zhtml", // zk framework | |
".classpath" |
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
public class User implements Stringer { | |
private String username; | |
User(String username) { | |
this.username = username; | |
} | |
@Override | |
public String String() { | |
return username; |
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
package rxvote | |
import "time" | |
type TrueVote int | |
func (tv TrueVote) Value() int { | |
return int(tv) | |
} |
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
package main | |
import "fmt" | |
type Object string | |
type Message string | |
func eventLoop(addEvent chan Object, echoEvent chan Message, quitEvent chan bool) { | |
for { |
OlderNewer