自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(91)
  • 问答 (1)
  • 收藏
  • 关注

转载 submatrix

given a 2-d matrix with 0 or 1 valueslargest square of all 1'sdynamic programming, dp[i][j] = 1 + min{dp[i-1][j], dp[i][j-1], dp[i-1][j-1]} if m[i][j] == 1; otherwise a[i][j]=0;largest subm...

2017-05-07 17:14:00 414

转载 emacs for OCaml

(require 'cl)(require 'package)(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))(add-to-list 'package-archives '("gnu" . "http://elpa.gnu....

2017-04-08 21:00:00 214

转载 JVM endianness

JVM endianness StackOverflow topicto summarizeJVM class file is big-endian;JVM multi-byte instructions are big-endian;java.nio.ByteOrder.nativeOrder() gives you endianness of underlying arch...

2017-02-05 00:34:00 159

转载 Facebook Architecture

Facebook ArchitectureQuora articlea relatively old presentation on facebook architectureanother InfoQ presentation on Facebook architecture / scaleWeb frontendPHPHipHopHipHop Virtual Mach...

2017-01-09 23:55:00 368

转载 function multi-versioning in GCC

https://lwn.net/Articles/691932/https://gcc.gnu.org/wiki/FunctionMultiVersioningwhy multi-versioningThis aim of this project is to make it really easy for the developer to specify multiple ver...

2016-12-20 22:34:00 126

转载 sparse matrix format

see Spare Matrix wikipedia item,and scipy's documentation on different choices of sparse matrix typesparse matrix storage, only store non-zero entries. there're multiple possible data structure...

2016-12-04 20:22:00 159

转载 Pseudo Random Nubmer Sampling

Pseudo Random Nubmer Samplinghttps://en.wikipedia.org/wiki/Inverse\_transform\_samplinggiven a distribution's cumulative distribution function (CDF), generate sample numbers for this distributi...

2016-11-27 22:35:00 124

转载 a possible low-level optimization

http://www.1point3acres.com/bbs/thread-212960-1-1.html第二轮白人小哥,一开始问了一道至今不懂的问题,好像是给一个vector<uint8_t> nums,然后又给一个256位的vector<int> counts,遍历nums,然后counts[nums]++,问如何进行优化,提示说要用到CPU cach...

2016-11-23 18:28:00 124

转载 sorted matrix - search & find-k-th

sorted matrix ( Young Matrix )search for a given value in the matrix:1) starting from upper-right corner, turn left or turn down, O(n+m)2) if it's square, O(n+m) is optimal, seehttp://s...

2016-11-08 23:46:00 167

转载 array / matrix subarray/submatrix sum

Maximal Subarray Sum : O(n) scan-and-update dynamic programming,https://en.wikipedia.org/wiki/Maximum_subarray_problem,https://leetcode.com/problems/maximum-subarrayMaximal Submatrix Sum: ...

2016-11-07 00:59:00 105

转载 reservoir sampling / random shuffle

randomly choose a sample of k items from a list S containing n elements, the algorithm may be online (i.e. the input list is unknown beforehand)https://en.wikipedia.org/wiki/Reservoir_sampling...

2016-10-27 23:21:00 135

转载 Sharding & IDs at Instagram, Flickr ID generation

Instagram: http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagramFlickr:http://code.flickr.net/2010/02/08/ticket-servers-distributed-unique-primary-keys-on-the-chea...

2016-10-10 22:14:00 123

转载 MySQL Horizontal Scaling

http://www.tuicool.com/articles/miuq63Ehttp://www.guokr.com/blog/475765/http://songwie.com/articlelist/44https://www.youtube.com/watch?v=5yDO-tmIoXYsingle database => master / slave...

2016-10-10 00:18:00 151

转载 David Malan teaching CS75 lecture 9, Scalability

