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 T FindFirstSelectControlInControl_ExtentionMethod<T>(UITestControl ControlInWhichSelectControlCanBeFound) | |
{ | |
T element = default(T); | |
var childrenControl = ControlInWhichSelectControlCanBeFound.GetChildren(); | |
if (childrenControl.Count > 0) | |
{ | |
childrenControl.All(x => | |
{ | |
if (x is T) | |
{ |
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 chkmail(emailStr) { | |
/* The following variable tells the rest of the function whether or not | |
to verify that the address ends in a two-letter country or well-known | |
TLD. 1 means check it, 0 means don't. */ | |
var checkTLD = 1; | |
/* The following is the list of known TLDs that an e-mail address must end with. */ | |
var knownDomsPat = /^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/; | |
/* The following pattern is used to check if the entered e-mail address |
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 class IrCryptography | |
{ | |
private static readonly int _saltSize = 32; | |
private static string key = System.Configuration.ConfigurationManager.AppSettings["CryptoKey"]; | |
/// <summary> | |
/// Encrypts the plainText input using the given Key. | |
/// A 128 bit random salt will be generated and prepended to the ciphertext before it is base64 encoded. | |
/// </summary> | |
/// <param name="plainText">The plain text to encrypt.</param> | |
/// <param name="key">The plain text encryption key.</param> |
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
[Serializable] | |
public class temp | |
{ | |
public int a; | |
} | |
class Program | |
{ | |
public static T DeepClone<T>(T a) | |
{ | |
using (MemoryStream stream = new MemoryStream()) |
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
$.fn.serializeObject = function() | |
{ | |
var o = {}; | |
var a = this.serializeArray(); | |
$.each(a, function() { | |
if (o[this.name] !== undefined) { | |
if (!o[this.name].push) { | |
o[this.name] = [o[this.name]]; | |
} | |
o[this.name].push(this.value || ''); |
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 _unique = function (arr) { | |
var h = [], t = []; | |
arr.forEach(function (n) { | |
if (h.indexOf(n) == -1) | |
h.push(n); | |
else t.push(n); | |
}); | |
return [h, t]; | |
} |
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
{ | |
"typescript.tsc.autoDetect": "on", | |
"window.zoomLevel": 0, | |
"typescript.referencesCodeLens.enabled": true, | |
"editor.minimap.enabled": false, | |
"editor.colorDecorators": true, | |
"css.lint.hexColorLength": "error", | |
"workbench.colorTheme": "Monokai Dimmed", | |
"workbench.editor.tabSizing": "shrink", | |
"files.trimTrailingWhitespace": 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt] | |
@="@shell32.dll,-8506" | |
"Extended"="" | |
"NoWorkingDirectory"="" | |
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command] | |
@="cmd.exe /s /k pushd \"%V\"" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmdprompt] |
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
export function treeForwardTracking( | |
treeNodes: TreeNode[], | |
action: (TreeNode: TreeNode) => void | |
): void { | |
treeNodes.forEach((node) => { | |
action(node); | |
if (node.children) { | |
treeForwardTracking(node.children, action); | |
} | |
}); |