sneekula 969 Nearly a Posting Maven

Well, here is a quote from Goerge Bush's top evangelist.

There is nothing wrong with men possessing riches. The wrong comes when riches possess men.
~~~ Billy Graham

sneekula 969 Nearly a Posting Maven

~~~
Who do you think makes all those battleships, war plains, bullets, cloths and food. war causes our government to spend more money for all those things and gives our people jobs to make them.
~~~

The other ice thing about it is that the cost can be passed to our children. They undoubtedly are very greatful for this opportunity to support their country.

sneekula 969 Nearly a Posting Maven

Plane #31 looks like Boeing should have made it. Maybe it's the latest fighter plane sold to the USAF. Works well, it makes the enemy laugh so hard that they fall out of the sky!

Plane #34 is actually an ingenious design, since it allowed the shooter to use his machine gun with an 180 degree front clearance to clobber the enemy. It is a French Voisin_III, originally designed for crop dusting.

Here is plane #35, something even young jbennet should know.

sneekula 969 Nearly a Posting Maven

In the US we just saw the government pony up $30 billion of taxpayer dollars to enable one bunch of sharks in pinstripe suits to buy another bunch of sharks in pinstripe suits.

sneekula 969 Nearly a Posting Maven

Blessed are the young for they shall inherit the national debt.
~~~ Herbert Hoover

Children are our most valuable natural resource.
~~~ Herbert Hoover

Herbert Hoover, what a nice guy! Almost as good as Dick Chainy.

sneekula 969 Nearly a Posting Maven

A boneless beef chuck mock tender steak grilled to medium rare perfection with two all natural grade A jumbo eggs sunny side up. To top this feast, I am having a big hot mug of Mexican coffe.

sneekula 969 Nearly a Posting Maven

Sit down and think before you run off in all directions.

sneekula 969 Nearly a Posting Maven

Herbert Hoover was in charge of a governmant wheat pice support program that lasted from 1915 to 1929. Any idiot that could scratch the soil eventually grew wheat and made a living. In 1929 the price support collapsed, and the price went down to $0.00 per bushel of wheat!

sneekula 969 Nearly a Posting Maven

During the US Dust Bowl era (mid 1930s) more than 80 million acres of farmed land in the southern plains were totally stripped of their topsoil.

sneekula 969 Nearly a Posting Maven

jwenting
Don't let his sometimes rough and conservative exterior fool you, deep down he has the deepest and best sense of humour in the forum. He is an excellent programmer and knows his languages, he is at home with Java. One word of caution, don't start to talk about photography with him, it will be tough to have him stop.

sneekula 969 Nearly a Posting Maven

Airplanes can be turned on by a flick of a switch.

Airplanes don’t get mad if you do a “touch and go.”

Airplanes don’t object to a preflight inspection.

Airplanes come with manuals that explain their operation and behavior.

Airplanes have strict limits on weight and balance.

Airplanes can be flown any time of the month.

Airplanes don’t come with in-laws.

Airplanes don’t care about how many other airplanes you’re already flying, much less looking at.

Airplanes and pilots both arrive (and take off) at the same time.

Airplanes don’t mind if you buy airplane magazines.

Airplanes don’t comment on your piloting skills except in real extreme cases.

However ... when airplanes go suddenly quiet ... just like women, it’s usually not a good sign.

sneekula 969 Nearly a Posting Maven

History will be kind to me for I intend to write it.
~~~ softly spoken by Winston Churchill

sneekula 969 Nearly a Posting Maven

Before getting into politics she was a chemist. Judging from some of the girls in my chemistry class, she could have very well worn steel knickers.

Back to 2008 American Election politics, I wonder what Mike Huckabee's minister said?

sneekula 969 Nearly a Posting Maven

vmanes
Like his atavar suggests is a grandfatherly well meaning figure, always helpful and friendly. He helps folks a lot in the difficult C++ forum. I mainly know him from the lounge, but always enjoy his insights into life as it is!

sneekula 969 Nearly a Posting Maven

You might be able to talk the Australians into taking over for you in turn.

sneekula 969 Nearly a Posting Maven

@ sneekula

Plane 32 is a Su 37?

You are correct, plane #32 is a SU37 Terminator in sexy colors.

Ene's plane #33 looks a lot like a Sopwith Camel in the traditional camouflage colours.

Here is plane #34. It is credited with the first kill of a German plane in WW1.

sneekula 969 Nearly a Posting Maven

Just an accumulation of foolish things said by important folks on the merits of war. I am quoting the Iraq war here, but it can be contributions to any war.

There is a lot of money to pay for the Iraq war that doesn't have to be US taxpayer money, and it starts with the assets of the Iraqi people. We are talking about a country that can really finance its own reconstruction and relatively soon."
~~~ Paul Wolfowitz, March 27, 2003

