This file contains 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
<head> | |
<?php | |
$fileName = basename(__FILE__); | |
switch($fileName){ | |
case 'content/test.inc.php': | |
echo '<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css">'; | |
echo '<link rel="stylesheet" href="https://d3egb1p3jkzgcl.cloudfront.net/donde-style-v2.min.css">'; | |
echo '<link rel="stylesheet" href="http://api.donde.io/css/53299c5e7ec08ebbfe000017">'; | |
break; | |
case 'some/other/file/here.php': // if you want to do something if the file is different than test.inc.php, check for it here |
This file contains 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
$this->assertEquals(sort([]), sort([1, 2, 3, 4])); |
This file contains 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
$x = new DateTime(); | |
if ($x->diff) { echo "diff"; } else { echo "no"; } | |
// outputs no |
This file contains 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
diff --git a/gulpfile.js b/gulpfile.js | |
index b166623..fe7ae80 100644 | |
--- a/gulpfile.js | |
+++ b/gulpfile.js | |
@@ -5,6 +5,8 @@ var jshint = require('gulp-jshint'); | |
var browserify = require('browserify'); | |
var tape = require('gulp-tape'); | |
+var shell = require('gulp-shell'); | |
+ |
This file contains 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
diff --git a/gulpfile.js b/gulpfile.js | |
index fe7ae80..c0b13dc 100644 | |
--- a/gulpfile.js | |
+++ b/gulpfile.js | |
@@ -28,6 +28,11 @@ gulp.task('test', shell.task([ | |
'tape ' + paths.js_test + '* | faucet', | |
])); | |
+gulp.task('test-debug', function() { | |
+ return gulp.src(paths.js_test + '/*.js') |
This file contains 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
diff --git a/package.json b/package.json | |
new file mode 100644 | |
index 0000000..82fafa2 | |
--- /dev/null | |
+++ b/package.json | |
@@ -0,0 +1,22 @@ | |
+{ | |
+ "name": "graph", | |
+ "version": "0.0.1", | |
+ "description": "A simple graph library", |
This file contains 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
diff --git a/js/src/edge.js b/js/src/edge.js | |
new file mode 100644 | |
index 0000000..e829916 | |
--- /dev/null | |
+++ b/js/src/edge.js | |
@@ -0,0 +1,24 @@ | |
+var Edge = function(value) { | |
+ this.id = value || new Date().getTime(); | |
+ | |
+ this.nodes = {}; |
This file contains 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
diff --git a/js/src/edge.js b/js/src/edge.js | |
new file mode 100644 | |
index 0000000..e151541 | |
--- /dev/null | |
+++ b/js/src/edge.js | |
@@ -0,0 +1,24 @@ | |
+var Edge = function(value) { | |
+ this.id = value || new Date().getTime(); | |
+ | |
+ this.nodes = {}; |
This file contains 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
diff --git a/js/src/graph.js b/js/src/graph.js | |
index 00ab25c..e4a61d5 100644 | |
--- a/js/src/graph.js | |
+++ b/js/src/graph.js | |
@@ -21,6 +21,10 @@ Graph.prototype = { | |
return this.edges.some(function(edge) { | |
return edge.areAdjacent(node1, node2); | |
}); | |
+ }, | |
+ |
This file contains 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
diff --git a/js/src/edge.js b/js/src/edge.js | |
index 7dc926b..67e776d 100644 | |
--- a/js/src/edge.js | |
+++ b/js/src/edge.js | |
@@ -1,8 +1,8 @@ | |
var Edge = function(options) { | |
- this.name = options.name; | |
+ this.props = options || {}; | |
+ this.id = new Date().getTime(); |
OlderNewer