Showing posts with label Windows Trick. Show all posts
Showing posts with label Windows Trick. Show all posts

Topics

1) Code your Server.js - Node.js main file
        i) Importing libraries
        ii) Create Server and Handle Request
        iii) Play with Socket.io to do MultiChatting
2) Develop Webpage with Socket Javascript
3) Download Project here


1) Code your Server.js - Node.js main file

i) Importing libraries


 var http = require("http");
 var url = require('url');
 var fs = require('fs');
 var io = require('socket.io');

ii) Create Server and Handle Request

var server = http.createServer(function(request, response){
 
 var path = url.parse(request.url).pathname;
 console.log('Path='+path);
 switch(path){
  case '/':   
   fs.readFile(__dirname + "/index.html", function (error, data) {
    if (error) {
     response.writeHead(404);
     response.write("opps this doesn't exist - 404");
     response.end();  
    }  
    else{ 
     response.writeHeader(200, {"Content-Type": "text/html"});  
     response.write(data, "utf8");
     response.end();  
    }
   });
   break;
   
  case '/socket.html':
   fs.readFile(__dirname + path, function (error, data) {
    if (error) {
     response.writeHead(404);
     response.write("opps this doesn't exist - 404");
     response.end();  
    }  
    else{ 
     response.writeHeader(200, {"Content-Type": "text/html"});  
     response.write(data, "utf8");
     response.end();  
    }
   });
   break;
   
  default:
   console.log(path +"- Not found");
   response.writeHead(404);
   response.write("opps this doesn't exist - 404");
   response.end();
   break;
 }
 
});
server.listen(8001);

iii) Play with Socket.io to do MultiChatting


var serv_io = io.listen(server);
var textarea="";
var name="";
serv_io.sockets.on('connection', function(socket){
 //send data to client
 setInterval(function(){  
        socket.emit('date', {'date': getCurrentTime()}
 );
  
    }, 1000);
 
 socket.on('client_data', function(data){
  textarea=data.textarea;
  name=data.name;
  console.log("name="+name);
  //socket.emit('textarea', {'textarea': data.textarea});
  emitData(socket);
 });
 
    
});

function emitData(socket){ 
 socket.broadcast.emit('message', 
  {'date': getCurrentTime(),
   'name' : name,
   'textarea':textarea
  }
 );
}

function getCurrentTime(){
 var d = new Date();
 var curr_date = d.getDate();
 var curr_month = d.getMonth()+1;
 var curr_year = d.getFullYear();
 var curr_hour = d.getHours()%12 +"";
 var curr_min = d.getMinutes() + "";
 var curr_sec = d.getSeconds() + "";
 if(curr_hour.length == 1)
  curr_hour="0"+curr_hour;
 if(curr_min.length == 1)
  curr_min="0"+curr_min;
 if(curr_sec.length == 1)
  curr_sec="0"+curr_sec;
 
 //var dateString = sprintf("%2s-%2s-%s %2s:%2s:%2s ",curr_date,curr_month,curr_year,curr_hour,curr_min,curr_sec);
 var dateString = curr_date + "-" + curr_month + "-" + curr_year + "  " + curr_hour +":"+ curr_min +":"+ curr_sec;
 
 return dateString;
}

2) Develop Webpage with Socket Javascript

<html>
  <head>
    <script src="/socket.io/socket.io.js"></script>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script> 
 <style>
 .common{
  width: 200px;
  height: 30px;
  padding-left: 10px;
  
 }
 #date{
  color: green;
 }
 </style>
  </head>
  <body>
    <script>
  var socket = io.connect();
  socket.on('date', function(data){
   $('#date').text(data.date);
  });
  
  socket.on('message', function(data){   
   message=data.textarea;
   len=message.length;
   if(len > 0){
    printMessage(data.name,message);     
   }
  });
  
  
  $(document).ready(function(){
   $('#textarea').keypress(function(e){
   if ( event.which == 13 ) {
    message=$('#textarea').val();
    len=message.length;
    strname = $('#name').val();
    if(len > 0){
     socket.emit('client_data', {'name':strname,'textarea': message}); 
     printMessage(strname,message);     
    }
    $('#textarea').val("");
   }    
  });
  }); 
  
 function printMessage(strname,message){
  $('#messagearea').html($('#messagearea').html()+"<br/><span style='color:blue;font:18px;'>"+strname+"</span> : "+message);
 }
    </script>
    <div><h1>Welcome to Node.js Socket.io - Simple Multi Chat Application</h1></div>
 <b> Get tutorial here (Post your comments and query)</b> - <a href='http://www.coolcomputerpctricks.com'>www.coolcomputerpctricks.com</a><br><br>
 <b> Get Latest Code here </b> - <a href='https://github.com/karthikeyan98'>https://github.com/karthikeyan98</a>
 <br><br>Current Time: <span id="date"></span><br/>
 <input type="text" id="name" value="Guest" class="common"> - Type Name here<br/><br/>
 <textarea id="textarea" class="common"></textarea> - Type Message here and press Enter.
 <div id="messagearea"></div>
  </body>
