Skip to content

Instantly share code, notes, and snippets.

Andreas Madsen AndreasMadsen

  • Computationally Demanding
  • Copenhagen, Denmark
Block or report user

Report or block AndreasMadsen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build.log
--2014-07-06 12:26:29-- https://pypi.python.org/packages/source/n/numpy/numpy-1.8.1.tar.gz
Resolving pypi.python.org... 185.31.17.175
Connecting to pypi.python.org|185.31.17.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3794076 (3.6M) [application/octet-stream]
Saving to: 'numpy-1.8.1.tar.gz'
0K .......... .......... .......... .......... .......... 1% 945K 4s
50K .......... .......... .......... .......... .......... 2% 1.10M 4s
100K .......... .......... .......... .......... .......... 4% 3.13M 3s
@AndreasMadsen
AndreasMadsen / README.md
Last active Aug 29, 2015
d3 force layout overflow
View README.md

d3 force layout issue

@AndreasMadsen
AndreasMadsen / README.md
Last active Aug 29, 2015
d3 force layout overflow
View README.md

In the figure it is seen that some nodes appear outside the container, this causes them to be hidden. Furthermore it is not possible to drag the figure such that all nodes can be seen.

From the documentation:

The function is evaluated whenever the layout starts. Typically, the distance is specified in pixels; however, the units are arbitrary relative to the layout's size.

While it is not completely clear. I believe this means that the distance is scaled such that all information (nodes) is visible.

@AndreasMadsen
AndreasMadsen / README.md
Created Jul 17, 2014
d3 force layout overflow
View README.md

In the figure it is seen that some nodes appear outside the container, this causes them to be hidden. Furthermore it is not possible to drag the figure such that all nodes can be seen.

From the documentation:

The function is evaluated whenever the layout starts. Typically, the distance is specified in pixels; however, the units are arbitrary relative to the layout's size.

While it is not completely clear. I believe this means that the distance is scaled such that all information (nodes) is visible.

View graph.json
[{"group":4097, "nodes":[["Qualcomm Boosts Stock Buyback Plan, Dividend",5,5280]], "links":[]},
{"group":4098, "nodes":[["Jeffrey Immelt Aims to Assure Investors by Buying Company Stock",5,5281]], "links":[]},
{"group":11786, "nodes":[["The World's Riskiest Stock Market?",5,15376]], "links":[]},
{"group":20494, "nodes":[["Fidelity Investments Creating New Stock-Trading Venue",5,26784]], "links":[]},
{"group":19475, "nodes":[["Investors lose taste for Just Eat as tech stocks slide",2,25699],["Investors lose taste for Just Eat as tech stocks slide",2,25701],["Just Eat causes indigestion as shares fall below listing price",2,25454],["Just Eat causes indigestion as shares fall below listing price",2,25458],["Just Eat causes indigestion as shares fall below listing price",2,25464],["Investors lose taste for Just Eat as tech stocks slide",2,25688]], "links":[[25699,25701,0.0042186519],[25454,25701,0.0522736423],[25454,25699,0.0552179068],[25454,25688,0.0549006723],[25454,25464,0.0005187572],[25454,25458,0.001480041
@AndreasMadsen
AndreasMadsen / v8.diff
Created Aug 25, 2014
Add CallSiteGetFunctionArguments to frame object
View v8.diff
diff --git a/src/messages.js b/src/messages.js
index c86c12d..ad5921c 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -801,6 +801,10 @@ function CallSiteGetFunction() {
? UNDEFINED : GET_PRIVATE(this, CallSiteFunctionKey);
}
+function CallSiteGetFunctionArguments() {
+ return GET_PRIVATE(this, CallSiteFunctionKey).arguments;
@AndreasMadsen
AndreasMadsen / patch.diff
Last active Aug 29, 2015
Working Local Scope in v8
View patch.diff
diff --git a/src/runtime.cc b/src/runtime.cc
index 1616434..a72eff3 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -14552,6 +14552,59 @@ RUNTIME_FUNCTION(Runtime_GetScript) {
}
+// Get variabels in this function scope
+RUNTIME_FUNCTION(Runtime_LocalVariabels) {
View run.sh
d8 --allow-natives-syntax test.js
View test.js
'use strict';
var asyncWrap = process.binding('async_wrap');
var fs = require('fs');
var asyncHooksObject = {};
var kCallInitHook = 0;
asyncHooksObject[kCallInitHook] = 1;
//asyncHooksObject = new Uint8Array([1]);
View gist:36692deccfcf474854e1
'use strict';
var stream = require('stream');
var timer = new stream.Readable({
highWaterMark: 1,
read: function() {
console.log('read');
var self = this;
You can’t perform that action at this time.