Search This Blog

Sunday, November 30, 2008

Dell Latitude E6400



I have been DELL Latitude fans since i work in DELL early 2004. My first test out was DELL Latitude D600, the following DELL notebook was DELL Latitude D800 and DELL Latitude D620. You may wonder why DELL specifically Latitude

I can give you some reasons:

  1. The price: it's not too expensive, it's slightly higher than getting a DELL Vostro or DELL Studio. Normally my machine cost is about RM4K - 6K (USD 1.3K - 1.8K)
  2. The outlook: it's always have cool looking (I'm mention DELL Latitude series, not Inspiron or Vostro). It looks quite elegant with this price.
  3. The performance: it perform very well, i heavyly use my notebook for programming (.NET, MSSQL, C++), debugging and etc. It still can meet my requirement. My battery can last for 4 hours without charging. This is important for me when meeting customer in cafe and etc.
  4. The warranty services: this is what i love most but it depend on your warranty that you purchase. I've my next business day warranty service. I call it today, the next day i'll get the warranty parts and the engineer with come to change the part for you without any further questions. Remember to get your warranty service whenever you purchase your notebook. It's important.





My new DELL Latitude E6400 specs:


  1. Intel(R) Core(TM)2 Duo Processor P8400

  2. 3 Yrs Next Business Day Onsite Service

  3. 3Yr CompleteCover

  4. Dell Wireless 370 Bluetooth(R) 2.1

  5. Intel WiFi Link 5300 (802.11 a/g/n 3X3) MiniCard

  6. 4GB (2x2GB) 800MHz DDR2 SDRAM

  7. 250GB SATA (5400RPM) Hard Drive

  8. Genuine Windows(R) XP Professional SP3 -Downgrade Vista Business Basic(EMRP)

  9. 14.1" Widescreen WXGA (1280x800) Display

  10. Integrated 10/100/1000 Ethernet

  11. High Definition Audio Codec

  12. 5-in-1 Media Card Reader

  13. 8X DVD+/-RW Drive

  14. Mobile Intel(R) Graphics Media Accelerator X4500HD With Express Card

  15. Power DVD Software and Media CD

  16. 56k Internal Modem

  17. 6-Cell Li-Ion Primary Battery

  18. 90W AC Adapter

Dell latitude E6400 come with a very cool notebook messenger bag. Light and slim. I bet you will love it.




Tuesday, November 18, 2008

Classic ASP CAPTCHA with JQuery Cross domain AJAX

It come to the point that i need to maintain my old application which written in ASP. I was asked to add a new feature in form submission to prevent from spamming. CAPTCHA is the thing that i could thought of. Thanks Emir Tüzül who willing to share his ASP CAPTCHA. You can download it from http://www.tipstricks.org/ .

I downloaded the code and modify the code so that the security checking is before the asp postback. The solution i could thought of is AJAX. When i thought of javascript, the coolest javascript framework will be JQuery.

The decision is go for JQuery in order to perform Ajax with ASP.

There is one concern, the application will need to perform cross domain ajax. If use normal jquery ajax (code below), it will work if all the file reside in the same domain but not when cross domain. Error : Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no] will be displayed.

var html = $.ajax({
url: "/captcha.asp?validateCaptchaCode=" + $("#captchacode").val(),
async: false
}).responseText;

In our case, the file put in different domain. The technics will be use is Cross-Domain getJSON (using JSONP). Sample code below

$.getJSON("captcha.asp?validateCaptchaCode=" + $("#captchacode").val() + "&format=json&jsoncallback=?", function(data)
{
if (data.status == "1")
{ alert("verified and submit.");
$("#form").submit();
result = true;
}
else
{
if (data.session == "0")
RefreshImage("imgCaptcha");
alert("Please key in the security key correctly!");
$("#captchacode").focus();
result = false;
}
});


The Cross-Domain getJSON will espect the data return in Json format. So, my ajax handler file (in my case is captcha.asp) will need to return Json format data for processing.

After develop and tested. It's work. You can download my sample file here and test on it. Please let me know if it's help.

Sunday, November 16, 2008

screnc.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

I get below error message when try to encrypt my asp file.

"screnc.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

In my old machine, everything is working fine (xp pro sp2) but when come to new machine (xp pro sp3), problem occur. Acording to this article, there is no way can be done in xp sp3 unless we install a virtual machine to run it. So, i give up on running this in my new machine.

