Saturday, December 19, 2009

PHP string concatation

  1. $str1 = 'This ';
  2. $str2 = 'is a ';
  3. $str3 = 'test string';
  4. $full = $str1.$str2.$str3;
  5. echo $full;
  6. ?>

PHP string compare

  1. $str1 = "Test";
  2. $str2 = "Test";
  3. if ($str1 == "Test") echo "OK-1";
  4. if ($str1 == $str2) echo "OK-2";
  5. ?>

Tuesday, December 15, 2009

Shortcut command to Restart / Shutdown windows

XP : Click start -> Click "Run" -> Write : cmd
Vista, 7 : Click start -> Write : cmd

Then :
For a shortcut to RESTART Windows :
SHUTDOWN -r -t 01

For a shortcut to SHUT DOWN Windows :
SHUTDOWN -s -t 01

Monday, December 14, 2009

enable content search in windows

Content-searching can allow you to search files by what is contained within the file rather than the file-name. By default, Windows only search file names for locations that are unindexed, which can often bring frustration upon users who have Search Indexing disabled. By enabling content-searching, those who often forget filenames but remember the contents within a file can make their searching much more efficient.

searchbar.jpg

Re-enabling content-searching is very simple. First, you want to access your folder options from the Tools menu. If you don’t have the top navigation bar enabled by default, just press Alt.

folderoptions1.jpg

Click on the Search tab above to access your Search Functions. Below is a picture of the default search settings. Simply check the second button, “Always search file names and contents” to re-enable content searching. If you’re working with system files, you might also want to check the Include System Directories box below.
searchfoloptions.jpg

source : http://www.vistarewired.com/2007/03/17/how-to-search-files-by-content-data

Split screen, Notepad++

To split the screen in Notepad++ you have to right-click on the tab
with the current document and select "Clone to another view". The
screenshot at the following page explains how to switch between
horizontally and vertically split screens.

http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_rotate.gif

This page explains how Notepad++ can be integrated with Stata similar
to the built-in Do-File Editor:

http://huebler.info/2008/20080427-stata.html

thanks to Friedrich

Tricks to make old Addons work on Firefox 3.5 or higher

The trick is to add some configurations in Firefox settings. All the changes you make from here on are done at your own risk. Do revert the settings if something goes wrong.

  1. Type about:config address bar of Firefox browser and hit enter. It will give you a warning. Just click the button “I’ll be careful, I promise!” and proceed…
  2. It will show a huge list of values. Now, right click any where in the free white-space on the screen and click on New –> Boolean, then name the Boolean as checkCompatibility – make it false in the next step.
  3. again right click and click on New -> Boolean and name as checkUpdateSecurity and choose false.
  4. After doing this changes to get the changes applied, Restart the Firefox browser. Now install the addon that was not supported or compatible by Firefox 3.5 and install it.
  5. Restart the Firefox browser once again. Now, the not compatible addon will work with Firefox 3.4

Hope you liked this trick.

Thanks to Blogote