- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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
| System.Data.DataView view = new System.Data.DataView(sourceTable); | |
| System.Data.DataTable selected = view.ToTable("Selected", false, "col1", "col2", "col6", "col7", "col3"); |
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
| //You cannot change the DataType of a DataColumn after populating it with data. | |
| //An exception is generated when changing this property after the column has begun storing data. | |
| public DataTable CloneOriginalTableThenChangeColumnType(DataTable dt) | |
| { | |
| DataTable dtCloned = dt.Clone(); | |
| dtCloned.Columns[0].DataType = typeof(string); | |
| foreach (DataRow row in dt.Rows) | |
| { | |
| dtCloned.ImportRow(row); |
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
| -- Get a list of microsoft sql server agent jobs | |
| --1 | |
| SELECT job_id, [name] FROM msdb.dbo.sysjobs; | |
| --2 | |
| USE msdb | |
| EXEC dbo.sp_help_job | |
| -- Get a list of microsoft sql server agent jobs with steps | |
| SELECT | |
| job.job_id, |
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
| Cursor Movment | |
| h - move left | |
| j - move down | |
| k - move up | |
| l - move right | |
| w - jump by start of words (punctuation considered words) | |
| W - jump by words (spaces separate words) | |
| e - jump to end of words (punctuation considered words) | |
| E - jump to end of words (no punctuation) |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| --Get the logical name of the database and log file | |
| USE tempdb | |
| GO | |
| EXEC sp_helpfile | |
| GO | |
| --Change database location | |
| USE master | |
| GO | |
| ALTER DATABASE tempdb |
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
| //List Journals | |
| WRKOBJ OBJ(*ALL/*ALL) OBJTYPE(*JRN) | |
| //Journal a file | |
| STRJRNPF FILE({Library}/{File}) JRN({Library}/{File}) | |
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
| --Source : http://www.codeproject.com/Articles/300785/Calculating-simple-running-totals-in-SQL-Server | |
| --First we need a table for the data. To keep things simple, let's create a table with just an auto incremented id and a value field. | |
| CREATE TABLE RunTotalTestData ( | |
| id int not null identity(1,1) primary key, | |
| value int not null | |
| ); | |
| --And populate it with some data: | |
| INSERT INTO RunTotalTestData (value) VALUES (1); |
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
| -- ##Export Table | |
| use <database> | |
| DECLARE @table VARCHAR(128), | |
| @file VARCHAR(255), | |
| @cmd VARCHAR(512) | |
| -- Replace <table name> table Name which you want to backup | |
| SET @table = '<table name>' | |
| -- Replace <destination folder> to destination dir where you want to place table data backu | |
| SET @file = '<destination folder>' + @table + '_' + CONVERT(CHAR(8), GETDATE(), 112) + '.dat' | |
| -- You must have bulk import / export privileges |
OlderNewer