Skip to content

Instantly share code, notes, and snippets.

View AndreasMadsen's full-sized avatar

Andreas Madsen AndreasMadsen

View GitHub Profile
@AndreasMadsen
AndreasMadsen / build.log
Last active August 29, 2015 14:03
MKL numpy
--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 August 29, 2015 14:04
d3 force layout overflow

d3 force layout issue

@AndreasMadsen
AndreasMadsen / README.md
Last active August 29, 2015 14:04
d3 force layout overflow

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 July 17, 2014 20:21
d3 force layout overflow

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 / graph.json
Last active August 29, 2015 14:04
bug in chrome?
[{"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 August 25, 2014 15:47
Add CallSiteGetFunctionArguments to frame object
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;
d8 --allow-natives-syntax test.js
@AndreasMadsen
AndreasMadsen / patch.diff
Last active August 29, 2015 14:05
Working Local Scope in v8
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) {
'use strict';
var asyncWrap = process.binding('async_wrap');
var fs = require('fs');
var asyncHooksObject = {};
var kCallInitHook = 0;
asyncHooksObject[kCallInitHook] = 1;
//asyncHooksObject = new Uint8Array([1]);
'use strict';
var stream = require('stream');
var timer = new stream.Readable({
highWaterMark: 1,
read: function() {
console.log('read');
var self = this;