Recently in Tips Category

2008 Mar 28
flashplayer_100x100.jpgDownloaded an swf file but you do not know how to open it? You try to download a flash player from its website but it only works on a web browser. the only option to you is to install Flash, this is impractical if you only want to open swf files and not edit them considering the cost of buying the software.

I usually go to some flash sites with online games, then later ill browse my temporary internet folder for these swf files. Store them in a folder on my drive, then later whenever i wanted to play these flash games i would just simply go over to my saved swf folder and run it from there.

Adobe flash actually has its stand alone flash player. i you just know where to locate them on their site. The only catch is that its description is not clearly defined and explained.

To get the stand alone flash player go to the flash download page and scroll down to the link marked similar to this "Adobe Flash Player Projector Content", Choose an OS version and download it. Double click on the downloaded application and drag swf into it to play.
2008 Mar 15

Obviously, its seldom to see people using batch files nowadays. Most people dont even know what it is. On, contrary i still use them on my daily tasks to automate things, its like having Perl on a Linux box. but things are changing now, i guess using batch files isn't the trend anymore these days. The same with Linux OS, Windows also comes in handy with some tools used to automate tasks and using batchfiles is one of them. Since we're using Windows XP now, its also wise to do things in GUI mode in contrary with the old style DOS mode edit.

While downloading some pictures from a camera, I found them hard to manually rename its filename to a more meaningful title and not some random "DSC001323.JPG". After rename 10 or 15 files, i got bored, thinking this would take me forerver to rename them all for they are more than a thousand in total. If you can still recall that neat application called Irfan View, my life would have been alot easier.

Well anyway, lets change things we normally do and instead of using batch files we use vb script. A zipped version of the mass renaming script is also available for download.

''''''''''''''''''''''''''''''''''''''''''
' Mass Rename Script by tildemark
' http://www.tildemark.com
'
'
' Usage:
'   Place this script on a list of files you wish to rename.
'   Run this script by double clicking on the filename.
'
'
' For bugs send it to tildemark@gmail.com
'
''''''''''''''''''''''''''''''''''''''''''

Dim fso, Path, Folder, Counter, Prefix, File, Extension

set fso = CreateObject("Scripting.FileSystemObject")

Path = InputBox("Input the location of the files to be renamed. ('.' means current folder)", "Mass Rename Script", ".")

Prefix = InputBox("Input the filename prefix", "Mass Rename Script")
If Prefix = "\" Then WScript.Quit

Extension = InputBox("Input the file extension to be renamed", "Mass Rename Script")
If Extension = "\" Then WScript.Quit

Counter = InputBox("Input the starting offset", "Mass Rename Script")

Set Folder = fso.GetFolder(Path)

For Each File In folder.Files

  If Not ((File.Attributes And 8) = 8) Then
    If fso.GetExtensionName(File.Path) = Extension Then 
      File.Name = Prefix & CStr(Counter) & "." & Extension
    End If
  End If
  Counter = Counter + 1
Next

MsgBox("Done")

2008 Jan 24

This program is very annoying, and it wont be removed with a simple program uninstall. There are also programs that will automatically run the application. When you try to use the new version Live Messenger, Windows Messenger will not be overwritten and will display 2 tray applications, One for the new MSN Live Messenger and the preinstalled Windows Messenger. This day, I have decided to get rid of the preinstalled Windows Messenger.

To my surprise, its not listed with the Add/Remove Programs icons at the Control Panel. Microsoft has hidden the uninstall option for this application. Windows 98 has that option, i wonder why they removed it from Windows XP.

So, I searched the System folder for the configuration. Here's how we could remove Windows Messenger successfully.

Browse to your Windows INF folder. Usually its found at C:Windows\inf. its a hidden folder so you have to explicitly type it at the address bar or using Run like this

1. Start -> Run
2. Type in C:\windows\inf [Enter]
3. Look for the file named SYSOC.INF
4. Open it with an editor, notepad will do.
5. Look under Components for the line like this:
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,7

6. Remove the word hide. Making it like it like this:
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,,7

7. Save and close notepad. The Windows Messenger application uninstall should now appear at the Add/Remove Programs Icon in the Control Panel. Remove it from there.

8. Start -> Control Panel
9. Double Click on Add/Remove Programs
10. Click on Add/Remove Windows Components
11. Uncheck Windows Messenger
12. Click Next
13. Click Finish

2008 Jan 11

The merge and Center button in Excel only centers the top left text and deletes the rest. What if the two columns of First names and last names are to be merged into the format: Last name, First name it would then become a problem.

Using the Ampersand ( & ) operator, it allows us to merge cells in an excel worksheet. you can create a formula to merge cells in excel or just insert it right away on the cell formula bar.

Problem:
And you wish to merge the two cells at A1 and A2 to the cell at A3

Given:
Cell A1 has the text "Lastname"
Cell A2 has the text "Firstname"

Solution:
* First position your active cell on A3.
* On the formula bar input the following: =A1&A2 [ENTER]

