Infographic of the year.
Thank you, webmonkey.
I had to deal with New Math briefly when going through school. Even then I found it to be pretty stupid. 2 + 2 = 4 no matter how you feel about it. But this site just might make me change my mind (not about 2 + 2). A subset of the new math equations:
This last is probably the most accurate assessment of weather forecasting around.
One of the first things I noticed is that it, in FireFox at least, it takes up a lot of resources. Like 50% of my system resources (or 1 CPU). And it’s currently doing the same with Safari on a Mac. To be fair, I haven’t tried it in Chrome, which is the point of the app.
They should totally add another option – Stephen Fry.
We all know the story – we’ve got a web page that’s pulling a lot of data from the database. In ASP.NET, the Gridview object will handle the pagination for you, but you still have to pull all of the data from the server. Using the ROW_NUMBER() option, we can return just the records we need to display for the page, defined by the starting row number and the number of rows to return.
This is the SQL snippet generally presented as the solution:
SELECT TOP (@rows) * FROM ( SELECT fips, county, state, pop2000, area ROW_NUMBER() OVER (ORDER BY fips) AS num FROM dbo.Counties ) AS a WHERE num > @startrow
which gives us @rows worth of counties from the @startrow position after the results are sorted.
But what if you want the results returned as XML data? My solution is to use a common table element to determine the result set first and then format the XML from the CTE.
WITH CTE AS ( SELECT TOP (@rows) * FROM ( SELECT fips, county, state, pop2000, area ROW_NUMBER() OVER (ORDER BY fips) AS num FROM dbo.Counties ) AS a WHERE num > @startrow ) SELECT fips AS '@FIPS', county, state, pop2000, area FROM CTE FOR XML PATH('County'), ROOT('Counties')
You get an XML stream like this:
(These are not the real statistics by the way.) And usually I also return the row number as an element/attribute.
From here, we can use an XSL transform to parse the data into our final format. Now, I haven’t done any query analysis on this or compared it to a temp table situation, but it is quick to implement.
So dishwasher detergent containing phosphates have been banned in Spokane County, Washington. Sounds great, right? Well, not really when a lot of the residents just hop the Idaho border to stockpile Cascade. The reason – the eco-friendly, low phosphate options don’t work very well with hard water. The Washington Lake Protection Association suggests installing water softeners so the eco-friendly detergents work better, but that just raises another issue – increased salinity from the waste water from the water softeners. Water softeners are already being banned in some parts of the country.
So which is worse: high phosphate loads or high salinity? Bearing in mind that the phosphate, more than nitrogen, might actually drive the algae blooms we’re trying to prevent.
Can we come up with a third option?
California is talking about banning black or dark color cars as a way to reduce carbon emissions. The reason – it takes more to cool the car off after a few hours in the sun.
Don’t get me wrong, I’m all for reduced carbon emissions and conservation, etc, but after many years in the desert southwest, I can tell you that it doesn’t matter what color your car is, it will be smoking hot inside if you leave it in the sun. I owned a black car at the time (and was pretty happy with the 34 mpg it got in town) and I don’t recall ever getting into anyone else’s light-colored car and saying “Wow, it’s so much cooler in here than in my car.” Nor do you ever see anyone say that a child or pet died because the car they were left in was black. No, they died because because temps inside a car can reach 140 F very quickly regardless of color.
I’m just not buying this as a meaningful solution to global warming. Can anyone say green-washing?