Browsed by
Month: November 2010

Portland’s Recent Bombing Attempt

Portland’s Recent Bombing Attempt

Recently, Mohamed Osman Mohamud, a Somali-born, 19 year-old student from Oregon State University attempted to detonate what he believed was a vehicle bomb amidst the hundreds of spectators at the annual Portland tree-lighting event.  I was only 10 or so blocks away watching from the 30th floor of the Portland City Grill.  Turns out he wasn’t working with fellow confederates, but had unwittingly been snagged by undercover FBI agents.  He fell on their radar because his own father apparently wrote to the FBI and warned them about his son’s extremist viewpoints.  Mohamed tried to contact militants in other countries, but the FBI intercepted instead.  Following his lead, the FBI supplied him with a dummy van bomb which had 5 or 6 55 gallon drums of (what he thought) were explosives.  The van was parked on the tree-lighting block and he walked (past my building) and activated the dud via cel phone right in the middle of the event.  Obviously it didn’t go off and he was immediately arrested.  Many have already called up the very likely charge of entrapment; but that will likely have to be decided in the courts.

Unfortunately, the night after the bombing, a mosque that Mohamed sporadically attended was set on fire.  Arson is highly likely based on the early evidence.  Fortunately only the office area was damaged and police are now running extra patrols around other mosques in the area.  The mosque very quickly and publicly denounced Mohamed’s actions, and there has been no evidence any radical element is present there.  So far there is no evidence that Mohamed appears to have contacted or worked with anyone from the mosque on his plans.

Unfortunately, this has revealed a general anti-religious attitude here in Portland/Oregon that I’ve run into before from what seem very well educated, self-described as open-minded, and well meaning folks.   On OPB’s Think Out Loud radio show, a comment appeared on their live blog they read from while doing the show.   The following comment was made, and struck a chord because I have heard it at a number of times at dinner parties/etc:

Religious people of all faiths are the problem. They are the cause of hatred, violence, misinformation, and ignorance throughout the world. The rest of us are dragged along in the wake of their poor behavior, we are associated with them because of the country we live in and the politicians they elect. Muslims aren’t the problem, all religions are the problem.

A number of people responded, but I liked this one best:

I disagree with your argument – not least of which is because it’s a contradiction.  You say religions are the problem, but say Muslims are not.  Do you realize what makes a person a Muslim is their identification with a religion?  Why did you assume it was his religion when his own congregation condemns his actions and he didn’t appear to get support for his plan or ideas from them?  Do you support the people that tried to burn down his Mosque because religions are to blame even though there is no proof to their involvement?

Secondly, you indicate that religions are the the cause of these problem.  It’s far too simplistic and wrong to say religion is the the sole source of this kind of brutal hatred in the world. How about the purely political and ideological killings of rebel groups in Central and South America?  Or the purely monetary murders of drug cartels in Mexico? The atrocities of the Kamier Rouge and Pol Pot, or the wholesale rape and hacking off of limbs by African militia groups?  Somolian death squads?  None of these groups are based on religious principles/backgrounds.

I agree with croyfp – it’s extremism of ANY ideology: be it political, ideological, religious, monetary, or otherwise that causes folks to feel the need to destroy those that don’t believe in what they do.  In fact, I can see a bit of this kind of hatred and anger in your response that desires to destroy something you don’t feel is right in your eyes. A true desirer of the good seeks to take what is good, and correct what is bad via reasoned argument and dialog.  An extremist says it must all be destroyed.  So where do you find yourself in your statement?

People desire to hurt others when they themselves have been hurt and not found understanding or healing; so they try to hurt others so that others have to feel the hurt and helplessness they themselves feel.  We won’t make a dent in extremists like this until they are allowed to be heard or at least given models to help guide them through their anger.

You can find the whole dialog and program here.  There were some pretty good comments.

Portland’s $600 million biking plan

Portland’s $600 million biking plan

(this got stuck away in the ‘filed for later’ bin and I’m cleaning them out)

I’m not one that writes to reps often, but lately I sure have been.  Especially after Portland just passed a $600 million biking expansion plan in Portland.  Now I’m a fan of biking and exploring alternative transportation – but Oregon just forced a ballot measure vote on two new ‘Emergency’ tax increases to pay for basic services such as schools – both of which passed.  I have a really terrible time looking at people spending $600 million on these sorts of plans when basic services are in emergency mode.  But at any rate, there’s more to the story.

A few facts:
$600 million plan is a 20 year plan, and it is not actually funded yet.  It was just passed with funding to be figured out in the next 30-90 days.  The mayor is quoted as saying that his first thought on funding will be that once the big pipe project is finished, he’ll start diverting money from that project.  Problem is (as one writer pointed out), that money comes directly from water and sewage bills that were raised to nation-high levels to fund big pipe.  So, instead of dropping your taxes after big-pipe is fixed, your water bill would now start funding a bike project.

A few very notable and interesting quotes from sites:

“I propose that one way to help pay for these biking and pedestrian programs would be to license bikes with a yearly fee.  I think we could also increase public safety if the bikes also had to get a quick mechanical and safety check just like a car is required to pass.  It could also be used to ensure the rider has a proper helmet, lights for night riding, reflective gear, and other legally required safety equipment.  We have a lot of local bike shops in the area; and they could check out these bikes and issue these simple sticker permits that are attached to the bike like a yearly license plate sticker showing I’m up to date.  If the permits were numbered, it would also be a good way to track stolen bikes.  It would certainly help create and/or keep jobs at these local bike shops – especially in these tough times.”

