search results matching tag: Flow

» channel: weather

go advanced with your query
Search took 0.001 seconds

    Videos (466)     Sift Talk (25)     Blogs (36)     Comments (1000)   

ChaosEngine (Member Profile)

ChaosEngine says...

Thank you, anonymous benefactor.

May happiness and attractive members of your preferred sex flow your way.

siftbot said:

You just received a gift of 16 Power Points from an anonymous human being. Spend them well, and make your generous benefactor proud.

The LA Speed Check

Tabs v(ersu)s Spaces from Silicon Valley S3E6

MilkmanDan says...

(**EDIT** hmm, code HTML tag doesn't seem to allow whitespace to show at the beginning of lines, so I'm replacing spaces with _underscores_ in the pseudocode below)

Code uses spaces or tabs to visually distinguish the flow of the program, what code belongs to what functions / loops / whatever.

Here's some C-style "pseudocode" that should get the idea across:

void function fizzbuzz {
__for (i = 1; i <= 100; i++) {
____set print_number to true;
____If i is divisible by 3
______print "Fizz";
______set print_number to false;
____If i is divisible by 5
______print "Buzz";
______set print_number to false;
____If print_number, print i;
____print a newline;
__}
}


The braces { } show the beginning and ending of a "function" (essentially one of potentially many self-contained algorithms in a program) and the beginning and ending of a "for loop" (that will repeat the code inside it some number of times). And the "if" statements will only perform the stuff after them IF the test they perform evaluates to true.

So in that pseudocode, there's sort of 4 tiers or things going on. First is the function (named "fizzbuzz"). Since functions are kind of the most basic structural unit of the code, they are on the far left -- not indented at all. Sorta like Roman Numerals in an outline.

Then, the actual content of that function (the code that makes up its algorithm) is set a consistent amount of space to the right to make it clear that it is contained inside the function. That can be done with *1* tab, or some consistent amount of spaces so that it lines up. The only thing in that tier is the "for loop" and the braces that show its beginning and end.

Then the content of the for loop is set a bit further to the right (with another space or another set number of spaces). All of the "if" statements are at that 3rd tier level, along with a bit more code at the beginning and end. Then, the actual content of the if statements is set one more tier to the right to help distinguish that it will only run IF the conditions are met.

That pseudocode uses spaces for all of the tiering -- 2 spaces per tier. I'm a tab person like the guy Richard in the video, because it seems easier to press tab once per tier than hitting the spacebar 2/3/4 times per tier. But it really is just a personal preference issue, because as he said in the video, by the time the code is compiled (turned into an executable file that the computer can run) the final result will be the same whether the programmer used spaces or tabs.

But like with many things, Silicon Valley really hits the nail on the head here. Programmers tend to be very set in their ways and anal about their style preferences for code. If we have to go through someone else's code that doesn't follow our style conventions exactly, it kinda tends to throw us out of whack. To make an analogy with something less nerdy, consider how annoying it can be when someone borrows your car and you have to adjust the seat / mirrors / radio stations etc. when you get back in.

eric3579 said:

Don't think i've ever used a tab outside filling in a form or playing video games. Does the tab thing have more to do with writing code?

The Paris Accord: What is it? And What Does it All Mean?

Diogenes says...

I understand, and "pollution per capita" is a logical argument. But from my point of view there are some critical problems and many flaws with following such reasoning. For example:

The US isn't the greatest emitter of Co2 per capita, but when that's brought up...the argument falls back to emissions in absolute terms. Many would say that that's hypocritical.

