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...
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....
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...
Facebook Architecture Facebook ArchitectureQuora articlea relatively old presentation on facebook architectureanother InfoQ presentation on Facebook architecture / scaleWeb frontendPHPHipHopHipHop Virtual Mach...
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...
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...
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...
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...
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...
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: ...
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...
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...
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...
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...
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...
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...
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...
my emacs configuration modified fromhttps://github.com/flyingmachine/emacs-for-clojure;;;;;; Packages;;;;;; Define package repositories(require 'package)(add-to-list 'package-archives '("...
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...
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