Skip to content

Instantly share code, notes, and snippets.

View EricCote's full-sized avatar

Eric Cote EricCote

View GitHub Profile
@EricCote
EricCote / frValidation.js
Created June 14, 2017 18:11
Validation francais
$.validator.methods.range = function (value, element, param) {
var globalizedValue = value.replace(",", ".");
return this.optional(element) || (globalizedValue >= param[0] && globalizedValue <= param[1]);
}
$.validator.methods.number = function (value, element) {
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:[\s\.,]\d{3})+)(?:[\.,]\d+)?$/.test(value);
}
@EricCote
EricCote / test.js
Created March 31, 2017 13:28
test avance jquery
$("table.a-GV-table tr>td:nth-child(2)").filter(function( index ) {
return $( this ).html() === "Atlanta";
}).parent().children(":nth-child(1)").css({visibility: "hidden" });
@EricCote
EricCote / lien meteo septiles.txt
Last active March 29, 2017 19:22
lien meteo sept iles
http://api.wunderground.com/api/637a4c5321cdadb1/forecast/q/Canada/Sept-Iles.json
@EricCote
EricCote / menu bootstrap.html
Created March 29, 2017 15:29
menu bootstrap
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
https://raw.githubusercontent.com/jquery/jquery-ui/master/ui/i18n/datepicker-fr-CA.js
@EricCote
EricCote / employes.js
Last active February 22, 2017 20:55
Mercredi
/// <reference path="jquery-3.1.1.js" />
$(function () {
$("#btnEmployes").click(function () {
var httpRequest = new XMLHttpRequest();
httpRequest.addEventListener("readystatechange",
function () {
if (httpRequest.readyState ===
XMLHttpRequest.DONE) {
@EricCote
EricCote / A - Web Api Lab 5.txt
Last active February 16, 2017 22:03
Web Api Lab 5
Pour le lab 5
@EricCote
EricCote / A - Lab 4.txt
Last active January 17, 2017 02:00
Web Api Lab 4
Pour le lab 4
@EricCote
EricCote / Console.cs
Last active January 16, 2017 20:14
WebApi Client
static void Main(string[] args)
{
HttpClient client = new HttpClient();
client.BaseAddress =new Uri("http://localhost:52516/api/abonnement");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
@EricCote
EricCote / vs project cleanup
Last active December 19, 2016 17:23
cleanup VS projects
dir bin -Directory -recurse | rd -Recurse -Force
dir obj -Directory -recurse | rd -Recurse -Force
dir packages -Directory -recurse | rd -Recurse -Force
dir .vs -Directory -Hidden -recurse | rd -Recurse -Force
dir *.mdf -file -recusre | del -force
dir *.ldf -file -recusre | del -force