</html>

3)  Download Project here

GitHub - https://github.com/karthikeyan98/SimpleMultiChat

Post your comments and query for any help.

Are we trusting Google too much?

Are we trusting Google too much?

1. why should chrome warn us with a message when we clear browsing history?


Whenever we try to clear browsing history, chromes tells that there is incognito mode to use, is Google worried if you clear your entire browsing history from chrome?

What does Google do with your browsing history?
Here's a clear evidence, "YouTube", Google's YouTube shows video contents relevant to our browsing history stored in chrome. that's how your information is used to make you use their product(YouTube) more than what you do normally.
you can find the difference when you go to "YouTube" home page in both conditions
1. first without browsing history - everything cleared in chrome- visit YouTube home page
2. after doing couple of Google searches, let chrome shows some history and visit YouTube, you will feel the difference

2. why should chrome has separate log in session separating it from other google products.

when you logged in chrome, also when you logged in some of other google product like gmail, when you signout of gmail,chrome logged in session wont go.

chrome separate login session stores all your data ( you can control it by visiting settings, how many of us do that, what about people who doesn't have enough computer experience to change the settings ) user specific data stored in each of our google account right from browsing history to form input data's.

3. How does google map works - showing traffic information in the road we travel.



It does collect our location information including in which speed we are traveling, it collects every one who uses android mobile or signed in to google map atleast once and using some algorithm it gives back.


4. What will happen with Google Glass?

                    XX_____XX 

5. Not just above four items, there are lot more things.. like

     At first time when you open Google Chrome, it asks you to sign in with Google account. How many of you signed in without knowing that it is a log in for Google chrome to save your personal browsing data  in your account?
      Many would have no idea initially that it is a log-in specially for Google Chrome. and would have signed in directly thinking it is normal google product sign-in.

 Obviously, we are very much benefited and addicted to all those products, and there are ways we can control sharing our data to a certain level, but how many of us are really concerned about it, going to settings, searching where it is and switching it off?

Google's New Scientific Calculator

Google Launches its New Scientific Calculator.


If you type "Calculator" or "99/9" in google search, you will get the googles All New Scientific calculator.
Or if you do any mathematic calculations right away it will bring its Advanced Mathematical calculator
Try typing these things in google search for getting Google Scientific Calculator

Search it in Google - Calculator , 99/9 , Sin(90) , Sin 90,  log10 , like any mathematical calculations.
Its is as fast as google search results.


Google Restricts Labels in blogger (robot.txt)


Google Search restricts Labels (Categories) for all the blogs in Blogger (BlogSpot)

If you see something like this in your webmaster tools, be cool don’t worry for this.

This is because

Reason: Each Label entries are not sub pages, they are just a well framed search query
For example:
When you click the Label – Windows Trick in coolcomputricks.co.cc, the url pointing to that label is this

http://www.coolcomputricks.co.cc/search/label/Windows%20Trick

If you see this url carefully, you can see “/search/” in it, this means it is not actually a new page to be crawled by the Google search bot, it just a search query url, where all the pages yielded by this search query url is already indexed, so it just says it restricts the labels (search query url), but all the pages in your site is already indexed and included in search engine

The main idea behind having labels in the blogs or website, is to make the users comfortable in selecting categories they wished.

What should you do to make safe browsing, when using your friends laptop or using it in any Internet center.?

What should you do to temporarily erase the trace of what you searched for?

Keep the history unchanged, but temporarily disallow saving of histories, cookies, url names and everything.

Here is what you need to do.

Almost All the browsers has a concept called Private Browsing, Private Browsing helps not to save any information like histories, form entries, username, password, cookies, and everything you browsed for, so all the browsing entries can be unsaved for that particular time of browsing
For Chrome Users
1.       Click Settings ( Tool Icon on the top right corner of chrome)
2.       From the drop down, select “New Incognito Window

3.       You will now see a new window with a Detective Agent Logo on Top Left Corner, where you can make private browsing, credit card transactions, experiments, research, and anything that will not saved forever
4.       And when you close it, it goes normal, If you want to do Private browsing again, need to start from first

For Mozilla Firefox Users
1.       Click Firefox Button on the Left top corner
2.       Click “Start Private Browsing
3.       You will receive a alert box, click “Start Private Browsing” once again

4.       There you go, you will now see a new window that has changed color in the Firefox Button on the Left top corner enjoy private browsing, where you can make private browsing, credit card transactions, experiments, research, and anything that will not saved forever

For Internet Explorer Users
1.       Click Safety Menu on the Top right side of the Internet explorer
2.       Select “InPrivate Browsing

3.       There you go, you will now see a new window that has InPrivate icon on the address bar, enjoy private browsing, where you can make private browsing, credit card transactions, experiments, research, and anything that will not saved forever

Renaming Multiple Files

Windows XP Tips and Tricks - Renaming Multiple Files

In your computer, if you want to rename multiple files at once, like an array, this trick will be very useful.

Windows XP lets you rename files in bulk by simply selecting multiple files within Windows Explorer and pressing the F2 key. When you use this feature, the OS applies the name you enter to the first file and applies the same name with a number in parentheses to the other files you selected (the file extensions remain unchanged).

For example, if you select the following files,
* pics.jpg
* notes.txt
* myname.rtf
* music.mp3

and rename the first file (pics.jpg) to sample.doc, XP renames the remaining files as follows:
* Sample (1).jpg
* Sample (2).txt
* Sample (3).rtf
* Sample (4).mp3

Make Desktop wallpaper screensaver unchangeable

Make Your Desktop Wallpaper , ScreenSaver to be unchanged by anyone.



This trick is for Windows 7, it will work with windows vista and previous versions as well.



Step1: Open Run Window..



To open Run Window press( WindowsKey+R) or Click StartMenu and type Run to get it





Step2: Enter gpedit.msc in Run Window and press enter.



Step3: Now the Local Group Policy Editor Window will be opened ( look the picture below )







Step4: In the Left Pane of Local Group Policy Editor window Click User Configuration--> Templates ( look the picture below )







Step5: In the Right Pane of Local Group Policy Editor window Double Click Control Panel ( look the picture below )





Step6: Now In the Right Pane of Local Group Policy Editor window Open Personalization--> Changing desktop background ( look the picture below )







Step8: Now you will get a Prevent changing desktop background window, click Enabled Option and press Ok. ( look the picture below )







Step9: Now you can’t change your Desktop background Image. ( look the picture below )







Step10: To Once again Make the Desktop background to changeable Make the Option as Not Configured in Prevent changing desktop background window.



Step 11: Do the Same for Screen saver, Desktop icons, mouse pointers etc..

Google Chrome gets a new Icon

Google Chrome icon changed


New Chrome ICON
Old Chrome ICON


The new Google Chrome Icon is very simple and looks like it's a 2 dimension of the old chrome icon.

The new Icon has been changed automatically for all the users of chrome browser. it seems like update is going on for the application without the users knowledge.

Simple things are always powerful - secret of Google.

Two Secret Shortcuts for Windows 7

Two Secret Shortcuts for Windows 7 - Computer cool Tricks



ShortCut-1 : press WindowsKey + x



you will get Windows mobility center, where u can control things like

  • wifi adapter on/off
  • display brightness
  • volume control
  • projector or external display
  • battery charging and power options
  • synchronization
  • etc...




Shortcut-2: click and shake at top of any window faster.



This makes minimize all other opened windows, except the one u shaked.. a cool trick to your windows computer while working with multiple applications..



To test it do the following.

step1: Open up multiple windows of any choice ( like notepad, paint , browser ...).



step2: click on top of any of the window and shake it twice ( just hold your mouse button and move left to right and right to left twice fastly).



step3: u will notice that, all other windows getting minimized.



step4: also if u do that again, u can restore all the windows back.

Interesting !!! Google Vs Bing , Unbelievable Trick try it yourself.

Interesting !!! Google Vs Bing , Unbelievable Trick try it yourself.
Have you ever tried Automattic currency Conversion in Google or Bing search, There lies this interesting fact.Just have a look at it.. perhaps wait! how about Exploring this interesting crazy fact on your own with the help of following steps.

Step 1: Open your favourite Web browser twice (two windows or two tabs) open www.google.com in one and www.bing.com In another.


Step 2: Type the following in both the search bar and hit Enter.

1 euros in usd

Step 3: Well I searched at this time December 5 2010 8.24 pm look what I get. Having two different answers for same question

Google said 1 Euro = 1.3382 US $

Bing said 1 Euro = 1.34246 US $


Step 4: Which one is correct??????????!!!!!!!?????????

Step 5: Well According to Yahoo (OMG!!! another search engine) Currency convertion at this page http://finance.yahoo.com/currency-converter/#from=USD;to=EUR;amt=1.3399 says both are wrong.

Step 6: Well Let’s try some other site to verify it http://www.xe.com/ucc/convert.cgi?Amount=1&From=EUR&To=USD&image.x=63&image.y=21&image=Submit which says Google Data is better than bing and yahoo but not Accurate though !!!!!!.
Enable and Disable Thumbnail view (Most visited / Recently Closed) on the New tab of Google Chrome Browser

Disable
By Default you have the thumbnail view enabled, closing or disabling this view is very simple

Step 1: just click X – close button on the right side of the Most Visited or Recently closed frame.

Step 2: After clicking it, the thumbnail view will disappear.

Step 3: Though the thumbnail view disappeared, u can access the most visited and Recently closed items through links on the left down of the page in a simple view.

Enable

And to get back thumbnail view of Most visited or Recently Closed items
Step 1: click the “Most Visited” link (text) in the left down corner

Step 2: You will have your recently visited links poped up, now click the “Most Visited” link in the poped up window.



Step 3: now the Most Visited view will be appearing in the top of the page, click the arrow on the left side of it.



Step 4: That’s it You have your thumbnail view of Most Visited items back.

Step 5: Do the same for Recently Closed items .

Bug Exposed in Google Chrome Browser


Google Chrome Display Bug Exposed

Google browser Chrome - one of the newest widely used browser, has a funny display problem which is exposed, try this for yourself and have a look at it..

Step: 1 - Open Google Chrome Browser (well the latest version)

Step: 2 - Open Google mail ( www.gmail.com ) and log into your account

Step: 3 - Open any of your contacts chat window just like chatting ( but we not gonna chat here).

Step: 4 - with your middle mouse button - click hold and drag down on the down left corner of the chat box. see the below picture..



Step 5: Now you see the Nasty Trick of browser scrolling out the window itself. the chrome browser scrolls outside its level.. this makes browser lost its screen display area.

now go to address bar and browse other sites and have a funny display out of it..

Store your Gmail mails in Computer without using any Email Client

Gmail Offline

Gmail Offline is a Feature where you can Store your Mails, Chats, Attachments, labels in your personal Computer without having to use any Email clients like outlook.

Gmail Offline Let you to Synchronize all your Gmail contents to your PC when your connected to internet and makes u to work with your mails while not connected.


Enabling Gmail Offline Feature

1. Log into your Gmail
2. go to Settings->Offline
3. click "Enable offline mail for this Computer" and click "Save changes" button
4. Follow the instructions and Accept to install Google Gears which is less than 1 MB.
5. After this Few minutes Process, u'r Google mail gets synchronized to your PC
6. and you can access all your gmail contets offline by clicking the "Gmail Offline" icon on your Desktop


Advantage of Gmail Offline

1. Very Simple Feature and easy to use
2. No Additional Software to be Installed like outlook express etc..
3. And More Importantly its the Google's Product you can be sure of security of your personal file's

Disadvantage of Gmail Offline
1. You cannot specify selected mails to get saved in your Pc, instead all your mails within specified years are get stored.

Disable or Enable Windows Task Manager

Disable or Enable windows Task Manager

There are sometimes where your windows Task Manager get disabled by some virus, you can re-enable it, or if u wish u can disable it also, to do this follow the steps



1. Go to Start->Run and type gpedit.msc press ok, group policy window will open.

2. In the group policy window navigate to User Configuration->Administrative Templates->System->Ctrl+Alt+Del options

3. then open Remove Task Manager, in that there are there options Not Configured, Enabled, Disabled, by default Not configured is selected

4. To enable the task manager select disabled and press ok.

5. To disable the task manager select enabled and press ok.

Changing Thumbnail size and Quality of the Pictures in Windows

Make your own Thumbnail view size in windows

When we browse images in the explorer, the thumbnail size of the picture's is too small or too big and the quality of the thumbnail is not good, it is possible to make our own thumbnail size and make the thumbnails display in high quaility.

To do this it is required to edit the registry, so it is better to make the registry backup.


1. open the registry editor - start->run-> regedit

2. navigate to HKEY_CURRENT_USER\ Software\ Microsoft \ Windows\ CurrentVersion\Explorer

3. create two new DWord Value by right clicking and select "new->DWORD value" and name one as "ThumbnailSize" and other as "ThumbnailQuality"

4. select Decimal Value and set values for both, ThumbnailSize can have values 32 - 256 and Thumbnail Quaility can have values 50 - 100.

5. open any folder and change the view to Thumbnail and see the difference.

Add New list in Right Click of My Computer

This technique involves registry, so make backup of the registry..

step-1: Copy/Paste the following code in Notepad And then Save it as .reg

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellRegistry Editor]
@="Name of the Application"
[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellRegistry Editorcommand]
@="Location Of The Application"

