Monday, 23 March 2009

Trend Micro HouseCall on Vista/ Free online scan for antivirus

I have installed AVG Free as anti-virus software on my laptop. I think they are quite good. Although it is quite safe, sometime I will use other online virus checker to scan my computer to ensure my computer is secure.

I used to use Trend Micro HouseCall to do a online scan on my computer, sometime it did find some Trojan and worms, but AVG did not notice it. But as soon as I upgrade my laptop to Windows Vista, HouseCall did not work again. On the previous version of HouseCall it did say it does not support Windows Vista. When I check it again today, it said it did now.

My computer has not done any full virus scan for quite awhile, I think I should have a try now. I am not sure if it is something not quite right on my computer. I cannot get it work on my IE, it said "HouseCall is not available for your platform"..."You can not use Trend Micro HouseCall on your machine because your processor type or your operating system are not supported." etc. (but on the front page, they did say they support vista and IE6 or above). I hope it is not something to do with my CPU which is “Centrino Duo
”.



When i try again on Firefox, it seems to work. The different is I need to download an exe file instead of running it directly on browser(Firefox).

After I downloaded the "housecall66.exe" I just double click on it to execute it.

When you started it, it will ask you to accept the terms and condition agreement.


Once you done that you need to choose a HouseCall Kernel which his either a Brower base or Java base. Then you would need to download the plug-in, it may take awhile.
(I chose Browser Base)


Then you will see a "Select Scan Options" screen.


Recommended scan - only scan for malware, grayware, vulnerability and selected location. It will perform quicker

Complete scan - probably will scan for everything on you PC

Customized Scan - you can select what to scan.
It has one more option than Recommended Scan which is scan open network port
I think it would be quite useful to see if your computer has open a network port which could be attack by hacker.
If you have selected "Open Network ports" it will pop up a message to inform you that the program will perform a port scan. (It is not a hacker attack (not this time))


It takes about 4 hours to scan my computer, which has 160GB HDD, filled in around 110GB data



My scan result


Here it is the URL for Trend Micro HouseCall online scan.
http://housecall.trendmicro.com/

Hope your find it useful.

Thursday, 19 March 2009

Jquery's Notes

I am learning JQuery at the moment, and going to note down the error/mistake which I made while I am experimenting it.
Hope you would find it useful if you encounter the same issue, while you are using JQuery. Please correct me if my concept is

wrong or you have a better solution.

Why learn JQuery?
It is a JavaScript library/API/Frameworks allow you to develop website rapidly with nice feature that can work Cross-

browser, CSS3 Compliant and Lightweight Footprint, you can found lots of plugin on-line which can save you a lot of time to

develop you own method for some common feature.

Here it is the official site for JQuery, where you can find JQuery to download download/tutorials/documentation and get the latest

information about it.
jquery.com

One thing that I would like to remind myself from this notes is. All the even/action E.g. Blur, Onchange...etc should register on ready event. Of course, the most important thing is to reference the jquery.js between the HTML header tag.
E.g.

<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
//Register on ready event
$(document).ready(function() {
$("#txt_Text").change(function(){
alert($("#txt_Text").val());
});
});

</script>
<title>Jquery Notes</title>
</head>
<body>
<input type="text" id="txt_Text"/>
</body>
</html>


The example above will display an alert box when we change the focus on txt_Text input control.

Happy coding.

Tuesday, 17 March 2009

Oyster Mushroom Crisps suitable for vegetarians (Health Choice)

Today I would like to recommend crisps for you (Oyster Mushroom Crisps Wasabi Flavour). I felt that crisps are a bit healthier than normal crisps as it is not that oily. On the package it said it has No Trans Fat, No Cholesterol, No Artificial Colouring and No Preservative Added.
Normal crisps are made from potato, but this one is made from Oyster Mushroom.
The taste of wasabi is not that strong, so you probably won’t feel the spice of it. Not like the wasabi on Sushi or wasabi seaweeds…etc. I think it is not only suitable for Vegetarians, it also suitable for children as well.

It is quite special, you must try it out : ). But if you do not like the smell of mushroom, you may not like it then.

Package


Inside the package. It does not look like normal crisps





That is what Oyster Mushroom look like.




Let me know if you are interested on it.

Wednesday, 11 March 2009

Crystal report XI Service Packs 5 solve the PDF font size get reduced/smaller issue

