About LockeVN Nguyen

Đang trên đường đi tìm ánh sáng cho sự nghiệp. Đốt đuốc tìm thầy... SOA Scalar, scale out software software design web mashup online service

Run Dropbox as Service on Windows 2008 Win 7

- Remote desktop to your server

- On server, download dropbox.exe to C:\
- Start command prompt (with “YourUserLockeVN” please)
- Install dropbox by command prompt:

"C:\dropbox.exe" /D=C:\Program Files\Dropbox

- Run through DropBox setup, login to dropbox, use advanced install, determine local folder for sync, …
- (very important) Start Dropbox, Preferences -> uncheck “Show desktop notifications” and “Start Dropbox on system startup
- Exit dropbox (right click tray icon, Exit)
- Check StartMenu/Startup folder, remove the Dropbox shortcut (if any)
- Download Windows Server 2003 Resource Kit Files (Win2003, 2008 can use)
- Install it into your server (don’t worry about conflict, they are all M$ stuff, and they just extracts to folder)
- on command prompt, create Service by:

"C:\Program Files (x86)\Windows Resource Kits\Tools\instsrv" DropBoxService "C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe"

- Start/Run, “Regedit”, go to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DropBoxService

- Create KEY Parameters
- Create String value name “Application“, value C:\Program Files\Dropbox\Dropbox.exe /home
- Create String value name “AppDirectory“, value C:\Program Files\Dropbox


- Go to Administration Tools / Services -> DropBoxService -> Properties -> Log on -> Use “YourUserLockeVN
- Change the service startup type to “Automatic
- Start service

That’s fine. Now you can logoff, disconnect from the server and Dropbox still up and running, sync your file.

Set Remote Desktop of Windows 7 to 256 colors for faster speed

Before Windows 7, I was able to set Remote Desktop client Display at 256 Colors. That option is missing in Windows 7 ( The lowest option is “High Color 15 bit” )
It is very important to have it back specially if when using a slow network connection.

- Save all the remote desktop settings for the connection and save it to a RDP (.rdp) file by choosing Save As in the General tab.
- Open that .rdp file in a text editor (Notepad)
- Find the line that begins with session bpp:i:
- Change this line to session bpp:i:8
- Use (double click) that .rdp file to open a RDP session to the remote computer.

Setup and Using RAM Disk in daily development

I have quite strong QuadCore computer with 8GB RAM. Normally, my daily working basis uses nearly 6GB RAM. So 2GB more are waste. I often have to write installer script, try/test the setup, installer … which read/write a lot of files (7000 files, WTH)

So idea about RAM disk (from DOS era) come up!

Software to create RAM disk

1. ImDisk. TESTed on Win7

http://www.ltr-data.se/opencode.html/#ImDisk

2. http://www.ocztechnologyforum.com/forum/showthread.php?63273-*-Windows-7-Ultimate-Tweaks-amp-Utilities-*&s=fed9149ad42cb34e6e914b94fa7a3232&p=442160#post442160

3. I use this DataRAM RamDisk

Install it is very simple.


Create/Start new disk in DataRAM
go to Computer Manager, Disk Management, format it and assign drive letter, Fix the drive character to R: for easily reference later.

Settings/DiskSize set to your need
Load and Save/Load Disk Image at Startup, Filename = C:\RAMDISK.img
Load and Save/Save Disk Image on shutdown, Filename = C:\RAMDISK.img
Option/Do not compress image file on NTFS filesystems

Using your ram disk

Redirect Chrome cache dir

Change your Chrome shortcut, change the Target to

C:\Users\ngng\AppData\Local\Google\Chrome\Application\chrome.exe –user-data-dir=”D:\LockeVN\ChromeLockeVNWorkProfile” –disk-cache-dir=”R:\Google\ChromeDev”

Change Win7 temp path

Go to environment of OS, redirect TEMP and TMP folder to ramdisk

.
.
.
.

Javascript sleep(), will block browser, block setTimeout either

