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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\xm] | |
@="URL:xm Protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\xm\shell] | |
[HKEY_CLASSES_ROOT\xm\shell\open] |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MinLength | |
{ | |
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
public Bitmap Draw(Color subjectCol, string subjectStr, Color statusCol, string statusStr) { | |
var fullHeight = 0; | |
var fullWidth = 0; | |
var padding = 8; | |
var shadowOffset = 5; | |
var font = new Font("Segoe UI", 100, GraphicsUnit.Pixel); | |
var maxWidth = (subjectStr.Length + statusStr.Length) * 100 + 4 * padding; | |
Bitmap bitmap = new Bitmap(maxWidth, 200); | |
using (Graphics g = Graphics.FromImage(bitmap)) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>d3.tip.js - Tooltips for D3</title> | |
<meta charset="utf-8" /> | |
<title>Bar Chart</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script> | |
<script type="text/javascript" src="../index.js"></script> | |
<script type="text/javascript"> | |
data = [{"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, "date": "5.3"},{"total":335, "date": "5.4"},{"total":329, "date": "5.5"},{"total":234, "date": "5.6"},{"total":175, "date": "5.7"}, {"total":1225, "date": "5.1"},{"total":279, "date": "5.2"},{"total":212, |
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 query = { | |
url: 'http://stackoverflow.com/questions/31095166/angular-mocha-tests-fail-when-i-add-multiple-controllers-to-the-same-module', | |
type: 'html', | |
map: { | |
title: { | |
selector: "#question-header h1 a", | |
extract: "text" | |
}, | |
description: { | |
selector: ".question .postcell .post-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
interface PromiseState { | |
status: number; | |
} | |
class Promise { | |
$$state: PromiseState; | |
constructor() { | |
this.$$state = { status : 0 }; | |
} | |
then(onFulfilled, onRejected, progressBack) { | |
var result = new Deferred(); |
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
private static string ConvertInFixToPostFix(string inFixExpression) | |
{ | |
if (inFixExpression == null || inFixExpression.Trim().Length == 0) | |
return inFixExpression; | |
inFixExpression = inFixExpression.Replace("(", " ( "); | |
inFixExpression = inFixExpression.Replace(")", " ) "); | |
inFixExpression = inFixExpression.ToLower(); | |
string[] tokens = inFixExpression.Split(new string[] { }, StringSplitOptions.RemoveEmptyEntries); | |
if (tokens.Length == 0 || tokens.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
public static XmlDocument ToXml(object thisObj) | |
{ | |
XmlDocument propertyDoc = new XmlDocument(); | |
XmlNode rootNode = propertyDoc.CreateElement(thisObj.GetType().Name.Replace("[]", "Array")); | |
propertyDoc.AppendChild(rootNode); | |
if (thisObj.GetType().IsArray) | |
{ | |
Array objects = (Array)thisObj; | |
foreach (object obj in objects) | |
{ |
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.Diagnostics; | |
using System.Text; | |
namespace Common | |
{ | |
/// <summary> | |
/// This class will take down the steps in the api flow, and trace it if the latency is larger than config. | |
/// </summary> | |
public static class PerfTracer |
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
import sys | |
import string | |
def NameToNo(name): | |
result = 0 | |
for ch in name.upper().strip("\n"): | |
result = result * 26 + ord(ch) - ord('A') + 1 | |
return result | |
def NoToName(no): |
OlderNewer