Each process have its own stack and heap, while threads share common heap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| /bin/sh -c "while true; do echo hello world; sleep 1; done" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| func main() { | |
| var jsonBlob = []byte(`{ | |
| "repo_info": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
| # that enables you to choose a character from a menu of options. If you are on Lion | |
| # try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
| # for input. | |
| # | |
| # It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
| # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
| # as it means you cannot press and hold h/j/k/l to move through your file. You have | |
| # to repeatedly press the keys to navigate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "github.com/CenturyLinkLabs/docker-reg-client/registry" | |
| "net/url" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Println(f(5, 3)) | |
| } | |
| func f(n, m int) int { | |
| if n <= 0 || m <= 0 { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParentelem.clientLeft,elem.clientTop,elem.clientWidth,elem.clientHeightelem.getClientRects(),elem.getBoundingClientRect()
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -------- start loop -------- | |
| 2015/09/30 15:27:36.745404 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/sched.go:303"] active! | |
| 2015/09/30 15:27:36.746252 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:55"] loadNodesMeta Normal 1 | ReservedNormal 0 | |
| 2015/09/30 15:27:36.746267 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:56"] loadNodesMeta Offline 0 | ForcedOffline 0 | |
| 2015/09/30 15:27:36.746274 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:57"] loadNodesMeta Clear 0 | |
| 2015/09/30 15:27:36.746797 [D][SCD][#1443598056][172.17.0.4]["qiniu.com/qcos/kernel.v3/sched/pick.go:144"] Real <cpu> 0.091 core / 1.000 core = 0.09 <mem> 466.8 MB / 1.956 GB = 0.23 <ls> 16 <bs> 14 | |
| 2015/09/30 15:27:36.751137 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:380"] check the 0 of 1 pod(s) from app 10000 | |
| 2015/09/30 15:27:36.751338 [D][SCD][#1443598056][C_0]["qiniu.com/qcos/kernel.v3/sched/pick.go:328"] loadDirtyPods dirty pods(all): 1 | |
| 2015/09/30 15 |