I found this Javascript sleep function here and it works in FF9, Chrome 14 (tested).

function sleep(ms) {
 ms += new Date().getTime();
 while (new Date() < ms){}
}

This function will block browser from doing anything, even setTimeout()
E.g.:

/*BEGIN*/
setTimeout(alert('stupid'), 1000); 
sleep(2000); 
// after sleep completed, setTimeout has its turn to run. 
// The alert() will be shown after 3 seconds from /*BEGIN*/

This might be a stupid thing but sometimes you have to do stupid work and it’s required.

Free online private repositories for source code control management

I have some pet projects but so shy to show off ;)

I share with my close fellow only, that why I need an online free private source repository (stable, hosting, free, private, is it too much?). The small list below is carefully made on the time (updated in July 2011) I write this post (because the SCM service providers’ plans are subject to change)

 

Assembla

  • free plan has private repos with
  • Unlimited Users. Unlimited Projects
  • 1GB Storage
  • with Git and SVN

 

bitbucket

  • Free plan
  • has unlimited public repos
  • and unlimited 5 user private repos
  • with Git and Mercurial

 

Unfuddle

  • free plan has private repos
  • 200MB
  • 2 users, 1 active project
  • with Git and SVN

 

xp-dev

  • 200MB of basic Subversion & Trac space
  • 2 projects
  • No backups
  • No secure SSL access
  • Advertisements

 

 

Bonus: Client to access

I use eclipse as open source SCM client

Git: I use eGit

SVN: I use Subclipse

Mercurial: MercurialEclipse (formly HgEclipse)

 

More bonus: conversation on StackOverflow about this free private source repository

NodeJS quick sum up July 2011

This is my sum up about NodeJS on July 2011, base on some slides (of geeks in my list from BarCamp Saigon 2011). Just a fastfood of what NodeJS is, why is get buzz at the moment.

 

specs

  • JS and C++ code
    + and commonJS module mechanism 
    ——–> on NodeJS binding (http socket IO …)
    ——–>——–> on JS engine V8 + ThreadPool-libIO + EventLoop-libEV + …
  • programming style: evented with callback function, no thread
  • non blocking IO
  • DB support: mongodb couchdb mysql redis
  • package (module of NodeJS) is NPM (not available on Windows?)
  • IDE support: bad, no great debugger, can use cloud9 online IDE
  • hosting: joyent heroku cloudfoundry dotcloud

 

when to use it?

  • chat/messaging
  • real-time applications
  • intelligent proxies
  • high concurrency applications
  • communication hubs
  • coordinators

 

something bad

  • so young, immature
  • lots of stuffs to look at, must lookup API from internet, and remember yourself (function name, parameter, …)
  • retro compatibility, API is (frequently) subject to change
  • hard to find organized (and centralized) and authoritative information

what is .NET delay signing?

Signing

Signing an assembly basically certifies that assembly by the manufacturer and prevents tampering and hi-jacking of that assembly.

The signing is accomplished by using public key/private key encoding of parts of the assembly.

 

Delay signing

Delayed signing refers to a technique of partially signing assemblies while they are in development (embedded the public key in the assembly but still secures the private key).

 

Why?

An organization can have a closely guarded key pair that developers do not have access to on a daily basis. The public key is often available, but access to the private key is restricted to only a few individuals.

When developing assemblies with strong names, each assembly that references the strong-named target assembly contains the token of the public key used to give the target assembly a strong name. This requires that the public key be available during the development process.

So, after delay signing, the public key is embedded in the assembly and will be used by third-parties who want to reference (you can place a shared assembly (as if strongly named) in the GAC by signing the assembly with just the public key).

powershell script to open web address URL with default browser

After install a website, we used to open the start page in web browser.

There are at least (not 2) 4 ways to open web address URL with default browser in Powershell.

1. Run a exe file with parameter is our url.

How to get exe filepath of default browser? define and use this function (thanks to Ravikanth Chaganti):