Wealth inequality is particularly bad in the US, with the top 20% of the population holding upwards of 88% of all wealth (while the total wealth of individuals isn't GDP, it does correlate with income flow). Doesn't this skew GDP per capita, holding the poor in the US to an unfair standard, vis a vis emissions? If it doesn't, then how is it unfair to poor, rural Chinese?

No international organizations agree on the definition of a "developing" country. Without this, aren't these types of arguments extremely subjective and open to abuse? The point being that there are very, very few "apples-to-apples" comparisons available. For example, would it be a fair comparison if I told you that China's per capita Co2 emissions exceeded the per capita emissions of the EU starting back in 2014?

But you're right...in that the US has polluted the most in absolute terms historically (with China catching up pretty fast). We didn't have a "God-given" right to do it; for most of it, we didn't even know that "it" (Co2) was a pollutant.

You're also right that as individual Americans we have more power to demand change. I understand and accept the dangers of climate change, and I very much want to do something about it. This is why I'm so frustrated with our current administration.

I just want you to understand that I'm not strictly pro-US and/or anti-China. In my opinion, climate change is giving us one resource to either take advantage of or to squander. That resource is time. And time isn't going to make accommodations for any nation, big or small, rich or poor.

This is why I'm troubled by a government like the CCP, that has plans to accelerate their emissions. We know better now (re. Co2), and so such actions on their part are unreasonably selfish. They know their actions will likely hurt or kill all of us, and yet they continue...with the hope that other nations will sacrifice so much as to be properly weakened while they themselves are strengthened.

I understand that in a perfect world, we'd have an equality of outcome. Wouldn't that be great? But we don't have the time left to make most of South America, much of Asia and virtually all of Africa economic equals. What we can do is get our own emissions down to as close to zero as possible, and help these nations build up an infrastructure using green energy. In this way, maybe we can try to foster at least an equality of opportunity energy-wise. The Chinese government has the funds to not only fully transform their own nation, but also to help to some degree in the aforementioned global initiative. But instead of being honestly proactive, they're creating a new cold-war mindset. This is not only wasting time, but also resources (both their own and those of the US in seeking to maintain their strategic edge militarily) that could be better used to help the less fortunate.

So what do we do? Well, I'm not entirely sure. But I can tell you that having other countries paint the US as a villain in this issue, and China as a saint certainly isn't helping.

dannym3141 said:

What i was talking about was division by number of people that live there. That way you're not unfairly giving US citizens a "god" given right to pollute the Earth more. Maybe that's why China is gaming the system, if the system was gaming them.

French Crosswalk PSA

StukaFox says...

So I just got back from Paris.

If you think traffic in the US is insane, try getting from one side of the city to the other. There's no traffic flow; everyone just goes when they want. And peds are the worst. They will step out on the street whenever, instead of waiting for the "green man" (the 'ok to cross' light), and damned whoever is driving on the road at the moment.

The first day I was there, I saw the body of a struck Frenchman laying in the middle of the road by Ecole' Militaire (sp). In America, this would have drawn a huge crowd. In Paris, no one even slowed down.

Don't get me started with bikes in Amsterdam, either.

New Rule: The Lesser of Two Evils

enoch says...

i have to agree that when the election was nearing the end,and it was time to vote.the choice was pretty clear.

i never liked the "lesser of two evils" argument,but when faced with a choice of:

soft fascist,narcissistic used car salesman,who spoke in bombastic and racially charged rhetoric,but really said nothing.

or...

a war-mongering corporatist,who never saw a war she didn't want to send your kids to go die in,or a corporation she didn't want to extract donations from for political favors and who basically said nothing as well.except for 'well,at least i am not that THAT guy"--->points to trump.

i am still gonna say...go with the corporatist.

because in the end,at least on domestic policy,hillary would have been adequate.oh she would have signed the TPP,and fucked millions of american workers,and she would have most likely expanded the drone campaign,and continued with the american empires policy of "regime change",but she had/has the knowledge and capabilities to actual lead a government.

hillary knows how to politic,and understands how shit gets done in washinton,and things would have remained relatively unchanged here in america.maybe..maybe.... some incremental change due to the political pressure the sanders campaign brought.

so i get it,and maher is not exactly wrong per se",but i think he is missing the bigger picture that so many in the beltway have missed,and CONTINUE to miss,because they reside in their own,tiny and insulated bubble.

the american people were desperate for change,and they have been for decades.after obama's campaign of 2008,and his "hope and change" platform,which ignited the american people,only to see,not "hope and change" but rather "more of the same".

and what was hillary offering?
a new message or vision? a new path for america that would include everybody to blaze a new path of invention,creativity and imagination to create an america everyone could be proud of? and feel a part of?

nope..she was offering "more of the same".

well,americans had already had their fill of "more of the same".they had lost faith in a system that appeared to no longer represent them.so they chose the nuclear option for change.terrifying and horrifying change.

so go ahead and blame the "bernie bros".feel free to slap responsibility on those "uneducated and redneck hillbillies".cry and whine and point the finger at those liberals who refused to abandon their principles,and by all means bask in the glory of your own self-righteous moralizing,and condescendingly condemn anyone who voted for trump,or who refused to vote at all.

you can sit in a small room with everybody else who voted for hillary,and self-righteously smell each others farts and call it a rose,because you are obviously a better quality human being than the rest of us.

and by all means,refuse to examine the fact that hillary ran a shit campaign,and had no real message,vision or path to the future.ignore the corruption and blatant,and politically motivated shenanigans of the DNC.god forbid you experienced a moment of honesty.

is trump going to be a disaster of presidency?
well,it sure is shaping up to look that way isn't it?
but we have survived horrible presidents before,and we shall survive trump.

and on a positive note:
trump has brought many people out of their apathetic slumber,and they are scrutinizing everything he does with a fine toothed comb.the amount people who are becoming politically engaged is quite impressive.

there is nothing in our representative democracy quite as powerful as people gathering together to put pressure on our elected representatives.

town hall meetings,that used to be wastelands,are now being packed to over-flowing.with citizens calling out their representatives..to their FACE..on how unhappy they are.

so go ahead and ridicule those who voted for trump,but it is due to trump that so many have gotten off their couches and are taking it to their congressmen and senators.

just a non-controversial,and easily predicted side effect,when you put someone like trump in power.

man,the politics in my country is getting really fucking interesting!i cannot WAIT to see what happens in the next episode!

what do you guys think?
/end rant

*promote

Your Brain on LSD and Acid

shagen454 says...

Yeah, it's been a while for me too. The best one I remember was living off Valencia street in the Mission district of San Francisco. I dropped, went to sleep for a hour and woke up and the floors literally had mist flowing through the apartment like some sort of ethereal fantasy movie. When I went outside the fence was waving/bending in a mesmerizing way and the houses were continually sinking into the ground. I looked at some flowers and they were infinitely growing. The best part was looking in the mirror, it was like one of those youtube videos where someone takes a photo of them-self every day for a year - every second it was like a different photo of myself except very organic watching myself grow old, bald and with a beard and then back to normal, lol. It was fun, but I'd never do it again without some anti-anxiety pills around for the last 6 hours which I found to be fairly annoying. Plus, as Shpongle puts it "LSD? Do DMT." (https://www.youtube.com/watch?v=U3cgNm_f2ow)

4 Revolutionary Riddles

visionep says...

I guess the hint for these is the rotational test that they show at the first.

1) A sticky object that would let go like a wall crawler that climbs down a wall would create this effect. (see below)
2) You can't. As you approach infinite speed it would get very close. (see below)
3) The bike will move forward. (see below)
4) The outside parts of the wheels that overlap the rail. Also if the train has a flywheel that is larger than the wheel size the bottom of the flywheel would also always move backwards faster than the train was moving.

