-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* databench 0.5 rewrite * update localcrawl * update to java8 * upgrade ci system * update * validate angular attributes ok * run crawl on different port * give tests time to build
- Loading branch information
1 parent
5767ecd
commit b78eaaf
Showing
40 changed files
with
4,198 additions
and
3,802 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "airbnb", | ||
"installedESLint": true, | ||
"plugins": [ | ||
"react", | ||
"jsx-a11y", | ||
"import" | ||
], | ||
"rules": { | ||
"no-param-reassign": 0 | ||
} | ||
} |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.nav { | ||
display: block; | ||
width: 100%; | ||
float: left; | ||
} | ||
.nav-pills li { | ||
display: block; | ||
padding: 5px 20px; | ||
border: 1px solid #55a; | ||
border-bottom: 0; | ||
border-top-left-radius: 4px; | ||
border-top-right-radius: 4px; | ||
float: left; | ||
margin-left: 5px; | ||
} | ||
.nav-pills li.active { | ||
border-top: 3px solid #55a; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* global Databench */ | ||
/* global angular */ | ||
|
||
const databench = new Databench.Connection(); | ||
Databench.ui.wire(databench); | ||
|
||
angular.module('angularApp', []) | ||
.controller('navCtrl', ['$scope', '$location', ($scope, $location) => { | ||
$scope.navCheck = (page) => { | ||
const currentRoute = $location.path().substring(1) || 'home'; | ||
return page === currentRoute; | ||
}; | ||
}]) | ||
.controller('testingAngular', ['$scope', ($scope) => { | ||
$scope.chapter = 'modify me'; | ||
}]) | ||
.controller('simplepi', ['$scope', ($scope) => { | ||
$scope.pi = '0.0 ± 1.0'; | ||
|
||
databench.on({ data: 'pi' }, (pi) => { | ||
$scope.pi = `${pi.estimate.toFixed(3)} ± ${pi.uncertainty.toFixed(3)}`; | ||
$scope.$apply(); | ||
}); | ||
}]); | ||
|
||
databench.connect(); |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#viz { | ||
height: 300px; | ||
width: 100%; | ||
} | ||
|
||
path.slice { | ||
stroke-width: 2px; | ||
} | ||
polyline { | ||
opacity: .3; | ||
stroke: black; | ||
stroke-width: 2px; | ||
fill: none; | ||
} | ||
input[type=text] { | ||
box-sizing: border-box; | ||
font-size: 110%; | ||
color: #555; | ||
display: block; | ||
width: 100%; | ||
padding: 6px 12px; | ||
line-height: 1.4; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* global Databench */ | ||
/* global d3charcount */ | ||
/* global document */ | ||
|
||
const databench = new Databench.Connection(); | ||
Databench.ui.wire(databench); | ||
document.getElementById('sentence').databenchUI.triggerOnKeyUp(); | ||
|
||
|
||
const d3visualizaton = d3charcount('viz'); | ||
|
||
databench.on({ data: 'counts' }, (counts) => { | ||
const reformattedData = Object.keys(counts) | ||
.map(letter => ({ label: letter, value: counts[letter] })); | ||
|
||
if (reformattedData.length > 0) d3visualizaton(reformattedData); | ||
}); | ||
|
||
|
||
databench.connect(); | ||
databench.emit('sentence', 'type a phrase'); |
Oops, something went wrong.