Function GET-DefaultBrowserPath {
#Get the default Browser path
New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root | Out-Null
$browserPath = ((Get-ItemProperty ‘HKCR:\http\shell\open\command’).’(default)’).Split(‘”‘)[1]
return $browserPath
}

call

Get-DefaultBrowserPath

in my computer Powershell console will return D:\Program Files (x86)\Mozilla Firefox\firefox.exe

2. Simple way:

call

start ‘http://www.gurucore.com’

in Powershell.

Thanks Dac Thach, I tested your solutions and it works on Windows 2008 + Powershell 1.0

3. One another is we use Invoke-Expression

to lend the Windows’ CMD hand (like you open Windows Run / cmd / then type start)

 

Invoke-Expression “cmd.exe /C start http://gurucore.com
Invoke-Expression “cmd.exe /C start http://some-thing.com.net/~en/my-site/gurucore.com#thach
Invoke-Expression “cmd.exe /C start /b http://gurucore.com?ab=abb’&’thach=2+g~

4. Use .NET static function

[Diagnostics.Process]::Start(‘http://gurucore.com?a=-b&c=~d#abc’,'arguments‘)

Disable Attach Security Warning in Visual Studio 2010

 

When debugging/attach to a process in Windows 7 from Visual Studio 2010, VS displays a warning message confirming if you want to attach to the process you just asked VS to attach to.

Of course I don’t click No Attach! because I do want to attach.

 

So, to save one mouse click and disable the warning,

1. go to windows Start/run, regedit

2. Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger

3. and set DisableAttachSecurityWarning to 1

DisableAttachSecurityWarningVisualStudio2010

 

For VS 2008 the path should be

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Debugger

 

4. Restart Visual Studio

 

Thanks to: abjbhat

 

Troubleshoot:

if you cannot alter the key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger, DisableAttachSecurityWarning to 1, then

Delete it

Go to HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\Debugger

Create new DWORD, name it DisableAttachSecurityWarning , set value to 1

 

Adding Client-Side Script Blocks with RegisterStartupScript() and RegisterClientScriptBlock()

The System.Web.UI.Page class contains two methods for emitting client-side script code into the HTML rendered by the ASP.NET Web page:

  • RegisterStartupScript(key, script)
  • RegisterClientScriptBlock(key, script)

Both of these methods take two strings as input. The second parameter, script, is the client-side script—including the opening and closing <script> tags—to insert into the page. The first parameter, key, serves as a unique identifier for the inserted client-side script.

The only difference between these two methods is where each one emits the script block. RegisterClientScriptBlock() emits the script block at the beginning of the Web Form (right after the <form runat="server"> tag), while RegisterStartupScript() emits the script block at the end of the Web Form (right before the </form> tag).

From http://msdn.microsoft.com/en-us/library/aa478975.aspx

Fatal error and cannot boot after install Windows 7 SP1 RTM

After installing Windows 7 SP1 RTM, your computer probably cannot boot, and it shows

fatal error c0000034 (*) applying update operation 282 (**) of 115544 (***)

(*) (**) (***) can be different in your case.

 

I found a solution from here http://social.technet.microsoft.com/Forums/en-US/w7itproinstall/thread/1c9a7151-b48c-4a98-aae7-a4b82682ea8e/#bcabda57-7338-499f-aee2-d708e76df315

Thanks to thiswoot. His method works without Safe Mode, without backups, without System Restore, without DISM, and without a Windows 7 DVD repair disc.

Step

  • Reboot (or turn off/turn on) your computer
  • Try to go to Command Prompt (the step may be different, but it always exists a button to go to Command Prompt):
  • When your computer’s starting up, choose the option "Launch Startup Repair"
  • When the Startup repair starts, click cancel.
  • Click the link "View advanced options for recovery and support"
  • In the new window click Command Prompt at the bottom.

 

  • (Optional): if your computer using VHD image to load Windows, please mount the VHD file first, then change to that drive
  • type bcdedit, enter, to get the VHD file path, copy it (E.g.: c:\win7.vhd)
  • type diskpart, enter
  • type select vdisk file="c:\win7.vhd" , enter (use the VHD path in previous step)
  • type attach vdisk, enter
  • type list volume, enter. You will see you "real" Windows volume drive ————> (E.g.: I:)
  • exit diskpart

 

  • In Command Prompt type this and press enter: notepad C:\Windows\winsxs\Pending.xml (or whichever drive Windows is installed on. E.g.: if you mount VHD image and list volume, your Windows drive can be I:, replace C: with I: ———-> the command will be notepad I:\Windows\winsxs\Pending.xml). It can be very slow (because that file is very big)
  • Save as Pending.xml to another location (E.g.: save as Pending.OLD.xml), close Notepad.
  • Re-open pending.xml again with command notepad C:\Windows\winsxs\Pending.xml (It can be very slow (because that file is very big))
  • Press CTRL+F and search for the following exactly: 0000000000000000.cdf-ms
  • Delete the following text (yours will be a little different):

<Checkpoint/>
<DeleteFile path="\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms"/>
<MoveFile source="\SystemRoot\WinSxS\Temp\PendingRenames\e56db1db48d4cb0199440000b01de419._0000000000000000.cdf-ms" destination="\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms"/>

 

  • Save the file (very slow), close notepad
  • Exit command prompt, restart your computer.

 

  • Do a normal startup, Service Pack installation process can be continued or reverted, it depends, but let it be. Your computer can boot to Windows again

Mua bàn bóng bàn – rồi chơi bóng bàn

 

Công ty đầu tư cho cái bàn bóng bàn, mình kể ra là thể thao nhất bọn ở đây + hay lăng xê thể thao –> đi chọn bàn. Lượm lặt được một số thông tin sau:

(Chú ý: Ván MDF tốt hơn, khó thấm nước /hút ẩm + cong vênh hơn, nếu chọn ván OKAL phải từ 30mm trở lên)

 

Xịn

Double Fish (song ngư) 323 chân cong, chuyên dùng tại các CLB

tầm 9 10tr

http://www.vatgia.com/1299/929557/b%C3%A0n-b%C3%B3ng-b%C3%A0n-double-fish-323.html

 

Trung bình

Đức Long TĐ 01 MDF 25mm (5tr5)

http://www.vatgia.com/1299/751449/b%C3%A0n-b%C3%B3ng-b%C3%A0n-%C4%91%E1%BB%A9c-long-t%C4%91-01.html

Đức Long TL 04 (MDF 18mm) (4tr2)

http://www.vatgia.com/1299/704100/b%C3%A0n-b%C3%B3ng-b%C3%A0n-%C4%91%E1%BB%A9c-long-tl-04.html

 

Xoàng (2tr đến 3tr)

Vinasport 30mm

http://www.vatgia.com/TDshop&module=product&view=detail&record_id=84442

Động Lực 30mm

http://www.vatgia.com/1299/681548/b%C3%A0n-%C4%91%C3%A1nh-b%C3%B3ng-b%C3%A0n-30mm.html

 

Bóng

Mua bóng tập cho rẻ và tiện, đằng nào toàn newbie cũng không có khả năng phân biệt.

100 quả bóng tập 370k http://bongbanviet.com/bongbanviet.asp?module=41&cid=98&subid=24&sid=0&nid=308

 

Bảo quản bàn bóng

  • 1/ Nếu bàn để cố định thì nên chằng chống các chân bàn kỹ vào. Có thể lắp thêm các thanh giằng để bàn cố định không bị lung lay hay bị sụp bàn (đối với bàn do VN sản xuất, bàn nhập ngoại có lẽ không cần)
  • Nếu bàn hay xếp ra-vào thì nên cẩn thận trong lúc xếp, kẻo các thanh giằng bị quẹo. Có thể độ lại các thanh giằng mới cứng hơn các thanh giằng của nhà sx.
  • 2/ Mặt bàn tuyệt đối không để dính nước lâu. Nếu có nước thì phải lau ngay.
  • Lau chùi mặt bàn thường xuyên, không nên lau bằng giẻ thấm nước mà lau bằng giẻ khô hay thấm tí dầu hỏa hay vecni.
  • 3/ Hạn chế chặt chém vào mặt bàn.

 

Thông tin thêm (bonus):

Điều chủ yếu làm mọi người không có cảm tình với Trường Huy là thái độ với khách hàng. Giá cả ở đây thì thường đắt hơn 10% đến 30% so với bên ngoài, nhưng thấy nhiều người quả quyết rằng Trường Huy không bao giờ bán đồ giả, đồ kém chất lượng.

Tuy vậy nếu nói về uy tín thì cửa hàng 160 Nguyễn Thái Học, số 2 Nguyễn Biểu hoặc số 2 Hàng Than cũng chẳng kém.

Theo kinh nghiệm của rất nhiều anh em box "Bóng bàn" TTVNOL thì ở đó rất hay lừa newbie cả về giá cả lẫn chất lượng…….

Hình như ở Nguyễn Thái HỌc có shop của 1 thành viên TTVNOL box "Bóng bàn" đấy

Vợt

Bác nào mới học đánh thì nên mua cốt gỗ, dễ đánh, dễ tập và rẻ hơn cốt dùng carbon và sợi thuỷ tinh rất nhiều.

Mazunov là một cây đáng bỏ tiền ra mua, tầm 350K-390K. Dán thêm 2 mặt ghép 100K/ cái hoặc 1 mặt ghép giá 100K 1 mặt 729 70-90K là yên tâm chơi được rồi.

Với cốt vợt thì dùng đồ 729 rẻ hơn nhưng không thấy bán ở VN. Chất lượng của mấy hãng Trung Của như 729(LKT) , Double Fish, Double Happiness…cũng rất là tốt.

 

hoặc là mua vợt second hand cũng có nhiều cái rất tốt

theo kinh nghiệm của bản thân tôi, dưới 300k thì ko có vợt brand new nào đánh hay bằng 3 loại sau:- Cao su đường sắt: 15k

- Song ngư: 45k

- 729 hình như 80-85k gì đó

nếu bạn định mua vợt mới thì nên mua từ off+ trở lên

jQuery animation queue, create DOM element and its properties, ajaxStart and ajaxStop events

animation queue

By default, animations are queued, but you can disable this by setting the queue property to false. Unqueued animations start immediately and subsequent queued animations are not deferred for unqueued animations.

$("img").fadeIn(500)
        .animate({"width":"+=100"},
                 {queue:false, duration:1000})
        .fadeOut(500);
  • The fadeIn() and fadeOut() effects are queued, but the call to animate() (which animates the width property for 1000ms) is not queued.
  • The width animation begins at the same time the fadeIn() effect begins. The fadeOut() effect begins as soon as the fadeIn() effect ends—it does not wait for the width animation to complete.

 

ajaxStart and ajaxStop events

  • When jQuery is not performing any Ajax requests and a new request is initiated, it fires an “ajaxStart” event.
  • If other requests begin before this first one ends, those new requests do not cause a new “ajaxStart” event.
  • The “ajaxStop” event is triggered when the last pending Ajax request is completed and jQuery is no longer performing any network activity.
  • These “ajaxStart” and “ajaxStop” event handlers can be bound to any document element: jQuery triggers them globally rather than on any one particular element.

 

DOM Element creating

You probably already know that you can pass a tagname to $() to create an element of that type, and that you can pass (as a second argument) an object of attributes to be set on the newly created element.

  • This second argument can be any object that you would pass to the attr() method,
  • but in addition, if any of the properties have the same name as the event registration methods, the property value is taken as a handler function and is registered as a handler for the named event type.
  • Similarly, if any of the properties has the name “css”, “val”, “html”, “text”, “data”, “width”, “height”, or “offset”, then the value of that property is passed to the method with the same name as the property.
var image = $("<img>", {
                  src: image_url,
                  alt: image_description,
                  className: "translucent_image",
                  click: function() {$(this).css("opacity", "50%");},
                  css: { border: "dotted red 3px" }
               });
 

Sum up from: http://answers.oreilly.com/topic/2353-5-things-you-might-not-know-about-jquery/

Take care of accessibility for web

This article is in my FASTFOOD series:

You Are Not The Default

Millions of people around the world have disabilities that hinges them from information.

If you care about a web truly accessible to people w/disabilities, follow @googleaccess team, on the forefront of alt access modes. They are active!

 

Use this site/tool to check your website

 

Read articles

http://www.1stwebdesigner.com/design/web-accessibility-guide-beginners/

http://www.google.com/accessibility/

 

Microsoft Windows Phone 7, all in one (release) day (tổng hợp)

English

Windows Phone 7 unveiled: First impressions
http://blogs.techrepublic.com.com/smartphones/?p=1710

What’s inside the first Windows Phone 7 devices?
http://news.cnet.com/8301-13924_3-20019249-64.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20

Video: Windows Phone 7 launches in New York
http://news.cnet.com/1606-2_3-50094368.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20

Video: Ballmer talks WP7, iPhone, Android, and Microsoft tablets
http://blogs.techrepublic.com.com/hiner/?p=6427

Already Planned: Copy/Paste Support for Windows Phone 7
http://news.cnet.com/8301-13860_3-20019176-56.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20 (how to)
http://www.slashgear.com/windows-phone-7-getting-cut-paste-in-early-2011-11107106/ (early 2011)
http://mashable.com/2010/10/11/windows-phone-7-copy-paste-2/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Mashable+%28Mashable%29

Windows Phone 7 Ads Save Us From Our Phones [VIDEO]
Read more (How Microsoft plans to sell Windows Phone 7 ) http://news.cnet.com/8301-13860_3-20019111-56.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20#ixzz126dhFPbD
http://mashable.com/2010/10/11/windows-phone-7-ads/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Mashable+%28Mashable%29

Windows Phone 7 debuts: One phone won’t rule them all
http://news.cnet.com/8301-1035_3-20019173-94.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20#ixzz126dK53Sb

Windows Phone 7 official: Oct 21 in Europe, Nov 7 in North America
http://www.slashgear.com/windows-phone-7-official-oct-21-in-europe-nov-7-in-north-america-11106942/

Around the world, release plan
http://www.cnet.com/8301-17918_1-20019213-85.html?part=rss&amp;subj=news&amp;tag=2547-1_3-0-20

Video: http://www.slashgear.com/lg-quantum-hands-on-video-11107226/ (LG Quantum Hands on)

Video: http://www.slashgear.com/samsung-focus-hands-on-video-11107228/ (Samsung Focus Hands on)

http://www.slashgear.com/orange-htc-7-mozart-and-samsung-omnia-7-priced-11107038/ (HTC 7 Mozart and Samsung Omnia 7)

http://www.slashgear.com/htc-hd7-for-o2-launching-october-21st-11107083/ (HTC 7, on October 21st)

http://www.engadget.com/2010/10/11/meet-the-new-atandt-windows-phone-7-family/ (AT&T Windows Phone 7 family)

Vietnamese

(Cập nhật) Tổng hợp toàn bộ về Windows Phone 7

http://www.tinhte.vn/tin-tuc-gioi-thieu-11/tong-hop-toan-canh-ve-he-dieu-hanh-windows-phone-7-a-498852/

10 chiếc Windows Phone 7 ra mắt cho bạn chọn
http://www.tinhte.vn/tin-tuc-gioi-thieu-11/10-chiec-wp7-moi-moi-anh-em-chon-498351/

Dân chơi Windows Mobile tản mát dần
http://vietcntt.com/news/sys.php?name=News&act=showarticle&sid=17365&utm_source=twitterfeed&utm_medium=twitter

HTC tung ra tới 5 mẫu điện thoại thông minh chạy hệ điều hành Windows Phone 7 mới
http://sohoa.vnexpress.net/SH/Dien-thoai/Smartphone/2010/10/3B9B31FA/

Samsung, LG và Dell cũng tung ra các mẫu di động chạy Windows Phone 7
http://sohoa.vnexpress.net/SH/Dien-thoai/Smartphone/2010/10/3B9B31FB/

CSS: inline-block for IE7

I was developing a DemoSite and have problem with IE7 (actually we’re only target IE8, but one of our module must run in IE8 emulate IE7 mode so a meta tag <meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ /> is put in the header). While Firefox is my primary browser and it’s OK with display: inline-block CSS style, BUT IE7 (and IE8EmulateIE7) does not render it.

So this is the hack for IE7 (from http://grasshopperpebbles.com/css/css-inline-block-ie7-hack/):

HTML

<div class="predefinedList">
<div class="predefinedListItem">Cross country skiing</div>
<div class="predefinedListItem">Fine cuisine</div>
<div class="predefinedListItem">Spa</div>
</div>

Put your style settings to the top,
put display: inline-block;zoom:1;*display:inline; to the bottom.

CSS

.predefinedList .predefinedListItem {    padding:0;    /* other the styles should be here */
    display:inline-block;   /* for firefox */
    zoom: 1;    /* for IE7 hack */
    *display:inline;   /* for IE7 hack */
}

Lời Phật dạy chuyện bỏ vợ ngoại tình, nên đọc phải đọc

Ðêm khuya, trong một ngôi đền, một Người một Phật, Phật ngồi người đứng…

Người : Thưa Ðức Phật thánh minh, con là một người đã có vợ, con hiện đang yêu say đắm 1 người đàn bà khác, con thật không biết nên làm thế nào.
Phật : Con có thể xác định người đàn bà con đang yêu hiện nay là người đàn bà cuối cùng duy nhất trong cuộc đời con không?
Người : Thưa vâng.
Phật : Con ly hôn, sau đó lấy cô ấy.

Người : Nhưng vợ con hiện nay dịu dàng , lương thiện, thảo hiền. Con bỏ cô ấy liệu có phần tàn nhẫn không, có mất đạo đức không, thưa Ðức Phật?
Phật : Trong hôn nhân không có tình yêu mới là tàn nhẫn và mất đạo đức.Con hiện giờ đã yêu người khác, không yêu vợ nữa.Con làm như thế là đúng.

Người : Nhưng vợ con rất yêu con, quả thật yêu con lắm ,thưa Ðức Phật.
Phật : Vậy thì vợ con hạnh phúc.
Người : Sau khi con chia tay vợ lấy người khác,vợ con sẽ rất đau khổ, tại sao lại hạnh phúc, thưa Ðức Phật?
Phật : Trong hôn nhân, vợ con vẫn có tình yêu đối với con, còn con đã mất đi tình yêu đối với vợ con. Bởi vì con đã yêu người khác, chính vì có hạnh phúc, mất đi mới đau khổ, cho nên người đau khổ là con.
Người : Nhưng con cắt đứt vợ, sau đó cưới nguời khác, vậy là cô ấy đã mất con, cô ấy mới là người đau khổ.
Phật : Con nhầm rồi, con chỉ là người vợ con yêu thật sự trong hôn nhân.Khi một người như con không tồn tại, thì tình yêu thực sự của vợ con sẽ tiếp nối sang một người khác, bởi vì tình yêu thực sự của vợ con trong hôn nhân xưa nay chưa từng mất, cho nên vợ con mới hạnh phúc, con mới là người đau khổ.

Người : Vợ con đã từng nói, kiếp này chỉ yêu một mình con, cô ấy sẽ không yêu ai khác.
Phật : Con cũng đã từng nói thế phải không?
Người : Con…con…con…

 

Phật : Bây giờ con nhìn 3 ngọn nến trong lư hương trước mặt, xem ngọn nào sáng nhất?
Người : Quả thật con không biết, hình như đều sáng như nhau.
Phật : Ba ngọn nến ví như ba người đàn bà, một ngọn trong đó là người đàn bà hiện giờ con đang yêu. Ðông đảo chúng sinh, đàn bà đâu chỉ là mười triệu trăm triệu…Ngay đến một trong ba ngọn nến, ngọn nào sáng nhất con cũng không biết, cũng không tìm được người con hiện đang yêu, thì làm sao con xác định được người đàn bà con đang yêu hiện nay là người đàn bà cuối cùng và duy nhất trong cuộc đời con?
Người : Con…con…con…

Phật : Bây giờ con cầm một cây nến đặt ở trước mắt, để tâm nhìn xem ngọn nào sáng nhất?
Người : Ðương nhiên ngọn trước mắt này sáng nhất.
Phật : Bây giờ con đặt nó về chỗ cũ, lại xem xem ngọn nào sáng nhất.
Người : Quả thật con vẫn không nhìn ra ngọn nến nào sáng nhất.
Phật : Thật ra cây nến con vừa cầm giống như người đàn bà cuối cùng con đang yêu hiện nay, tình yêu nảy sinh từ trái tim, khi con cảm thấy yêu nó, để tâm ngắm nghía, con sẽ thấy nó sáng nhất, khi con để nó về chỗ cũ, con lại không tìm được một chút cảm giác sáng nhất. Thứ gọi là tình yêu cuối cùng và duy nhất của con chỉ là hoa trong gương trăng dưới nước, suy cho cùng chỉ là con số không, một cuộc tình trống rỗng.

 

Người : Ồ, con hiểu rồi, không phải Ðức Phật bảo con phải ly hôn với vợ, Ðức Phật đang niệm chú làm cho con ngộ đạo.
Phật : Nhìn thấu sẽ không nói trắng ra, con đi đi!
Người : Bây giờ con đã biết thật sự con yêu ai, người đó chính là vợ con hiện nay, thưa Ðức Phật.

Configure XDebug with WAMP and NetBeans IDE 6.8 on Windows 7

This is step – by – step procedure (with sample):

  1. Install WAMP, default location is at c:\wamp
  2. Download latest release of xdebug for PHP version you are using.
    1. I use WampServer 2.0i [07/11/09] and it includes :
      - Apache 2.2.11
      - MySQL 5.1.36
      - PHP 5.3.0 ———> 5.3 is what we need
    2. write a phpinfo() to know what PHP compiled, Find “PHP Extension Build“  ———–>   API20090626,TS, VC6 is what we need
    3. I use Windows 7 64bit, there is nothing 64bit at XDebug (at the moment Apr 2010)  —–> so this is not important
    4. After all, this is what we should download from Xdebug: 5.3 VC6 (32 bit)   ———-> we have php_xdebug-2.0.5-5.3-vc6.dll
  3. Copy php_xdebug-2.0.5-5.3-vc6.dll file into php’s extension directory, it is c:\wamp\php\ext
  4. Now open php.ini (click WAMP tray icon, PHP/php.ini), we need to configure xdebug so that it get recognized by PHP
  5. Add following at the end of your php.ini
  6. [xdebug]
    zend_extension_ts="c:/wamp/php/ext/
    php_xdebug-2.0.5-5.3-vc6.dll"
    xdebug.profiler_output_dir = "c:/wamp/tmp/xdebug"
    xdebug.profiler_output_name = "cachegrind.out.%p"
    xdebug.profiler_enable = 0
    xdebug.profiler_append=0
    xdebug.extended_info=1
    xdebug.remote_enable=1
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    xdebug.idekey=xdebug
    xdebug.remote_log="c:/wamp/tmp/xdebug/xdebug_remot.log"
    xdebug.show_exception_trace=0
    xdebug.show_local_vars=9
    xdebug.show_mem_delta=0
    xdebug.trace_format=0

  7. Just create   c:\wamp\tmp\xdebug folder.
  8. Finally restart Apache service .
  9. Now you can write PHP code and debug with NetBeans