I transposed the coordinate axis of the chart because the item amount is dynamic.
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
casper.test.begin('Test enroll with Facebook.', 1, function suite(test) { | |
casper | |
.start('http://localhost/enroll') | |
.then(function() { // #1 Test: Register using Facebook but user click cancel button on auth page. | |
casper.click('#facebookLogin'); // Simulate an user click button 'Login with Facebook'. | |
casper.waitForPopup(/^https:\/\/www.facebook.com\/login/, function() { // Wait for Facebook login popup. | |
this.echo('Open Facebook login page when not login yet.'); // The user has not login yet. | |
}); | |
casper.withPopup(/^https:\/\/www.facebook.com\/login/, function() { // Do something within the popup. | |
this.evaluate(function() { // Simulate the user enters email and password. Then, click login button of Facebook. |
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
casper.test.begin('Test page.', 2, function suite(test) { | |
casper.start( | |
'https://cib.icicibank.com/corp/BANKAWAY?Action.CorpUser.Init1.001=Y&AppSignonBankId=ICI&AppType=corporate', | |
function() { | |
this.echo(this.getTitle()); | |
test.assertUrlMatch(/BANKAWAY?/, 'Current location is ' + this.getCurrentUrl()); | |
}); | |
casper.then(function(){ | |
this.fill('#rt', {}, true); |
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
/* | |
Created by jsgao0 on 2016/06/15. | |
The intallation guide: http://docs.casperjs.org/en/latest/installation.html | |
Steps: | |
1: Install PhantomJS globally. npm install phantomjs -g | |
2: Install CasperJS globally. npm install casperjs -g | |
3: Execute tests. casperjs test testRedirectAndBack.js | |
*/ | |
casper.test.begin('Test redirect and back to URLs.', 5, function suite(test) { |
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
public class DTC { // DateTimeComparison | |
public static bool lgr(DateTime a, DateTime b, bool isEqual = false) { // Left Datetime a is greater than right Datetime b. If isEqual is true then return true when the 2 Datetimes both are same. | |
int result = DateTime.Compare(a, b); | |
return isEqual ? (result >= 0) : (result > 0); | |
} | |
} |
I post a tutorial in order that my friend needs a 2D heat map for quailty display.
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
public class BusinessHours { | |
public DateTime openAt { get; private set; } | |
public DateTime closeAt { get; private set; } | |
public BusinessHours(DateTime openAt, DateTime closeAt) { | |
this.openAt = openAt; | |
this.closeAt = closeAt; | |
} | |
} | |
public class GroceryStore<T> where T : Grocery { |
NewerOlder