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
@model MotherEffinChatSite.Models.HomeVM | |
@{ | |
Page.Title = "MVC Chat Example"; | |
} | |
@section ScriptSection { | |
<!-- The new message template... TODO: make it sexy --> | |
<script id="msgTmpl" type="text/x-jquery-tmpl"> | |
<li><p style="margin-bottom:-2px; color: black;"><strong>${user.name}</strong></p><p>${message}</p></li> |
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 sinon = require('sinon'), | |
Widget = require('../../widget'); | |
describe('My widget', function () { | |
var sandbox; | |
beforeEach(function () { | |
// Create a sandbox for the test | |
sandbox = sinon.sandbox.create(); | |
}); |
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
/*************************************************************/ | |
/*************************************************************/ | |
/*************************************************************/ | |
-- Create the temporary permission tables and stored procedures | |
-- TO preserve the permissions of an object. | |
-- | |
-- We use this method instead of using CREATE (if the object | |
-- doesn't exist) and ALTER (if the object exists) because the | |
-- latter one either requires the use of dynamic SQL (which we want to |
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 fs = require('fs'), | |
path = require('path'), | |
_ = require('underscore'), | |
when = require('when'), | |
express = require('express'), | |
GhostPlugin = require('../../../core/server/plugins/GhostPlugin'), | |
knex = require('../../../core/server/models/base').Knex, | |
KudosPlugin; | |
KudosPlugin = function (ghost) { |
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
// Original code by Joachim Lykke Andersen; http://devtalk.dk/2011/02/16/Workaround+EF+Code+First+On+AppHabour.aspx | |
using System.Data.Entity; | |
using System.Data.Entity.Database; | |
using System.Data.Entity.Design; | |
using System.Data.Entity.Infrastructure; | |
using System.Data.Metadata.Edm; | |
using System.Data.Objects; | |
using System.Globalization; | |
using System.Linq; |
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
/** | |
* Touchable Highlight example (that fires invariant as expected) | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, |
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
/** | |
### Regular component require statement | |
``` | |
const Token = require('v2/core/components/tokenizer/token'); | |
-> import Token from 'v2/core/components/tokenizer/token'; | |
``` | |
### Destructured require statement | |
``` |
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
arraysEqual = (nums1, nums2) -> | |
# Check the length | |
return false unless nums1.length == nums2.length | |
# Sort the arrays | |
nums1.sort() | |
nums2.sort() | |
# A helper for checking indices are same |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
// http://bingsharp.codeplex.com/ | |
using Bing; | |
// http://nuget.org/List/Packages/HtmlAgilityPack | |
using HtmlAgilityPack; |
NewerOlder