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
{ | |
"window.zoomLevel": 1, | |
"git.autofetch": true, | |
"breadcrumbs.enabled": true, | |
"go.useLanguageServer": false, | |
"editor.minimap.enabled": false, | |
"go.testTimeout": "300s", | |
"go.testEnvVars": { | |
"REUSE_DOCKER": 1 | |
}, |
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
uis_tsai@tw-louistsai2:~ | |
import Data.Function ((&)) | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
import System.IO | |
import Control.Monad | |
testOnePair :: (Ord k, Eq a) => (k, a) -> Map k a -> (Bool, Map k a) | |
testOnePair (k,v) table = |
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
perl -wpl -e '' file1 file2 | |
perl -wnl -e 'print;' file1 file2 | |
perl -wl -e 'while (<>) { print; }' file file2 |
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
pragma solidity ^0.4.23; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC721/ERC721Token.sol"; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/ownership/Ownable.sol"; | |
contract Character is ERC721Token, Ownable { | |
string[10] Tokens = ["明", "月", "幾", "時", "有", "把", "酒", "問", "青", "天"]; | |
constructor() public { |
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
-(void)setName:(NSString *) str { | |
[str retain]; | |
[name release]; | |
name = str; | |
} | |
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 str = "Hello, playground" | |
struct Language : Codable { | |
var name: String | |
var versions: Int | |
} | |
let swift = Language(name: "Swift", versions: 4) | |
let php = Language(name: "PHP", versions: 7) |
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
import socket | |
import struct | |
import sys | |
import select | |
class PingProtocolData(object): | |
def __init__(self): | |
self.seq_number = 0 | |
@property |
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 <sys/socket.h> | |
#include <sys/event.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <errno.h> |
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 Solution(object): | |
def longDivision(self, digit, denominator): | |
return digit*10 / denominator, digit*10 % denominator | |
def getFracs(self, digit, denominator): | |
fracs = [] | |
rem_location = dict() | |
rem = digit | |
rem_location[rem] = len(fracs) |
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
[1,[[2],3]] |> List.flatten |> Enum.reverse |> Enum.map(fn(x) -> x * x end) |