How to Make a Bootable Mac OS X Mavericks 10.9 USB Thumb Drive | JBTech17:
Technology, Art, Solution, Tips, Multimedia, How To, What Is, Programming, Software, Freelance
Mar 16, 2014
Mar 15, 2014
Mar 14, 2014
sql server - Is it better to use an uniqueidentifier(GUID) or a bigint for an identity column? - Stack Overflow
sql server - Is it better to use an uniqueidentifier(GUID) or a bigint for an identity column? - Stack Overflow: "That depends on what you're doing:
If speed is the primary concern then a plain old int is probably big enough.
If you really will have more than 2 billion (with a B ;) ) records, then use bigint or a sequential guid.
If you need to be able to easily synchronize with records created remotely, then Guid is really great.
Update
Some additional (less-obvious) notes on Guids:
They can be hard on indexes, and that cuts to the core of database performance
You can use sequential guids to get back some of the indexing performance, but give up some of the randomness used in point two.
Guids can be hard to debug by hand (where id='xxx-xxx-xxxxx'), but you get some of that back via sequential guids as well (where id='xxx-xxx' + '123').
For the same reason, Guids can make ID-based security attacks more difficult- but not impossible. (You can't just type 'http://example.com?userid=xxxx' and expect to get a result for someone else's account)."
'via Blog this'
If speed is the primary concern then a plain old int is probably big enough.
If you really will have more than 2 billion (with a B ;) ) records, then use bigint or a sequential guid.
If you need to be able to easily synchronize with records created remotely, then Guid is really great.
Update
Some additional (less-obvious) notes on Guids:
They can be hard on indexes, and that cuts to the core of database performance
You can use sequential guids to get back some of the indexing performance, but give up some of the randomness used in point two.
Guids can be hard to debug by hand (where id='xxx-xxx-xxxxx'), but you get some of that back via sequential guids as well (where id='xxx-xxx' + '123').
For the same reason, Guids can make ID-based security attacks more difficult- but not impossible. (You can't just type 'http://example.com?userid=xxxx' and expect to get a result for someone else's account)."
'via Blog this'
Mar 13, 2014
Mar 12, 2014
Create FTP folder at Windows Explorer
1. Start Menu->Computer
2. On the left pane: right-click computer-> add network location
3. Follow the wizard and type in your ftp location (ftp://yourusername : password@yourftpsite.com)
4. Right click the network location and send to your desktop as shortcut.
Mar 11, 2014
ASPX Forms Authentication Across Applications
<configuration>
<system.web>
<authentication mode="Forms" >
<!-- The name, protection, and path attributes must match
exactly in each Web.config file. -->
<forms loginUrl="login.aspx"
name=".ASPXFORMSAUTH"
protection="All"
path="/"
domain="contoso.com"
timeout="30" />
</authentication>
<!-- Validation and decryption keys must exactly match and cannot
be set to "AutoGenerate". The validation and decryption
algorithms must also be the same. -->
<machineKey
validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE"
decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F"
validation="SHA1" />
</system.web>
</configuration>
Reference
http://msdn.microsoft.com/en-us/library/eb0zx8fc(v=vs.100).aspx
Keep NodeJS running forever
reference: https://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever/
- Monit: http://mmonit.com/monit/
- Upstart: http://upstart.ubuntu.com/
- Daemontools: http://cr.yp.to/daemontools.html
- Launchtool: http://people.debian.org/~enrico/launchtool.html
Mar 10, 2014
Mar 8, 2014
Mar 7, 2014
Mar 6, 2014
Mar 5, 2014
Mar 4, 2014
EF with transaction scope
http://stackoverflow.com/questions/1070040/how-to-rollback-a-transaction-in-entity-framework
Mar 3, 2014
Show Visual Studio 2012 Page Inspector ( aka Firebug in VS )
Method 1
Type Page Inspector at the Quick Lauch Text Box at top right of your vs.
Method 2
View > Other Windows > Page Inspector
Just discovered this really useful tool for vs web developer !
Type Page Inspector at the Quick Lauch Text Box at top right of your vs.
Method 2
View > Other Windows > Page Inspector
Just discovered this really useful tool for vs web developer !
jQuery DOM Navigation, Manipulation
DOM Navigation
children() Gets the children of the selected elements
closest('selector') Navigates through the ancestors of each of the selected elements to find the first
instance of an element that matches the specified selector
filter('selector') Reduces the selected elements to those that match the specified selector
first('selector') Navigates through the descendants of the selected elements and locates all those
elements that match the specified selector
next() Gets the sibling elements that immediately follow the selected elements
prev() Gets the sibling elements that immediately precede the selected elements
parent() Returns the immediate parent of the selected elements
sibilings() Returns the siblings of the selected elements
e.g:
$(document).ready(function () {
$('table').find("td[class]").parent().filter(":odd").addClass("highlight");
});
-------------------------------------------------------------------------------------------------------------
DOM Manipulation
before('new')after('new') Inserts the element new either before or after the selected elements
insertBefore()insertAfter() As for before and after, but the order of the new element and the selector
is reversed, and these functions return the newly created elements
prepend('new')append('new') Inserts the element new inside of the selected elements, either as the first or last child
prependTo()appendTo() As for prepend and append, but the order of the new element and the
selector is reversed, and these functions return the newly created elements
empty() Removes all children from the selected elements
remove() Removes the selected elements from the DOM
attr('name', 'val') Sets the attribute name to value val on the selected elements; will create the
attribute if it doesn’t already exist
removeAttr('name') Removes the attribute name from the selected elements
e.g:
$(document).ready(function () {
$('tr').prepend("");
$('').prependTo('tbody td:first-child')
.first().attr("checked", true);
});
95
$(':button').bind("click", function (e) {
$(':radio:checked').closest('tr').remove();
$(':radio').first().attr("checked", true);
});
children() Gets the children of the selected elements
closest('selector') Navigates through the ancestors of each of the selected elements to find the first
instance of an element that matches the specified selector
filter('selector') Reduces the selected elements to those that match the specified selector
first('selector') Navigates through the descendants of the selected elements and locates all those
elements that match the specified selector
next() Gets the sibling elements that immediately follow the selected elements
prev() Gets the sibling elements that immediately precede the selected elements
parent() Returns the immediate parent of the selected elements
sibilings() Returns the siblings of the selected elements
e.g:
$(document).ready(function () {
$('table').find("td[class]").parent().filter(":odd").addClass("highlight");
});
-------------------------------------------------------------------------------------------------------------
DOM Manipulation
before('new')after('new') Inserts the element new either before or after the selected elements
insertBefore()insertAfter() As for before and after, but the order of the new element and the selector
is reversed, and these functions return the newly created elements
prepend('new')append('new') Inserts the element new inside of the selected elements, either as the first or last child
prependTo()appendTo() As for prepend and append, but the order of the new element and the
selector is reversed, and these functions return the newly created elements
empty() Removes all children from the selected elements
remove() Removes the selected elements from the DOM
attr('name', 'val') Sets the attribute name to value val on the selected elements; will create the
attribute if it doesn’t already exist
removeAttr('name') Removes the attribute name from the selected elements
e.g:
$(document).ready(function () {
$('tr').prepend("");
$('').prependTo('tbody td:first-child')
.first().attr("checked", true);
});
95
$(':button').bind("click", function (e) {
$(':radio:checked').closest('tr').remove();
$(':radio').first().attr("checked", true);
});
Subscribe to:
Posts (Atom)