Tech Sharing Blog

Computer knowledge, news, product, SEO, earn money online sharing place

Advertisement

Posts Tagged ‘ Tips ’

Window Run Command

By on May 22, 2009

I believe most of the advance computer user will know how to ultilize the window run command. But for the normal user may not ultilized it but more prefer to click by mouse.

runcommandwindow Window Run Command

The most common use command is [cmd] and also [notepad]. By using the window run command, you may just press on [Window Key] + [R] on your keyboard and type the command.


The following are some of the window run command that you may or may not use, but I suggest if possible try to remember the most common use which will help you to save your time and also reduce the movement of your hand.


Accessibility Controls
access.cpl


Add Hardware Wizard
hdwwiz.cpl


Add/Remove Programs
appwiz.cpl


Administrative Tools
control admintools


Automatic Updates
wuaucpl.cpl


Bluetooth Transfer Wizard
fsquirt


Calculator
calc


Certificate Manager
certmgr.msc


Character Map
charmap


Check Disk Utility
chkdsk


Clipboard Viewer
clipbrd


Command Prompt
cmd


Component Services
dcomcnfg


Computer Management
compmgmt.msc


Date and Time Properties
timedate.cpl


DDE Shares
ddeshare


Device Manager
devmgmt.msc


Direct X Control Panel (If Installed)*
directx.cpl


Direct X Troubleshooter
dxdiag


Disk Cleanup Utility
cleanmgr


Disk Defragment
dfrg.msc


Disk Management
diskmgmt.msc


[More]

Popularity: 1% [?]

I just found out this usefu function in MSSQL when I try to Google for the solution to replace the null value with something else. So that I no need to do the checking again in my application. The function is call


NULLIF and ISNULL


This 2 functions are actually work opposite with each other.

NULLIF(ColumnName, ValueToCompare) accept 2 parameters, and will return the NULL value if both the expression match.


IFNULL(ColumnName, NewValue) accept 2 parameters, the first parameters is the string that you wish you check with, and the 2nd parameter that you wish to replace with.


Popularity: 3% [?]


In SQL, basically there are two ways to Insert data into a table; one is insert it one row per time, another way is insert multiple rows at a times.


For the first method (insert one row per time) is the most common way to insert data into database that we will use normally, and the sample sql syntax as below:


Insert into table1 (col1, col2, col3)
values (value1, value2, value3)


The other insert method that we seldom use, but it may be useful if you like to copy and insert more then one row of record into a table at a time. You may include the Select statement to specify the data that you want to insert into the tables.


The SQL syntax as below:

INSERT INTO table1(col1, col2, cols3)

SELECT value1, value2, value3
FROM table2
WHERE value4 = 1998


There is another way of writing the same SQL:


Select value1, value2, value3

Into table1

From table2

WHERE value4 = 1998

Popularity: 1% [?]

Normally to get the number of row for a particular table, where we will do is as the following query:


select count(*) from Table_name


Yes, you may get your result very fast if your table is very small, but if your table is more then 100k rows, then you may face some delay on that. What the above query do is actually it run the full table scan to get the row count. The scaning can be Logically or Physically. Logically mean that the SQL server only scan from the catch memory, whereas physically scan mean that it really scan through your table.


Actually there is anther alternative way to get the total row count for a table. You can ultilize the sysindexes system table for this purpose.


There is ROWS column in the sysindexes table. This column contains the total row count for each table in your database. So, you can use the following select statement instead of above one:


SELECT rows
FROM sysindexes
WHERE id = OBJECT_ID(‘table_name’) AND indid < 2


There are physical read and logical read operations. A logical read occurs if the page is currently in the cache. If the page is not currently in the cache, a physical read is performed to read the page into the cache. To see how many logical or physical read operations were made, you can use SET STATISTICS IO ON command.


The example:

SET STATISTICS IO ON

GO

SELECT count(*) FROM tbTest

GO

SELECT rows FROM sysindexes WHERE id = OBJECT_ID(‘tbTest’) AND indid < 2

GO

SET STATISTICS IO OFF

GO





Result:

———–

10000


(1 row(s) affected)


Table ‘tbTest’. Scan count 1, logical reads 32, physical reads 0, read-ahead reads 0.

rows

———–

10000


(1 row(s) affected)


Table ‘sysindexes’. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0.






Popularity: 1% [?]

I believe all the DBA know that how important is “Index” in the database if you would like to optimize the database server performance. It maybe a pain for your server if you create the index wrongly.


Here are some check lists on the index optimization that you should bear in mind and should go through. This is the foundation of the index optimization but it mean and help you a lot, if you already follow and apply all the checklist below, then you may need to try out more experiment to get more optimize:


