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 DateFormatter = { | |
| format: function(d) { | |
| var d_date = d.getDate(); | |
| var d_month = d.getMonth(); | |
| d_month++; | |
| var d_year = d.getFullYear(); | |
| var a_p = ''; | |
| var d_hour = d.getHours(); |
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
| exports.format = function (d) { | |
| var d_date = d.getDate(); | |
| var d_month = d.getMonth(); | |
| d_month++; | |
| var d_year = d.getFullYear(); | |
| var a_p = ''; | |
| var d_hour = d.getHours(); | |
| if (d_hour < 12) |
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 dateFormatter = require('../utilities/dateFormatter.js'); | |
| app.get('/page', function(req, res){ | |
| var d = new Date(); | |
| console.log(dateFormatter.format(d)); | |
| // prints out 25/2/2012 1:06 AM | |
| ... |
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
| <system.diagnostics> | |
| <sources> | |
| <source name="System.ServiceModel" | |
| switchValue="Information,ActivityTracing" | |
| propagateActivity="true"> | |
| <listeners> | |
| <add name="xml" /> | |
| </listeners> | |
| </source> | |
| <source name="System.ServiceModel.MessageLogging"> |
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 target = require('../modules/dateFormatter'); | |
| exports.dateShouldPrintCorrectly = function(test){ | |
| // given | |
| var date = new Date('25 Dec, 1995 23:15:00'); | |
| // when | |
| var result = target.format(date); | |
| // then |
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
| dateFormatterTest | |
| ✔ dateShouldPrintCorrectly | |
| OK: 1 assertions (9ms) | |
| jumble@jumble-Inspiron-600m:~/Documents/Dev/Node/Projects/clog/src$ |
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
| using System; | |
| public class OnLoadTest | |
| { | |
| static void Main() | |
| { | |
| Page page = new Page(); | |
| //Wire up the event delegate | |
| page.Load += new Page.OnLoadHandler(MyHandler); |
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
| using System; | |
| public class OnLoadTest | |
| { | |
| static void Main() | |
| { | |
| Page page = new Page(); | |
| //Wire up the event delegate | |
| page.Load += new Action<object, EventArgs>(MyHandler); |
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
| public interface IDidSomething | |
| { | |
| int UserID { get; set; } | |
| DateTime EventDate { get; set; } | |
| } | |
| public class Publisher | |
| { | |
| public IBus Bus { get; set; } |
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
| public interface IBus | |
| { | |
| void Publish<T>(Action<T> action); | |
| } |
OlderNewer