Wednesday, May 23, 2012

System Restore settings in Vista

To set yourself up:
1. Click on 'start'-> All programs -> Accessories
2. Right click on "Command Prompt" and "Run as Administrator"

To view current storage settings, type
vssadmin list shadowstorage /for=c: /on=c:

To change current storage settings, type
vssadmin resize shadowstorage /for=c: /on=c: /maxsize=4gb

Friday, April 2, 2010

Size of a unix folder

If folder name is , run ths following command to find out the size of the folder on disk -

du -sh

use "man du" to see help on the "du" command.

Friday, February 13, 2009

Outlook EULA continues to popup

The problem in most probability is because Office was not installed in administrator mode. You do not need to reinstall office in admin mode to fix this problem.

  • Just open explorer, and browse to the Office folder which contains the Outlook executable (outlook.exe).
  • Right click on the Outlook executable, and select 'run as administrator'
  • Now accept the EULA and close Outlook.

You should not see EULA now for any user who runs Outlook on this computer!

Thursday, February 12, 2009

Vista & Cisco VPN

I purchased a new laptop which had Vista on it, and the VPN settings that worked perfectly on my old laptop (XP SP3) stopped working on the Vista.

  • Well now exactly, I was able to connect the VPN, but when I tried RDC to any server on the VPN, it threw an error.
  • I could not even ping any of the servers
Solution - turned off IPv6 on my wireless network card and on the network connection created by Cisco.

Hurray it works now!

Wednesday, November 19, 2008

ObjectPlanet HeadlessException solution

I was getting the following exception while using the ChartServer from ObjectPlanet.

[10:32:21.796] {resin-11} java.awt.HeadlessException
[10:32:21.796] {resin-11} at java.applet.Applet.(Unknown Source)
[10:32:21.796] {resin-11} at com.objectplanet.chart.ChartApplet.(Unknown Source)
[10:32:21.796] {resin-11} at com.objectplanet.chart.BarChartApplet.(Unknown Source)
[10:32:21.796] {resin-11} at com.objectplanet.chart.ChartServlet.init(Unknown Source)
[10:32:21.796] {resin-11} at com.caucho.server.dispatch.ServletConfigImpl.createServletImpl(ServletConfigImpl.java:830)
[10:32:21.796] {resin-11} at .......
......


On searching the Internet i found fixes related to xFree86.org and PJA in order to create a virtual AWT console for the ChartServer. But here's the simple solution -
add "-Djava.awt.headless=true" as a parameter to java.exe call.

I am using Resin, and "-Djava.awt.headless=true" added to the httpd call does not work. instead i did "httpd -Djava.awt.headless". and the headless exception disappeared.

I recommend trying both...one of these should work!

Tuesday, October 7, 2008

Displaying row number in mysql

Try the following piece of code -
SELECT @rownum:=@rownum+1 AS "Count", m.* FROM member AS m, (SELECT @rownum:=0) AS temp ORDER BY firstname DESC

Obviously, choose the second table ('member' in my example) appropriately

Saturday, September 13, 2008

nokia pc suite not compatible with map upload

It seems that the latest version of the Nokia N-Series PC Suite and the latest Nokia map loader have compatibility issues.

If you have faced this problem with your n-series PC suite, then here's what you need to do -
1. scrap your n-series pc-suite.
2. download and install the generic Nokia PC-Suite 7.0
3. Download and install the latest version of the Nokia Map Uploader

You will now be able to upload maps to your n-series phone

Friday, September 12, 2008

Network ID disabled

If any of the following is true -
1. network ID button is disabled in 'computer name' section
2. you cannot change your workgroup

Then you need to install the 'Client for Microsoft Networks' on your LAN/Wifi.

1. Go to Network Connections
2. Right click on your LAN/Wifi, and then Properties
3. If 'Client for Microsoft Networks' is un-checked, then check it.
4. If it is not there at all, then Install the client
5. Restart, and you should be good to go :-)

Wednesday, May 7, 2008

Cannot compose or write email in Outlook Web Access on Vista

check out these links -

fix for exchange server:
http://www.mydigitallife.info/2006/12/09/cannot-compose-or-reply-to-messages-and-other-errors-in-outlook-web-access-in-windows-vista/

fix for IE7:
http://mustech.net/2007/02/20/windows-vista-webmail-owa-fix-for-internet-explorer-7-five-step-fix

The IE7 fix worked just fine for me. Haven't tried the exchange server fix, since it requires to bring down the server.

Friday, August 17, 2007

Microsoft Outlook 2003 - insert signature

My co-worker wants me to switch over to a MAC. Everyday, I spend a few minutes just trying to figure out why my PC (loaded with Microsoft) behave the way it does.