Index optimization checklist:

  • Create Index on frequently used columns in T-SQL Code. Columns used in WHERE, ORDER BY and GROUP BY are good candidate for Indexes. Create Index on columns which are used in JOIN Condition.
  • Remove any un-necessary Indexes. As Index occupies hard drive space as well as it decreases performance of the entire insert, updates, deletes to the table.
  • Smaller Index Key gives better performance than Index key which covers large data or many columns
  • Index on Integer Columns performs better than varchar columns.
  • Clustered Index must exist before creating Non-Clustered Index.
  • Clustered Index must be created on Single Column which is not changing and narrow in size. Best candidate is primary key.
  • Non-clustered Indexes increases performance of the query that returns fewer rows and rows has wide selectivity spectrum.
  • Each table must have one Clustered Index.
  • If column have low selectivity avoid creating Index on that column as it slow down the rows modification and system will not get benefit from Index.
  • Multiple Columns Index or Covered Index should be ordered as Most Selective column on left and gradually decreasing selectivity as they go right.
  • Use SORT_IN_TEMPDB option when table is created if tempdb is on different disk. This will increase the performance to create Index.
  • Rebuild Index frequently using ALTER INDEX and De-fragment Index to keep performance optimal for Indexes.

Popularity: 3% [?]

mssql2005 T SQL: Concatenate something + null=null This whole morning just spent about 1 hours+ just to try out one very simpel query on MS SQL 2005.

I keeping get the null value whenever i run this query, even in my program or run directly from the MS SQL 2005 management studio.

Finally I found out that is you are concatenate null values, either the concat null yields null setting of sp_dboption or SET CONCAT_NULL_YIELDS_NULL determines the behavior when one expression is NULL.


With either concat null yields null or SET CONCAT_NULL_YIELDS_NULL enabled ON, String + NULL returns NULL. If either concat null yields null or SET CONCAT_NULL_YIELDS_NULL is disabled, the result is String?


This is the case 1

Update tableA
set field1 + ‘My value’
where field2 = 1


This is the case 2

select ‘test ‘ + null + ‘ string’

returns
————
NULL


This is the solution

set concat_null_yields_null off
select ‘test ‘ + null + ‘ string’

returns
————
test string

Popularity: 2% [?]

Recently just start to learn on one of the famous e-commerce shopping cart – Magento. But found out that is not as simple as other open source shopping cart such as osCommerce, ZenCart or even Joomla Virtual Mart.


It take me about 1 – 2 days just to find out how to set my default product category at the home page after i found out this video clip. So just copy the video clip here to share with those who are facing this problem as well.



The code to added to your home page

{{block type=”catalog/product_list” category_id=”xxx” template=”catalog/product/list.phtml”}}




Popularity: 2% [?]

Paypal fee calculator

By on March 23, 2009

paypal logo Paypal fee calculatorPaypal Fee Calculator is a small and simple tools for you to calculate the amount of money that you going to charge your customer if you want to transfer the finance charges to them.


Paypal fee calculator available in 2 difference mode which are simple mode and advance mode. If you just want to find out how much your customer need to pay to you using the Paypal account without involve any currency convertion, then just enter to the simple mode.


What you need to do is enter finance charges at the bottom of the page, then enter the amount you wish to received at the top of the page. The Paypal calculator will help to you calculate how much you should ask your customer to pay to you in order to get a exactly the amount.


[More]

Popularity: 1% [?]

Email signature SEO

By on February 23, 2009

 Email signature SEOA small tips for all the website owner. You may include your web blog url, web site url or RSS link in your email signture to help you in attracting some free traffic to your site.


You may design the signature in HTML form with the editor tools such as Macromedia Dreamwaver or Microsoft front page, then attach it in your email client. But for Gmail Webmail user, you need a tools such as WiseStamp to help you to attach it, as by default Google don’t allow HTML signature.


With the website url and the RSS link provided, you may attract your receiver who are actually wish to know you better. It may be useful for those who like to send the forwarded email to your friend.


I did this few weeks ago and it did help me in increasing my web blog traffic and also increase the subscriber number for by feed.


Hopefully this small tips can help you all.


my signature in gmail Email signature SEO

My sample siganture in my Gmail




Popularity: 1% [?]

Gmail shortcut key

By on February 23, 2009

shortcut key Gmail shortcut keyGmail are provided with the full access/navigate the webmail using your keyboard shortcut key. The keyboard shortcuts actually help you to save time by allowing your hand just stick on your keyboard.


But in order to avoid to crash with your browser or system shortcut key, Gmail pre-define shortcut may be not so familiar for you. You need to remember your most common use key such as next/previous email, send email, delete email, reply email.


How to turn on the keyboard shortcuts?

  1. Login to your Gmail
  2. Click on setting on the top right corner
  3. Go to general
  4. Select the “Keyboard shortcuts on”
  5. Save the change


The following is the shortcut key that may be useful for you:


[More]

Popularity: 1% [?]

SEO Powered by Platinum SEO from Techblissonline