alasql 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/alasql-cli.js +1 -1
- package/dist/alasql-worker.js +2 -2
- package/dist/alasql-worker.min.js +1 -1
- package/dist/alasql.fs.js +11231 -11231
- package/dist/alasql.js +17 -17
- package/dist/alasql.min.js +2 -16
- package/package.json +1 -1
- package/.npmignore +0 -15
- package/utils/2ch/2ch.js +0 -69
- package/utils/2ch/README.md +0 -3
- package/utils/2repl.js +0 -21
- package/utils/README.md +0 -16
- package/utils/a.a +0 -0
- package/utils/a.jison +0 -2455
- package/utils/a.js +0 -2546
- package/utils/a1.html +0 -120
- package/utils/abc.tsv +0 -4
- package/utils/callback/cb1.js +0 -59
- package/utils/callback/cb2.js +0 -45
- package/utils/closure/README.md +0 -1
- package/utils/closure/compiler.jar +0 -0
- package/utils/cordova/alasql-cordova.js +0 -134
- package/utils/cordova/filestorage.js +0 -138
- package/utils/cordova/test.js +0 -5
- package/utils/cordova/test1.js +0 -27
- package/utils/cordova/test1.json +0 -1
- package/utils/d31/1.html +0 -133
- package/utils/d31/2.html +0 -130
- package/utils/d31/3.html +0 -131
- package/utils/d31/5.html +0 -133
- package/utils/d31/d3.v3.min.js +0 -5
- package/utils/d31/force.csv +0 -29
- package/utils/d31/forcerus.csv +0 -29
- package/utils/d31/index.html +0 -120
- package/utils/d3graph/index.html +0 -98
- package/utils/d3graph/links.json +0 -58
- package/utils/d3graph/nodes.json +0 -38
- package/utils/graph/CREATE CLASS G1 +0 -39
- package/utils/graph/README.md +0 -3
- package/utils/graph/idea.txt +0 -22
- package/utils/graph/ides 150428.txt +0 -24
- package/utils/graph/index.html +0 -68
- package/utils/graph/miserables.json +0 -337
- package/utils/indexeddb/index.html +0 -24
- package/utils/main.html +0 -207
- package/utils/mainww.html +0 -9
- package/utils/mainww1.html +0 -15
- package/utils/minisql/minisql.js +0 -377
- package/utils/redj/README.md +0 -10
- package/utils/redj/redj.js +0 -44
- package/utils/test.js +0 -6
- package/utils/testbench.html +0 -15
- package/utils/testbench.worker.html +0 -15
package/utils/d31/2.html
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<meta charset="utf-8">
|
|
3
|
-
<script src="d3.v3.min.js"></script>
|
|
4
|
-
<script src="../../dist/alasql.js"></script>
|
|
5
|
-
<style>
|
|
6
|
-
|
|
7
|
-
path.link {
|
|
8
|
-
fill: none;
|
|
9
|
-
stroke: #666;
|
|
10
|
-
stroke-width: 1.5px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
circle {
|
|
14
|
-
fill: #ccc;
|
|
15
|
-
stroke: #fff;
|
|
16
|
-
stroke-width: 1.5px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
text {
|
|
20
|
-
fill: #000;
|
|
21
|
-
font: 10px sans-serif;
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
</style>
|
|
26
|
-
<body>
|
|
27
|
-
<script>
|
|
28
|
-
|
|
29
|
-
// get the data
|
|
30
|
-
|
|
31
|
-
alasql('SELECT * FROM CSV("force.csv",{headers:true})',[],function(data){
|
|
32
|
-
var vv = alasql('SEARCH DISTINCT(UNION ALL(/[source],/[target])) FROM ?',[data]);
|
|
33
|
-
|
|
34
|
-
alasql('CREATE GRAPH '+vv.map(function(v){return '"'+v+'"'}));
|
|
35
|
-
|
|
36
|
-
alasql('CREATE GRAPH '+data.map(function(e){
|
|
37
|
-
return '"'+e.source+'" > {[value]:'+e.value+'} > "'+e.target+'"';
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
|
-
alasql('SEARCH "Harry" PATH("Roger") EDGE SET(color="red")');
|
|
41
|
-
alasql('SEARCH "Johan" PATH("Carol") EDGE SET(color="blue")');
|
|
42
|
-
|
|
43
|
-
var width = 960,
|
|
44
|
-
height = 500;
|
|
45
|
-
|
|
46
|
-
var force = d3.layout.force()
|
|
47
|
-
|
|
48
|
-
.nodes(alasql('SEARCH VERTEX D3()'))
|
|
49
|
-
.links(alasql('SEARCH EDGE D3()'))
|
|
50
|
-
|
|
51
|
-
.size([width, height])
|
|
52
|
-
.linkDistance(60)
|
|
53
|
-
.charge(-300)
|
|
54
|
-
.on("tick", tick)
|
|
55
|
-
.start();
|
|
56
|
-
|
|
57
|
-
var svg = d3.select("body").append("svg")
|
|
58
|
-
.attr("width", width)
|
|
59
|
-
.attr("height", height);
|
|
60
|
-
|
|
61
|
-
// build the arrow.
|
|
62
|
-
svg.append("svg:defs").selectAll("marker")
|
|
63
|
-
.data(["end"]) // Different link/path types can be defined here
|
|
64
|
-
.enter().append("svg:marker") // This section adds in the arrows
|
|
65
|
-
.attr("id", String)
|
|
66
|
-
.attr("viewBox", "0 -5 10 10")
|
|
67
|
-
.attr("refX", 15)
|
|
68
|
-
.attr("refY", -1.5)
|
|
69
|
-
.attr("markerWidth", 6)
|
|
70
|
-
.attr("markerHeight", 6)
|
|
71
|
-
.attr("orient", "auto")
|
|
72
|
-
.append("svg:path")
|
|
73
|
-
.attr("d", "M0,-5L10,0L0,5");
|
|
74
|
-
|
|
75
|
-
// add the links and the arrows
|
|
76
|
-
var path = svg.append("svg:g").selectAll("path")
|
|
77
|
-
.data(force.links())
|
|
78
|
-
.enter().append("svg:path")
|
|
79
|
-
// .attr("class", function(d) { return "link " + d.type; })
|
|
80
|
-
.attr("class", "link")
|
|
81
|
-
.style('stroke',function(d){
|
|
82
|
-
console.log(d.color);
|
|
83
|
-
return d.color;
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
.attr("marker-end", "url(#end)");
|
|
87
|
-
|
|
88
|
-
// define the nodes
|
|
89
|
-
var node = svg.selectAll(".node")
|
|
90
|
-
.data(force.nodes())
|
|
91
|
-
.enter().append("g")
|
|
92
|
-
.attr("class", "node")
|
|
93
|
-
.call(force.drag);
|
|
94
|
-
|
|
95
|
-
// add the nodes
|
|
96
|
-
node.append("circle")
|
|
97
|
-
.attr("r", 5);
|
|
98
|
-
|
|
99
|
-
// add the text
|
|
100
|
-
node.append("text")
|
|
101
|
-
.attr("x", 12)
|
|
102
|
-
.attr("dy", ".35em")
|
|
103
|
-
.text(function(d) { return d.name; });
|
|
104
|
-
|
|
105
|
-
// add the curvy lines
|
|
106
|
-
function tick() {
|
|
107
|
-
path.attr("d", function(d) {
|
|
108
|
-
var dx = d.target.x - d.source.x,
|
|
109
|
-
dy = d.target.y - d.source.y,
|
|
110
|
-
dr = Math.sqrt(dx * dx + dy * dy);
|
|
111
|
-
return "M" +
|
|
112
|
-
d.source.x + "," +
|
|
113
|
-
d.source.y + "A" +
|
|
114
|
-
dr + "," + dr + " 0 0,1 " +
|
|
115
|
-
d.target.x + "," +
|
|
116
|
-
d.target.y;
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
node
|
|
120
|
-
.attr("transform", function(d) {
|
|
121
|
-
return "translate(" + d.x + "," + d.y + ")"; });
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</script>
|
|
129
|
-
</body>
|
|
130
|
-
</html>
|
package/utils/d31/3.html
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<meta charset="utf-8">
|
|
3
|
-
<script src="d3.v3.min.js"></script>
|
|
4
|
-
<script src="../../dist/alasql.js"></script>
|
|
5
|
-
<style>
|
|
6
|
-
|
|
7
|
-
path.link {
|
|
8
|
-
fill: none;
|
|
9
|
-
stroke: #666;
|
|
10
|
-
stroke-width: 1.5px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
circle {
|
|
14
|
-
fill: #ccc;
|
|
15
|
-
stroke: #fff;
|
|
16
|
-
stroke-width: 1.5px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
text {
|
|
20
|
-
fill: #000;
|
|
21
|
-
font: 10px sans-serif;
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
</style>
|
|
26
|
-
<body>
|
|
27
|
-
<script>
|
|
28
|
-
|
|
29
|
-
// get the data
|
|
30
|
-
|
|
31
|
-
alasql('SELECT * FROM CSV("forcerus.csv",{headers:true})',[],function(data){
|
|
32
|
-
|
|
33
|
-
alasql('CREATE GRAPH '+data.map(function(e){
|
|
34
|
-
return '"'+e.source+'" > {[value]:'+e.value+'} > "'+e.target+'" ';
|
|
35
|
-
}));
|
|
36
|
-
|
|
37
|
-
alasql('SEARCH / VERTEX D3() SET([index]=[$id])');
|
|
38
|
-
console.log(alasql('SEARCH / VERTEX D3()'));
|
|
39
|
-
console.log(alasql('SEARCH / EDGE D3()'));
|
|
40
|
-
|
|
41
|
-
alasql('SEARCH / "Harry" PATH("Roger") EDGE SET(color="red")');
|
|
42
|
-
alasql('SEARCH / "Johan" PATH("Carol") EDGE SET(color="blue")');
|
|
43
|
-
|
|
44
|
-
var width = 960,
|
|
45
|
-
height = 500;
|
|
46
|
-
|
|
47
|
-
var force = d3.layout.force()
|
|
48
|
-
|
|
49
|
-
.nodes(alasql('SEARCH / VERTEX D3()'))
|
|
50
|
-
.links(alasql('SEARCH / EDGE D3()'))
|
|
51
|
-
|
|
52
|
-
.size([width, height])
|
|
53
|
-
.linkDistance(60)
|
|
54
|
-
.charge(-300)
|
|
55
|
-
.on("tick", tick)
|
|
56
|
-
.start();
|
|
57
|
-
|
|
58
|
-
var svg = d3.select("body").append("svg")
|
|
59
|
-
.attr("width", width)
|
|
60
|
-
.attr("height", height);
|
|
61
|
-
|
|
62
|
-
// build the arrow.
|
|
63
|
-
svg.append("svg:defs").selectAll("marker")
|
|
64
|
-
.data(["end"]) // Different link/path types can be defined here
|
|
65
|
-
.enter().append("svg:marker") // This section adds in the arrows
|
|
66
|
-
.attr("id", String)
|
|
67
|
-
.attr("viewBox", "0 -5 10 10")
|
|
68
|
-
.attr("refX", 15)
|
|
69
|
-
.attr("refY", -1.5)
|
|
70
|
-
.attr("markerWidth", 6)
|
|
71
|
-
.attr("markerHeight", 6)
|
|
72
|
-
.attr("orient", "auto")
|
|
73
|
-
.append("svg:path")
|
|
74
|
-
.attr("d", "M0,-5L10,0L0,5");
|
|
75
|
-
|
|
76
|
-
// add the links and the arrows
|
|
77
|
-
var path = svg.append("svg:g").selectAll("path")
|
|
78
|
-
.data(force.links())
|
|
79
|
-
.enter().append("svg:path")
|
|
80
|
-
// .attr("class", function(d) { return "link " + d.type; })
|
|
81
|
-
.attr("class", "link")
|
|
82
|
-
.style('stroke',function(d){
|
|
83
|
-
console.log(d.color);
|
|
84
|
-
return d.color;
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
.attr("marker-end", "url(#end)");
|
|
88
|
-
|
|
89
|
-
// define the nodes
|
|
90
|
-
var node = svg.selectAll(".node")
|
|
91
|
-
.data(force.nodes())
|
|
92
|
-
.enter().append("g")
|
|
93
|
-
.attr("class", "node")
|
|
94
|
-
.call(force.drag);
|
|
95
|
-
|
|
96
|
-
// add the nodes
|
|
97
|
-
node.append("circle")
|
|
98
|
-
.attr("r", 5);
|
|
99
|
-
|
|
100
|
-
// add the text
|
|
101
|
-
node.append("text")
|
|
102
|
-
.attr("x", 12)
|
|
103
|
-
.attr("dy", ".35em")
|
|
104
|
-
.text(function(d) { return d.name; });
|
|
105
|
-
|
|
106
|
-
// add the curvy lines
|
|
107
|
-
function tick() {
|
|
108
|
-
path.attr("d", function(d) {
|
|
109
|
-
var dx = d.target.x - d.source.x,
|
|
110
|
-
dy = d.target.y - d.source.y,
|
|
111
|
-
dr = Math.sqrt(dx * dx + dy * dy);
|
|
112
|
-
return "M" +
|
|
113
|
-
d.source.x + "," +
|
|
114
|
-
d.source.y + "A" +
|
|
115
|
-
dr + "," + dr + " 0 0,1 " +
|
|
116
|
-
d.target.x + "," +
|
|
117
|
-
d.target.y;
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
node
|
|
121
|
-
.attr("transform", function(d) {
|
|
122
|
-
return "translate(" + d.x + "," + d.y + ")"; });
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
</script>
|
|
130
|
-
</body>
|
|
131
|
-
</html>
|
package/utils/d31/5.html
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<meta charset="utf-8">
|
|
3
|
-
<script src="d3.v3.min.js"></script>
|
|
4
|
-
<script src="../../dist/alasql.js"></script>
|
|
5
|
-
<style>
|
|
6
|
-
|
|
7
|
-
path.link {
|
|
8
|
-
fill: none;
|
|
9
|
-
stroke: #666;
|
|
10
|
-
stroke-width: 1.5px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
circle {
|
|
14
|
-
fill: #ccc;
|
|
15
|
-
stroke: #fff;
|
|
16
|
-
stroke-width: 1.5px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
text {
|
|
20
|
-
fill: #000;
|
|
21
|
-
font: 10px sans-serif;
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
</style>
|
|
26
|
-
<body>
|
|
27
|
-
<script>
|
|
28
|
-
|
|
29
|
-
// get the data
|
|
30
|
-
|
|
31
|
-
alasql('SELECT * FROM CSV("forcerus.csv",{headers:true})',[],function(data){
|
|
32
|
-
var vv = alasql('SEARCH DISTINCT(UNION ALL(/[source],/[target])) FROM ?',[data]);
|
|
33
|
-
alasql('CREATE GRAPH '+vv.map(function(v){return '"'+v+'"'}));
|
|
34
|
-
|
|
35
|
-
var vvv = {};
|
|
36
|
-
alasql('SEARCH / VERTEX').forEach(function(v){vvv[v.name] = v.$id});
|
|
37
|
-
|
|
38
|
-
alasql('CREATE GRAPH '+data.map(function(e){
|
|
39
|
-
return '#'+vvv[e.source]+' > {[value]:'+e.value+'} > #'+vvv[e.target]+'';
|
|
40
|
-
}));
|
|
41
|
-
|
|
42
|
-
// alasql('SEARCH / "Саша" PATH("Марина") EDGE SET(color="red")');
|
|
43
|
-
// alasql('SEARCH / "Иван" PATH("Карина") EDGE SET(color="blue")');
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var width = 960,
|
|
47
|
-
height = 500;
|
|
48
|
-
|
|
49
|
-
var force = d3.layout.force()
|
|
50
|
-
|
|
51
|
-
.nodes(alasql('SEARCH / VERTEX D3()'))
|
|
52
|
-
.links(alasql('SEARCH / EDGE D3()'))
|
|
53
|
-
|
|
54
|
-
.size([width, height])
|
|
55
|
-
.linkDistance(60)
|
|
56
|
-
.charge(-300)
|
|
57
|
-
.on("tick", tick)
|
|
58
|
-
.start();
|
|
59
|
-
|
|
60
|
-
var svg = d3.select("body").append("svg")
|
|
61
|
-
.attr("width", width)
|
|
62
|
-
.attr("height", height);
|
|
63
|
-
|
|
64
|
-
// build the arrow.
|
|
65
|
-
svg.append("svg:defs").selectAll("marker")
|
|
66
|
-
.data(["end"]) // Different link/path types can be defined here
|
|
67
|
-
.enter().append("svg:marker") // This section adds in the arrows
|
|
68
|
-
.attr("id", String)
|
|
69
|
-
.attr("viewBox", "0 -5 10 10")
|
|
70
|
-
.attr("refX", 15)
|
|
71
|
-
.attr("refY", -1.5)
|
|
72
|
-
.attr("markerWidth", 6)
|
|
73
|
-
.attr("markerHeight", 6)
|
|
74
|
-
.attr("orient", "auto")
|
|
75
|
-
.append("svg:path")
|
|
76
|
-
.attr("d", "M0,-5L10,0L0,5");
|
|
77
|
-
|
|
78
|
-
// add the links and the arrows
|
|
79
|
-
var path = svg.append("svg:g").selectAll("path")
|
|
80
|
-
.data(force.links())
|
|
81
|
-
.enter().append("svg:path")
|
|
82
|
-
// .attr("class", function(d) { return "link " + d.type; })
|
|
83
|
-
.attr("class", "link")
|
|
84
|
-
.style('stroke',function(d){
|
|
85
|
-
console.log(d.color);
|
|
86
|
-
return d.color;
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
.attr("marker-end", "url(#end)");
|
|
90
|
-
|
|
91
|
-
// define the nodes
|
|
92
|
-
var node = svg.selectAll(".node")
|
|
93
|
-
.data(force.nodes())
|
|
94
|
-
.enter().append("g")
|
|
95
|
-
.attr("class", "node")
|
|
96
|
-
.call(force.drag);
|
|
97
|
-
|
|
98
|
-
// add the nodes
|
|
99
|
-
node.append("circle")
|
|
100
|
-
.attr("r", 5);
|
|
101
|
-
|
|
102
|
-
// add the text
|
|
103
|
-
node.append("text")
|
|
104
|
-
.attr("x", 12)
|
|
105
|
-
.attr("dy", ".35em")
|
|
106
|
-
.text(function(d) { return d.name; });
|
|
107
|
-
|
|
108
|
-
// add the curvy lines
|
|
109
|
-
function tick() {
|
|
110
|
-
path.attr("d", function(d) {
|
|
111
|
-
var dx = d.target.x - d.source.x,
|
|
112
|
-
dy = d.target.y - d.source.y,
|
|
113
|
-
dr = Math.sqrt(dx * dx + dy * dy);
|
|
114
|
-
return "M" +
|
|
115
|
-
d.source.x + "," +
|
|
116
|
-
d.source.y + "A" +
|
|
117
|
-
dr + "," + dr + " 0 0,1 " +
|
|
118
|
-
d.target.x + "," +
|
|
119
|
-
d.target.y;
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
node
|
|
123
|
-
.attr("transform", function(d) {
|
|
124
|
-
return "translate(" + d.x + "," + d.y + ")"; });
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</script>
|
|
132
|
-
</body>
|
|
133
|
-
</html>
|