Tech Support Websites

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 29 January 2012

Notes from Pluralsight course - SQL Server Questions and Answers

Posted on 09:45 by Unknown
In the Pluralsight course "SQL Server Questions and Answers", Pinal & Vinod debunk some SQL Server misconceptions with examples and highlight uncommon facts -
  • Use SCOPE_IDENTITY() instead of @@IDENTITY or IDENT_CURRENT("tablename") to get the latest IDENTITY value for the table in the session
  • @@IDENTITY returns the last IDENTITY value produced on a connection
  • SCOPE_IDENTITY() returns the last IDENTITY value produced on a connection (explicity created by you rather than a trigger) and by a statement in the same scope
  • IDENT_CURRENT("tablename") returns the last IDENTITY value produced in a table, regardless of the connection
  • Identity column value can be positive or negative
  • Identity column can be reseeded with DBCC CHECKIDENT command
  • Deleting records from table using DELETE does not reset Identity values whereas deleting records from table using TRUNCATE resets Identity values.
  • TRUNCATE statements are logged and can be part of transaction. Such transactions can be rolled back.
  • Executing TRUNCATE is not possible when a table is referenced by a foreign key or if the table is used in replication or with Indexed views
  • WHERE can be used with SELECT, DELETE, UPDATE statements whereas HAVING is used along with GROUP BY clause in a SELECT statement
  • The order of the conditions in the WHERE clause does not affect index used. This can be verified from the Execution plan.
  • If parenthesis is used with a combination of OR & AND conditions, the result & index usage may vary
  • Table variables & Temporary tables both exist in TempDB
  • Table variables too can have a clustered index but they do not participate in the Transaction context.
  • A Table variable cannot be assigned to another Table variable
  • A Table variable cannot be truncated
  • Stored procedures are not compiled when created.
  • Stored procedures are compiled on first run & this can be verified by watching the SP:CacheInsert event in Profiler.
  • Using Filtered Index (uses WHERE in an UNIQUE INDEX) which is new in SQL Server 2008, it is possible to have multiple nulls even when UNIQUE constraint is imposed.
  • In SQL Server 2008, date and time can be stored independent of each other in a db using the DATE & TIME datatypes
  • DateTime2 datatype has a precision of 100th of a nanosecond.
  • Precision of SmallDateTime datatype is 1 minute
  • Multiple UNIQUE constraints can be defined on a table
  • A quick way to populate table rows - 
  • CREATE TABLE Test (id INT IDENTITY(1,1), Long_Name CHAR(7500) DEFAULT 'dummy') 
    INSERT INTO Test DEFAULT VALUES; GO 15; --inserts 15 rows
  • fn_dblog is an undocumented system UDF that lets you to read from your transaction log  
  • Lock duration is dependent on the ISOLATION LEVEL (READ COMMITTED, READ UNCOMMITTED, REPEATABLE READ, SERIALIZABLE)
  • When a nested transaction is rolled back it always rolls back to the outermost BEGIN TRANSACTION statement (unless SAVEPOINT is used)
  • DENY takes precedence over GRANT except at a column level GRANT
  • Blocked process report Event under Error & Warnings section of Events Selection tab in the Trace Properties dialog box in Profiler helps in analyzing Blocking issues
  • Recent Expensive Queries tab within Activity Monitor in SSMS shows queries that you can optimize.


Read More
Posted in SQL Server | No comments

Saturday, 14 January 2012

Explore console.log if you use JavaScript alert extensively for debugging

Posted on 23:00 by Unknown
The JavaScript alert method is something that most web developers use to debug their code. However, now with all popular browsers incorporating Developer tools within them, there are easier ways to debug client-side code. Firebug is an optional add-on for Firefox that adds richer features to those natively available & probably the motivator for browsers to develop their own Developer tools. I guess, it was IE that started using F12 as keyboard shortcut to start up Developer tools and now that's synonymous with Developer tools on almost all browsers.


Within the Developer tools, a Console panel exists for executing script statements on-the-fly. You can make use of Console methods to expose information that is flowing through your scripts. The console.log method can be used as an alternative to the obtrusive JavaScript alert method to track what's going on within your code without having to click OK for every dialog box that alert throws up. This will work only if you have the Console opened though.


So to remove your debugging code when you deploy to production, use this:
if ( window.console ) {
  // console is available
}


While console.log is one of the more common methods supported in popular browsers(IE, Firefox Firebug, Chrome, Safari), there are other methods as well for which support may vary -


  • console.info
  • console.warn
  • console.error
  • console.assert