1) He says "what object is inside?" so I'm not sure a liquid would count. Also a viscous liquid would flow a slow rate and would probably not stop and start. You might be able to get a viscous liquid to stop and start if you had fins, but that still might just move slowly or gain enough momentum to roll fast without any flow.

2) A little excel calculation shows that the average velocity approaches twice the initial but will never hit it.

attempted m/s - total time - average m/s
1 100 1
2 50 1.333333333
3 33.33333333 1.5
...
200 0.5 1.990049751
201 0.497512438 1.99009901

3) I'm not sure if the parameters of this experiment are explained sufficiently.

If it is allowed to slip then no matter the mechanical advantage a hard pull should always be able to get the bike to skid back and defeat friction.

If the bike is not allowed to slip on the ground then I don't understand how it could ever move backwards, the only options would be that it doesn't move at all or it moves forward.

If it can't slip then the ratio of the pedal to the wheel is what is in question. Bikes only have gear ratios higher than 1 and the crank is smaller than the tire so the tire will always rotate more than the crank thus the bike should move forward.

Gratefulmom (Member Profile)

The Future of Airliners? - Aurora D8

transmorpher says...

I'm predicting that once self-driving cars are mainstream in the next 20 years the airlines will be in a lot of trouble. With a majority of self driving cars on the road, I think the safety numbers will shift to cars being the safer form of travel, and likely very few traffic jams. We may not even need traffic lights eventually as traffic learns to flow smoothly.

I had no idea cats liked bread this much

NirnRoot says...

It's not the bread. A lot of plastic bags are covered with tallow (animal fat) to make them slippery and keep them from sticking together (necessary so the machines can pull them apart when they pack the bread in the factory). Cats love the taste; that's why you'll often find them licking or chewing plastic bags (side note: don't let them chew: if they swallow a tiny piece, it can lodge in their intestines and block the smooth flow of food and waste, causing bloating and potentially a rupture). This cat obviously /really/ likes the taste.

Mordhaus (Member Profile)

Lava flows in Pahoa

Whole New Worlds: An Aladdin History of Exoplanets

eric3579 says...

Wasn't easy being a planet hunter back in the day *promote

I'm looking for
1 tug
The pull of a planet
1 tell
A wobbling sun
I've searched for years
Haven't found a one
But they're out there

1 jump
In radial redshift
1 slip
Of spectral lines
They'll see if I can show them the sines

Pish tosh
Green men
Take five
Take ten

Just a little cash guys

Budget's tight
Don't fund this trash guys

I can take a hint
Better face the facts
Second-hand'll have to do