Outlook allows you to create many different signatures. But here's the problem -
If you turn on Word as your default email editor, the 'insert -> signature ->....' option disappears from the menu. It seems that MS Word does not integrate too well with Outlook. To get back that menu option go to: Tool -> Options -> Mail Format , and uncheck the checkbox for 'use MS word to edit email messages'.

Now when you create a new email, click on 'Insert -> Signature' , to add your signature while writing the email.

Tuesday, July 31, 2007

Click to activate and use this content

The IE flash problem. See fixes
--> here 1 <--
--> here 2 <--

Monday, July 23, 2007

AJAX request overlapping

I am sure many people of faced the problem of multiple ajax requests overlapping each other's context. In english - when you placed 2 AJAX requests without any delay between them, the AJAX callback function receives only the data from the second request.

This happens due to caching problems in the browsers.

To avoid this i created a stack implementation in Javascript and used the stack to control my AJAX request. Consequently, the AJAX requests went out sequentially rather than all at once, but it was a trade-off i was willing to pay.

Sunday, July 15, 2007

Nirsoft ProduKey

ProduKey is a freeware utility to retrieve Windows and Microsoft Office Product Keys. It is one of the few utilities that even lets you run with command line parameters so you can use it in Windows Scripting. A great help for IT administrators!

--> ProduKey <--


keywords: office, exchange, microsoft, product key, serial, windows, xp, professional, retrieve, get, lost, scripting

Wednesday, July 11, 2007

HTML form problem with DIV tags, Javascript and Ajax

Issue
I am trying to load page2.jsp into a DIV tag in page1.jsp using Ajax. Further, page2.jsp has a hidden (visibility: hidden) DIV tag inside a table element and this DIV tag also has HTML form elements.
Now on page1.jsp, when I try to unhide the nested DIV tag, the textual content of the DIV tag shows up, but the FORM content disappears!

Reason
1. Some issue with IE HTML compliance. The above scenario is not on issue on Firefox2. But is an issue on IE7
2. This is probably something to do with z-index for the DIV tag and the default given to the FORM elements. I was never able to figure that out anyway
3. The DIV tag in page2.jsp has position: relative. position: absolute would not cause any problems, but of course, that setting is not what I needed

Work Around
I created a 2nd DIV tag on page2.jsp, right underneath the first DIV tag. It looks something like this

<a onclick="toggleDiv('buddydiv', false); toggleDiv('spacerdiv1', true);">
<div id="buddydiv" style="position: absolute; visibility: hidden;">
<input name="send_email" id="sendemail" value="checkbox" type="checkbox">
</div>
<div id="spacerdiv1" style="position: absolute; height: 160px; visibility: hidden "> </div>


Definition of toggleDIV
function toggleDiv(layerid, blockStyle) {
if(document.getElementById) {
var obj1 = document.getElementById(layerid);
if(obj1.style.visibility=='visible') {
obj1.style.visibility = "hidden";
if(blockStyle==true)
obj1.style.position = "absolute";
} else {
obj1.style.visibility = "visible";
if(blockStyle==true)
obj1.style.position = "relative";
}
}
}

Saturday, June 30, 2007

an AJAX script

this is the easiest and more brief script I've worked with in a while.

--> here <--

Monday, May 7, 2007

Java based bulletin board

In order of preference -

JForum (free)
Jive Forum
mvnForum (free)
MessageBoard Servlet (free)
NorthStarBBS (free)

keywords: Java bulletin board forum discussion based open source free opensource mvnforum jforum

update height of iframe

this has troubled me at times - dynamically update the height of an iframe based on the height of the content being referred to.

--> see here <--

keywords: iframe ie height dynamic fix adjust

Tuesday, May 1, 2007

MySQL slow query logs

log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 1

The above will log queries taking longer than one second to the specified log file.

Monday, April 23, 2007

No Line Number in Exception Stack Traces?

use "-g" java compiler parameter

Friday, April 20, 2007

Installation of Resin 3.1.0 - steps

the order of the steps as mentioned in the Resin Documentation is very very important. The logging system of the httpd process is all but helpful and you won't be able to figure out what went wrong.
For the sake of brevity -
-- if you have any previous version of resin installed as a NT service, you should remove that NT service by running "httpd -remove"
1. install JDK that you want to use. it is advisable to remove the versions that you don't want to use any more.
2. download and unzip resin to root folder (i.e. c:\resin-3.1.0) . Do not try installing it on the desktop as the httpd daemon has a hard time with long folder names
3. make sure that jdk-xxx\bin folder is in the environment PATH variable
4. make sure that the jdk-xxx\lib\tools.jar is in the CLASSPATH
5. setup JAVA_HOME
6. setup RESIN_HOME
7. (you should not have even opened the MSDOS prompt window yet. This is because the addition of environment variable do not take effect in already open DOS prompts
8. now open a new MSDOS prompt
9. go to the resin folder and run "httpd" to start resin
10. or, run "httpd -install" to install it as a NT service