Monday, September 08, 2008
Removing large gap from WinXP "Add or Remove Programs"
I’ve been living with this annoying large gap in my "Add or Remove Programs" for quite sometime and tonight I’m wondering how to remove it although it hasn't caused any problems. After some googling around, finally I came across to a solution from experts-exchange.com. From my experience, it happen when I installed AutoCAD 2002 couple years back but didn't realize until tonight. Below are the instructions on how to fix it.
Open your regedit from START >> run... menu.
Now go to;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5783F2D7-0101-0409-0000-0060B0CE6BBA}
Now you can see that the "DisplayIcon" entry is having ",-1" value. That is causing the problem. Negative numbers will cause the gap. Edit it by removing the ",-1".
Before
C:\Program Files\AutoCAD 2002\acad.exe,-1
After
C:\Program Files\AutoCAD 2002\acad.exe
And now, the moment of truth, open you "Add or Remove Programs"
Tadaa!! Good luck...
Thursday, September 04, 2008
Copy FLV file from Google Chrome cache
To copy FLV from Google cache, the method is similar to copy FLV from Firefox cache. The cache location is at;C:\Documents and Settings\YourLogin\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache
Or
%AppData%\..\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache
The method is quite similar, open explorer and go to cache folder like mentioned above.
Now watch full Youtube video in Google Chrome browser. Do not close your browser yet after that. Back to the cache folder, refresh it using F5 key and now you can see some new large file created in the folder. Sort by date modified for better visibility.
Copy it somewhere and rename it to *.flv . Now you may play the FLV using a favorite player.
Thursday, August 28, 2008
DBVisualizer, MySQL 'characterEncoding' error
While connecting to MySQL server using DBVisualizer 6.0.9, there was an error message;
An error occurred while establishing the connection:
Type: java.sql.SQLException Error Code: 0 SQL State: S1000
Message:
Unknown initial character set index '192' received from server. Initial client character set can be forced via the 'characterEncoding' property.
So I tried to upgrade my DBVisualizer to version 6.0.13 but it does not solved the problem. After some googling session, here is my solution/workaround. Reffering to the error message, I open the connection properties tab and find 'characterEncoding' property. So now what to fill it with? I login to my webhosting CPanel > 'phpMyAdmin' and try to look for some clue.
Found it!
Set it in and ready to go.
Wednesday, August 13, 2008
Enabling OCI8 for XAMPP under Linux
Following instruction fromhttp://www.apachefriends.org/f/viewtopic.php?t=27559&sid=96d42fb6867daf5d8932fdacf4232d58 ,
here are my output.
My case is similar to this problem. The only different is, I have libclntsh.so.9.* which is older than the expected version. BTW, my OS is SLES 9.3. First thing to do is to download Oracle Instant Client version 10 to match the expected version from;
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
It is recommended to download .gz version than .rpm version since the .gz version is quite easy to be extracted. My case, I accidentally downloaded the .rpm version. So to extract it need special rpm2cpio command as below.
normuser@MYSERVER:~/OC> ls -al
total 32048
drwxr-xr-x 2 normuser normgroup 112 2008-08-12 13:03 ./
drwxr-xr-x 13 normuser normgroup 784 2008-08-12 13:03 ../
-rw-r--r-- 1 normuser normgroup 32782200 2008-08-12 12:55 oracle-instantclient-basic-10.2.0.4-1.i386.rpm
normuser@MYSERVER:~/OC> rpm2cpio oracle-instantclient-basic-10.2.0.4-1.i386.rpm | cpio -idv
./usr/lib/oracle/10.2.0.4/client/bin/genezi
./usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1
./usr/lib/oracle/10.2.0.4/client/lib/libnnz10.so
./usr/lib/oracle/10.2.0.4/client/lib/libocci.so.10.1
./usr/lib/oracle/10.2.0.4/client/lib/libociei.so
./usr/lib/oracle/10.2.0.4/client/lib/libocijdbc10.so
./usr/lib/oracle/10.2.0.4/client/lib/ojdbc14.jar
Now, copy all .so files into xampp lib directory named /opt/lampp/lib/.
MYSERVER:/apps/home/normuser/OC/usr/lib/oracle/10.2.0.4/client/lib # cp * /opt/lampp/lib/
Next is to issue the lampp oci8 command by telling the program that the expected libs are at /opt/lampp/lib/ as root since xampp is under root.
MYSERVER:/opt/lampp # ./lampp oci8
Please enter the path to your Oracle or Instant Client installation:
[/opt/oracle] /opt/lampp/lib
installing symlink...
patching php.ini...
OCI8 add-on activation likely successful.
XAMPP: Stopping Apache with SSL...
XAMPP: Starting Apache with SSL (and PHP5)...
Now you can test your connection with some PHP example code from
http://www.php.net/oci8
Saturday, July 05, 2008
Web Based HTTP management GUI
When receiving a call from friend ask your help on "Hey! how do I open my ADSL modem Web Based HTTP management GUI?" and your answer "Oh! Go to command prompt and then type ipconfig or route PRINT and hit enter. Copy the gateway IP address in xxx.xxx.xxx.xxx format, Paste it at your Internet browser URL bar and hit enter" Suddenly he/she might ask you back, "What is command prompt?" or "How does IP address looks like?" or "I enter ipconfig at the command prompt but I get this response ip is not recognized as an internal or external command what went wrong?" (Maybe he/she type "ip config" with space instead of "ipconfig").Then you should consider pass him/her below script. Script below automates process above so with a double click he/she could open the Web Based HTTP management GUI with default Internet browser.
Option Explicit
Dim oShell
Dim oShellExec
Dim oStdOutputText, sText, strTarget, strPingResults
Set oShell = CreateObject("Wscript.Shell")
Set oShellExec = oShell.Exec("%comspec% /c route print")
set oStdOutputText = oShellExec.StdOut
Do While Not oStdOutputText.AtEndOfStream
sText = oStdOutputText.ReadLine
If InStr(sText, "Default Gateway") <> 0 Then
strTarget = split(sText,":")
exit do
End If
Loop
Set oShellExec = oShell.Exec("%comspec% /c ping -n 1 " & strTarget(1))
strPingResults = LCase(oShellExec.StdOut.ReadAll)
If InStr(strPingResults, "reply from") Then
Set oShellExec = oShell.Exec("%comspec% /c start http://" & trim(strTarget(1)))
Else
WScript.Echo "******** Local router is DOWN ********"
End If
Set oShellExec = Nothing
Copy and paste above codes into notepad and name it as open_modem_gui.vbs. Note that the extension must be *.vbs.
IF he/she asked you "Hey it prompts for password now. How?" just ask him/her to refer to the ADSL modem user manual.
Tuesday, April 15, 2008
MS Outlook icon recovery
Need to recover accidentally deleted MS Outlook icon from desktop? Open Registry Editor, go to;HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Explorer > Desktop > NameSpace
Add new key to folder NameSpace and paste code below as the key name;
{00020D75-0000-0000-C000-000000000046}
Now refresh your desktop
Wednesday, February 20, 2008
Recreate Show Desktop Icon
Show Desktop icon near the Windows XP start button is used to minimize all active windows. The icon/button is located on your Quick Launch bar. This Quick Launch bar folder location is at %appdata%\Microsoft\Internet Explorer\Quick Launch.Sometimes, people accidentally deleted this icon. To recover this icon/button, you can try to;
- Copy the icon from other users %appdata%\Microsoft\Internet Explorer\Quick Launch folder.
- Copy the icon from others machine with Windows XP that still have it on the same location.
- Search the icon entire drive for Show Desktop file (*.scf extension)
- Search the icon in i386 folder from Windows XP installer CD or DVD.
- Create a new icon/button.
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
Remember to save the file with .scf extension. If everything goes well, the file icon should appear as below automatically.
Tuesday, February 19, 2008
Automatic Completion with a Command Prompt in Windows
UNIX like auto complete is now available on Windows. I believe it is available since Windows 2000. Some versions of Windows do not turn this on by default. It is very useful whenever you are working with a very long file or folder name. Example;You have a long folder name and you want to change directory into it. Just type cd m and hit TAB key should complete the long folder name automatically for you as below;
Useful isn’t it? To enable this feature, open the regedit and add "CompletionChar"=dword:00000009 to [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] as below;
From screenshot above, CompletionChar is set to 0x9, that is the TAB key. If you want to customize you own choice of key, you might want to try 0x4 for Control+D or 0x6 for Control+F. For more info please visit
Microsoft - Help & Support.
Thursday, February 14, 2008
Windows XP Hidden User Accounts Interface (control userpasswords2)
Having more than one person using your computer? If you do, you can create user accounts for everyone so that they can customize their favorites, colors, wallpaper, and private files. Default ‘Windows XP User Accounts’.Sometimes you might need to fine tune the user accounts. You can do this with a hidden ‘User Account 2’ interface by running control userpasswords2.
This ‘Windows 2000’ style ‘User Accounts’ might be useful for those users that are very familiar with Windows 2000.
So, now you might want to add this shortcut permanently to the ‘Control Panel’. The only way is to add some lines into the 'Windows Registry'.
It is recommended to use *.reg script below to add ‘User Accounts 2’ shortcut to your control panel rather than entering it manually. Copy lines below to a new file and called add_ua2.reg. Note that the extension must be reg. Just right click the file and Merge it. Your computer must be restarted for these to take effect.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{18646F66-8C25-0000-BEE4-C2CE1298969D}]
@="User Accounts 2"
"InfoTip"="Starts The Windows 2000 style User Accounts dialog"
[HKEY_CLASSES_ROOT\CLSID\{18646F66-8C25-0000-BEE4-C2CE1298969D}\DefaultIcon]
@="%SystemRoot%\\\\System32\\\\nusrmgr.cpl,1"
[HKEY_CLASSES_ROOT\CLSID\{18646F66-8C25-0000-BEE4-C2CE1298969D}\Shell\Open\command]
@="Control Userpasswords2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{18646F66-8C25-0000-BEE4-C2CE1298969D}]
"Default"="Add Userpasswords2 to Control Panel"
Just incase you don’t like it, you can also remove it using *.reg file below. Copy lines below to a new file and called delete_ua2.reg. Note that the extension must be reg. Just right click the file and Merge it. Your computer must be restarted for these to take effect.
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\CLSID\{18646F66-8C25-0000-BEE4-C2CE1298969D}\DefaultIcon]
[-HKEY_CLASSES_ROOT\CLSID\{18646F66-8C25-0000-BEE4-C2CE1298969D}\Shell\Open\command]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{18646F66-8C25-0000-BEE4-C2CE1298969D}]
Wednesday, January 30, 2008
JDK vs JRE vs J2SE vs J2EE vs J2ME ?
Which Java should I download? Can I just download the minimum small file size Java? Well, it depend on what are you need it for. Below explains;JDK = Java Development Kit
Contains all of the software needed to compile Java source files (.java) into bytecode (.class)
JRE = Java Runtime Environment
Software needed to run the bytecode.
The JRE does come with the JDK. So, if you just want to run Java program, downloading JRE will do. The JRE installer is about 15MB while the JDK installer is about 55MB.
Quick introduction about Java? Read here.
J2SE = Java 2 Standard Edition
JDK + JRE, Java development package.
J2EE = Java 2 Enterprise Edition
JDK + JRE, advance Java development package.
J2ME = Java 2 Micro Edition
JDK + JRE, for handheld devices (cellular phones, palmtops etc.)
Quick way to know your Java version? Type java –version on your dos or shell prompt.
Java version example on WinXP command prompt
Java version example on Solaris 10 shell through PuTTY
More Java version checking methods can be found here
Tuesday, January 29, 2008
NetMeeting on Windows XP
Wondering on how to install NetMeeting on Windows XP? Actually, you don’t have to. Just type conf on the command prompt or Start > Run > conf and hit enter.Thursday, January 24, 2008
Removing and disabling the thumb.db file in Windows
When displaying files as thumbnails in explorer, a file called thumbs.db will be created automatically by Windows. It help user to view folders and pictures in the thumbnail view much faster since it stores the images. Although the file is small, it may take up a large amount of space soon. It is safe to delete this file but if you would like to stop Windows from creating them again, you can disable it by doing;From explorer toolbar, Tools > Folder Options, go to the View tab, tick Do not cache thumbnails.
Wednesday, January 16, 2008
Reading Text File Using 'schema.ini' & OLEDB
Reading data structured text file can be tedious. Maybe some splitting ,array creation, filtering or trimming involved. Example, if you have a dataset like below...File my_txt_db.txt content
WORD|LENGTH|DATE
LOREM|5|03/07/08
IPSUM|5|02/16/08
DOLOR|5|04/19/08
SIT|3|04/16/08
AMET|4|04/01/08
CONSECTETUER|12|04/01/08
ADIPISCING|10|04/17/08
ELIT|4|02/02/08
DONEC|5|01/23/08
ID|2|03/19/08
PEDE|4|03/15/08
FUSCE|5|03/11/08
QUIS|4|04/10/08
MI|2|04/02/08
VESTIBULUM|10|02/20/08
ALIQUET|7|03/28/08
ALIQUAM|7|04/09/08
ERAT|4|01/31/08
VOLUTPAT|8|01/22/08
SED|3|04/23/08
The easiest way is to use OLEDB + Text driver named schema.ini.
By doing this, the data can be pulled using SQL statement which is easy to manipulate. The format of the text file is being determined by schema.ini.
schema.ini content
[my_txt_db.txt]
ColNameHeader=True
Format=Delimited(|)
MaxScanRows=0
CharacterSet=OEM
Col1=WORD Char
Col2=LENGTH Integer
Col3=DATE Date
The schema file name is fixed to schema.ini and it must be in the same directory as the text data source. Detail on this can be found here. You may use VBS example below to test the scripting.
vbs_test.vbs content
Option Explicit
Dim conn, rs
Call INIT_CONN()
Call MSGBOX_DATA()
Call END_CONN()
Function MSGBOX_DATA()
Dim SQL, MSG_BOX_STR
SQL = "select * from my_txt_db.txt"
rs.Open SQL, conn
rs.movefirst
if not (rs.eof and rs.bof) then
while not rs.eof
MSG_BOX_STR = "Word = "& rs("WORD") & chr(13)
MSG_BOX_STR = MSG_BOX_STR & "Length = "& rs("LENGTH") & chr(13)
MSG_BOX_STR = MSG_BOX_STR & "Date = "& rs("DATE")
msgbox MSG_BOX_STR
rs.movenext
wend
end if
rs.Close
End Function
Function INIT_CONN()
Set conn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=.;" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"""
End Function
Function END_CONN()
conn.close
Set rs = Nothing
Set conn = Nothing
End Function
Just create these 3 files, place it in the same directory and run the VBS for testing.
Tuesday, January 15, 2008
Simple Javascript + Meta Refresh Auto-Refresh with Countdown
Below are the example of a simple auto-refresh webpage using meta refresh and javascript. Meta refresh is a method of instructing a browser to automatically refresh the web page with a given time (second). While javascript is used to make the counter running.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hello!</title>
<meta http-equiv="refresh" content="10" />
</head>
<body>
<h2>Auto-Refresh in <span id="CDTimer">???</span> secs.</h2>
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
var TimerVal = 10;
var TimerSPan = document.getElementById("CDTimer");
function CountDown(){
setTimeout( "CountDown()", 1000 );
TimerSPan.innerHTML=TimerVal;
TimerVal=TimerVal-1;
if (TimerVal<0) { TimerVal=0 } //improvement by vivalibre, tq
}
CountDown()
/*]]>*/
</script>
</body>
</html>
Just make sure both bold value is same, 10 for example.
Monday, January 14, 2008
Windows 98 / ME / 2000 Thumbnail View Fix
If you are still using Windows 98 / ME / 2000 and found out that explorer image thumbnails is not working, this is probably because of a third party image program changing file type association. To fix this, type regedit at the command prompt and hit enter. Click here to learn more about REGEDIT. Enter this value;[HKEY_CLASSES_ROOT\.png\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
This is to enable thumbnail view for .png extension. How about other file types? Repeat adding it like below, like jpg for example;
[HKEY_CLASSES_ROOT\.jpg\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
If you want to do it all file types with, copy code below to a file and name it as my_thumbnail_view_fix.reg (extension must be .reg). Then right click > Merge the file.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.jpe\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.jpeg\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.jpg\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.gif\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.bmp\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.png\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.tif\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.tiff\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.htm\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
[HKEY_CLASSES_ROOT\.html\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{7376D660-C583-11D0-A3A5-00C04FD706EC}"
This will fix most of the thumbnail viewable file types.
Sunday, January 13, 2008
Copy FLV file from Firefox cache
After watching a video from Youtube, you may want to save the video file into your local for future offline playing. To download them, you can use many available softwares / add-ons from the net. The thing is, the software will reinitiate the download procedure and you need to wait again for it to complete. If you are using Firefox, you could by pass this by copy the FLV directly from Firefox cache. Firefox cache located at;C:\Documents and Settings\YourLogin\Local Settings\Application Data\Mozilla\Firefox\Profiles\cdvfbg12.default\Cache
Or
%AppData%\..\Local Settings\Application Data\Mozilla\Firefox\Profiles\ cdvfbg12.default\Cache
The method is to open explorer and go to cache folder like mentioned above. Note that ‘YourLogin’ is your windows local login name and ‘cdvfbg12’ is randomized folder name. It may not be the same like your PC. Look, nothing much here.
Now watch full Youtube video in Firefox browser. Do not close your browser yet after that. Back to the cache folder, refresh it using F5 key and now you can see some new large file created in the folder. Sort by date modified for better visibility.
Copy it somewhere and rename it to *.flv . Now you may play the FLV using a favorite player.
Friday, January 11, 2008
Active Directory in Windows XP
Windows 2000 users can easily browse Active Directory by opening My Network Places > Entire Network. But this active directory browsing is disabled by design under Windows XP. To have this feature in Windows XP, simply copy "dsfolder.dll" from Windows 2000 (sp2 or higher) "%WINDIR%\system32" to Windows XP "%WINDIR%\system32". After that, use "regsvr32" command-line tool to register the dll by entering "regsvr32 dsfolder.dll" at the command prompt. Now you will be able to see the Active Directory icon whenever you go to My Network Places > Entire Network. Hard to find Windows 2000? Read here.
Wednesday, January 09, 2008
Microsoft Office 2007 - Office Open XML
When somebody came to you and ask "I cannot seem to open files with .pptx extensions. Can you?"
.pptx is the new Microsoft Office 2007 - Office Open XML format for PowerPoint presentations. Microsoft Office 2007 uses a new Office Open XML format that is not understood by previous versions of the software. For Microsoft Office XP and 2003 users, you may overcome this incompatibility by installing the Microsoft Office Compatibility Pack. After updating,
you may test your software with sample Open XML documents provided by openxmldeveloper.org. Anyway, it is recommended for users to install all High-Priority updates from Microsoft Update before downloading the Compatibility Pack.
If you don't really like this new format, you might consider to sign a petition of "NO to the Microsoft Office format as an ISO standard", please visit http://www.noooxml.org/petition.
Subscribe to:
Posts
(
Atom
)