Table of Contents
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
#!/usr/bin/zsh | |
source $HOME/.zshrc | |
alias mvnp="MAVEN_OPTS='-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=1081' mvn -Dlicense.skip=true -DskipTests=true -Dcheckstyle.skip=true -Denforcer.skip=true -Dscalastyle.skip=true" | |
mvnp clean | |
rm -rf build | |
rm -rf docs | |
rm -rf integrationtests | |
rm -rf manual | |
rm -rf stresstests |
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 ( | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"strconv" | |
) | |
// 实现一个只支持int,只支持加法,函数只有println,只支持一个参数的Go语言子集.... |
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
/* | |
RadixSort.java : Sorts 32-bit integers with O(n*k) runtime performance. | |
Where k is the max number of digits of the numbers being | |
sorted. | |
(i.e. k=10 digits for 32-bit integers.) | |
Copyright (C) 2013 Yeison Rodriguez ( github.com/yeison ) | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License |
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
#!/usr/bin/env python | |
# example of proof of work algorithm | |
import hashlib | |
import time | |
max_nonce = 2 ** 32 # 4 billion | |
block_map = {} |
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
// Copyright 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
/* | |
Generating random text: a Markov chain algorithm | |
Based on the program presented in the "Design and Implementation" chapter | |
of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999). | |
See also Computer Recreations, Scientific American 260, 122 - 125 (1989). |
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 <memory> | |
#include <vector> | |
#include <iostream> | |
template <unsigned N, typename Key, typename Value> | |
class BTree | |
{ | |
template <typename T> using vector = std::vector<T>; | |
template <typename T> using shared_ptr = std::shared_ptr<T>; |
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 msgSend; | |
var counter = 0 | |
setInterval(function(){ | |
msgSend = new Buffer(counter.toString()); | |
ipfs.pubsub.publish(topic, msgSend, (err) => { | |
if (err) { | |
throw err | |
} | |
// msg was broadcasted | |
}) |
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" | |
"net" | |
"os" | |
"syscall" | |
) | |
const ( |
OlderNewer