Leopard quick look
You can quick look excel files! Pretty amazing. That’s it.
You can quick look excel files! Pretty amazing. That’s it.
I’m working on a project where people have profile pages and we need to show a counter for how many views they’ve gotten. I saw two ways of doing this:
Google didn’t help me find any direction so I made a test. I created a table for each. In the case of the MySIAM I filled it with 10 million test records. Then I echoed out the total.
The result I found was that they basically take the same miniscule amount of time. Because I indexed the MySIAM on the user_id it optimizes really well and doesn’t seem to care that there are only 1000 views per user amongst the 10 million. Only how many views a user has. So a user with 10000 views takes longer to total than one with 100. I’m going to go with the MySIAM since it is storing richer data that may be useful down the road. Figuring I can switch to a InnoDB implementation later if I need to.
After working with Mootools a bunch on a project (2K), I think I’ll be sticking with Script.aculo.us for GC. The main reason for me comes to down to documentation, but there are some peripheral reasons.
For it’s DOM stuff, Script.aculo.us uses Prototype out of the box and I think Prototype has AWESOME documentation, the pillar of what everything should aspire to documentation wise. For it’s effects, Script.aculo.us uses a wiki. Now I don’t think this is great (I don’t love the wiki look), but the way the pages are written up do make them more approachable than Mootools. With Mootools, there aren’t a whole lot of examples and I got the sense to really get good with it, you had to use undocumented properties and methods. It felt like a class I would make ;) Plus, many of the wiki pages include functioning examples inline, which Mootools relegates to another non-exhaustive section.
I’m also gonna use Script.aculo.us because I like how it’s effects have a delay property, which is super handy. And it uses the existing CSS properties as it’s starting point for animations. And it has more (and more useful) built in effects.
The main reasons I would recommend Mootools over Script.aculo.us is that their download page is the sickest thing ever and it’s domain isn’t a pain in the ass to type. I HATE the name. I hate having to use command-v over and over again to insert it into this blog. Also the Mootools site is more slick looking. But these aren’t really reasons to use it over Script.aculo.us.
Here’s another interesting query. Say you want to get a list of items, ordered by something, lets say date. But you want a particular row at the top, it’s special. Well check this out:
SELECT id
FROM games
ORDER BY id=5 DESC, dcreate DESC
“id=5″ converts to a 1 if true, 0 if false on all the rows that are returned. By ordering that boolean by DESC, you put the 1 at the top. The rest are all 0. Thus, you have your special row with id=5 at the top and the rest ordered by date! I’m guessing this doesn’t optimize super well, I guess we’ll see.
Check out this query:
SELECT
games.title AS game,
GROUP_CONCAT(DISTINCT artists.name ORDER BY artists.name ASC SEPARATOR ', ') AS artists
FROM games
INNER JOIN tracks ON tracks.game_id = games.id
INNER JOIN artists ON artists.id = tracks.artist_id
GROUP BY games.id
I want to get a list of the soundtracks of all the games. The list should show me the name of the game and all of the artists that contributed to the soundtrack. I didn’t want to do two queries to select first the games and then the artists. This GROUP_CONCAT function saves the day. When you’re doing a grouping you can use it to join the columns that were collapsed with some separator, like they were an array! Nice!
You can’t directly enable smooth on FLVPlayback instances. But you can use the following code:
video.getVideoPlayer(video.activeVideoPlayerIndex).smoothing = true;
Where video is some FLVPlayback instance. Credit goes to this forum post.
I was looking for a way to get screen sharing to work better when people are looking at my screen. Because I have two monitors, one of which is really big, I was hoping there would be some way to only share one monitor. So far I haven’t found a solution (please tell me if you do), but I did find this article on other sharing enhancements.
