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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup> | |
<Content Include="App.config"> | |
<SubType>Designer</SubType> | |
</Content> | |
<Content Include="App.Base.config"> | |
<DependentUpon>App.config</DependentUpon> | |
</Content> | |
<Content Include="App.Debug.config"> |
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
// get all items in this frame split into regions | |
function getRegionItems (items) { | |
var result = []; | |
items.forEach(function (item) { | |
var x = Math.floor(item.pos.x / 28); | |
var y = Math.floor(item.pos.y / 28); | |
var region = (x * 4) + y; | |
if (result[region] === undefined) { | |
result[region] = [item]; |
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 stack () { | |
var content = []; | |
return { | |
push: function (v) { | |
content[content.length] = v; | |
}, | |
pop: function () { | |
var result = content.splice(-1, 1); | |
if (result.length === 1) { |
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 fibonacci (n) { | |
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); | |
}; | |
var fibonacci_memo = (function () { | |
var memo = [0,1]; | |
function fib (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { |
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 factorial (n) { | |
return n <= 1 ? 1 : n * factorial(n - 1); | |
}; | |
var factorial_memo = (function () { | |
var memo = [1]; | |
function fac (n) { | |
var result = memo[n]; | |
if (typeof result !== 'number') { |
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 query without the aggregation | |
SELECT o.OpinionDocumentId, | |
o.DisplayTitle, | |
o.Date | |
FROM dbo.OpinionDocumentOpinionDocuments c | |
JOIN dbo.OpinionDocuments o ON o.OpinionDocumentId = c.OpinionDocument_OpinionDocumentId | |
WHERE c.OpinionDocument_OpinionDocumentId1 = 617143 | |
-- adjusted query with aggregation sub-query | |
-- can this query be improved? |
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.Text.RegularExpressions; | |
namespace RegExWoo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var text = "701 N.Y.S.2d 766, 123 N.Y.S.2d 256 (N.Y.City Civ.Ct. 1999), McEntee v Cappucci"; |
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
(ns replays.handler | |
(:require [compojure.core :refer [GET defroutes]] | |
[compojure.route :as route] | |
[ring.util.response :refer [response resource-response]] | |
[ring.middleware.json :as json] | |
[ring.middleware.defaults :refer [wrap-defaults api-defaults]])) | |
(defroutes app-routes | |
(GET "/" [] (resource-response "index.html" {:root "public"})) | |
(GET "/widgets" [] (response [{:name "Widget 1"} {:name "Widget 2"}])) |
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
host=prod.na2.lol.riotgames.com | |
xmpp_server_url=chat.na2.lol.riotgames.com | |
ladderURL=http://www.leagueoflegends.com/ladders | |
storyPageURL=http://www.leagueoflegends.com/story | |
lq_uri=https://lq.na2.lol.riotgames.com | |
ekg_uri=https://ekg.riotgames.com | |
regionTag=na | |
rssStatusURLs=null | |
lobbyLandingURL=http://landing.leagueoflegends.co.kr/ | |
loadModuleChampionDetail=true |
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
WITH RankedMonthlySizes AS | |
( | |
SELECT Matter_MatterId AS MatterId, | |
HostingFilesize, | |
DENSE_RANK() OVER (PARTITION BY Matter_MatterId ORDER BY MonthAndYear DESC) AS DateRank | |
FROM dbo.RelativityMatterFilesizes | |
) | |
SELECT s.MatterId, s.HostingFilesize | |
FROM RankedMonthlySizes AS s | |
JOIN dbo.Matters AS m ON m.MatterId = s.MatterId |
OlderNewer