Ctrl+Shift+J shortcut lets you jump to the Console panel in Chrome.
Read More
Posted in Browsers, Chrome, Firefox, IE, Javascript | No comments

Saturday, 31 December 2011

Indian comparison shopping sites

Posted on 09:28 by Unknown
Did you know, India has 120 million Internet users & the Indian e-commerce market is worth $7 billion? Travel accounts for over 80 percent of the e-commerce market.

Forbes believes "the rise of e-commerce is significant because it shows the limitations of physical retailing and the rise of aspirations of small town India. Between the large unorganised retail (kiranas and unbranded supermarkets) that serves the masses and modern retail that serves the aspirational class in large cities, there lies a thin wedge of aspirational classes who live in dusty towns. The economics of physical retailing have always left them short changed."

(Update: 25-Apr-2012, Economist) "Nowadays more than 100m surf the web. Close to 30m scour for bargains online, and the number which grows by 1.5m every month. The industry is worth around $10 billion, though travel-ticket sales alone accounted for $8.4 billion last year....There is certainly room for growth. E-commerce accounts for just 0.12% of all retail sales in India, compared with over 4% in China and America. But expect growing pains. Even Flipkart, arguably the most successful online retailer, has yet to turn a profit."

Yet another indicator of the rise of e-commerce is the growing number of comparison shopping sites -
  • Junglee - product comparison and advertising site offered by Amazon which enables customers to find and discover products from online and offline retailers in India and from Amazon.com
  • MySmartPrice - for books & gadgets
  • 90DI - finds fastest & cheapest travel options (train, bus & flights)
  • Redbus - choose travel options from over 350 bus operators
  • Expedia.co.in - flights & hotels
  • Rediff FareSearch - compare domestic flights
  • IndiaBookStore.net - search engine for books available at major Indian online book stores.
  • iShopper.com - compare prices of laptops, tablets, mobiles on popular online shopping sites, set price alerts
  • FindYogi - compare prices of laptops, tablets, mobiles
If you know of any more much websites, please leave a comment


Read More
Posted in India, Websites | No comments

Monday, 26 December 2011

HOW TO back up a database (schema and data) as a SQL Server script

Posted on 06:48 by Unknown
Did you know, SQL Server 2008 Management Studio has an in-built option to generate a script that can help you restore an entire database alongwith the data? Compared to a .BAK file that can also be used to restore a database, a script lets you peek into the schema AND data (INSERT statements for rows within tables are automatically generated) before you restore it.

Unfortunately, this cool feature is hidden under layers of options and isn't easily discoverable unless a really discerning user points it out.


Steps to generate script:
1. Right click on a database name, choose Generate Scripts.. option under Tasks.. in the context menu
2. In the Generate and Publish Scripts wizard which appears choose the database object for which you want to generate a script
3. Under the Set Scripting Options, make sure to click on the Advanced button which reveals a bunch of more options.
4. In the new dialog box that opens up, scroll down to the last option in the General category and for Types of data to script, choose Schema and Data

Related:
HOW TO view parameter values of a stored procedure through SQL Profiler
Why are these Visual Studio Settings not enabled by default?
Read More
Posted in HOWTO, SQL Server | No comments

Thursday, 15 December 2011

Fastest dictionary on the web - thefreedictionary.com

Posted on 08:36 by Unknown
As per the most voted answer on Web Applications StackExchange forum, thefreedictionary.com with the print layout is the fastest and their content is pretty comprehensive too.

WordWeb is my favorite desktop dictionary tool & now I also have thefreedictionary.com configured as my search engine for words within Chrome.

The URL looks simple - http://thefreedictionary.com/p/Word & this makes it super easy to add the site as a search provider in Chrome & Opera. This generic article how you can add thefreedictionary.com as a search engine option.

I assigned the letter "d" to represent thefreedictionary.com as a shorcut for dictionary. So now, whenever I need to search for the meaning of a word I type "d" in the Chrome address bar, hit space followed by word & bingo...a detailed page pertaining to that word appears in a flash.

Related:
HOW TO Google specifically for discussions/answers on only online forums instead of articles
Free Programmable & Searchable Dictionaries
Read More
Posted in Chrome, WebApps | No comments

Friday, 9 December 2011

Get over pesky layout/design changes, use keyboard shorcuts on Twitter, Google products

Posted on 10:34 by Unknown

