本稿ではNim言語 (旧称: Nimrod) の構文を紹介します。
Nim言語の概要やインストール方法については、ブログ記事があるのでそちらをご参照下さい。
本稿ではNim言語 (旧称: Nimrod) の構文を紹介します。
Nim言語の概要やインストール方法については、ブログ記事があるのでそちらをご参照下さい。
常用的几个 Ruby 版本管理工具有:rvm,rbenv,ry,rbfu。rvm 应该是最早出现、使用最多的,因为过于强大以至于违背了某个 Linux 软件开发原则,所以出现了很多轻便的替代者,其中来自 37signals 的 rbenv 就很受欢迎。ry 和 rbfu 看上去更轻便,不过使用不广泛。之前使用过rvm, 这次尝试下rbenv。
我的环境是 Ubuntu14.04
rbenv的源代码托管在github,在终端中,从 github 上将 rbenv 源码 clone 到本地,然后设置 $PATH。
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
/[^a-zA-Z0-9\u4e00-\u9fa5]/g |
from collections import defaultdict, deque | |
def find_number_universe(keylog): | |
numbers = set() | |
for attempt in keylog: | |
for num in attempt: | |
numbers.add(num) | |
return numbers |
def rotl(num, bits): | |
bit = num & (1 << (bits-1)) | |
num <<= 1 | |
if(bit): | |
num |= 1 | |
num &= (2**bits-1) | |
return num | |
def rotr(num, bits): |
mysql> show variables;
mysql> show global status;
function heidiDecode(hex) { | |
var str = ''; | |
var shift = parseInt(hex.substr(-1)); | |
hex = hex.substr(0, hex.length - 1); | |
for (var i = 0; i < hex.length; i += 2) | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift); | |
return str; | |
} | |
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393')); |
3 比 2 要慢不少, 囧rz.
This benchmark has been misleading for a while. It was originally made to demonstrate how JIT compilers can do all sorts of crazy stuff to your code - especially LuaJIT - and was meant to be a starting point of discussion about what exactly LuaJIT does and how.
As a result, its not indicative of what its performance may be on more realistic data. Differences can be expected because
from contextlib import contextmanager | |
import ctypes | |
from ctypes.wintypes import WORD, DWORD, LONG, WCHAR, HANDLE | |
k32 = ctypes.windll.kernel32 | |
a32 = ctypes.windll.advapi32 | |
class SYSTEMTIME(ctypes.Structure): |