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
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import java.util.Set; | |
class Pair<First,Second> { | |
First first; | |
Second second; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://code.angularjs.org/0.10.6/angular-scenario-0.10.6.js" ng:autotest></script> | |
<script type="text/javascript"> | |
angular.scenario.dsl('appElement', function() { | |
return function(selector, fn) { | |
return this.addFutureAction('element ' + selector, function($window, $document, done) { | |
fn.call(this, $window.angular.element(selector)); | |
done(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="/build/angular-scenario.js" ng:autotest></script> | |
<script type="text/javascript"> | |
// this is just copy of browser().navigateTo() | |
// the only difference is this implementation accepts future value | |
angular.scenario.dsl('goToFutureUrl', function() { | |
return function(futureUrl) { | |
var application = this.application; |
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
<!DOCTYPE html> | |
<html id="ng-app" ng-app> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="http://code.angularjs.org/0.10.6/angular-0.10.6.min.js"></script> | |
<script type="text/javascript"> | |
function Main() { | |
var $scope = this; | |
$scope.persons = []; | |
for(var i = 0; i < 5000; i++) { |
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
<!doctype html> | |
<html> | |
<head> | |
<title>angular-zrm</title> | |
<script src="http://ci.angularjs.org/job/angular.js-vojta/167/artifact/build/pkg/0.10.7-3173d860/angular-0.10.7-3173d860.min.js"></script> | |
<script src="foo-controller.js"></script> | |
</head> | |
<body ng:app> | |
<div ng:controller="FooController"> | |
<button ng:click="clear()">Clear</button> |
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
)]}', | |
[{ | |
"name": "one" | |
}, { | |
"name": "two" | |
}] |
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
// simple dsl just wrapping angular's dsl, just providing higher abstraction | |
angular.scenario.dsl('submitMessage', function() { | |
return function(message) { | |
// these dsl already register futures (add fn into the queue), | |
// so you don't wrap them into addFutureAction | |
input('modelValue').enter(message); | |
element('button.submit').click(); | |
}; | |
}); |
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
var app = angular.module('plunker', []); | |
app.controller('MainCtrl', function($scope) { | |
$scope.name = 'World'; | |
}); |
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
var fs = require('fs'); | |
var getLastModified = function(files, done) { | |
var timestamps = new Array(files.length); | |
var pending = files.length; | |
files.forEach(function(file, idx) { | |
fs.stat(file, function(err, stat) { | |
timestamps[idx] = stat.mtime; |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
inline: { | |
'index.html': ['tpl/*.html'] | |
} | |
}); | |
grunt.registerMultiTask('inline', 'Inline AngularJS templates into single file.', function() { | |
var SCRIPT = '<script type="text/ng-template" id="<%= id %>"><%= content %></script>\n'; |