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 appController; | |
var inputDate = new Date(2013,2,27,11,15,00); | |
module("EurekaJ.AppController", { | |
setup: function() { | |
Ember.run(function() { | |
appController = EurekaJ.__container__.lookup("controller: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
var interval = null; | |
var args = phantom.args; | |
if (args.length < 1 || args.length > 2) { | |
console.log("Usage: " + phantom.scriptName + " <URL> <timeout>"); | |
phantom.exit(1); | |
} | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
if (msg.slice(0, 8) === 'WARNING:') { |
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
Even though JavaScript have matured significantly over the last five years, there is still a couple of areas where you will most definitely notice that you are working with a project that still have some maturing to do. Testing is definitely one of these areas, leaving a lot of the decisions required up to the application developers. This chapter will attempt to outline how you can successfully test your own Ember.js applications while looking at a real world implementation of one possible test harness. | |
As with applications written in other languages, there are multiple way to test your application, including: | |
• Unit Testing | |
• Integration Testing | |
• Performance Testing | |
• Regression Testing | |
• Black Box Testing | |
• Continuous Integration | |
Naturally, you might not need to implement a solution for all of these testing types in your own application. Chances are, though, that you might need several of them, where unit testing and integration testing are the most common types of test harnesses you will find f |
This file has been truncated, but you can view the full file.
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
/* | |
* Date Format 1.2.3 | |
* (c) 2007-2009 Steven Levithan <stevenlevithan.com> | |
* MIT license | |
* | |
* Includes enhancements by Scott Trenda <scott.trenda.net> | |
* and Kris Kowal <cixar.com/~kris.kowal/> | |
* | |
* Accepts a date, a mask, or a date and a mask. | |
* Returns a formatted version of the given date. |
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 appController; | |
module("EurekaJ.AppController", { | |
setup: function() { | |
appController = EurekaJ.ApplicationController.create(); | |
}, | |
teardown: function() { | |
} | |
}); |
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
{ | |
"guiPath": "JSFlotJAgent:Memory:Heap:Used", | |
"accountName": "ACCOUNT", | |
"hoursSince1970": 378981, | |
"metrics": [ | |
22780440, | |
23524272, | |
23936024, | |
24203536, | |
24806664, |
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
EME.PhotoControlsController = Ember.Controller.extend({ | |
needs: ['photoList'], | |
slideshowTimerId: null, | |
playSlideshow: function() { | |
console.log('playSlideshow'); | |
var controller = this; | |
controller.nextPhoto(); | |
this.set('slideshowTimerId', setInterval(function() {Ember.run.schedule('timers', controller, 'nextPhoto')}, 4000)); | |
}, |
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
package org.eurekaj.plugins.riak.dao; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.log4j.Logger; | |
import org.eurekaj.api.dao.TreeMenuDao; | |
import org.eurekaj.api.datatypes.Statistics; | |
import org.eurekaj.api.datatypes.basic.BasicStatistics; |
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
EurekaJ.TreeView = Ember.View.extend({ | |
items : null, | |
controller : Ember.Controller.create(), | |
init : function() { | |
this._super(); | |
this.set('controller._allowSelectionOfNonLeafNodes', this.get('allowSelectionOfNonLeafNodes')) | |
this.set('controller._allowMultipleSelections', this.get('allowMultipleSelections')) | |
}, |
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
I've set up a 3-node cluster (Cassandra 1.2.0) and a column family with a replication factor of 3. | |
I've also created a StackOverflow question for this topic: http://stackoverflow.com/questions/15198413/cassandra-running-out-of-memory | |
The Column family is called metric_hour and hold 15-second average values for one hour | |
with column names: | |
- account name | |
- metric name | |
- value type (string) |