Today I just have a look at the documentation about Crystal report XI Service Packs 5, which has released at the end of Nov 2008.
They have mention the PDF generation issue which I posted few days ago about PDF font size get reduced after you export it from crystal report.

If you have similar issue, the following description may be able to help you get around it.

Hope you find it useful.

ADAPT00940675
Description:
The registry key option ForceLargerFonts maintains the correct font size of reports that are exported to PDF format; however,
this option may cause data to be truncated along the right-side margin.
The problem is caused by a mismatch in the way that character widths are calculated between PDF and Microsoft Windows.
New Behavior:
This problem is resolved.
To solve the problem, the PDF export engine has been modified to use an algorithm that positions characters precisely to
prevent truncation, while still maintaining the correct font size. This algorithm is activated and controlled by two new registry
keys:
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\\Crystal Reports\Export\Pdf]
"UsePrecisePositioningForText"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\\Crystal Reports\Export\Pdf]
"TruncationAdjustment"=dword:00000002
The UsePrecisePositioningForText key enables the new functionality when it is set to 1. When this option is enabled, the
ForceLargerFonts option is automatically enabled (to maintain correct font sizes in PDF exports), and any manual settings
made to it are ignored. The TruncationAdjustment key controls a width calculation rounding function in the new algorithm and
accepts values between 0 and 10 inclusively. The default value of 2 has been tested to sufficiently eliminate most truncation
issues. If truncation still happens, users can increase the value.
Known Limitations:
When the UsePrecisePositioningForText key is enabled, exports to PDF format may take slightly longer, but by no more than
10%. Also, the exported PDF document will increase in file size over the standard output, and Crystal reports will consume
more GDI resources during the export.

Saturday, 7 March 2009

WordWrap on Crystal Report?

I have received a task to convert the project handbook from Word Document into Crystal report. It does not sound difficult until I need to do some formatting and Layout.

I had a problem on trying to make a field to display in Multi-line, instead of one line. And I am not able to file a word wrap function on Crystal Report. After spending some time on the web. Finally I find out how to do it.

Solution:

1) Select the field(s) that you want to enable WordWrap.

2) Right click and select "Format Field" OR "Format Objects" (if you select more than 1 fields)

3) Then in the "Format Editor" Click on the "Common" tab.

4) You will see the screen shot similar as below.

Crystal Reports fields Format Editor

5) Then "Tick" the "Can Grow" check box and click "OK"

6)After you done that you can save the Report and press "F5" to preview the report.

Hopefully you the field will be wrapped into next line.

Good luck

Wednesday, 4 March 2009

TSQL Get Number of Decimal Place (on a field)

Today I need to do a query to get all the record which has 3 decimal places on one of the field and process them by using different method.

I am wondering if there any default TSQL function that I can use, so that it can save my time. Unfortunately, I could not find one, so that I decided to write my own function.

Here it is the TSQL code that I used to retrieve the number of decimal place of a field.

--Example input value
DECLARE @DecimalValue FLOAT
SET @DecimalValue = 12.34567
--Declare a variable to store the result
DECLARE @NoOfDecimalPlace INT

SET @NoOfDecimalPlace = CHARINDEX('.', REVERSE(CAST(@DecimalValue AS VARCHAR(30)))) -1

--Return Number of decimal Place
SELECT @NoOfDecimalPlace

Here it is my User Define Function for get number of decimal place of a number field.

You can execute it by using the following SQL code

SELECT dbo. Get_NoOfDecimalPlace(0.123)

CREATE FUNCTION [dbo].[Get_NoOfDecimalPlace]
(

@ValueToProcess FLOAT=0
)
RETURNS INT
AS
BEGIN
-- Declare the return variable here

DECLARE @NoOfDecimalPlace INT
SET @NoOfDecimalPlace = CHARINDEX('.', REVERSE(CAST(@ValueToProcess AS VARCHAR(30)))) -1

RETURN @NoOfDecimalPlace
END


Hope you found it useful.

Wednesday, 25 February 2009

Deselect an Item on SilverLight

Sometime you may find it useful to de-select an Item on ComboBox,
when you try to force a user to pick one from the list.

Here it is the code sample to deselect a selected item on ComboBox in Silverlight.
[Just need to set the selected Index to -1]
ComboBox1.SelectedIndex=-1

Hope you find it useful.