Eww
All you planet hunters at the bottom
You've got fact & fantasy entwined
Finding planets except they haven't got one

Well they gotta be forming readily
When you think about it given we've got nine

1 jump
A blip in the spectrum
1 shift of meters per second
1 graph of period power
They laugh but I'm not sour

Here goes
18 months of data
Cross & correlate it
All I gotta do is run

Pish tosh
Green men
Ah don't mind them
If only they'd look closer
Would they see a pure void
No sirree
They'd find out
There's worlds galore
To see

Make way for Pegasi
51 Pegasi

First was a world
Round an old pulsar
That's true
But the news
Is a sun-like star
With wobble
Too quick & precise
To be designed
No fluke not a spot
If you like it hot
You're gonna love this find

Pegasi 51b
Planet discovered
Orbit traced
Every 4 days
Hot as can be
Its order-Jupiter size
Was something of a surprise
Especially given its star's proximity

Pegasi 51b
It's a new era
To detect
Exoplanets
Soon there'll be three
As planet pulls on its Sun
It shifts the stellar spectrum
That's how we found 51b Pegasi

How'd a planet get so close in orbit
Cause I thought you needed ice to form it
Did it later undergo some strange migration
Star too small to be so long-pulsating
And too old to be so quick rotating
Is there any other good interpretation

This will certainly help with our funding

We got your funding
We got your funding

Got a surface of 1200 C

It's treacherous
So treacherous

If in time this new breakthrough feels mundane
Planets are common

That's proof
Of the truth
I've been telling you
This is no mean anomaly

Pegasi 51b
Planet uncovered
Round a far
Main sequence star
Spectral type G
We know its mass to be high
Half Jupiter by sine i

It's 15.61 pc from home
And it shakes our faith in how planets are formed
And its star is in Pegasus
Give it an A and thus
Label the planet as b
51 Pegasi

Plotting Doppler shifts is glacial-pace
And that astrometry never prevails
But baby you're in luck cause
Up in space
You got a planet-finder never fails

You got the power of statistics now
You got a view without an atmosphere
So no more nights spent locked up in your tower
All you gotta do is wait right here
And I say

Kepler the planet-searcher
Got a dip, no 2, no 3
We just measure brightness
Plot it out & that's transiting photometry

When your stars do this
And your curves displace
Then your star's got this
Transiting its face

Then you hit compute
And lookie here

You get good diameter data
From that dip
And orbit distance from the length of year

Well now we need this tale supported by
A ground observer with a good Échelle
We got 2000 planets certified
2000 more that only time will tell

But let's take em all, plot em out
And find out if we're really all alone
Is there a rocky world we've found no doubt
That orbits in the habitable zone
Like home?

Kepler the planet searcher
Got an Earth 452b
Part of a throng
40 billion strong

There ain't never been a field
Clever as the field
There ain't never been a field
Better than the field they call
Exoplanetology

I can show you a world
A shining shimmering planet
Found concealed in the band-shifts
Of the closest star in sight

I've found hope in the skies
And facing wonder I wonder
Could the sine wave discovered be
A planet fit for life

A whole new world
A new fantastic point of blue
Placed in that narrow zone
Where water flows
Midway tween cold & steaming

A whole new world
Its sun a faint, reddish hue
Could there be waiting here
A biosphere
Evolving in this whole new world to view

Fathoming a whole new world to view

Unbelievable find
Indescribable feeling
Earthlings someday revealing
Through directly captured light
A whole new world

Don't just stare from a far

Though nigh impossible to see

Wouldn't close up be bolder

Next to its parent's flair
If life is there
We'll know through atmosphere spectroscopy

A whole new world

Block the glare of the star

A laser starshot to pursue

With a star-shaped occulter

Chasing that crazy dream
That's always been
Of walking in a whole new world with you

a whole new world
That's where we'll be
A thrilling chase
A home in space
For you and me

Lake Oroville dam spillway damage

SFOGuy says...

For reference: flows at the their highest out of the spillways were exceeding the flows at Niagra Falls---

And---in 2005, 3 environmental groups tried to get the State to concrete armor the emergency spillway---they protested it would be too expensive and not necessary...And of course, with the main spillway out of action, the emergency spillway has started to erode as well---and 200,000 people have been evacuated. To my understanding---and I'm not a hydraulic engineer---the risk with the emergency spillway is that the water flowing over the concrete "cap" or "curb" has started to...duh...erode the earth below the cap. If it erodes too far, the concrete cap will tumble off, a 30 foot wall of water will cascade over the edge, the the dam will start to erode...



Send this Article to a Friend



Separate multiple emails with a comma (,); limit 5 recipients






Your email has been sent successfully!

Manage this Video in Your Playlists