View gist:5957630
<html>
<body onload="Test()">
<script>
function Filter(dictionary, letter, pos){ // Return a subset of words containing letter @ pos
var result = [];
for(idx in dictionary){
var word = dictionary[idx];
if (word[pos] == letter){
result.push(word);
View gist:2996803
public static class CContextMenu
{
public static string Name
{
get { return "Send File Securely"; }
}
public static string Command
{
get { return string.Format("{0}\"{1}\" \"%1\"", (ApplicationDeployment.IsNetworkDeployed) ? "cmd.exe /c " : string.Empty, exePath); }
View gist:2991318
public static class CAutoStartUtils
{
public static string exePath
{
get
{
return (ApplicationDeployment.IsNetworkDeployed) ? Path.Combine(CDeploymentInfo.AppPath, exeName) : Assembly.GetExecutingAssembly().Location;
}
}
View gist:2989846
// if (IsAsyncUploadAllowed(oAct, encAttachsToUpload) && BroadcastAsyncUploadAttachments(encAttachsToUpload))
// {
// COlUIHandler.OnAllAttachUploadedComplete(null, new AttachUploadedEventArgs(false, null));
// return;
// }
private static bool IsAsyncUploadAllowed(CActivation activation, CEncoding attachments)
{
if (activation.pen.penProfile.useAsyncUpload)
{
View gist:2714340
public static ICommand GetCommand(HttpRequest httpRequest)
{
try
{
return ((ICommand)Activator.CreateInstance(Type.GetType(string.Format("{0}.Cmd{1}", MethodBase.GetCurrentMethod().DeclaringType.Namespace, httpRequest.Headers["Command"])))).Init(httpRequest);
}
catch (Exception ex)
{
return new Command(ex);
}
View gist:2563071
Thread thread = new Thread(() =>
{
try
{
<func_name>(<func_parms>);
}
catch (Exception ex) { <exception_handling> }
});
thread.Start();
View googlemap.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
</style>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
View Ext.ux.form.HtmlTableEditor.js
/*!
* Ext JS Library 3.2.1
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.ns('Ext.ux.form');
/**
* @class Ext.ux.form.HtmlTableEditor
View Ext.ux.form.HtmlLintEditor.js
/*!
* Ext JS Library 3.2.1
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.ns('Ext.ux.form');
/**
View gist:1182841
private Dictionary<string, Type> typeCache = new Dictionary<string, Type>();
public bool TryFindType(string typeName, out Type t)
{
lock (typeCache)
{
if (!typeCache.TryGetValue(typeName, out t))
{
t = Type.GetType(typeName);
if (t == null)