Hey, I have some questions that would help me work faster.
In SQLyog, or MYSQL in general, is there any way to quickly view the last, say, hundred rows of a table automatically? You know, without having to select count(*) from the table (which gives me 2469207), then make a select * … LIMIT 2469107, 100; ?
Also, in PHP Eclipse, I like how I can paste in an SQL statement into a string, then hit enter and have Eclipse add end and start quotes and an append operator (.) at the end of the line automatically, to make my SQL statement pretty.
My question is, when I’m debugging, a lot of times I have to put that statement back into SQLyog (or MySQL Query Browser, or whatever). Is there a way to have one of these programs *remove* those quotes for you?
Note: One trick I’ve been seeing programmers do lately is open double quotes, paste in the SQL as a paragraph on a new line, make another line break, and then close the quotes with a semicolon to make the code block easily copy and pastable. The problem is that I’ve seen the SQL query blow up in PHP every once in a while when the SQL query starts with a new line. It happens erratically so I’m still trying to replicate it. Meanwhile this sqlyog product enhancement would be sweet.
To make this post worth reading, here are two eclipse tricks I recently found out about:
If you’re using CVS, and you go to Team > Show Annotation, and use QuickDiff, you can see line by line who last edited that line. This would be great for project managers or for getting help from fellow coders!
And to indent a bunch of code, you can highlight it all and hit tab to indent it more, or shift-tab to indent it less.
After reading that someone on digg thought Wario Ware Smooth Moves would make a great party game, and that other games such as wii play had sold out on preorder already, I preordered a copy from Amazon. It arrived two days ago and it’s quite a lot of fun. Some of the games are frustrating, such as the waiter hold games, because they demand that the wiimote remain level as you move it left and right, but it doesn’t register on my projector and wireless sensor bar unless I either angle it up (forcing me to lose in most games) or hold the wiimote flat way above my head and move my whole body left or right.
Nonetheless, it’s a fun game and I was excited to try out multiplayer.
So my friend comes over last night, we turn on both wiimotes, the wii ‘siis’ them (sorry), and we start the game. And then one of the remotes turns off. We go to the game select screen and it only allows you to play ‘single’. We hit pause and go to remote setup, detect remotes, but the second one just blinks continuously and doesn’t turn on. To make things more confusing, occasionally the empty battery icon blinks on the screen, making us think the batteries were dead. (But I just replaced them!) We replace batteries in the second remote, then the first, but it didn’t help. We hit reset connection on the wiimotes and on the wii, but the second one wouldn’t register. We reset the wii twice but it kept happening. We switched player 1 and player 2 on the wiimotes but then the other one wouldn’t work. I even unplugged my bluetooth mouse and keyboard from my adjacent computer thinking it was interfering. I seriously was upset that my wiimote was broken.
Then I realized. Wario Ware is only one player and it’s disabling my other remote. There’s no indication of this, the wii remote screen will look like the battery is dead in the second wiimote. There’s even a screen where you choose “single player” or “newspaper” in warioware, and the newspaper was disabled. (WTF? Why have this screen?) The Wario Ware box has a picture of a wiimote and nunchuck, but doesn’t say anything about being single player.
It turns out, I read online, that there is a multiplayer mode that unlocks later in the game. (Ah, so that’s what that screen is for. Why show it and confuse people in the beginning though?) However, in multiplayer mode, you all share the same wiimote. Wario Ware will disable all your other remotes while the game is in session, and the manual, box, and game won’t tell you it’s doing so.
Having not played earlier wario ware games, this is very different than the impression I got from all the hype surrounding the game, I thought the minigames could be played simultaneously and the game would reward whomever completed the level first. This is not the case. After figuring out that my wii is not broken and the game is more or less single player, I can still say the game is fun, but not what I expected.
I got three security alerts from windows firewall booting up my machine this morning, about phonenumberregistry.exe, bluetoothdispatcher.exe, and rendezvous.exe. Worried, I googled them, and found one match that said they were related to the Nokia series 40 SDK. Which I just installed yesterday. Whew.
If you haven’t installed an SDK and are getting these errors, maybe be a little more worried. I guess this should be a lesson in naming your services with non-scary names (like phone number registry, jeez.) (I guess malware hackers do this for the most part anyway.)
On a side note, what the hell is wrong with windows firewall? I mean I’ll get these notices about outgoing connections, which is great, and the options to “keep blocking” or “unblock”, but while this dialog is displaying, windows is already allowing the program to communicate back and forth. What’s the point of that? I’ve played whole half life 2 games and then came back to the desktop where it says “windows firewall is blocking (half life 2). Should it continue blocking this program?” And I want to sarcastically say, “yeah, great job, windows.” But I hit unblock in case it actually ever starts to do anything.
First of all, you shouldn’t be using internet explorer. I hope you know why. IE was vulnerable for 284 days in 2006 alone, compared to Firefox which was vulnerable for 9 days. By using IE you’re exposing yourself to all sorts of vulnerabilities, including adware, spyware, and viruses, simply by browsing unsafe sites. Most of the sites you go to may be safe, but even large sites like myspace had adware bugs last year. In addition, there are tons of sites out there that infect your computer when you just type the wrong URL, such as googkle.com (link goes to security warning, not googkle.com).
Now, if you’re on a mac, you may complain that firefox is too much of a hog, it’s too slow for you. And I’d agree with you. Use Safari, or Opera, or something, just not IE.
Now that I’m at a job with a PC again, I’ve been discovering the joys of firefox. I love the live bookmark feeds–I’m subscribed to digg, fark, slashdot, make zine, woot, nytimes, the onion, and craigslist. I use a bookmarks’ full titles add-on that shows me wider (more) titles per feed, albeit still not all of them.
Finally, I just discovered adblock, an extension that lets me simply right click on any image and block it forever, or even any image from the source site. Goodbye horrible shaking, flashing ads! Blocking flash ads is a little harder, but you can hit control-shift-F to disable all flash on a page, and control-shift-A to list all blockable elements on a page, including the flash ads that you hate.
I’ve been waiting for a feature like this for a long time. Finally it’s here! That plus yahoo mail beta may convert me to using Firefox even on the mac.
One thing I miss from the mac is the ability to retain sessions even when all windows are closed. On macs, you can close all windows and the application will remain open, meaning in the case of browsers, you can close all windows and then still open a new one, go to yahoo mail again, and still be logged in.
My solution is to always keep a firefox window open on my least used desktop, desktop 4, using the wonderfully awesome and free Virtual Dimension desktop manager. As long as the window remains open on desktop 4, desktops 1-3 can have all their firefox windows closed and I’ll still keep my multiple mail sessions.
Virtual Dimension deserves its own article, but I’ll briefly mention how it’s improved my life–you can configure hotkeys to switch between desktops, and have unlimited desktops, with a different wallpaper on each one. It’s multi monitor compatible, and combined with ultramon, a commercial app I use that extends the taskbar onto a second monitor, I can easily switch applications from desktop to desktop or monitor to monitor, and switch between them easily. I have desktop 1 devoted to work – eclipse on monitor 1, SQLyog on monitor 2; desktop 2 devoted to email and music – outlook on monitor 1, itunes on monitor 2; virtualization and remote desktops to desktop 3 – timbuktu to my mac on monitor 1 and VMware and Ubuntu on fullscreen on monitor 2; and procrastination and websurfing on desktop 4 – the always open browser to retain my sessions, additional web email, digg, etc.
Now I’m working on getting drempels, my favorite free visualization app, to work on multiple monitors.
I found this hint on macosxhints.com a while ago but keep having to dig around to find it again, so I’m reposting it here.
If Timbuktu locks up on your computer when you’re away on you and you have SSH enabled, you’re in luck: First, ssh in, and type:
ps -aux | grep -i timbuktu
Note: make sure your terminal window is wide enough or ps ‘s output will not display the full path of the processes running and it won’t match. Use ps -aux and search manually if the grep doesn’t find anything.
look for a process ID for timbuktu. Then type:
sudo kill ###
where ### is the process ID.
Finally, paste this in to restart timbuktu:
sudo ‘/Applications/Timbuktu Pro/Timbuktu Pro.app/Contents/SharedSupport/TimbuktuInstaller’ ‘/Applications/Timbuktu Pro/Timbuktu Pro.app’
You should be in business!
Just a note, Timbuktu 8.5 seems to hang up a lot less but occasionally this is still necessary.