When popular websites change their layout & design, it takes time for users to get accustomed to it. If you don't like frills and rather like features that get your work done faster, explore keyboard shorcuts that web apps like Twitter, Gmail, Google Reader, Google Docs offer. Just hit the question mark (?) key while you are logged into one of those sites and you will see a popup with a list of all supported hotkeys. While the keyboard shortcut Help popup has been in GMail & Google Reader since a couple of years now, I came to know about the Twitter hotkeys today from Scott Hanselman's blog.

I found the choice of letters used by Twitter hotkeys more intuitive than what Google has (how easy is it to correlate Sneak Peak with the letter "h"?)

... so I identified for myself a list of shortcuts that are easily memorable from the much larger list:

  • g then i : Go to Inbox
  • g then s : Go to Starred conversations
  • g then t : Go to Sent messages
  • g then d : Go to Drafts
  • g then a : Go to All mail
  • g then c : Go to Contacts
  • g then k : Go to Tasks
  • g then l : Go to Label
  • u : Back to threadlist
  • k / j : Newer/older conversation
  • o or or <Enter> : Open conversation; collapse/expand conversation
  • c : Compose
  • / : Search
  • ? : Open shortcut help
  • ! : Report as spam
  • # : Move to bin
  • r : Reply
  • <Shift> + r : Reply in a new window
  • a : Reply all
  • <Shift> + a : Reply all in a new window
  • f : Forward
  • <Shift> + f : Forward in a new window
  • z : Undo last action
  • g then w : Create a blank document
  • h : Sneak peek
  • <Shift> + t : Add conversation to Tasks
  • <Tab> then <Enter> : Send mail
  • . : Open more actions menu
  • <Ctrl> + s : Save draft

The ? hotkey Help shortcut popup is an interesting UI Pattern that other web apps should start using as well.

Just as browsers have almost standardized on keyboard shortcuts, it will be good for users if web sites standardize helpful features like the keyboard shortcuts Help popup and maintain similar mappings.

Here's a list of sites that support keyboard shortcuts (those supporting the ? hotkey Help shortcut popup are shown in bold):

  • Twitter
  • Gmail
  • Google Reader
  • Google Docs 
  • Yahoo
  • Remember The Milk
  • Hotmail


Read More
Posted in GMail, Google Reader, Twitter, WebApps | No comments

Friday, 2 December 2011

HOW TO take a screenshot of any screen on Samsung Omnia 652

Posted on 10:00 by Unknown

The Wife finally cracked the mystery of how to take a screenshot of any screen on her Samsung Omnia 652.

For months since she saw the message "Screen captured. Saved as image file" while trying to unlock the smartphone, we were intrigued what key combination had led to it. We turned to Google but found no answers and this was too trivial to ask on online forums.

It's finally a relief to know that the combination is Alt+*+Confirm/OK key
You can access the screenshot by going to the Images folder in My Documents that you can find under Contents Manager. 