It should display LastnameFirstname on cell A3

To add a space and a comma, use the following:
=A1&", "&A2
it will output: Lastname, Firstname

alternatively you can also use the concatenate function, like this:
=CONCATENATE(A1,", ",A2)

2008 Jan 8
By default autorun is enabled on windows xp, this puts your pc into potential malaware risk or even virus infection. Mostly, viruses and worms are spread using the windows autorun feature. We should disable autorun on your computers to prevent it from being infected with any virus, malaware or worms. Here are several ways to disable the autorun function:

Disable Autorun with TweakUI.
The most convenient way is to install TweakUI a PowerToy from Microsoft we can download for free . Download TwealUI and install it. This PowerToy gives you access to system settings that are not exposed in the Windows XP default user interface, including mouse settings, Explorer settings, taskbar settings, and more.

1. Run TweakUI
2. Navigate to My Computer -> AutoPlay -> Drives
3. Uncheck the drive you wish to disable the AutoPlay function.
4. Navigate to My Computer -> AutoPlay -> Types
5. Uncheck Enable Autoplay for CD and DVD drives
6. Uncheck Enable Autoplay for removable drives
7. Click Apply button
8. Click OK button

Disable Autorun with Group Policy Editor
If you are a geek type and want to do it the hard way we could use the GPEDIT.MSC tool to disable Autorun. GPEDIT.MSC does not work on Windows Home Edition, only on Windows XP.
1. Navigate to Start -> Run
2. type GPEDIT.MSC
3. Click OK
4. Navigate to Local Computer Policy -> Computer Configuration -> Administrative Template -> System
5. Double click Turn Off Autoplay
6. Select Enabled from the radio buttons
7. On the Turn off autoplay dropdown box select All drives
8. Click OK button, Close Group Policy Editor

Disable Autorun with the Registry Editor
If you are using Windows Home, you can disable autorun using the registry editor.

1. Navigate to Start -> Run
2. type REGEDIT, click OK button
3. Navigate to HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services -> CDROM
4. Double Click on Autorun
5. Change from 1 to 0. The default value 1 means autorun is enabled on CDROM
6. Navigate to HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Policies -> Explorer
7. Double click on NoDriveTypeAutoRun
8. Change the current valut to B5 in Hex. This disables CDROMs and USB drives

To disable other devices refer to the table below.
Value Meaning
0x1 Disables Autoplay on drives of unknown type.
0x4 Disables Autoplay on removable drives.
0x8 Disables Autoplay on fixed drives.
0x10 Disables Autoplay on network drives.
0x20 Disables Autoplay on CD-ROM drives.
0x40 Disables Autoplay on RAM disks.
0x80 Disables Autoplay on drives of unknown type.
0xFF Disables Autoplay on all types of drives.

By default, Autoplay is disabled on removable drives, such as the floppy disk drive (but not the CD-ROM drive), and on network drives. The default value 0x95 (149) is the sum of 0x1, 0x80 (unknown types), 0x4 (floppy drives), and 0x10 (network drives). 0xB5 is the sum of 0x1, 0x4, 0x10, 0x20 and 0x80. B5 in Hex or 181 in Decimal.
2007 Mar 13

Most of us started using IE7 because of its tabs support. While using it we would just maximize its use. Here's a list of common Internet Explorer Shortcuts:

Keyboard shortcuts
Open links in a new tab in the background CTRL+click
Open links in a new tab in the foreground CTRL+SHIFT+click
Open a new tab in the foreground CTRL+T
Open a new tab from the Address bar ALT+ENTER
Open a new tab from the search box ALT+ENTER
Open Quick Tabs (thumbnail view) CTRL+Q
Switch between tabs CTRL+TAB/CTRL+SHIFT+TAB
Switch to a specific tab number CTRL+n (n can be 1-8)
Switch to the last tab CTRL+9
Close current tab CTRL+W
Close all tabs ALT+F4
Close other tabs CTRL+ALT+F4

Mouse shortcuts
Open a link in a background tab Click the middle mouse button on a link
Open a new tab Double-click the empty space to the right of the last tab
Close a tab Click the middle mouse button on the tab

2007 Feb 2

Here are common linux command examplers for managing user accounts.

Displaying user details
Syntax: id {username}
shell> id tildemark

Create a new user with username tildemark
Syntax: useradd {username}
shell> useradd tildemark

Create a new user with username tildemark under group admin
Syntax: useradd -g {group} {username}
shell> useradd -g admin tildemark

Creating a new user with username tildemark and assign a home folder
Syntax: useradd -d {location} {user}
shell> useradd -d /home/tildemark tildemark

Creating a new user tildemark and assigning a password pass
Syntax: useradd -p {password} {username}
shell> useradd -p pass tildemark

assigning password to user tildemark
Syntax: passwd {username}
shell> passwd tildemark

Creating a new group
Syntax: groupadd {group}
shell> groupadd developers

Creating a new user and assigning it multiple groups admin, developers
Syntax: useradd -G {group1}, {group2} {,...}
shell> useradd -G admin, developers

