Android Autocomplete


ref : daramasala


IIS deploy example configuration

right click > manage website > advance settings



– run as Admin is risky, try to run as “Application user (pass-through authentication)”


Only copy the published site to the server, no need to install visual studio.

To deploy from VS, choose Publish method : file system


– beware of firewall if we have to connect from outside server

– IIS error

If the following Web.config cause iis error.


<compilation debug="true" targetFramework="4.0" />

We can solve that bychange_asp_from_2_to_4

ubuntu 12.04 with NVIDIA 8400 graphics card

When I finished setup everything I need on windows, and peek back to ubuntu.

Everything works. Damn it !!!

The story begins that I would like to buy a second monitor for my laptop.

I try to figure out how to make it work on ubuntu with my NVIDIA graphic card with a lot of methods I could find on the Internet.

I try to install nvidia-current, nvidia-current-updates, nvidia-current-dev, nvidia-173, nvidia-319, etc., but nothing works in my case.

Moreover, some package gives my ubuntu a black screen of death.

I also try to download an official package from NVIDIA website, but I could not finish installation. That installation told me that I have to disable the nouveau driver that is in my machine. I try put it into a blacklist, but it does not works, so I set it back.

After give up with ubuntu and try to install every software I needed on windows, and I peek back to ubuntu to get some files. Everything works in a couple of minutes !! I do not know what is the real cause of the problem, so everything I note here is just for myself for using in the future ( I hope ). However, if it works for your system I will be appreciate.

First thing I do today is uninstall all the nvidia package

$ sudo apt-get purge nvidia-*

Modify the xorg file a little bit. Note that here I commented out the resolution of the xorg file (# Virtual 1024 768).

I post my whole xorg file here. For the one who is not familiar with ubuntu, use it with care. It is very dangerous to change xorg file without any knowledge.

Section "Monitor"
 Identifier "Monitor0"
 VendorName "Unknown"
 ModelName "Unknown"
 HorizSync 28.0 - 33.0
 VertRefresh 43.0 - 72.0
 Option "DPMS"

Section "Screen"
 Identifier "Screen0"
 Device "Device0"
 Monitor "Monitor0"
 DefaultDepth 24
 SubSection "Display"
 #Virtual 1024 768
 Depth 24

Section "ServerLayout"
 Identifier "Layout0"
 Screen 0 "Screen0" 0 0
 # commented out by update-manager, HAL is now used and auto-detects devices
 # Keyboard settings are now read from /etc/default/console-setup
 # InputDevice "Keyboard0" "CoreKeyboard"
 # commented out by update-manager, HAL is now used and auto-detects devices
 # Keyboard settings are now read from /etc/default/console-setup
 # InputDevice "Mouse0" "CorePointer"

Section "Device"
 Identifier "Device0"
 Driver "nvidia"
 VendorName "NVIDIA Corporation"
 Option "NoLogo" "True"

Stop the lightdm service

$ sudo service lightdm stop

and Restart the gdm service

$ sudo service gdm restart

At first my login screen and unity side panel are on the output display tv, but when I disabled my tv ( using System Settings > Displays  ), they can recognized my laptop as main screen.

NOTE that I can use resolution 1280×800 on my laptop, and 1920×1080 on my extended screen, using the ubuntu that is stored in the external drive connected with machine using USB-2.0 without any lag. ( At first, I though USB-2.0 is not fast enough, so my laptop is lag when connected to the high-resolution screen, but it is not. )

That’s it. I just note it here perhaps this will be useful for my future.


[ udl extension ] test Data Link with windows

1. new File

2. test.udl

3. double click

4. we can select provider driver


NOTE : if in 64 bit machine, but the driver is 32 bit ( i.e. `Oracle Provider for OLE DB` ), try to execute UDL in 32 bit mode using the following command.

C:\Users\User>c:\Windows\SysWOW64\rundll32.exe "c:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\Users\User\Desktop\test.udl

32_64_bit_machineThe sourcecode of the UDL file is showing below.


; Everything after this line is an OLE DB initstring

Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=userIdNaja;Data Source=XXX.XXX.XXX.XXX

[ xls ] VB Tips about VBA and macros in excel

1. From the Sheet, Right Click > Show Codes

2. The VB editor will be appears

TIPs for VB editor

– Go to definition ( Open Declaration )

right click > definition

Go back

right click > last position

– To prevent the screen swaping

Application.ScreenUpdating = False

or if we want to set it back

Application.ScreenUpdating = True

– Activate Worksheet


– Access Cell Values ( For example, if we want to access E4 cell


– MsgBox function


MsgBox(prompt(, buttons) (, title) (, helpfile, context))

prompt : string

buttons : can be vb MsgBox constanti.e. vbCritical

title : string

– Go To




On Error Go To XXX



– recordset

If Not rs Is Nothing Then rs.close



TIPs : record macro

1. View > Macros > Record Macro

2. do the event in excel ( i.e. save file as CSV )

3. View > Macros > Stop record Macro

The excel will generate the code for that action. The result will be in VBA modules.

TIPs : excel change column width and height

Home > Cells > Format

Insert Button

For MS 2010

Developer > Insert > ActiveX control > Button

Writing Excel macros

– save as .xls ( .xlsx does not contains all macro )

Option Explicit : force define variable ( This will be error at compile time. In VBA, we can check by `Debug > Compile VBA Project`.

On load worksheet and On Terminate Sheet

Note that the code is `Worksheet`, do not replace it with worksheet name !!!!

Private Sub Worksheet_Activate()
MsgBox ("Hi")
End Sub

Private Sub Worksheet_Deactivate()
MsgBox ("Bye")
End Sub

Protect VBA code

In VBA screen, Tools > VBAProject Properties

Protection tab
Tick Lock project for viewing
and set password