End up, i run it in my dedicated server which give me cool output file.

IE 7 hang when close the browser

My IE7 will hang most of the time when i try to close it if i open many tab or windows. End up, i need to hit Ctrl, Alt, delete to close it.

My machine spec:
  • XP pro SP3
  • Intel Core 2 Duo P8400 @ 2.26GHz 791 MHz
  • 4GB RAM

It shouldn't hang with my machine spec.
Many article suggest that it's caused by the IE Add-ons. So, i try my luck to disable the Add-ons one by one.

Finally, i found that after i disable Skype Add-ons, my problem solved.
To Enable/Disable IE Add-ons,
  1. Open IE
  2. Click on Tools, click on Manage Add-ons -> Enable or Disable Add-ons asd
  3. Manage Add-ons windows will be pop up.
  4. Select the add-ons you want to disable.
  5. Click OK to close the windows
  6. Close all the IE and start again.
Now my IE is working fine. Hope this solve your problem.
UPDATE: it solve my problem for only a day. Problem come back the next day.
The real action that solve my problem is uninstall google toolbar which is my last choice. Hope this solve your problem.
UPDATE: 10/12/2008. My problem confirm solved after uninstall google toolbar.

Tuesday, November 11, 2008

Database diagram support objects cannot be installed because this database does not have a valid owner.

I have restore a database from MSSQL 2000 to MSSQL 2005. When i try to open the database diagram, error message below pop up:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

ALTER AUTHORIZATION ON DATABASE: Database_name TO valid_login

I use SSMS to solve my problem.
In SQL Server Management Studio do the following:
  1. Right Click on your database, choose properties
  2. Go to the Options
  3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
  4. Go to Files
  5. Type "sa" in the owner textbox
  6. Click OK
This solve my problem.

Alternatively, we can solve it using TSQL:
- My database name: avlDB
- MY Login: sa

EXEC sp_dbcmptlevel 'avlDB', '90';
GO
ALTER AUTHORIZATION ON DATABASE::avlDB TO "sa"

GO
USE [avlDB]
GO
EXECUTE AS USER = N'dbo' REVERT
GO

Monday, November 10, 2008

The memory could not be written

After i change My Computer name, my machine (Windows XP Pro SP3) getting very very slow and hit below message when try to install some simple application and even hit the same error notepad.

"The instruction at "0×62e2cc0f" referenced memory at "000000000". The memory could not be written. "

Try to work around and suft here and there but not able to find any solution.

Finally System Restore work for me.

To use System Restore to restore Windows XP to a previous state, follow these steps:

  1. Log on to Windows as Administrator.
  2. Click Start, point to All Programs, point to Accessories, point to System Tools, and then click System Restore. System Restore starts.
  3. On the Welcome to System Restore page, click Restore my computer to an earlier time (if it is not already selected), and then click Next.
  4. On the Select a Restore Point page, click the most recent system restore point in the On this list, click a restore point list, and then click Next.
    Note A System Restore message may appear that lists configuration changes that System Restore will make. Click OK.
  5. On the Confirm Restore Point Selection page, click Next. System Restore restores the previous Windows XP configuration, and then restarts the computer.
  6. Log on to the computer as Administrator. The System Restore Restoration Complete page is displayed.
  7. Click OK.
For more information, please visit http://support.microsoft.com/kb/306084

Friday, November 7, 2008

SQL Server Setup failed to obtain system account information for the ASPNET

Trying to setup MSSQL 2005 Developer version in my new machine OS Windows XP Profesional SP3, when come to installation point, error message below appear:

"SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET framework, and then run SQL Server Setup again"

Under Add/Remove Programs, i have Framework 1.1, 2.0 and 3.0 installed.

What next? After surf around, here is the solution:

Steps:

1. Click on Start -> Run






2. Type in cmd and click OK





3. Command prompt screen will appear. go to"C:\Windows\Microsoft.NET\Framework\v1.1.4322" folder by using command cd C:\Windows\Microsoft.NET\Framework\v1.1.4322 and hit enter. Please refer screen below:





4. Type in aspnet_regiis -i and hit enter.




5. Screen below will be shown and dotnet user installed.




Try to install MSSQL 2005 again. It's work.


Problem solved.