6,559 karma · joined Jul 6, 2009 (17y ago) · 2,470 submissions
comment 8y ago · link · parent
begin;
select id, new_rating into temp_ratings values (1,25),(2,94),(3,16);
update table place set rating=new_rating
from temp_ratings
where place.id=temp_ratings.id;
drop table temp_ratings;
commit;
Scales well, and almost all db engines know how to do that join. You can index the id, or use a temp table, or whatever depending on the shape and quantity of your data.(edit -- actually finished the post)
comment 8y ago · link · parent
comment 8y ago · link · parent
And hopefully one that doesn't rely on external inputs, and has a water supply that's not affected by climate change.
Learning how to farm it is essentially equivalent to currently farming it, or if not, then you need a few years of supplies to make it over the startup transient. With no reliable external input.
comment 8y ago · link · parent
When I design a DB system, Ideally the production 'user' can only do those things that we reasonably expect them to be able to do, and truncate isn't one of them. Also drop tables, potentially delete entries, and any maintenance tasks. DDL modifications are right out.
Those tasks can be run from a specific user, and locked down to a certain types of connections that aren't allowed from production.
comment 8y ago · link · parent
Escape, slow as hell. Brushing the touchbar and bringing up the man app on some random argument, useless and annoying.
It’s gotten a lot better now that I’ve switched it from context to function keys, and am using an external keyboard 95% of the time.
It’s really my third favorite laptop to use in the house, behind a 2012 MBA and a Thinkpad t410.
comment 8y ago · link · parent
LRFD puts a 1.2-1.6 multiplier on loads (and at time less than 1 for cases where you're relying on it for balance), and resistances are in the .8-.9 range.
I never did a whole lot with the Factor of Safety era codes, but they were generally in the same range once you multiply out all the factors. (As you'd expect, the newer codes tended to hit about the same design point, with some deviations.)
There are two main things to keep in mind here:
* A factor of safety is for normal variability in loads and normal variability in material/connection strengths. It doesn't cover you for blunders.
* The loads that are calculated are the extreme loads on the system, not the normal loads. 1.4 DL + 1.6 LL + 1.2 WL is often the design envelope, and that's... a lot. Add a huge factor of safety on that and you're into physically impossible cases. Like, people are being crushed to death if you get more than 300psf of human load over a significant area, but the typical Live Load is in the range of 100psf. (Now books on a reference library moving shelf system? That's 300psf)
From what I've seen of this bridge, there was no live load at the time, so it's unlikely that it was overloaded as designed. If I was doing failure analysis, I'd be looking at a combination of factors, and the ones I'd start with are the shop drawings vs. the engineer's plans and the quality of the concrete materials, placement, and curing.
comment 8y ago · link · parent
Now, there’s dead load, live load, wind, etc, and they’ve all got different uncertainty factors. Resistance factors are assigned based on the variability of the material, concrete more than steel, and fracture critical higher than redundant.
comment 8y ago · link · parent
An easy thing to check is the hot water tank. If it's not well strapped to studs, then I can't imagine anything else has been done. If it has, then at least you know that has been done, it it doesn't really tell you anything else.
I know when I was selling my house in Wa, that was one of the things the inspector looked for, so it's highly probable that it's been done, as its quick and easy.
Inspections are the only way to know for sure, but it can be invasive to get into the walls enough to see.
comment 8y ago · link · parent
Building codes for new construction do most of the obvious now, the walls are tied to the foundation, there are shear panels.
5 to 15 stories is the worst height range, but shorter buildings can be bad if they're very asymmetric, like one with a parking under a two story appt, with one shear wall and poles for gravity support.
otoh, in a big enough earthquake, anything will be damaged.
comment 8y ago · link · parent
Permits are from the county health department. Apparently poor septic systems wind up polluting ground water with fecal coliform.
comment 8y ago · link · parent
It's several hundred to get it pumped every couple of years, I think I'm remembering in the range of $600 and just shy of 3 years between pumpings.
Then the well needs power, and someone needs to do the generator in a power outage, or you get to chip in for a spiffy one with an autostart, and the only time the well head ever acts up is on national holidays when if you can get someone out, it's 3x overtime.
You know, I kind of like city water now.
comment 8y ago · link · parent
1) Talk with the state insurance commissioner. Make sure that your paperwork is in order, and then file a formal complaint. Mentioning this when talking to insurance company reps will get you booted upwards to people who are more able to help you so that the to make their problem go away.
2) If you have a case that's a clear compelling class, talk to a lawyer after the first appeal.
Background: My son had some prescribed therapy for a mental health condition that I was told would be covered when I talked to the insurance company. They subsequently denied the claims, then backpedaled on the first month because "I'd been told that they'd be covered.", but the subsequent months were not covered. I was left with a several thousand dollar bill. Washington State has the Mental Health Parity act, which states that mental health treatments must be covered to the same extent as rehab or surgical treatments. The insurance company ended up losing 2 class action suits, (a federal and a state) and paying $6.4M to repay all the class member's denied claims and an agreement to not deny claims in the future.
comment 8y ago · link · parent
What I see as one of 5 maintainers of an open source project is that when a review comes back with a bunch of formatting comments, it's because the reviewer didn't step back and see the other parts. Raymond Hettinger has a talk where he discusses it, but it's the sort of feedback that can be given in almost any case and can obscure the more fundamental issues with the code.
comment 8y ago · link · parent
What I look for is:
1) What's the problem being solved? Does this look like a reasonable approach? Is the code pythonic (Obv: for python)?
2) What edge cases are there? Does this handle the important ones? Does it punt properly on the less important ones?
3) Look for a short list of bug classes that have come up in the project before that have lead to emergency patches. E.g. Decrefing, Checking mallocs, any exec sorts of things. (This is a clear application for a checklist)
4) Are there tests/documentation/other required fixtures and stuff?
5) Does the code generally match the style of the project?
1000) Code formating and whitespace and line wrapping and all that bikeshedding stuff.
Feel free to short circuit anywhere once it becomes clear that there's more work required.
comment 8y ago · link · parent
This is why when there's a tsunami warning, boats are supposed to leave the harbor, where it's dangerous, and get to sea where they won't notice the wave.
comment 8y ago · link · parent
The water column height on these buoys is a pressure transducer on the floor of the ocean (http://www.ndbc.noaa.gov/dart/dart.shtml)
The time skew of the events is small, but does exist. They're all within minutes of the 9:31am gmt earthquake, getting longer as you get away from the epicenter. i.e, way faster than a tsunami travels, but about how fast an earthquake travels. (Earthquakes spread in x miles per second, tsunamis in x miles per minute)
I _think_ what you're seeing is the pressure sensor picking up the earthquake and converting it to a water column height.
comment 8y ago · link · parent
(The most common one is breakoff studs on the bolts, which actually speeds thing up because the wrench can grab the nut and the stud on one side of the connection and torque away till it pops)
comment 8y ago · link · parent
All of you are defending the castle from an onslaught of baddies coming in from the forest. Everyone gets cards each round to spend/trade that can damage/kill/repair with various restrictions. As with a lot of cooperative games, it starts easyish, and then things get harder.