A few other tricks we discovered (after we didn't find them in the manual):
While composing a text message, press the Shift key (up arrow on the extreme left of bottom row) twice to type everything in capitals and if you need to type only numbers, press the Alt key twice.

The Sym (Symbol) key lets you activate the XT9 option, the predictive text feature that helps in typing words faster. XT9 & T9 are typically found on phones made by LG, NEC, Nokia, Samsung Electronics, Siemens, Sony Ericsson, Sanyo, Sagem.

One of our favorite camera features on the Omnia is the Multi shot option that lets you take a series of photos of an action with a single click.

Also see:
Save time while typing with PhraseExpress


Read More
Posted in Gadgets, HOWTO | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 10 ways to make laptop battery last longer
    Paraphrased from a Right Choice magazine article with my own opinions: Keep the brightness of the screen as low as possible. If portability ...
  • Words that leave Google Instant speechless
    2600 Magazine has compiled a list of objectionable words that Google Instant has blacklisted. Several volunteers have submitted blackliste...
  • A new JavaScript Reference to bookmark
    For years, the JavaScript section at W3Schools.com has been a indispensable source of reference for me . It will now not be my only source. ...
  • Free JavaScript & jQuery learning resources
    There is a nice compilation of JavaScript & jQuery learning resources in this community wiki on StackOverflow.com . I picked those which...
  • Manipulate PDF files for free with PDFRider
    PDFRider (currently in version 0.5) is an open source project on Codeplex. This utility provides a GUI for the command-line program  Pdftk ...
  • Look what Google Goggles visual search can do
    Google Goggles is a visual search application available currently for Android powered phones. It may possibly be available for phones of oth...
  • HOW TO read long text messages on the Samsung Omnia 652
    Samsung Omnia 652 clumps text messages from a single recepient together. Scrolling through a message doesn't reveal the entire message ...
  • Web Applications - Tips & Tricks
    Did you know, you can append +any-word to a GMail address & use that word to filter emails or distinctly identify where the mail has co...
  • What is the difference between Browser Mode & Document Mode in IE
    If you're a web developer and your job actively involves building web pages that work the same in all browsers including the last three ...
  • Dig deeper into jQuery with "jQuery Succinctly"
    jQuery Succinctly by Cody Lindley is an ebook that Syncfusion is offering as a free download (requires registration). I've been working ...

Categories

  • AJAX
  • Android
  • APIs
  • App
  • ASP
  • ASP.NET
  • ASP.NET-MVC
  • Azure
  • Azure SQL Database
  • AzureInPictures
  • Bing
  • Book Review
  • Bookmarklet
  • Browsers
  • C#
  • chart
  • Chrome
  • Cloud
  • CSS
  • CSS3
  • DidYouKnow
  • E-Commerce
  • Excel
  • FB
  • Fiddler
  • Firefox
  • Gadgets
  • GeoLocation
  • GMail
  • Google
  • Google Docs
  • Google Reader
  • Health
  • Hotmail
  • HOWTO
  • HTML
  • HTML/CSS
  • HTML5
  • Humor
  • Hyderabad
  • IE
  • IIS
  • India
  • Internet
  • IT
  • Javascript
  • jQuery
  • JSON
  • JSONP
  • Laptop
  • Learning Resources
  • Lists
  • Map
  • Metrics
  • Microsoft
  • miscellaneous
  • Mobile
  • NAPA
  • Office365
  • Opera
  • PDF
  • Performance
  • Personal
  • PHP
  • PM
  • PowerShell
  • Privacy
  • Programming
  • Rant
  • Safari
  • Science
  • Search Engines
  • SearchEngines
  • Security
  • SEO
  • Sharepoint
  • SharePoint2013
  • Silverlight
  • Software Engineering
  • Solutions
  • SQL Azure
  • SQL Server
  • TFS
  • Tip
  • Tips
  • Tools
  • Tools/Utilities
  • Trivia
  • TWIL
  • Twitter
  • UX
  • VM
  • VS.NET
  • VS2010
  • VS2012
  • WCF
  • WebApps
  • Websites
  • WF
  • Windows Phone
  • Windows7
  • Windows8
  • Word
  • WP7
  • WPF

Blog Archive

  • ▼  2013 (112)
    • ▼  October (16)
      • 10 ways to make laptop battery last longer
      • Learnings in S/W Engineering from the HealthCare.g...
      • TWIL - Week #29
      • MS currently has 21 apps on Google Play, incl. Wor...
      • Review: uCertify PMI PMP v-5 Online PrepKit
      • TWIL - Week #28
      • HOW TO highlight a Province within a Country with ...
      • My first impressions of Nexus 7 tablet
      • Free APIs, online services to generate screenshots...
      • TWIL - Week #27
      • HOW TO prevent mixed content warning in web pages
      • What's common between Kovid Goyal & Antony Lewis?
      • TWIL - Week #26
      • FB & Twitter spam me with similar subject line
      • Book Review: PMP Rapid Review by Sean Whitaker; MS...
      • Windows Azure Mobile Services - Error: Table 'some...
    • ►  September (14)
    • ►  August (8)
    • ►  July (8)
    • ►  June (13)
    • ►  May (12)
    • ►  April (12)
    • ►  March (8)
    • ►  February (15)
    • ►  January (6)
  • ►  2012 (127)
    • ►  December (11)
    • ►  November (14)
    • ►  October (13)
    • ►  September (14)
    • ►  August (16)
    • ►  July (16)
    • ►  June (6)
    • ►  May (5)
    • ►  April (11)
    • ►  March (12)
    • ►  February (7)
    • ►  January (2)
  • ►  2011 (98)
    • ►  December (5)
    • ►  November (2)
    • ►  October (5)
    • ►  September (7)
    • ►  August (7)
    • ►  July (15)
    • ►  June (10)
    • ►  May (7)
    • ►  April (8)
    • ►  March (10)
    • ►  February (11)
    • ►  January (11)
  • ►  2010 (163)
    • ►  December (14)
    • ►  November (19)
    • ►  October (19)
    • ►  September (15)
    • ►  August (18)
    • ►  July (17)
    • ►  June (20)
    • ►  May (17)
    • ►  April (19)
    • ►  March (5)
Powered by Blogger.

About Me

Unknown
View my complete profile