epalla.com

reddit reddit

Kristen Bell's sloth melt down on Ellen
Santorum Tells Sick Kid Not To Complain About $1 Million Drug Costs Because People Pay $900 For An iPad
The front page of Reddit on the front page of The Star Tribune. (x-post)The front page of Reddit on the front page of The Star Tribune. (x-post)
How I feel as a-
Like a boss.
"If they want to say God sent me, that’s fine. I think Reddit did it." - TheLake
1 Raptor, 1 Mustang1 Raptor, 1 Mustang
Graffiti from ScotlandGraffiti from Scotland
Pac-man dress... hotPac-man dress... hot
The captain is coming! Quick, do something important!

Updated: 02/08/12 05:00 am

Latest Comments

JamesI know, Fuck Javascript. I spent at least an hour implementing a
SatanThis is exactly what I was looking for, didn't notice the differe
Mattk.
92.625sean, all i think your's is good for is hanging clothes on. ma
MattNope. That all came to a screeching halt when I messed up my ank
seanpr123... Still hitting the stationary?
MattFor some reason the idea of Drew rocking out to this song puts a
DrewLOL! I have been guilty of listening to this song as well. Very
JoshAbout every 5 years or so I need a reminder of how amazing the Mi
JoshSo I saw this one opening night, also in 3D, and have been waitin

M
a
y
31

I’m thinking in the $250 – $450 used range. I want a road bike so I could (in theory) keep up with Brandan, but not some hardcore ridiculous thing that I can’t go near without padded shorts. There are lots of varieties, heights, wheel sizes, pedal types, etc. etc. that I have to look into. I may head down to re-cycle in Uptown sometime this week to look into it.

I’m not sure I see myself commuting to work, but I need a good way to get out of the house every now and then

M
a
y
29

I’m mostly posting this for my own future reference. This is the simplest example in the world for exporting from a simple SQL query to an Excel file while preserving row headers.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// assuming we got our query from an htmlspecialchars encoded, slashes added POST
$z = htmlspecialchars_decode(stripslashes($_POST['query']));
$q = mysql_query($z);
$result = '';
 
// add the row headers
$numfields = mysql_num_fields($q);
for ($i=0; $i<$numfields; $i++) {
	$result .= mysql_field_name($q, $i) . "\t";
}
 
/* cycle through the query and add each row, note the casting via &$val and the \t separators for new columns.  Using commas, semicolons, etc. will create a .csv but Excel will not interpret it correctly as an .xls download */
while ($r = mysql_fetch_assoc($q)) {
	$result .= "\n";
	foreach ($r as &$val) {
		$result .= "$val\t";
	}
 
}
 
header('Content-type: application/ms-excel');
header("Content-Disposition: attachment; filename=report.xls");
header("Pragma: no-cache");
header("Expires: 0");
echo $result;
M
a
y
28

In a project I’m working on right now I’m making a dynamic reporting application. Basically I’m trying to take what I can do easily with a few lines of SQL and turn it into a usable interface for people who don’t know what they’re doing. It has summary reporting (group by), filters (wheres), etc. As you can imagine, this system has a plethora of fields that can be selected to be included in the report. No big deal, they’re all dynamically generated anyway. The catch is when I want to save a report, effectively restoring selections from a database.

Read the rest of this entry »

M
a
y
23

I used to love killing time by reading the long and damned interesting articles on Damn Interesting. Alas, I have gotten through the entire archive. At least, all of it that looks interesting. This blog is awesome, yet they haven’t posted anything new since October 2008. This is unacceptable.

Come Back, Damn Interesting.

M
a
y
22

The weeks have been cruising by way too fast lately. It feels like the weekends go straight to Sunday evening and I’m stuck going “how the hell did that happen?”. Hopefully Memorial Day will be a nice little break. I plan to spend it shopping and killing zombies.

Jess and I signed our new lease yesterday and we have the new place on June 20th. We’ll have both apartments for the last week and a half of June which should let us be pretty relaxed about moving. So – if anyone wants to come visit that week or the last weekend in June we’ll have an extra apartment :) . The new unit is right across the street and quite a bit bigger than our last one (for $10 less a month – woooh savings). We also have real live guest parking now so you guys won’t have to search or pay for parking when you come downtown.

It still hasn’t quite sunk in that we’ll be moving yet. Time has been flying lately though so I suspect the next month will go by super fast.

M
a
y
21
M
a
y
20

As you may or may not have heard, Microsoft is due in European court in June to defend itself for bundling Internet Explorer with Windows. Opera started the suit, claiming that IE “harmed the web” and demanded that IE be unbundled. Since then Google and Mozilla have jumped on the gravy train, and who can blame them?

But it’s pure bullshit. An operating system has to come with a browser. I don’t think anybody is seriously suggesting that MS should not bundle a browser with Windows (although that would be a great “fuck you” in its own right). So what are we really saying here? They should bundle a competitors’ product?

Nevermind that Microsoft has a legitimate case about google becoming a de-facto search monopoly if virtually any other browser is bundled (Firefox, Opera, and Chrome all use Google as the default search engine). What on Earth makes the EU think they can force Microsoft to bundle a competitors’ product?

Read the rest of this entry »

M
a
y
18
M
a
y
18

So Roger Federer upended Nadal on Clay to win the Madrid Open, his first title since October. I’ve been pulling for him since the last couple of heart breaking wins Nadal has pulled out against him in major opens. For some reason Federer just falls apart against Nadal all the time, so it’s good to see him pull one through.

I sure wish the two best players in the world were a bit more evenly matched. It’s sad to see Federer kick so much ass and then just lose his cool completely against Nadal.

M
a
y
16

My dad’s 98 Expedition is about at the end of its useful life. He’s well into the 100ks and it’s about time for a new vehicle. My dad really felt the sting recently when gas was up over $4.00/gallon. The listed mileage for his truck is 12 city / 16 highway – and that’s before the EPA raised the standards and before he put a bill of miles on it. If you’re filling a 24 gallon tank every week, well, you do the math.

Long story short, my dad is now looking into buying a midsize SUV. He needs something capable of hauling our boat and some occasional lumber. No problem, shouldn’t be tough to find a midsize SUV that beats the Expedition for fuel economy right? Except my dad doesn’t want to stop there. He wants to buy a hybrid midsize SUV. Specifically, he wants to buy a Toyota Highlander Hybrid.

Read the rest of this entry »

M
a
y
16
M
a
y
13

I guess this is the first post here now, woooohooo. As you can see I’m making a lot of changes on epalla. The most noticeable being the giant blue rainbow on the right side of the site (and the new template in general). This is still very much a work in progress; hopefully I’ll have it up and running beautifully by the end of the weekend.

As you can see there are a few big things missing. It is my experience that most of you who still visit the site occasionally do so for the links in the digg widget. It’s gone right now but never fear! It will be back, I think. In the meantime if you can’t live without those digg links (hah) you can get to them here.

To be honest, I’m not a huge fan of digg anymore. Most of the same stuff comes on reddit earlier and the discussion has some real substance to go with the one-liners. I don’t know if I’ll ever stop going to digg completely, but don’t be surprised if it’s a reddit widget this time around and not a digg one.

Read the rest of this entry »