Wednesday, 23 December 2009

TSQL: Granting Permissions

GRANT INSERT ON table
TO sqluser
GO

GRANT UPDATE ON table
TO sqluser
GO

SQL Profiler: Wild Cards

When adding wild cards to filter by textdata column, be sure to include the percentage characters around your text string.

For example:

%WHERE bass = null%

Friday, 18 December 2009

TSQL: Newline, Carraige returns into char or varcahr field

To insert new line + carraige returns (\r\n) into a char or a varchar field you'll need to convert the to char(13)+char(10) before running your UPDATES or INSERTS.

Tuesday, 15 December 2009

Sysadmin: cURL

Found a very powerful commandline tool for transferring data across a multitude of protocols.
"curl is a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction."
http://curl.haxx.se/

Adobe AIR: Getting Started

Adobe AIR
" Adobe AIR is a cross-operating system runtime that enables you to use your existing HTML/Ajax, Flex, or Flash web development skills and tools to build and deploy rich Internet applications to the desktop.

Adobe AIR applications support native desktop integration, including clipboard and drag-and-drop support, local file IO, system notification, and more. " - http://www.adobe.com/devnet/air/

Essentially, AIR allows you to easily package up your browser based web application created in HTML/AJAX/Flash/Flex and deploy it to clients as a desktop application.

Getting Started

To start you'll need to download the Adobe AIR SDK. The SDK is available from Adobe's website. The SDK contains the necessary javascript libraries and also a debugger, packaging utility for creation of installation files AND self-signed certificate generator. There is no IDE that comes with the SDK. Current version is 1.5.3

For an IDE you can use any text editor, but if you wish to have a GUI interface, the options are to use Aptana Studio or Adobe Dreaweaver CS3/CS4 with Adobe Air Extensions for Dreamweaver.

A step by step guide to writing your first Hello World AIR application using any text editor can be found here.

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html

Interesting

Wednesday, 9 December 2009

JQUERY: Get select value and text

Get Value:

$('#selectList').val();

Get Text:

$('#selectList :selected').text()

Get Multiple Text:

var foo = [];
$('#multiple :selected').each(function(i, selected){
foo[i] = $(selected).text();
});