This file contains hidden or 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
# ***************************************************************** | |
# After updating the .gitignore file to ignore previously | |
# tracked file(s) by Git. However, Git is still tracking | |
# the file(s) that you added to .gitignore. Please stop the | |
# files from being tracked! :-) | |
# ***************************************************************** | |
# For a single file staging (a.k.a cache or index): | |
git rm --cached <theFileName> |
This file contains hidden or 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
[Test] | |
public void TestExceptAndIntersect() | |
{ | |
//check if equal with differing sequence | |
var list1 = new List<int>(new int[] { 1, 2, 3, 4, 5, 6 }); | |
var list2 = new List<int>(new int[] { 6, 5, 4, 3, 2, 1 }); | |
var result = list1.Except(list2).ToList(); | |
Assert.AreEqual(new int[] { }, result); | |
This file contains hidden or 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>Soratble Table Rows</title> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
</head> | |
<body> | |
<table border="1" id="formTable"> | |
<thead><th>View</th><th>Page</th><th>Sheet #</th><th>Reason</th><th>Location</th></thead> | |
<tbody id="sortThis"> |
This file contains hidden or 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Test</title> | |
</head> | |
<body> | |
<table cellpadding="1" cellspacing="1" border="1"> | |
<tr> | |
<td>type</td> | |
<td>j_username</td> |
This file contains hidden or 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 name = "John Jacob Jingleheimer Smith"; | |
//replace the space with a dot '.' | |
var id = name.replace(/\s/g, '.'); | |
console.log(id); | |
//now replace the '.' with a space | |
newId = id.replace(/\./g, ' '); | |
console.log(newId); |
This file contains hidden or 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
<!-- include source files here... --> | |
<script type="text/javascript" src="src/DateSort.js"></script> | |
<!-- include spec files here... --> | |
<script type="text/javascript" src="spec/SpecHelper.js"></script> | |
<script type="text/javascript" src="spec/DateSortSpec.js"></script> |
This file contains hidden or 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
it("should show Wisdom title with descending sort", function() { | |
var sortedDesc = dateSort.sortedDesc(booksData); | |
var sortedTitle = sortedDesc[0]['title']; | |
expect(sortedTitle).toEqual('Wisdom'); | |
}); |
This file contains hidden or 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
describe("Sort by Date", function() { | |
var dateSort; | |
var booksData; | |
beforeEach(function() { | |
dateSort = new DateSort(); | |
booksData = [ | |
{ | |
title: 'Health for a friend', | |
author: 'John Doe', |
This file contains hidden or 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
DateSort = function (){} | |
DateSort.prototype.sortAsc = function(theArray){ | |
return theArray.sort(date_sort_asc); | |
} | |
var date_sort_asc = function(a,b){ | |
a = new Date(a.publishDate); | |
b = new Date(b.publishDate); | |
return a<b ? -1 : a>b ? 1 : 0; |
This file contains hidden or 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
DateSort = function (){} | |
DateSort.prototype.sortAsc = function(theArray){ | |
return ""; | |
} |
NewerOlder