Tuesday, May 4, 2010

disable or remove weather from HTC Sense in windows based phones

.
Tired of HTC Sense animated weather integrated with its clock, and you want to remove or disable it?.

I got this figured out while fiddling the HTC Touch Diamond2

I did not subscribe to the mobile fixed rate data plan, so having the weather information just eats up my credit limit
After half a day browsing the internet for the answer, I got if from here:


The cheats is that you should not "enable my location"

First.
remove all "Location" from the weather setting.
Tap on the weather icon at the menu, and tap "menu"
remove all location from there.

Second.
still on the "weather" settings, tap menu and then tap settings.
untick "download data automatically"

Third
Tap on the menu and look at the bottom of the list
Ensure that you not "enable my location"


Fourth.
remove all "City" from clock
Tap on the clock itself, then select "My Location".
if there are lists of other cities, then you proceed as below, else go to next step.
Tap on the menu at the bottom of the screen.
tap "Remove cities". if there is no such menu, only "24 hrs" and other menu, then you had removed all cities.
select all cities to remove.
tap 'done'

You are done, and the weather should not be there..


this apply to HTC Touch Diamond2 windows phones. I do not know if it also applies to other HTC models. the steps might vary.

.


Saturday, January 30, 2010

home grille enhancement


DOOR GRILLE


Good practice is to install metal plates at the front portion of the windows grille, as shown. Note that the a also a small metal plate that cover the gap between the two vertical grill irons. This is to ensure that nobody could easily peel off the lock. I would advice that the cover be a long as the metal plate, instead of only few inches long. A latch or a bolt should be installed at the other side of the steel panel as shown below.

Ensure the the lock and staple (the place where you put in the padlock) is firmly welded at the grill member. Then you could lock the grill from inside.





IMPORTANT NOTE: Ensure that the plate does not cover your main door lock. Put it slightly higher than the door lock. The grill usually are quite close to the main door. The bolt's handle might not be able to slide free when the main door is closed. Having the main door lock below from the grills metal plate will ensure that you could open the door first, then unlock the grill's padlock that you had fasten behind the grill.
I would prefer this step since anybody who want to force open the grill would first force open the main door. In my home, the lever was bent slightly outward (not straight as in this diagram), this means I cannot slide out the lever out of the shackle unless I open the wood door first.







WINDOW GRILLE





Ensure that the windows grille is not installed this way. the screw could easily forced out even though the screw was quite long and installed using a wall plug.
The base was quite thin and it could be easily cut or severed from the main grille structure especially at its welding points.
The best practice is to ensure that the grille is as close as possible to the window frame, and the grille is screwed into the wall directly at its main structure, not via thin connecting plates. ensure that there are enough free space at the windows handle so that the windows can be open or locked easily.

You could also let the screw went in the grille as shown, and then cover the hole with rubber plug or another metal plate welded in..




Sunday, January 24, 2010

enable microphone to speaker in vista for pavilion dv2


this procedure works for HP pavilion dv2 1003ax using IDT HD sound running microsoft "stupid" vista.

1. open regedit, and search for DisableMicInFromRender. Replace all of its value from 01 with 00
2. reboot
3. at the taskbar, right click the "Speaker icon" and select "Playback Devices".
4. right button click "Speakers", and select Properties.
5. At the "Level" tab, you should see the Microphone slider. push it as you wish. I set it to 90, select OK.

it would still give no mic.. be patient, last step follows...

6. Select "Recording", and click at your "External Mic". ensure the your external mic is connected.

you should hear the sound. you cannot close the box. if you close it, the mic monitor will be gone after few seconds, and you cannot use the mic again.

next time you need to use the external mic, open the "Recording Devices" instead of the "Playback Devices" from step 3, and you should be able to use your mic.

BTW, I have not got the internal mic to work yet. not planning to use it yet..


.



Monday, October 26, 2009

using USB CDROM or DVDROM to install debian lenny, and got CDROM not detected.

problem using debian lenny : unable to enumerate USB device on port xx ?

here is the work around.

use the non-graphical installer


proceed normally for language, locale and keyboard settings

you will then get "No common CDROM drive was detected.

presss ALT+F4

you will see the error:  unable to enumerate USB device on port xx

If so, press ALT+F2

press enter to get to console

then enter: modprobe -r ehci_hcd      

(this will remove your high speed usbmodule)

press ALT+F4 again and you will see someting like "New USB device found" 

last line shoud be: Attached scsi generic sg0 type 5

press alt+F1 to get back to menu

select "NO" when asked to load from removable media.

Select "Yes" when asked "Manually select a CD-ROM module and device"

Select "none" when prompted" Module needed for accesssing the CDROM:"

Just press enter when asked for "Device file for acccessing CDROM" (you are selecting the default "/dev/cdrom"

the installer should begin "Scanning the CDROM"

you could then continue normally.

.

Sunday, May 24, 2009

Howto write sybase sql query that group by date in multiple shifts or parts

OK.

There was a problem that I got solved. and I got them with the help from the guys at the sybase.public.ase.general newsgroups.

The basic requirement is to group the date into multiple parts or shifts when I do a sql query

For example, I have a table that keeps login time for some staff. but I need to get total logins for 4 periods each day. 12AM until 6AM, 6AM until 12PM, 12PM until 6PM and the remaining 6 hours.

the sql query should be as follows, and it uses "datepart" to divide the groups into 24 groups, and then divide them with 6 so that we got 4 new groups.
select convert(varchar(12),LoginDate,106), datepart (hh,LoginDate)/6+1,count(*)
from TABLE where LoginDate>="1 Jan 2009 7:00" and LoginDate<"4 Jan 2009 7:00"
group by convert(varchar(12),LoginDate,106),datepart (hh,LoginDate)/6+1

If we got an offset OperationalDate, for example that start from 7AM today until tomorrow's 7AM, (with an 8hour shifts each) then we could add the offset in this sql query using "dateadd":

select convert(varchar(12),dateadd(hh,-7,LoginDate),106), datepart (hh,LoginDate)/8+1,count(*)
from TABLE where LoginDate>="1 Jan 2009 7:00" and LoginDate<"4 Jan 2009 7:00"
group by convert(varchar(12),dateadd(hh,-7,LoginDate),106),datepart (hh,LoginDate)/8+1

However, if you are designing the database from scratch, better add new column for the period( or shifts), and the operationaldate in the table. we could use trigger thereafter to insert the value into these colums. (as notably mentioned by one participant on May 21th 2009 in the same thread)


Here is the complete thread:
http://groups.google.com/group/sybase.public.ase.general/browse_thread/thread/5e7b7a88cbeddd3c?hl=en#

.

Wednesday, April 29, 2009

Linux / unix delete a line from the same file

In Linux shell script, howto delete one line from a file and save it in the same file?

The longer method would be

-------------

grep -v PATTERN MyFile > MyFile.new

mv -f MyFile.new MyFile

------------

The one-liner command would be as below

sed -i "/PATTERN/d" MyFile

option -i  means "edit the file and save it in place (as the same file)"

/d means to delete - it will deleteall lines that contains PATTERN.

Read sed manual for more info

Thursday, February 26, 2009