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.Configuration | |
<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
captcha(); | |
}); | |
function captcha() { | |
Recaptcha.create("@(ConfigurationManager.AppSettings["recaptchaPublicKey"])", "captcha", |
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 (Ajax.BeginForm("Form", "Home", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "target", OnComplete = "captcha(this)"})) | |
{ | |
@Html.ValidationSummary() | |
<div id="captcha"></div> | |
<input type="submit" value="Submit" /> | |
} |
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
[HttpPost] | |
public async Task<ActionResult> Form() | |
{ | |
RecaptchaVerificationHelper recaptchaHelper = this.GetRecaptchaVerificationHelper(); | |
if (String.IsNullOrEmpty(recaptchaHelper.Response)) | |
{ | |
ModelState.AddModelError("", "Le captcha ne peut être vide."); | |
return PartialView(); | |
} |
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
var page = require('webpage').create(); | |
page.open(url, function(status) { | |
var title = page.evaluate(function() { | |
return document.title; | |
}); | |
console.log('Page title is ' + title); | |
}); |
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
var casper = require('casper').create(); | |
casper.start('http://casperjs.org/', function() { | |
this.echo(this.getTitle()); | |
}); | |
casper.thenOpen('http://phantomjs.org', function() { | |
this.echo(this.getTitle()); | |
}); |
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
function applyResponsive(force_reload){ | |
var new_breakpoint_value = setBreakpoint($(window).width()); | |
var orientation_originale = _DEVICE_CONFIG.orientation; | |
var reload_needed = force_reload | false; | |
// On recharge seulement si le format responsive à changé suite au resize | |
if(force_reload || (new_breakpoint_value != _BREAKPOINT && orientation_originale == setOrientation())){ | |
$.removeCookie('deviceConfig'); | |
loadDeviceConfig(); |
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
<configuration> | |
<system.web> | |
<httpRuntime executionTimeout="300" /> | |
</system.web> | |
</configuration> |
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
[1F28:0AB0][2014-12-22T23:01:43]i301: Applying execute package: vs_professionalcore, action: Install, path: C:\ProgramData\Package Cache\{5D40AFB7-6DC9-3903-A065-2C122B9483CE}v14.0.22310\packages\professionalcore\Setup\vs_professionalcore.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" VSEXTUI="1" VS7.3643236F_FC70_11D3_A536_0090278A1BB8="C:\Program Files (x86)\Microsoft Visual Studio 14.0" PIDKEY="VT2XGN96MGPGC23V98KJRX7VV" FEEDBACKOPTIN="1"' | |
[0DA4:10DC][2014-12-22T23:02:30]i000: MUX: ExecuteError: Package (vs_professionalcore) failed: Error Message Id: -2147483648 ErrorMessage: 12/22/14 23:02:30 DDSet_Error: Internal error: 1058. | |
[0DA4:10DC][2014-12-22T23:02:38]i000: MUX: ExecuteError: Package (vs_professionalcore) failed: Error Message Id: -2147483648 ErrorMessage: 12/22/14 23:02:38 DDSet_Error: Internal error: 1058. | |
[0DA4:10DC][2014-12-22T23:02:55]i000: MUX: ExecuteError: Package (vs_professionalcore) failed: Error Message Id: 1712 ErrorMessage: Error 1712.One or more of the files required |
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 LinkGenerator | |
{ | |
public string GetLink(string url, string title) | |
{ | |
return string.Format(GetLinkFormatPattern(), url, title); | |
} | |
public virtual string GetLinkFormatPattern() | |
{ | |
return "<a href=\"{0}\">{1}</a>"; |
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; | |
var uri = new Uri(Env.ScriptArgs[0]); | |
Console.WriteLine("AbsolutePath - " + uri.AbsolutePath); | |
Console.WriteLine("AbsoluteUri - " + uri.AbsoluteUri); | |
Console.WriteLine("Authority - " + uri.Authority); | |
Console.WriteLine("DnsSafeHost - " + uri.DnsSafeHost); | |
Console.WriteLine("Fragment - " + uri.Fragment); | |
Console.WriteLine("Host - " + uri.Host); |