Step-2. Now edit it and then type the name of the Applictaion.

Eg:

[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellRegistry Editor]
@="Firefox"

3. Then type the location of the application to be opened:

Eg:

[HKEY_CLASSES_ROOTCLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}shellRegistry Editorcommand]
@="C:\Program Files\Mozilla Firefox\firefox.exe"

Thats It finally save it And then Run it .

Creating nameless Icons ,Folders.

If you would like your desktop Icons to have no text underneath then try this tweak:

1. Right click the icon and select "Rename"

2. Now hold the "Alt" key and type "255" and hit Enter


NOTE : It may only work with the keypad numbers and not the number keys on top of the keyboard.

Speed up the Start Menu

Trick to Speed up the Start Menu


The Start Menu can be leisurely when it decides to appear, but you can speed things along by changing the registry entry

HKEY_CURRENT_USER/Control Panel/Desktop/MenuShowDelay
from the default 400 to something a little snappier. Like 0.

(to open registry go to Start->Run->type 'regedit'

Open Windows Explorer to a Different Default Directory


Open Windows Explorer to a Different Default Directory


When you open Windows Explorer (by choosing the Window key and "E" simultaneously or by choosing Start, all Programs, Accessories, Windows Explorer), you can change the directory that appears by default.
If you choose Start, all Programs, Accessories, and then right-click on Windows Explorer and choose Properties, you can modify the "Target" directory.
To go to your C: drive, type simply C:\ in the Target box and choose OK. You can also enter a shortcut key on this screen, telling Windows the character or combination of characters you want to type to automatically open Windows Explorer. You can even change the icon or specify that you always want Explorer to open up in full-screen mode.

Change Text on XP Start Button

Step 1 - Modify Explorer.exe File

In order to make the changes, the file explorer.exe located at C:\Windows needs to be edited. Since explorer.exe is a binary file it requires a special editor. For purposes of this article I have used Resource Hacker. Resource HackerTM is a freeware utility to view, modify, rename, add, delete and extract resources in 32bit Windows executables and resource files (*.res). It incorporates an internal resource script compiler and decompiler and works on Microsoft Windows 95/98/ME, Windows NT, Windows 2000 and Windows XP operating systems.

get this from http://www.users.on.net/johnson/resourcehacker/

The first step is to make a backup copy of the file explorer.exe located at C:\Windows\explorer. Place it in a folder somewhere on your hard drive where it will be safe. Start Resource Hacker and open explorer.exe located at C:\Windows\explorer.exe.

The category we are going to be using is "String Table". Expand it by clicking the plus sign then navigate down to and expand string 37 followed by highlighting 1033. If you are using the Classic Layout rather than the XP Layout, use number 38. The right hand pane will display the stringtable. We’re going to modify item 578, currently showing the word “start” just as it displays on the current Start button.

There is no magic here. Just double click on the word “start” so that it’s highlighted, making sure the quotation marks are not part of the highlight. They need to remain in place, surrounding the new text that you’ll type. Go ahead and type your new entry. In my case I used Click Me!

You’ll notice that after the new text string has been entered the Compile Script button that was grayed out is now active. I won’t get into what’s involved in compiling a script, but suffice it to say it’s going to make this exercise worthwhile. Click Compile Script and then save the altered file using the Save As command on the File Menu. Do not use the Save command – Make sure to use the Save As command and choose a different name for the file. Save the newly named file to C:\Windows.


Step 2 – Modify the Registry

!!!make a backup of your registry before making changes!!!

Now that the modified explorer.exe has been created it’s necessary to modify the registry so the file will be recognized when the user logs on to the system. If you don’t know how to access the registry I’m not sure this article is for you, but just in case it’s a temporary memory lapse, go to Start (soon to be something else) Run and type regedit in the Open field. Navigate to:

HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Winlogon

In the right pane, double click the "Shell" entry to open the Edit String dialog box. In Value data: line, enter the name that was used to save the modified explorer.exe file. Click OK.

Close Registry Editor and either log off the system and log back in, or reboot the entire system if that’s your preference. If all went as planned you should see your new Start button with the revised text.