Monday, 17 November 2014

Changing the USB setting on Galaxy S3 running Android 4.3 to enable USB connection to PC

I was banging my head trying to figure out why my Samsung Galaxy S3 (SGH-T999) was not able to be accessed as a media device on my PC. After a long search, I finally found that it was to do with me USB settings for my Qualcomm Modem (it might have been changed after the upgrade to Android 4.3).

The "USB PC Connection" in the "Settings" is no longer available. So, now, how do I check/change my USB settings on Android 4.3 on my S3?

Here's how.

1. Ensure that you have downloaded and installed the USB driver on your PC for your phone from:
http://www.samsung.com/us/support/downloads (select the model of the phone)

2. Enable Developer Options:
     • Settings > More > About device
     • Scroll down to "BUILD NUMBER"
     • Tap it a couple of times (about 5 times) - an alerts tells you how many more times to tap
     • "Developer options" would now have appeared (Settings > More > Developer options)
     • Under "Developer options", tick the check box for "USB debugging"

3. To change the Qualcomm Modem settings, dial *#0808# for Android 4.3 (*#7284# on Android 4.2)

4. You will see the following screen:

5. For me, "MTP + ADB" worked. (MTP = Media Transfer Protocol)

6. Click "OK". If your PC does not detect the phone, reboot the phone.

You should not be able to access your phone via a USB connection on your phone running Android 4.3.

Tuesday, 24 September 2013

Opening "My Computer" from a Windows Explorer shortcut

When clicking on the Windows Explorer shortcut on the Windows Taskbar, by default, it will open up the "Libraries" folder. If you prefer to open up "My Computer", change the Windows Explorer shortcut "Target" to any one of the following:

%windir%\explorer.exe /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

%SystemRoot%\explorer.exe /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Saturday, 25 August 2012

Fast way of getting your public IP address

There are many ways of getting your public IP address (which is assigned to you by your ISP). The fastest and easiest way to get your public IP address is by accessing icanhazip.com.

Other ways include:


All of the above should give you the same results.

If you do not want to use the browser, and prefer to use a saved script, copy and paste the flowing code snippet into a file with the .vbs extension (you could name the file get_public_ip.vbs).
Option Explicit
Dim http : Set http = CreateObject( "MSXML2.ServerXmlHttp" )
http.Open "GET", "http://icanhazip.com", False
http.Send
Wscript.Echo http.responseText   'or do whatever you want with it
Set http = Nothing

This script will get the public IP address from icanhazip.com.

To run the script, navigate to the folder holding issue the command at the command prompt (assuming the file name is get_public_ip.vbs):
cscript get_public_ip.vbs

Friday, 18 May 2012

Chromium for Windows

So, Chromium vs Google Chrome. Get it? Google Chrome is a customized browser built by Google, which was taken from the open source project, Chromium. Google has added a whole load of its own hooks into Chrome, allowing for Google to gather a stack of information about the user of Google Chrome.

If you are not paranoid about your browsing activities being "monitored", then you can continue using Google Chrome. For those who prefer not to disclose their browsing activities to Google, it would be highly recommended to use the Chromium browser instead. So, the question is, "Where can I download the Chromium browser for Windows?". Keep reading.

There is no real official installer .exe created for Chromium. All current and past build of Chromium (and future builds which are to come) are stored in the Chromium nightly build repository. In this link you would find folders named by numbers, which represent the build number of the Chromium browser. A current stable build is Chromium 20, i.e. build folder 136319. All builds beyond this build number are for Chromium 21, which is still in progress - so, as much as you could download and use the newer builds, there might be risks that something(s) might be broken. Any how, if there is a problem with one version, you could always download and try another.