Iraq is a very wealthy country. Enormous oil reserves. They can finance, largely finance the reconstruction of their own country. I have no doubt that they will.
~~~ Richard Perle, July 11, 2002

When it comes to reconstruction, before we turn to the American taxpayer, we will first turn to the resource of the Iraqi government and the international community.
~~~ Donald Rumsfeld, also March 27, 2003

Mission accomplished!
~~~ George Bush, sometime in 2003

Some facts:
Official cost of the Iraq war to US tax payers as of March 2008: $523 billion

Median household income in Cleveland: $27000
Average income of an Army private in combat: $26000
Average income of military contractor CEOs: $9095756
Highest paid military contractor CEO: $24399747 (Robert Stevens of Lockheed Martin)

vegaseat commented: very timely topic +8
sneekula 969 Nearly a Posting Maven

I have never met a man so ignorant that I couldn't learn something from him.
~~~ Galileo Galilei

sneekula 969 Nearly a Posting Maven

Fanaticism consists of redoubling your efforts when you have forgotten your aim.

sneekula 969 Nearly a Posting Maven

In 1810 the U.S. Census found that an average American city had a horse for every three citizens, which is the same ratio of people to cars in the 2000 U.S. Census.

sneekula 969 Nearly a Posting Maven

Now that Obama's, Clinton's and McCain's passport information has been compromised, we only need to find out if Lieberman's info has been violated too. This way we would get an early indication who is going to replace Chainy.

sneekula 969 Nearly a Posting Maven

I keep feeding it all sorts of passwords, but still can't get in!

sneekula 969 Nearly a Posting Maven

Adult Material Inside!

sneekula 969 Nearly a Posting Maven

Leftover pasta with a sauce made from diced tomatoes, tomato paste, red wine, bell peppers, green beans, zucchini and garlic. Strange breakfast, but what the heck, I made too much and have to finish it off. My GF gave me a pound of coffee beans from East Africa, so I am having fresh coffee.

sneekula 969 Nearly a Posting Maven

It took me while, but I am pretty sure that plane #30 is an Italian Macchi MC200.

Here is another plane, that would be plane #32, with a cute paint job.

sneekula 969 Nearly a Posting Maven

Spending time with my family and my GF
Cooking
Walking

sneekula 969 Nearly a Posting Maven

Here is the spiel:

a += b  Roughly equivalent to a = a + b 
a -= b  Roughly equivalent to a = a - b  
a *= b  Roughly equivalent to a = a * b  
a /= b  Roughly equivalent to a = a / b  
a //= b  Roughly equivalent to a = a // b 
a %= b  Roughly equivalent to a = a % b  
a **= b  Roughly equivalent to a = a ** b   
a &= b  Roughly equivalent to a = a & b  
a |= b  Roughly equivalent to a = a | b  
a ^= b  Roughly equivalent to a = a ^ b  
a >>= b  Roughly equivalent to a = a >> b  
a <<= b  Roughly equivalent to a = a << b
rysin commented: Helped a lot, answered question. +1
sneekula 969 Nearly a Posting Maven

Q: "What do you call a blonde who has dyed her hair black?"
A: "Artificial Intelligence."

sneekula 969 Nearly a Posting Maven

A heart shape is the most universally recognized symbol.

sneekula 969 Nearly a Posting Maven

Somebody forgot the corkscrew and for several days we had to live on nothing but food and water.
-- WC Fields

sneekula 969 Nearly a Posting Maven

I don't think it's quite that many, I would put the number more at 47% brain dead.

sneekula 969 Nearly a Posting Maven

Them's fighting words!

sneekula 969 Nearly a Posting Maven

Sounds like you want something lke this:

def ask_hours():
    return input ("How many hours do you want to convert? ")

def calc_minutes(hours):
    minutes = hours * 60
    print "There are", minutes, "minutes in", hours, "hours."

def main() :
    hours = ask_hours()
    calc_minutes(hours)


main()

You have ywo types of functions here, ask_hours() returns something and calc_minutes(hours) needs an argument (hours), but shows the result and does not return anything.

sneekula 969 Nearly a Posting Maven

A lot of programmers use both Java and Python. Python has the advantage of a much more rapid learning and program development phase. So I would learn Python first. Once you learn Python you can access Java libaries easily with Jython, also open source.

sneekula 969 Nearly a Posting Maven

You could use id():

word = "example"

print id(word)  # eg. 41369728

Let me warn you, Python really used the globals dictionary to match variable name with content.

sneekula 969 Nearly a Posting Maven

Please stick to established Python coding rules, you code is hard to read:

import Tkinter as tk
from PIL import Image, ImageTk

def show_image():
    """image object image1 created in main"""
    canvas.create_image(250, 250, image=image1)
    #canvas.update()

frame = tk.Frame()
frame.pack()

canvas = tk.Canvas(frame, bg='white', width=500, height=500)
canvas.pack()

