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
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using ValTool = System.ComponentModel.DataAnnotations; | |
namespace Validation | |
{ | |
public class Validator | |
{ | |
public List<ValidationResult> ValidationErrors { get; private set; } |
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
//A common thing to remember | |
myList.Where(l => otherList.Contains(l.Id)); | |
_.filter(this.myList(), l => { | |
return _.contains(otherList, l.id); | |
}); |
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
<label class="ov-label">Options</label> | |
<div data-bind="foreach: optionList, validationOptions: {insertMessages: false}"> | |
<div class="radio"> | |
<label> | |
<input data-bind="checked: $parent.selectedOptionId, value: id" type="radio" name="optionGroup"> | |
<!-- ko text: name --><!--/ko--> | |
</label> | |
</div> | |
</div> |
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
$ wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains website.org \ | |
--no-parent \ | |
www.website.org/tutorials/html/ |
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
using System.Net.Http; | |
using (var client = new HttpClient()) | |
{ | |
var url = "http://google.com/api-example"; | |
var response = client.GetAsync(url).Result; | |
if (response.IsSuccessStatusCode) | |
{ | |
// by calling .Result you are performing a synchronous call |
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
'use strict'; | |
var mysqlBackup = require('./mysql-backup'); | |
var schedule = require('node-schedule'); | |
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup); |
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
<pre data-bind="text: ko.toJSON($data, null, 2)"></pre> |