自定义博客皮肤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 values largest square of all 1's dynamic 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 404

转载 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 204

转载 JVM endianness

JVM endianness StackOverflow topic to summarize JVM 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 152

转载 Facebook Architecture

Facebook Architecture Quora article a relatively old presentation on facebook architecture another InfoQ presentation on Facebook architecture / scale Web frontend PHP HipHop HipHop Virtual Mach...

2017-01-09 23:55:00 357

转载 function multi-versioning in GCC

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

2016-12-20 22:34:00 123

转载 sparse matrix format

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

2016-12-04 20:22:00 153

转载 Pseudo Random Nubmer Sampling

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

2016-11-27 22:35:00 117

转载 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 122

转载 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 164

转载 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-subarray Maximal Submatrix Sum: ...

2016-11-07 00:59:00 103

转载 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 132

转载 Sharding & IDs at Instagram, Flickr ID generation

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

2016-10-10 22:14:00 121

转载 MySQL Horizontal Scaling

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

2016-10-10 00:18:00 146

转载 David Malan teaching CS75 lecture 9, Scalability

https://youtu.be/-W9F__D3oY4 Storage   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 167

转载 TripAdvisor architecture 2011/06

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

2016-10-09 16:14:00 100

转载 URL shortening service

Use Cases 1, shortening : take a URL => return a much shorter URL 2, redirection : take a short URL => redirect to the original URL 3, custom URL : http://goo.gl/Trump2016 4, High avail...

2016-10-05 21:45:00 203

转载 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 110

转载 db2 command line notes

db2ilist - list instances db2 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 96

转载 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 102

转载 repackage android application

decompile the application file apktool d -o dianping/ dianping.apk modify the resources / smali assembly codes as you wish. diff -bur 51buy/smali/ 51buy_new/smali/ r...

2014-12-26 18:33:00 126

转载 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 103

转载 QualType in clang

  http://clang.llvm.org/docs/InternalsManual.html#the-qualtype-class the 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 324

转载 STM in Clojure

 Transactional memory in Clojure is implemented using Multiversion Concurrency Control protocol http://en.wikipedia.org/wiki/Transactional_memory http://en.wikipedia.org/wiki/Multiversion_concu...

2014-06-08 18:24:00 79

转载 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.2 https://wiki.debian.org/Multiarch run follow...

2014-04-27 23:09:00 123

转载 hash tree

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

2014-01-25 16:30:00 68

转载 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 107

转载 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#disassembly the instruction is "0xf...

2013-10-13 21:14:00 466

转载 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 94

转载 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 194

转载 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 173

转载 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 137

转载 .net reflector & disassembler

http://www.denisbauer.com/NETTools/FileDisassembler.aspx disassemble 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 53

转载 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 55

转载 debian wireless

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

2012-12-27 11:54:00 109

转载 NRefactory

nrefactory:http://wiki.sharpdevelop.net/NRefactory.ashx NRefactory 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 517

转载 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 96

转载 Object Relational Mapping

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

2012-02-24 21:31:00 210

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

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

2012-02-18 15:39:00 252

转载 一些数据库笔记

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

2011-11-22 18:39:00 111

转载 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 130

空空如也

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

TA关注的人

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