https://youtu.be/-W9F__D3oY4Storage  PATA, SATA, SAS (15,000 rpm), SSD,  RAID0 : striping, double throughput / size, no redundancy;RAID1 : mirror; RAID2 : bit-level striping with parity...

2016-10-09 16:15:00 175

转载 TripAdvisor architecture 2011/06

http://highscalability.com/blog/2011/6/27/tripadvisor-architecture-40m-visitors-200m-dynamic-page-view.htmlrequest URL is parsed, content collected from various services, and then applied to...

2016-10-09 16:14:00 103

转载 URL shortening service

Use Cases1, shortening : take a URL => return a much shorter URL2, redirection : take a short URL => redirect to the original URL3, custom URL : http://goo.gl/Trump20164, High avail...

2016-10-05 21:45:00 225

转载 JVM StackOverflowError vs. OutOfMemoryError

if the computation in a thread needs a larger Java Virtual Machine stack than is permitted, the Java Virtual Machine throws a StackOverflowError;if Java Virtual Machine stacks can be dyna...

2016-08-26 22:46:00 113

转载 db2 command line notes

db2ilist - list instancesdb2 attach to <instance> user <username> using <password> // this will attach to the instance as the specified user.db2 create database feedb a...

2015-12-13 14:31:00 99

转载 my emacs configuration

modified fromhttps://github.com/flyingmachine/emacs-for-clojure;;;;;; Packages;;;;;; Define package repositories(require 'package)(add-to-list 'package-archives '("...

2015-04-25 16:50:00 106

转载 repackage android application

decompile the application fileapktool d -o dianping/ dianping.apkmodify the resources / smali assembly codes as you wish.diff -bur 51buy/smali/ 51buy_new/smali/r...

2014-12-26 18:33:00 132

转载 file -i haha.csv

user@user-desk ~/Downloads/largetrd$ file -i LT_Largetrd.csvLT_Largetrd.csv: text/plain; charset=utf-16le转载于:https://www.cnblogs.com/qsort/p/4148264.html

2014-12-06 15:12:00 106

转载 QualType in clang

  http://clang.llvm.org/docs/InternalsManual.html#the-qualtype-classthe QualType class is designed to be an efficient value class which contains a pointer to the unqualified type together with ...

2014-10-19 14:29:00 337

转载 STM in Clojure

 Transactional memory in Clojure is implemented using Multiversion Concurrency Control protocolhttp://en.wikipedia.org/wiki/Transactional_memoryhttp://en.wikipedia.org/wiki/Multiversion_concu...

2014-06-08 18:24:00 84

转载 32bit / 64bit co-exist Linux, ld-linux.so, linux-gate.so.1 etc

before this, confirm that you don't have 32bit libs notably 32bit libc, e.g. you have/lib64/ld-linux-x86-64.so.2but not/lib32/ld-linux.so.2https://wiki.debian.org/Multiarchrun follow...

2014-04-27 23:09:00 129

转载 hash tree

http://en.wikipedia.org/wiki/Hash_listIncomputer science, ahash listis typically alistofhashesof the data blocks in a file or set of filesAn important use of hash lists is to make sure...

2014-01-25 16:30:00 72

转载 K-S Test

K-S test, test for the equality of continuous, one-dimensional probability distribution that can be used to compare a sample with a reference probability distribution, or to compare two samples....

2013-12-30 14:04:00 115

转载 jmp $

in intel x86 instruction set, "jmp $" means jump to this instruction location, thus falling into an infinite loop.https://defuse.ca/online-x86-assembler.htm#disassemblythe instruction is "0xf...

2013-10-13 21:14:00 480

转载 why std::stack has separate top() and pop()

SGI explanation:http://www.sgi.com/tech/stl/stack.htmlOne might wonder why pop() returns void, instead of value_type. That is, why must one use top() and pop() to examine and remove the top...

2013-07-21 15:24:00 99

转载 gcc -frandom-seed