(to the Portland Transportation commissioner) “Your choices as Transportation Commissioner openly, blatantly, and consistently discriminate against my use of TriMet’s bus system to get around.  As Transportation Commissioner, you have blamed buses for street conditions, when buses are but a small user of the road system.  You have openly, actively sought out regional transportation funds serving cities as diverse as Troutdale, Forest Grove and Sherwood to fund the Portland Streetcar – a development project that was somehow tied to transportation and thus raided money used to improve the bus system. And you demand TriMet pay $3 million a year to subsidize that system – that’s $3 million a year not going to regional transportation.

And then you have the gall to say we can’t afford another pet project. Remember: Portland extends from Raleigh Hills to Gresham. And it’s your job, as Mayor, to represent – and support – each one of those citizens. That means that guy living on S.E. 163rd Avenue is just as much a Portland resident as one downtown – and deserves an equal amount of investment (since you take an equal amount of taxes from them).

Now: Can we afford your bike plan – AND meet your promise to your constituents at the same time? Or are you playing favorites with your special interest groups again?”

The key is MOV EDI, 0×9C5A203A

The key is MOV EDI, 0×9C5A203A

That’s the assembly instruction you need to unlock a secret ‘debug mode’ on AMD processors since the Athelon.  While you need to be in ring 0 to execute it; it did bring up some interesting possibilities of using the special debugging mode for reverse-engineering operation of the chip, accessing possible new features, or presenting a chink in the security armor.  So far, the security problems don’t seem to be probable, but if they cause undocumented resets/etc – they might be.

Anyway – interesting article.  Original posting here.

Cartalk conundrum

Cartalk conundrum

The guys from Car Talk have weekly puzzlers, but this question wasn’t a puzzler, but this came from a truck driver who called in.  He said (basically):

“I have big cylindrical tanks on my truck that lays sideways under the foot step.  Problem is that my gas gauge is broken.  I have a stick that I can put in vertically, so if the gas is at the 20″ mark on the stick, it’s full.  If the gas reaches the 10″ mark on the stick, the tank is clearly half full.  Where should I put the 1/4 and 3/4 marks on the stick?”

First you’d think they should be at 5″ and 15″, but that’s not right because the tank is round, which means the bottom and tops have less ‘volume’ per inch of height.   Then you think this is a problem is an integration problem – which it can be – but the integration becomes extremely hairy.  Then, you find you can back up and use a geometric method (and when you can’t reduce anymore) use a numerical method to solve it.  So let’s get started!

We see that needing the actual volume of the cylinder is unimportant since you can solve this problem with just the cross-section – which is a circle.  What you want is a circle with a chord across it in which the volume between the chord and the outer wall is 1/4 the capacity of the circle.  So, you draw a diagram, and get started!

Unfortunately, you see that the equation becomes very difficult to solve analytically – and one must resort to numerical methods to get an actual solution.  I used the Mathematica online site, but you could easily use the Newton-Raphson method as well.  Whatever way you use, you find that he should mark the 1/4 tank line 5.96027 inches from the bottom of the stick.  3/4 and 1/8th values are also shown.

The value of this equation can quickly be used to calculate 1/8, 1/16, and all other desired fill marks by simply changing the 1/4 * pi * r^2 line whichever fraction you’d like. In fact, you can graph it to get any value:

Ignoring negative volumes, you see that the tank’s volume compared to it’s theta (roughly equivalent to height) forms a S curve, so that you can see that the height changes more rapidly w.r.t. volume when close to full/empty than in the middle – just like we’d expect.

So, that’s your answer.  Turns out, others have solved this since it’s a common problem with all kinds of other tanks (fuel oil, gas stations, etc).  Here and here are other solutions that verify the same process and confirm that the final equation is unsolvable analytically.

Another person pointed out that most semi’s have TWO tanks – one on each side – which are connected by a balancing flow connector.  So both tanks fill and empty evenly.  Even though this seems to mess up the problem, it actually does not.  In order to represent that situation, you simply multiply both sides by two (two tanks, two times the target volume) – which cancel each other out.  You could have ANY number of tanks connected like this and the answer is the same.

It also doesn’t matter how long the tank is either (so long as the tanks are the same size if you have more than one).  Finally, the theta angle you calculate doesn’t even depend on what radius of the tank!  So if you calculate the thetas for all the fill points, then you can calculate the 1/4 mark on ANY size tank.  Pretty nifty huh.

error LNK2019: unresolved external symbol _vmlsLn4

error LNK2019: unresolved external symbol _vmlsLn4

If you get this message while converting some code from compiling with the Intel Compiler over to using Visual Studio, then I have a solution for you:

error LNK2019: unresolved external symbol _vmlsLn4 referenced in function “BLAHBLAH”
fatal error LNK1120: 1 unresolved externals

The Short Vector Math Library (SVML) which has the vmlsLn4() function is implemented in  svml_disp.lib.  Now this lib is usually only for the Intel Compiler’s use in vectorizing code but if someone used any of the SVML instructions, you can do the below trick to fix it.  See this article for more details about using SVML.

1. Install the latest Intel Compiler (with Visual Studio links if it asks).  If that doesn’t come with the library you need, install Install Intel Parallel Studio as well. Between the two, you’ll get the svml_disp.lib you need.

2.  At the top of the .h/.cpp file that uses , declare this external:
 “C” { __m128d vmldLn2(__m128d a); }

3. Go to your project settings, and for the library includes, add:

4. In the ‘Additional Library Directories” box, add a path to wherever you installed the Intel compiler’s lib directory.  The default location is:
C:Program Files (x86)IntelCompiler11.167libia32

Hit F7 in Visual Studio and you should build like a champ and run just fine.