Required tools for playing around with memory:
hexdump
objdump
readelf
xxd
gcore
import java.time.LocalDateTime; | |
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.Locale; | |
public class DateTimeFormatterSample { | |
public static void main(String[] args) { | |
String[][] patterns = new String[][]{ | |
new String[]{"G", "appendText(ChronoField.ERA,"}, |
use Plack::App::CGIBin; | |
use Plack::App::PHPCGIFile; | |
use Plack::Builder; | |
use Plack::Builder::Conditionals; | |
my $cgibin = Plack::App::CGIBin->new( | |
root => "/usr/local/nagios/sbin", | |
exec_cb => sub { my $file = shift; $file =~ m!\.cgi$! and -x $file }, | |
)->to_app; | |
my $htdocs = Plack::App::PHPCGIFile->new( |
#!/bin/bash | |
# Configration | |
MYSQL=/usr/bin/mysql | |
TPCCLOAD=./tpcc_load | |
TABLESQL=./create_table.sql | |
CONSTRAINTSQL=./add_fkey_idx.sql | |
DEGREE=`getconf _NPROCESSORS_ONLN` |
#NoSQLデータモデリング技法
原文:NoSQL Data Modeling Techniques « Highly Scalable Blog
I translated this article for study. contact matope[dot]ono[gmail] if any problem.
NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。
本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う
# Rspec用のCustom Matcher | |
# | |
# attributesメソッドを持つオブジェクト同士やHashを再帰的にmatchさせる | |
# | |
# ActiveRecord/ActiveModel/ActiveResrouce/Hashなどをゆるふわく | |
# 一致するか調べる。例えば、StringとSymbolは区別しないし、[]や{}やnilは同一視する。 | |
# | |
# it { should have_same_attributes(hash) } | |
# it { should have_same_attributes(:foo => 1,:bar => 2) } | |
# |
Index: twitvim.vim | |
=================================================================== | |
--- twitvim.vim (revision 250) | |
+++ twitvim.vim (working copy) | |
@@ -327,7 +327,9 @@ | |
let true = 1 | |
let false = 0 | |
let null = '' | |
- sandbox let result = eval(a:str) | |
+ let str = iconv(a:str, "utf-8", &encoding) |
function! s:BundleUpdate() | |
silent new __BUNDLE_UPDATE__ | |
setlocal buftype=nofile | |
redraw | |
for rtp in pathogen#split(&rtp) | |
let path = expand(rtp, ':p') | |
if isdirectory(printf("%s/.git", path)) | |
if &shellslash | |
let command = printf('cd ''%s'' && git pull', path) | |
else |
___ _____ _ _ _ | |
/ _ \ ___ _ __ ___ | ___(_)_ _____ __| | | | |
| | | |/ _ \| '_ \/ __| | |_ | \ \/ / _ \/ _` | | | |
| |_| | (_) | |_) \__ \_ | _| | |> < __/ (_| |_| | |
\___/ \___/| .__/|___(_) |_| |_/_/\_\___|\__,_(_) | |
|_| |
-- before query | |
EXPLAIN | |
SELECT a.id, a.title | |
FROM comment c | |
INNER JOIN article a ON c.article = a.id | |
GROUP BY a.id ORDER BY MAX(c.created_at) DESC LIMIT 10; | |
-- alter table | |
ALTER TABLE article |