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 AngularJSApp = angular.module("AngularJSApp", ["ngResource", "ngSanitize"]) | |
.config(function ($routeProvider, $httpProvider) { | |
$routeProvider. | |
when('/', { controller: NavigationCtrl, templateUrl: 'navigation.html' }). | |
when('/feedback', { controller: FeedbackCtrl, templateUrl: 'feedback.html' }). | |
otherwise({ redirectTo: '/' }); | |
$httpProvider.defaults.withCredentials = true; | |
delete $httpProvider.defaults.headers.common["X-Requested-With"]; |
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
//Double open angle brackets | |
//Using an open angle bracket at the end of the vector instead of a close angle bracket causes different behavior in Netscape //Gecko rendering. Without it, Firefox will work but Netscape won't: | |
<iframe src=http://ha.ckers.org/scriptlet.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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Reflection; | |
using Microsoft.CSharp.RuntimeBinder; | |
using System.Runtime.CompilerServices; | |
namespace ConsoleApplication2 | |
{ | |
class Program |
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; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
namespace SchemaMockup.Console | |
{ | |
using System.Data.Common; | |
using System.Data.SqlClient; | |
using PostgreClient; |
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; | |
using System.Data; | |
using System.Data.SqlClient; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Run"); | |
TestConnectionString("your connection string"); |
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 DynamicModel : DynamicObject | |
{ | |
private readonly bool _isStrictGet; | |
public IDictionary<string, object> _dict; | |
public DynamicModel(string objectName = null, IDictionary<string, object> dict = null, bool isStrictGet = false) | |
{ | |
ObjectName = objectName; | |
_dict = dict ?? new Dictionary<string, object>(); | |
_isStrictGet = isStrictGet; |
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 DynamicModel Convert(Dictionary<string, string> dictionary, bool isStrictGet) | |
{ | |
var customDynamicObject = new DynamicModel(isStrictGet: isStrictGet); | |
foreach (var key in dictionary.Keys) | |
{ | |
AddValueToExpandoRecursive(customDynamicObject, key, dictionary[key], isStrictGet); | |
} | |
return customDynamicObject; |
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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
using SEEK.Employment.Profile.API.Validation; | |
public class AntiXssValidator : IAntiXssValidator | |
{ | |
public static string[] XSSTagStringsForDoubleOpening = {"iframe", | |
"script", | |
"style", | |
"input" |
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
MyApp.directive('placeholder', function($timeout) { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function(scope, element, attr, ctrl) { | |
//check whether it support placeholder and cache it | |
scope.supportsPlaceholders = scope.supportsPlaceholders || function() { | |
return "placeholder" in document.createElement("input"); | |
}; |
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
* { | |
padding: 0; | |
margin: 0; | |
} | |
body { | |
font-size: 14px; | |
font-family: Georgia, "Bitstream Charter", serif; | |
color: #333333; | |
text-align: center; |
NewerOlder