Since there is no installer for Chromium, you would need to perform a couple of manual steps in order to set things up (these steps apply if you are attempting to upgrade/downgrade Chromium as well). So, here goes:
  1. In the build folder, download the file "chrome-win32.zip".
  2. After the download completes, unzip the contents of the zip file to your Program Files folder (if you are using a 64-bit Windows OS, you would need to unzip to the "Program Files (x86)" folder).
  3. Traverse into this folder and double-click the chrome.exe file to launch the Chromium browser. (Don't be misled with the fact that the exe file name is "chrome" - it is not the same as Google Chrome)
The Chromium browser should have launch successfully and the look and feel should be very much similar to Google Chrome. At this point you can also add any extension from the Chrome Web Store as they are fully compatible with Chromium (as they are with Google Chrome).

After launching the Chromium browser by running the chrome.exe file earlier, a couple of operations happened in the background to get Chromium set up for use on Windows. You would find that:
  1. a shortcut for the Chromium browser has been created on your desktop
  2. a registry entry was created at “HKEY_CURRENT_USER\Software\Chromium”
  3. the following directories were created (depending on the OS you are using):
    • on Windows 7, the folder "C:\Users\\AppData\Local\Chromium" would 
    • on Windows XP , the folder “C:\Documents and Settings\\Local Settings\Application Data\Chromium” would have been created
Updating Chromium
Chromium doesn’t have a built in mechanism of looking for updates and upgrading itself. So, it is a manula process of upgrading Chromium. To change the version of Chromium (upgrade/downgrade), just follow the same steps (Steps 1-3) above.

If you do not like Chromium or if you want to stop using it, all you would need to do is to go to the folder containing Chromium (in the folder "Program Files" or "Program Files(x86)") and remove/delete the folder completely. If you are an advanced user, you can also remove the folder created by Chromium in your applications data folder and also remove the registry entry (both should have been created automatically by the application).

There you go. Those are the steps on how to use Chromium on Windows.

Sunday, 28 August 2011

Moving incomplete µTorrent downloads to a different computer

If you use µTorrent, you might have wondered how to move your download to a different computer, without losing the progress of the downloads which have started but have not completed. Now, here is how you can do it.

Prepare the files for transfer:
  1. Shutdown µTorrent
  2. Copy the contents of %appdata%\utorrent folder to a portable storage device (USB drive, etc). Actualy, the most important file which is required is resume.dat. But I would suggest copying the entire folder, just for simplicity's sake.
  3. Copy the folder/files in which the partial downloads of the in-progress downloads are to the portable storage.
  4. Copy the files from (2) to %appdata%\utorrent on the second computer
  5. Copy all the files from step (3) to the second computer
  6. Download BEncode Editor from https://sites.google.com/site/ultimasites/bencode-editor
  7. Using BEncode Editor, edit the resume.dat in %appdata%\utorrent by using the function 'find/replace' to change the path or drive letter if the destination path of the partially downloaded file has changed.
  8. Start up µTorrent and the download should continue from where it left off on the older computer.
Enjoy!!!

Monday, 22 August 2011

Changing the Windows 7 Logon Screen image

There are numerous ways to change the background of the Logon Screen in Windows 7. All possible methods, including the steps, can be found in the tutorial below:

From the tutorial in the link above, the easiest way IMHO is to use Julien Manici's Windows 7 Logon Background Changer. The application's title speak for itself - it does exactly what it says it does - and it is really simple and hassle-free. And to top it off, it is FREE!!!

PC Hardware Review websites

Here is a list of some websites which contain PC hardware reviews:

Friday, 19 August 2011

Fixing problem of NFS mounts specified in /etc/fstab not being mounted at boot

When using SUSE11 (and possibly other flavours of Linux), there could be issues in nfs mount to successfulyl get mounted at boot up time, even though already specified in /etc/fstab.

There is a basic workaround for this, where the command "mount -a" can be manually entered when you log into the system the first time after each boot up.

However, if you wanted to fix this once and for all, there here's the solution. Open the file /etc/init.d/nfs, and change the following lines (the text in green are the additions that need to be made):

if test "$nfs" = yes ; then
sleep 10 && mount -at nfs,nfs4 > /dev/null 2>&1
sleep 2
fi

The value of "10" for the first sleep could be changed to a lower number, e.g. 5, but I decided to choose 10 just to be sure that the network was up and running for the nfs mount to succeed. This sleep period value could be increased/decreased to suit your needs.

Friday, 8 July 2011

Some "Must-Have" general plugins for Eclipse

As a fairly new Eclipse user, primarily focusing on C/C++ development, besides the Eclipse CDT plugin, I found that there are a couple of plugins which I would recommend to anyone using Eclipse:
  • AnyEdit (http://andrei.gmxhome.de/anyedit/)- AnyEdit is a "swiss army knife" for all Eclipse editors, where it adds several new tools to the context menu of text- based Eclipse editors, to output consoles, to Eclipse main menu and editor toolbar
  • StartExplorer (http://startexplorer.sourceforge.net/) - offers a convenient integration of the Windows Explorer, the Windows command line, Windows default system applications and the clipboard into Eclipse

Both these plugins can be found on the Marketplace in Eclipse. So, if you require "express" setup, it does not require manual downloading and installation of the packages.

AnyEdit features
- tabs <-> spaces convertion on multiple files or entire directories and supports also file exclusion filter for tabs <-> spaces action
- automatically remove trailing whitespaces and/or perform tabs<->spaces conversion on a "save" action
- automatically create a new line at the end of the file if the last line was not terminated by new line (useful for Linux development)
- adds "Save All", "Open File" and "Show whitespace in editor" buttons to the global Eclipse toolbar
- adds "Open File", "Open Type" and "Save to file..." actions to supported output consoles and "Save to file..." toolbar button to the Console view

StartExplorer features
It adds a context menu with the following operations:
- Show resource(s) in Windows Explorer
- Start this (these) file(s) with system editor
- Start cmd.exe here
- Copy resource path to clipboard
- Custom Commands

Thursday, 23 June 2011

MP3 tagging tool

TagScanner is a great free MP3 tagging tool. It has an extensive set of tools providing the ability to modify/edit tags on music files (batch and individual files), batch renaming of files using the tags, etc.

The website hosting this software:

Thursday, 16 June 2011

Keeping notes online and accessing them from anywhere

A great tool to keep notes online:

It allows for creation of personal notes, saving of URLs, webpages, and pictures from web pages.

It allows synchronization of notes between various PCs, and so you can view your notes from any PC, even when offline.

Friday, 18 March 2011

Recover data from a failing drive (possibly with bad sectors)

ddrescue is a fabulous tool/utility available in Linux. It can help to recover data from any failing hard disk. If your drive has failed, i.e. your drive cannot be detected by the BIOS, ddrescue will be of no help and the drive would need to be sent to a data recovery expert (who will charge you hundreds of dollars to recover what ever data possible).

ddrescue is available on SystemRescueCD. SystemRescueCD is exactly what it says it is - a system rescue CD, which uses Linux, and boots up either from a CD or a USB stick. It is possibly the one most important piece of software which I would advice any PC user to have. Or course, you would need to be familiar with the Linux OS and you would need to have some basic knowledge of the Linux interface. This article will not dive into the details of the SystemRescueCD. So, let's get back to ddrescue.


NOTE: In the steps below, "/dev/sdc" is the drive which has the failing drive. "/dev/sdb" is the good/new drive, which is the destination to copy the data to. "/mnt/usbstick/ddrescuelog.log" is the logfile which will be created (if you do not have this log file, re-trying failures or resuming recovery if the system needs to be shutdown will not be possible). Replace the above with the appropriate paths as needed for your own purposes.

Steps to recover as much data possible from a drive which has bad sectors:
1. Copy as much data as possible, without retrying or splitting sectors:
ddrescue --no-split /dev/sdc /dev/sdb /mnt/usbstick/ddrescuelog.log

2. Now let it retry previously detected errors 3 times:
ddrescue -r 3 /dev/sdc /dev/sdb /mnt/usbstick/ddrescuelog.log

3. Run successive passes like this to use the log file to only read the gaps with errors:
ddrescue -r 3 --complete-only /dev/sdc /dev/sdb /mnt/usbstick/ddrescuelog.log

4. Now let it retry previous errors 3 times, using uncached reads:
ddrescue --direct -r 3 /dev/sdc /dev/sdb /mnt/usbstick/ddrescuelog.log

5. If that fails, try again but retrimmed, so it tries to reread full sectors:
ddrescue --direct --retrim -r 3 /dev/sdc /dev/sdb /mnt/usbstick/ddrescuelog.log

These steps should be somewhat sufficient to retrieve as much data as possible from a failing drive. There is not guarantee that all the data will be able to be retrieved. Only data from sectors which do not have any physical damage will be able to be retrieved.

It helped me.

For other links on this matter, you can also refer to the following links:

What I have not tried, which these websites suggest are the following:
- ntfsfix /dev/sdc
- fsck -t ntfs
- fsck.ntfs

Friday, 18 February 2011

Determine which application is using a particular port

Say you try to install an application which needs to use port 80. But during or after the installation, the application is not able to launch because port 80 is already in use, how do you determine which application is holding on to port 80?

In Windows, it is simple and fairly straight forward.

Follow the steps below:
1. Issue the following command to check which process is using port 80:
netstat -aon | findstr 0.0:80

NOTE: If you wanted to check for any other port number, replace the "80" in the command above with the port number of choice.2. The output could look like this:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 2920

For the example above, referring to the number highlighted in yellow, this is the process id which is using/listening to port 80. The process id is assigned by the OS to an application/service which is running (it could be running in the background)

3. Issue the following command to get the name of the process which as the process id (as shown in the yellow text above - this value can be any number as assigned by the system, i.e. never fixed)
tasklist | findstr 2920

4. This command would yield an output which would have the following format:
httpd.exe 2920 Console 0 12,724 K

Based on the example above, the application using process id 2920 is "httpd.exe".

So, from here, you can see that port 80 is being used by process id 2920, where process id 2920 was assigned by the OS to httpd.exe which is running in the background (NOTE: this is on my system - If I was to restart my PC or stop httpd.exe and restart it, the process id would highly likely not be the same)

Sunday, 9 January 2011

Monday, 1 November 2010

Enabling/disabling IE's proxy via the registry

The registry entry which needs to be modified when you want to enable or disable the proxy for IE is
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings

Byte 9 has to be modified such that if you wanted to enable it, bit 2 has to be set. Alternatively, if you wanted the proxy to be disabled, bit 2 has to be cleared.

Example 1
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,a8,1e,00,00,03,00,00,00,6e,....

In the example above, bit 2 of byte 9 is set. This means that the proxy is enabled.

Example 2
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,a8,1e,00,00,01,00,00,00,6e,....

In the example above, bit 2 of byte 9 is cleared. This means that the proxy is disabled.

Tuesday, 12 October 2010

Issue with "Start without debugging" in Visual Studio 2010

With Visual Studio 2010 (VC++), after compiling and linking a project, attempting to run the application using "Start without debugging" will result in the console window opening and closing automatically.

To overcome this problem, the following needs to be done:
Project -> Properties -> Configuration Properties -> Linker -> System, please select Console (/SUBSYSTEM:CONSOLE) in SubSystem dropdown

Wednesday, 6 October 2010

Merging and splitting PDF files

If you want to merge multiple PDF files or split a PDF file, an excellent free tool avalable is PDF Split and Merge. It can do more that just split and merge PDF files.

It can be downloaded from the following URL:
http://www.pdfsam.org/

It has a simple and intuitive interface, with which you can:
  • split your pdf documents (into chapters, single pages, etc.)
  • merge many pdf documents or subsections of them
  • extract sections of your document into a single pdf document
  • mix alternate pages taken from two pdf documents in straight or reverse order into a single document
  • rotate pages of the selected pdf documents
  • visually reorder pages of a selected pdf document
  • visually compose a document dragging pages from selected pdf documents
  • save and load your environment to automatize your recurrent jobs
  • manage pdfsam settings and set an environment to load at start up

There is also an enhanced version of this tool, which has all the basic features plus:
  • encrypt your pdf files (RC40 bits, RC128 bits, AES128 bits) and set permissions on them
  • add a pdf frontpage or an addendum (or both) to your pdf documents
  • decrypt pdf documents
  • extract attachments from your pdf documents
  • set viewer options to a document to tell the viewer application how should open the document
  • set the metadata of a document (author, title, subject and keywords)

The features available and a comparison between the basic and enhanced version cna be found in the following link:
http://www.pdfsam.org/?page_id=42

Monday, 27 September 2010

Getting the size of a MySQL database

This is the command to get the size of the MySql database

SELECT table_schema "Data Base Name",
  sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB",
  sum( data_free )/ 1024 / 1024 "Free Space in MB"
  FROM information_schema.TABLES
  GROUP BY table_schema;

Saturday, 25 September 2010

Tuesday, 7 September 2010

Manually starting Microsoft File Transfer Manager

Here's how to launch the Microsoft File Transfer Manager manually.

%SystemRoot%\Downloaded Program Files\TransferMgr.exe