-frandom-seed=string This option provides a seed that GCC uses when it would otherwise use random numbers. It is used to generate certain symbol names that have to be different ...

2013-07-20 17:20:00 204

转载 GNU Linear Programming Kit

glpk,http://en.wikipedia.org/wiki/GNU_Linear_Programming_Kit一个最简单的例子 1 /* decision variables */ 2 3 var x1 >= 0; 4 var x2 >= 0; 5 var x3 >= 0; 6 var x4 >= 0; 7 ...

2013-06-13 23:02:00 178

转载 Windows cmd编码

windows cmd执行python的时候似乎有一些处理是依赖于cmd的编码的,这导致了一些处理中文内容文件时出现问题。更改编码(code page):chcp不带参数,查看codepage;chcp nnn(如936),更改codepage到对应代码的codepage。转载于:https://www.cnblogs.com/qsort/archive/2013/04/19/3...

2013-04-19 23:47:00 139

转载 .net reflector & disassembler

http://www.denisbauer.com/NETTools/FileDisassembler.aspxdisassemble a .net dll to a visual studio project.for more info,http://blog.justinholton.com/post/How-to-Decompile-a-dot-NET-DLL-into-...

2013-02-07 14:29:00 57

转载 hash collision vulnerability of popular web server-side technology

http request headers are typically parsed by the web server as a hash table. If the technology in use has a deterministic hashing scheme, it's vulnerable to hash collision based DOS attack.No m...

2013-01-13 23:49:00 60

转载 debian wireless

需要的包:wireless-tools、wpasupplicant,安装以后会有对应的hook脚本挂到/etc/network/对应的目录下面,比如if-pre-up.dinterfaces文件里面加上对应的配置auto wlan0iface wlan0 inet staticwpa-ssid ChinaNet-xxxxwpa-psk my-s...

2012-12-27 11:54:00 117

转载 NRefactory

nrefactory:http://wiki.sharpdevelop.net/NRefactory.ashxNRefactory is used by SharpDevelop & MonoDevelop for code navigation etc. NRefactory 5 is a complete rewrite of NRefactory 4 and is us...

2012-09-08 17:50:00 534

转载 yacc grammar for a simple shell

View Code %token STRING%token RIGHT_APPEND%%cmd: fg_cmd | bg_cmd ;bg_cmd: fg_cmd '&' ;fg_cmd: simple_cmd | pipe_cmd ;simpl...

2012-04-25 22:53:00 103

转载 Object Relational Mapping

ORM是Object Relational Mapping的缩写,目的在于解决object-orient programming与relational database之间的不一致(所谓Object-relational impedance mismatch,impedance-阻抗这个词,用的很形象)。这种不一致产生的原因很容易理解,两边是两个不同的domain,各自的模型都不尽相...

2012-02-24 21:31:00 220

转载 整合多个图片到一个pdf

某本书扫描得到的图片,每个大约8MB,tif格式,想做成一个pdf,方便携带。基本过程:先用imagemagick所带的convert,来转变为pdf;然后用pdftk将这些单页pdf合并,得到最终的pdf文件。convert时,得到的pdf比较大,convert resize又烦,而且似乎压缩太小以后图像质量不太好。尝试首先转换为jpg,结果效果非常好,真是不错。命令:...

2012-02-18 15:39:00 255

转载 一些数据库笔记

1NF的要求:1,各行没有顺序关系;2,各列也没有顺序关系;3,不允许重复的行;4,不允许null的列。因此,实际上是要求:1,要有unique key;2,不允许nullable属性。当然这里的unique key可以是一个attribute,也可以是一个superkey。如果一个relation满足1NF,则所有的attribute自然为一个superkeysuper-key...

2011-11-22 18:39:00 113

转载 cygwin的locale

.bashrc里面,export LC_ALL=en_US.UTF-8转载于:https://www.cnblogs.com/qsort/archive/2011/11/19/2255520.html

2011-11-19 21:15:00 133

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除