button = tk.Button(frame, fg="blue", text="Insert Image",
    activebackground='red', font=('verdana', 10, 'bold'), command=show_image)
button.pack(padx=50, side="left")

# create the image object here, not in the function
imageFile = "map.png"
image1 = ImageTk.PhotoImage(Image.open(imageFile))

"""
# default is center the image
canvas.create_image(250, 250, image=image1)
canvas.update()
"""

frame.mainloop()
sneekula 969 Nearly a Posting Maven

One is not born, but rather becomes, a man.

sneekula 969 Nearly a Posting Maven

Baked potato and cheese, yum yum!

sneekula 969 Nearly a Posting Maven

Even simpler:

sum([int(i) for i in raw_input("Enter integer: ")])
sneekula 969 Nearly a Posting Maven

I think it behaves perfectly fine, here is my output:

1.0 1.0 1.0  0.0
2.0 1.41421356237 1.41421356237  1.59472435257e-012
3.0 1.73205081001 1.73205080757  2.44585018905e-009
4.0 2.00000000003 2.0  2.62145860574e-011
5.0 2.23606798501 2.2360679775  7.51019246792e-009
6.0 2.44948974278 2.44948974278  6.2172489379e-015
7.0 2.64575131106 2.64575131106  3.66817687336e-013
8.0 2.82842712475 2.82842712475  6.9610983644e-012
9.0 3.00000000007 3.0  6.61648513756e-011

Also remember that most computer languages represent a floating point number in such a way that there is the possibility of a tiny last-digit error.

To get a better output of your results you should do some formatting:

def square_root(a):
    if a > 1.0:
        x = a - 1.0
    elif a == 1.0:
        return 1.0
    else:
        pass
    while True:
        y = (x + a/x)/2
        if math.fabs(y-x) < 0.0000001:
            break
        x = y
    return x



import math
i = 1.0
while i <= 9.0:
    sqrt = square_root(i)
    math_sqrt = math.sqrt(i)
    difference = math.fabs(math_sqrt - sqrt)
    print "%0.1f %0.9f %0.9f %0.9f" % (i, sqrt, math_sqrt, difference)
    i = i + 1

"""
my output --->
1.0 1.000000000 1.000000000 0.000000000
2.0 1.414213562 1.414213562 0.000000000
3.0 1.732050810 1.732050808 0.000000002
4.0 2.000000000 2.000000000 0.000000000
5.0 2.236067985 2.236067977 0.000000008
6.0 2.449489743 2.449489743 0.000000000
7.0 2.645751311 2.645751311 0.000000000
8.0 2.828427125 2.828427125 0.000000000
9.0 3.000000000 3.000000000 0.000000000
"""
sneekula 969 Nearly a Posting Maven

The real danger is not that computers will begin to think like men, but that men will begin to think like computers.
~Sydney J. Harris

Oh, I like that one!

Computers follow your orders, not your intentions.

sneekula 969 Nearly a Posting Maven

On problem #1 you want the sum of squares:

def times(y):
    sum = 0
    for i in range(1, y+1):
        # you want the sum of squares
        sum += i * i
    return sum

def main():
    x = input("Enter a number: ")
    w = times(x)
    print w

main()

This looks a lot like C, a bit more pythonic would be:

# sum of squares of a sequence 1 ... n
# if n is 5 then the sum is 1^2 + 2^2 + 3^3 + 4^4 + 5^5

n = 5

print sum([i*i for i in range(1, n+1)])  # 55
sneekula 969 Nearly a Posting Maven

Meat Ball Stroganoff, yum yum!

sneekula 969 Nearly a Posting Maven

"cuando sueño contigo no hablo, sino que canto en sueños". is one of my favorite quote.

Check out <plug removed> for discounts on your online purchases.

Please do not spam!

sneekula 969 Nearly a Posting Maven

Failure is simply the opportunity to begin again, this time more intelligently.
~~~ Henry Ford

sneekula 969 Nearly a Posting Maven

Okay, plane #13 is a MIG21 of the Rumanian Air Force. If you look close the second circle is yellow, as the Indian second circle is white. Good guess so. A very colorful plane it is!

Plane #14 is most likely a Japanese knock off of an American design, looks a lot like an F16. Need to check it more thorougly. Maybe they came up with their own.

sneekula 969 Nearly a Posting Maven

FYI, parts of Ohio (USA) got 2 feet of snow and we are looking the upcoming tornado season right in the eye. Makes life interesting.

sneekula 969 Nearly a Posting Maven

In one year the average adult male will shave about 520 grams of beard hair.

sneekula 969 Nearly a Posting Maven

You could dabble with an AI project.

sneekula 969 Nearly a Posting Maven

Function wget() is not part of Python. However you can extract a picture from a URL easily, as shown in this code snippet:
http://www.daniweb.com/code/snippet563.html