This file contains hidden or 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 search(e) { | |
var id = e.target.id; | |
var val = document.getElementById(id).value.toUpperCase(); | |
var grid = document.getElementById("ct100_ContentPlaceHolder1_dropdownListings"); | |
$('#ctl00_ContentPlaceHolder1_dropdownListings').find('tbody').find('tr').each(function (index, element) { | |
var blah = $(this).text().toUpperCase(); | |
if ($(this).text().toUpperCase().indexOf(val) < 0) | |
$(this).hide(); | |
else |
This file contains hidden or 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
imports System.Reflection | |
imports System.Reflection.Emit | |
imports System.Threading | |
''' <summary> | |
''' The purpose of this class is to take a struct and build and return an object type containing all of | |
''' the variable members of the struct as properties with getters and setters. You can then make an | |
''' instance of the object type by calling activator.createinstance(type). | |
''' Usage: dim converter = new StructConverter() | |
''' dim structObjectType as Type = converter.buildDynamicProperties(GetType(YourStruct)) |
This file contains hidden or 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
const PeHeaderOffset as integer = 60 | |
const LinkerTimestampOffset as integer = 8 | |
dim filePath = System.Reflection.Assembly.GetExecutingAssembly().location | |
dim b(2047) as byte | |
dim s as IO.FileStream = new IO.FileStream(filePath, IO.FileMode.Open, IO.FileAccess.Read) | |
try | |
s.Read(b, 0, 2048) | |
finally |
This file contains hidden or 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 function setExclusionFilter(table as DataTable) as DataTable | |
dim unit = cbxSelectUnit.text | |
dim xAxisName = table.columns(0).columnName | |
dim yAxisName = table.columns(1).columnName | |
dim unitExclusionRegions = from row in exclusionRegions | |
where row.field(Of String)("UnitID") = unit and row.field(Of Boolean)("Active") = true | |
select axis = row.field(Of Char)("Axis"), low = row.field(Of Double)("Low"), high = row.field(Of Double)("High") | |
dim query as String = "" |
This file contains hidden or 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
''' <summary> | |
''' This class adds two events for easy highlighting when tabbing and clicking. | |
''' Double clicking will unhighlight and leave the cursor at the beginning. | |
''' Uses the click and doubleclick events. | |
''' </summary> | |
public class FocusedTextBox | |
''' <summary> | |
''' Adds two events to the given textbox. Will override | |
''' click and doubleclick events. |
This file contains hidden or 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 ($) { | |
$.fn.confirmModal = function (opts) { | |
var body = $('body'); | |
var unique = Math.floor(Math.random() * (1e+9)); | |
var clickedOutside = true; | |
// the innerFrameId allows a body of markup to be inserted w append in lieu of message | |
// use detach first if the nodes are already in the dom | |
var defaultOptions = { | |
confirmModalId: "confirmModal" + unique, | |
confirmInnerFrameId: "confirmInnerFrame" + unique, |
This file contains hidden or 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
//given an object and a white list; reset all knockout observables to undefined | |
var reset = function (obj, whitelist) { | |
for (var prop in obj) { | |
if ( obj.hasOwnProperty(prop) && ko.isObservable(obj[prop]) && !ko.isComputed(obj[prop]) && whitelist.indexOf(prop) === -1 ) { | |
obj[prop](undefined); | |
} | |
} | |
}; | |
//useful for when an object is used for the value property of a dropdown. Usage: "optionsAfterRender: setOptionValue('propertyName')" |
This file contains hidden or 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
/** | |
* Make sure your page is using <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script> | |
* or if you're using <script src="https://www.google.com/recaptcha/api.js" async defer></script> then comment out | |
* Recaptcha.create and uncomment the grecaptcha.render. | |
* based on http://jsfiddle.net/jaGWY/ | |
* docs: https://developers.google.com/recaptcha/intro & http://recaptchamvc.apphb.com/Home/Document | |
*/ | |
var app = app || {}; | |
app.knockout = app.knockout || {}; |
This file contains hidden or 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 app = app || {}; | |
app.google = app.google || {}; | |
app.google.map = (function ($) { | |
var model = { | |
markers: [], | |
initialized: ko.observable(false), | |
infoWindow: null, | |
apiLoaded: ko.observable(false) | |
}; |
This file contains hidden or 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
SELECT SESSION.login_name AS 'Database User Name' | |
,MAX(SESSION.login_time) AS 'Login Time' | |
,SESSION.host_name AS 'PC Name' | |
,SESSION.program_name AS 'Program Using' | |
,SESSION.client_interface_name AS 'Interface' | |
,UM.USER_NAME AS 'User' | |
FROM master.sys.dm_exec_Sessions SESSION | |
WHERE SESSION.session_id >= 51 -- All user Sessions | |
GROUP BY SESSION.login_name | |
,SESSION.host_name |
OlderNewer