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; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| namespace ConsoleApplication1 | |
| { | |
| internal class Program | |
| { | |
| private static void Main(string[] args) | |
| { |
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; | |
| using Castle.MicroKernel.Registration; | |
| using Castle.Windsor; | |
| using Nancy; | |
| using Nancy.Bootstrappers.Windsor; | |
| using Nancy.Hosting.Self; | |
| namespace ConsoleApplication1 | |
| { | |
| public interface IFoo |
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
| <Application x:Class="CaliburnWpfAppCaliburn.App" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="clr-namespace:CaliburnWpfAppCaliburn"> | |
| <Application.Resources> | |
| <ResourceDictionary> | |
| <ResourceDictionary.MergedDictionaries> | |
| <ResourceDictionary> | |
| <local:AppBootstrapper x:Key="bootstrapper" /> | |
| </ResourceDictionary> |
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
| declare @TableName sysname = 'ActiveOptions' | |
| declare @Result varchar(max) = 'public class ' + @TableName + ' | |
| {' | |
| select @Result = @Result + ' | |
| public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } | |
| ' | |
| from | |
| ( | |
| select |
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
| // The code below need to be pasted immediately after this line "static function OnBeforeRequest(oSession: Session) {" | |
| function RequestContains (uri:String) { | |
| return oSession.uriContains(uri) || oSession.oRequest.headers.ExistsAndContains("Referer", uri); | |
| } | |
| if ( | |
| false | |
| || RequestContains("ClientState.ashx") | |
| || RequestContains("keepAlive.ashx") |
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; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Text; | |
| namespace ClassLibrary1 | |
| { |
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; | |
| using System.Collections.Generic; | |
| using System.Configuration; | |
| using System.Linq; | |
| using System.Net.Mime; | |
| using System.Web; | |
| using System.Web.Mvc; | |
| using Microsoft.TeamFoundation.Build.Client; | |
| using Microsoft.TeamFoundation.Client; | |
| using TeamFoundationMonitor.Domain; |
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
| from flask import Flask, request | |
| from flask.ext.restful import Resource, Api | |
| import json | |
| app = Flask(__name__) | |
| api = Api(app) | |
| projects = {} |
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
| #http://stackoverflow.com/questions/13073281/how-to-mock-pythons-datetime-now-in-a-class-method-for-unit-testing?rq=1 | |
| from mock import patch | |
| from mock import Mock | |
| import unittest | |
| class MyCalc(object): | |
| def add(self,x ,y): | |
| return x+y | |
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
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.preference.Preference; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.LinearLayout; | |
| import com.google.ads.AdRequest; | |
| import com.google.ads.AdSize; |