编程

Handle KeyDown during a drag drop. Or keydown event not workign

I need to handle event "KeyDown" while user drag and drop is working. Example of use. When user click "alt" some image under cursor will be changed and user can drop additional item data. But KeyDown not working at all! Only esc button!! Please help. I really need to determine event. P.s. I tried...

str_pad with a float in php?

I am looking for the best way to str_pad floats in php. The problem I am having is that str_pad takes into account the string length but with a float there is the decimal point. If I want a number padded with zeros this becomes a little bit of a nightmare. For example if I need the number to always...

Designing many to many relationship between three entities

I'm having trouble modelling this situation. I'm designing a location-based coupon system. A user can define zones and offers and then associate each offer to multiple zones. Also each zone can have more than one offer. So zone and offer have a many to many relationship. The user entity owns both...

Side-by-side view in Vim of svn-diff for entire directory

I have a MacVim setup on my OSX machine so that the default Vim application (ie: /usr/bin/vim) is actually a symbolic link to the command-line version of Vim that ships with MacVim (ie: /Applications/MacVim.app/MacOS/vim), as it provides some key benefits over the stock Vim that ships with OSX10.6....