Assigning user tildemark to group admin, developers
Syntax: usermod -G admin, developers tildemark

Delete an existing user
Syntax: userdel {username}
shell> userdel tildemark

2007 Jan 31

Most of the time i do work with the linux shell, so most of the time i will be using ls to display files the current folder. However, in windows the command to display files is dir. i would always interpret cmd as a linux shell.

Back with the good old days, we could use doskey to assign shortcuts to DOS commands. So, we could just assign ls to its windows equivalent like this:

C:\> doskey ls=dir

Now, whenever we type ls, dir command is executed. We could also do that in Windows XP Command prompt, but the problem is after you have closed the window the doskey is also removed as well and we have to type it again every time we would run cmd.

There is actually a work around with that, we could modify our cmd shortcut in the start menu to add the doskey instructions there so that everytime the cmd is loaded the extra line is also executed as well.

cmd-shortcut.jpg cmd-properties.jpg

i have modified my shortcut target from


%SystemRoot%\system32\cmd.exe

to

%SystemRoot%\system32\cmd.exe /k doskey ls=dir

the /k makes the window stay after the doskey is executed. For more additional options about cmd you can issue the command

C:\> cmd /?

here are a few common options:
/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K
/Q Turns echo off
/D Disable execution of AutoRun commands from registry


Alternatively, you could also change the value of your registry at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

to

Value name: AutoRun
Value data: doskey ls=dir

Actually, its better to use the registry option because after adding the code to the shortcut properties; the code completion for the command prompt no longer works.

2007 Jan 30

Making a tarball and adding a mysqldump to it then naming it as example.tar:


shell> tar cvf example.tar dump.sql


Making a tarball and adding all files in the current directory then naming it as example.tar:


shell> tar cvf example.tar *


Compressing the tarball by zipping it (.gz):


shell> gzip example.tar


Restoring a tarball gzip file example.tar.gz


shell> gunzip example.tar.gz
shell> tar xvf example.tar

2006 Oct 14

Creating a hyperlink in excel is simple. Notice that after typing any uri in excel the text automatically turned into a hyperlink. You can add any link as you like in excel as long as there is a prepended http:// phrase before the text entered.

Now, what if we are going to add a dynamic URL? It would be best explained by example, so here it goes.

For example: We are asked to check multiple sites for the following internet standards; W3C HTML Validator and WDG HTML Validator.

We have a reference cell A1 have the text http://tildemark.com. We all know the URL for the respective standards as:

W3C - http://validator.w3.org/check?uri=http://www.tildemark.com
WDG - http://www.htmlhelp.com/cgi-bin/validate.cgi?url=http://www.tildemark.com&warnings=yes

Now, all we need to create an entry such that each time we change the domain names the entry on each validator also changes.

Do the following on Excel:

Cell A1 - http://www.tildemark.com

  A B
1http://www.tildemark.com       
2  
3  
4  
5  
...  
9=HYPERLINK
("http://validator.w3.org/check?uri="&A1,"Check W3C HTML Validator")
 
10

=HYPERLINK
("http://www.htmlhelp.com/cgi-bin/validate.cgi?url="&A9&"&warnings=yes",
"Page passed WDG validator")

 

More info at Office Website.

2006 Oct 11

Removing a bunch of hyperlinks can be tedious. imagine the time you have to right-click on each of those links and selecting 'remove hyperlink' on the context menu. Of course it would just take two clicks, but what if you are to remove a hundred of them or perhaps 1000 of them? I'm sure that would scrape out the paint of your right-mouse button. :)

I have some simple techniques you can use in order to remove multiple hyperlinks on a page:

Removing just one hyperlink
1. Right-Click on the cell and select Remove Hyperlink on the context menu.

Removing the cell format
1. Select the cells having hyperlinks. You can use CTRL+LEFT CLICK to randomly select a cell.
2. On the menu click on Edit. Hover your mouse to the option Clear and select Fomats. Please note that the cell is still clickable to remove the hyperlink completely you have to select Clear->All.

Remove hyperlink on selected cells the better way
1. Type in any text or number in a blank cell
2. Right-click and select Copy on the context menu.
3. While pressing CTRL, select each hyperlink you wish to be removed
4. On the Edit menu, select Paste Special.
5. Under Operation, click Multiply and then click OK.

Removing using a macro
Assuming you know excel programming you could create a macro to automatically remove the hyperlinks.
1. Start Visual Basic Editor. Alternatively you can press ALT-F11 to start the editor.
2. Double click the workbook you are using on the Project Explorer.
3. Type the following text:


Sub RemoveHyperlinks()
ActiveSheet.Hyperlinks.Delete
End Sub

4. Save your work.
5. Run your macro by pressing ALT-F8 or using the menu by Tools->Macro->Macros
6. Select the macro you have made, it should have the name 'RemoveHyperlinks'.


About this Archive

This page is a archive of recent entries in the Tips category.

Sports is the previous category.

Find recent content on the main index or look in the archives to find all content.