Ene Uran 638 Posting Virtuoso

Shrillary Rodham Antichrist is the most fitting I've heard her called so far.

I assume there are silly names like this for all presidential candidates. I really don't like her, but I don't like any of the other trash neither. Looks like the whole choice is going to leave the voters in a tipsy lurch come election day. Thank God, we have the Electoral College to elect our leader.

Most likely label to apply to these characters:
"Careful! Loves torture, destroys opposing countries, stuffs pockets, hates truth, spies on citizens, does anything to get elected!"

Ene Uran 638 Posting Virtuoso

Actually our finite universe is as large as we can observe it. After that it makes no sense!

Ene Uran 638 Posting Virtuoso

All progress is based upon a universal inbred desire on the part of every organism to live beyond its income.
-- Imanuel Kutler

Ene Uran 638 Posting Virtuoso
>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance

Haha! Favorite error ever! All versions of python have this "hidden feature." It's obviously making fun at C. : P

A very funny discovery, thank you!

Ene Uran 638 Posting Virtuoso

If you have empty strings in the list you can change BearofNH's code simply:

mylist  = ["CAnADA", "hELLO", "", "CAN"]
# use list comprehension
newlist = [ x[0]+x[1:].lower() for x in mylist if x ]
print newlist
"""
my output -->
['Canada', 'hello', 'Can']

a list comprehension is a more efficient way of coding this ...
newlist =[]
for x in mylist:
    if x != "":
        newlist.append(x[0]+x[1:].lower())
"""
Ene Uran 638 Posting Virtuoso

Every person has brains (it's there!), but not every person has looks!

Ene Uran 638 Posting Virtuoso

I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it.

Ene Uran 638 Posting Virtuoso

My mentor said,"Let's go do it"not "You go do it."
How powerful when someone says,"Lets!"

Depends a little on the country. In the US "let's (let us) do it" means:
If it works, the boss gets the credit.
If it fails, you get the blame.

Ene Uran 638 Posting Virtuoso

The earth is borrowed from our children, not inherited from our parents. - Emma Polk

Ene Uran 638 Posting Virtuoso

Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25.

By golly, I finally got it! Thanks WaltP! You are true genius!

This is an actual alert to IBM field engineers that went out to all IBM branch offices. The person who wrote it was indeed serious. The rest of us may find it somewhat humorous:

Mouse Balls Available as FRU (Field Replacement Unit)

Mouse Balls are now available as FRU. Therefore, if a mouse fails to operate or should it perform erratically, it may need a ball replacement. Because of the delicate nature of this procedure, replacement of mouse balls should only be attempted by properly trained personnel.

Before proceeding, determine the type of mouse balls by examining the underside of the mouse. Domestic balls will be harder and larger than foreign balls. Ball removal procedures differ depending on the manufacturer of the mouse. Foreign balls can be replaced using the pop-off method. Domestic balls are replaced using the twist off method. Mouse Balls are usually not static sensitive. However, excessive handling can result in sudden discharge. Upon completion of ball replacement, the mouse may be used immediately.

It is recommended that each replacer have a pair of spare balls for maintaining optimum customer satisfaction, and that any customer missing his balls should suspect local personnel of removing these necessary items.

Ene Uran 638 Posting Virtuoso

SOS is right! You can find peons in every field of endeavour. That goes from a farmer, teacher, soldier, priest, scientist all the way to a country's leader.

Ene Uran 638 Posting Virtuoso

photography, and occasionally I try my hand at making chainmail.

Chainmail, is that the kinky stuff?

I like ceramics and modeling.

Ene Uran 638 Posting Virtuoso

Salmon with basil and orzo pasta, yum yum! To that I drink a nice glass of California red wine.

M&Ms, candy from the Spanish Civil War, how original!

Ene Uran 638 Posting Virtuoso

Someone seems to give this out as a homework problem. Take a look at: http://www.daniweb.com/forums/thread90145.html

After the two starting values 0 and 1, each number is the sum of the two preceding numbers.

This is such an easy problem, I suggest you really try to understand it!

Ene Uran 638 Posting Virtuoso

Ever read what the Koran has to say about treating with non-muslims, Ene Uran? From what I've seen, if they're lucky, Jews and Christians (People of the Book) get forced into slave-like servitude in Muslim societies. The unlucky ones, or anyone else, are to be killed outright unless they feel themselves subdued. (That is, choose to convert to Islam.) So I think I'd be a bit biased too, the same as I would against any other ideology whose primary purpose is to either enslave or kill me. You wouldn't? Or would you simply convert? ---

Amazing, the Ku Klux Klan used to spread the same story about Jews and Catholics.

Ene Uran 638 Posting Virtuoso

With the millions and millions of books published, one should not be surprised that every now and then one finds one book, where the author was a few bricks shy of a load.

Coming back to the subject of this thread:
Dark energy and dark matter surely is a hoax perpetrated by a bunch of drunk frat boys!

Ene Uran 638 Posting Virtuoso

Computers are getting harder to use and program?

You obviously have not seen one of the early computers, where all the programmig was done with binary switches!

Ene Uran 638 Posting Virtuoso

Cal Thomas is one of the many smug neocons in the US news media, that has beaten the drums to get us into invading Iraq. I am sure he never shed one tear or even felt sad for the many Muslims that got killed in this ill exercised adventure. His bias against Muslims is clearly reflected in his "the threat of more terrorism from a growing Muslim population" statement.

Let's face it, it was the immigrants that have made the USA the great country it is! England will in the long run gain from the same experience. Bigotry is just what it is, ugly bigotry!

iamthwee commented: I am no Nazi chump. In fact I find that comment quite upsetting as my great-grandpa died in a death camp... He slipped and fell off the watch tower. -2
Ene Uran 638 Posting Virtuoso

It wasn't a comment about linux in general, but about Ubuntu specifically. Any os that can beat world chess champion (human) is not all bad! :eek: I just don't enjoy spending hours doing something in a linux environment that takes me just minutes in MS-Windows. I have no idea about MAC, never tried one. But I hear they are great for graphics, much better than MS-Windows.

Hey Ancient, you could change the title to "Hell from Ubuntu". I myself have wasted plenty of time with Linux installations, I can feel for you!

Wouldn't the quality of graphics have much more to do with displays and their drivers?

Ene Uran 638 Posting Virtuoso

You left off another choice:
Therapy

:P

That is a good one! I hope the poll options can be changed.

Ene Uran 638 Posting Virtuoso

If you want friends that match your narrow mind, I would find them at my church!

Ene Uran 638 Posting Virtuoso

This would be a very basic pygame program, see if you can get that to work:

# fooling around with pygame --> draw/fill some rectangles

import pygame as pg

# initiate pygame first
pg.init()

#create a 400x300 window
screen = pg.display.set_mode((400, 300))
# give it a title
pg.display.set_caption('Draw/fill rectangles using pygame')

# some color constants
white = 0xFFFFFF
red = 0xFF0000
green = 0x00FF00
blue = 0x0000FF
yellow = 0xFFFF00

#draw/fill a 77x33 rectangle in position x=250, y=50 (NW corner)
screen.fill(white, (250, 50, 77, 33))

# more rectangles, vary color, size, position ...
screen.fill(red, (30, 20, 70, 120))
screen.fill(red, (140, 70, 90, 80))
screen.fill(green, (150, 80, 70, 60))
screen.fill(yellow, (200, 170, 150, 60))
screen.fill(blue, (70, 200, 100, 70))

# hey, nothing gets displayed until one updates the screen
pg.display.update()

# create the event loop to get things going
# and specify an exit action (clicking on the window x)
while True:
    for event in pg.event.get():
        if event.type == pg.QUIT:
            raise SystemExit
Ene Uran 638 Posting Virtuoso

I don't know who the heck Narue is, just let him stay!

Ene Uran 638 Posting Virtuoso

snowmen
eat
snowflakes
in the morn

Ene Uran 638 Posting Virtuoso

An ocean of dreary single family homes, a fancy complex with tennis courts and a pool, also a big medical facility where I worked some time ago.

Ene Uran 638 Posting Virtuoso

The good die young, pricks live forever!

Ene Uran 638 Posting Virtuoso

Talking about poor churches there is one of the many in my neighborhood:
http://www.crystalcathedral.org/visitors/

Ene Uran 638 Posting Virtuoso

Mister jwenting must be the Archy Bunker of the Lowlands.

When the second amendment was written arms were knives, sabers, muskets that took ten minutes to load, and single shot pistols. That's what the right to bear arms was intented to cover.

Now you talk about machine guns, automatic weapons, and sniper rifles that can blow your brains out from 2 miles away. Pretty soon we are talking about beam weapons, and photon torpedoes. Where do we stop?

Frankly, I would rather keep those foreign nut cases that want to come her to carry arms away from the USA!

Ene Uran 638 Posting Virtuoso
# This is text from a file I found.  Write a Python program to
# convert the text into a dictionary with "state": "motto" pairs
# something like {"Alabama": "At Least We're not Mississippi",
# "Alaska": "11,623 Eskimos Can't be Wrong!", ...}
#
# Then write a program that allows you to enter the state and
# it will display the motto of that state.

state_mottos = """\
Alabama:    At Least We're not Mississippi

 Alaska:     11,623 Eskimos Can't be Wrong!

 Arizona     But It's a Dry Heat

 Arkansas:   Litterasy Ain't Everthing

 California: As Seen on TV

 Colorado:   If You Don't Ski, Don't Bother

 Connecticut:  Like Massachusetts, Only Dirtier and with less Character

 Delaware:   We Really Do Like the Chemicals in our Water

 Florida:    Ask Us About Our Grandkids

 Georgia:    We Put the 'Fun' in Fundamentalist Extremism

 Hawaii:     Haka Tiki Mou Sha'ami Leeki Toru (Death to Mainland
             Scum, But Leave Your Money)

 Idaho:      More Than Just Potatoes... Well Okay, Maybe Not, But
             The Potatoes Sure Are Good

 Illinois:   Please Don't Pronounce the "S"

 Indiana:    2 Billion Years Tidal Wave Free

 Iowa:       We Do Amazing Things With Corn

 Kansas:     First Of The Rectangle States

 Kentucky:   Five Million People; Fifteen Last Names

 Louisiana:  We're Not All Drunk Cajun Wackos, But That's Our Tourism Campaign

 Maine:      We're Really Cold, But We Have Cheap Lobster

 Maryland:   A Thinking Man's Delaware

 Massachusetts:    Our Taxes Are Lower Than Sweden's (For Most Tax Brackets)

 Michigan:   First Line of Defense From the Canadians

 Minnesota:  10,000 Lakes and 10,000,000 Mosquitoes …
Ene Uran 638 Posting Virtuoso

This will read one line at a time and you can process each line and put the result in a list or file:

fout = open("ProcFile2.txt", "a")
for line in open("LogFile2.txt", "r"):
    # process each line (whatever you need)
    # for example ...
    process = line[:2]
    fout.write(process)

fout.close()
Ene Uran 638 Posting Virtuoso

You need to use the wxPython GUI toolkit to do that:

# experiment with the wx.animate.GIFAnimationCtrl() widget
# needs wxPython installed

import wx
import wx.animate

class AnimatedGif(wx.Panel):
    """class to show an animated gif image on a panel"""
    def __init__(self, parent, id):
        wx.Panel.__init__(self, parent, id)
        #self.SetBackgroundColour("black")
        # pick an animated GIF filename you have in the working folder
        ag_fname = "ag_puppy.gif"
        try:
            ag = wx.animate.GIFAnimationCtrl(self, id, ag_fname, pos=(10, 10))
            parent.SetTitle(ag_fname)
        except:
            pass
        ag.GetPlayer().UseBackgroundColour(True)
        ag.Play()


app = wx.PySimpleApp()
frame = wx.Frame(None, id=-1, title="need animated gif file", size=(300, 300))
AnimatedGif(frame, id=-1)
frame.Show(True)
app.MainLoop()

I think something like this is in the snippets.

Ene Uran 638 Posting Virtuoso

Brain:
An enchanting brain has to be capable of a balanced mix of creativity, wit and
understanding. My bosses brain contains the C++ manual in every detail, but
otherwise he is rude and crude and devoid of any people skills. He has a very
ugly wife and three very ugly children. She is a good cook, and they both have
put on weight in places that should prevent the birth of very ugly child number
four.

Beauty/Body:
Women should be cute with fatty tissue properly distributed.

Men should be tall and handsome. If you are the typical out of shape mouse
potato that is standard fare in computer departments, you have to make up for
your deficiency with money, sports car and/or alcohol.

christina>you commented: haha +14
Ene Uran 638 Posting Virtuoso

Python is not only a scripting language for a graphics marvel like Blender3D, but also for Open Office. You can create or modify spreadsheets, documents and so on via OO's UNO API. Check out PyUno at:
http://wiki.services.openoffice.org/wiki/Python

Open Office in my opinion outperforms Microsoft Office, and on top of that is free from Sun.

Ene Uran 638 Posting Virtuoso

Good grief Charlie Brown, where is the answer to EnderX in all this senseless squabble?

Ene Uran 638 Posting Virtuoso

This will show the even integers between 2 and limit, then it is up to you to show the product:

#include <stdio.h>

int main()
{
  int x;
  int limit = 30;
  
  for(x = 2; x <= limit; x=x+2)
  {
    printf("%d\n", x);
  }
  
  getchar();  // wait for enter
  return 0;
}
Ene Uran 638 Posting Virtuoso

If you use wxPython for a GUI toolkit, you can get Boa Constructor. A Delphi like visual interface to do drag and drop frame building.

Free downlod from:
http://sourceforge.net/project/showfiles.php?group_id=1909&release_id=150280

The installer for Windows:
http://downloads.sourceforge.net/boa-constructor/boa-constructor-0.4.4.win32.exe

There is also a forum:
http://sourceforge.net/forum/forum.php?thread_id=1617033&forum_id=5483

Boa Constructor needs wxPython. It actually makes a great general IDE for all Python programming.

Microsoft does not like Python, they have meddled a little with IronPython (a pot of dung IMHO), but don't expect any support from them. I think in their narrow mindset they associate Python with Google.

The closest thing SharpDevelop will work with is the python-like Boo language that uses C# to compile.

Ene Uran 638 Posting Virtuoso

"Is Python any good?"
I don't think this person really wants to know, so my question is:
"Is iamthwee any good?"

Ene Uran 638 Posting Virtuoso

Soemthing like that?

s = "c:/hello/scot"
if s.endswith("scot"):
    s = s.replace("scot", "bob")

print s  # c:/hello/bob
Ene Uran 638 Posting Virtuoso

Since PyDEv is a plugin for a Java monster like Eclipse, you can expect a few side effects. The whole thing was simple too huge for my taste.

Ene Uran 638 Posting Virtuoso

First of all, take the second line out, vegaseat did not write your program!
Note that print is used in console programs and will not work in a GUI. You have to use a label.

Also line

label25=tk.Label(root, text="Enter your number here:")

asks for an input, so you need an Entry widget.

This program cries out for a number of loops to create all those lables. I would proceed with a simpler game, get all the GUI problems worked out and than expand!

Ene Uran 638 Posting Virtuoso

You have to add a newline character to the end of each line in the string:

mylist = [[2934110, 'B1', 'D4', '7C7C7C7C804040404040F140404000'],
[2934110, 5, 1, 1, '01', 'Actes Sud '],
[2934110, 4, 1, 2,                 '8C00Dubbelganger (motief)'],
[2934110, 3, 1, 1, '01', '01', '03', 'Les amants imparfaits', ' : roman'],
[2934110, 6, 7, '104', 0], [2934110, 6, 1, 1, '01', '01', '03', 'Domain'],
[2934110, 2, 1, 1, '01', 0, 'C4', 'Fleutiaux, Pierrette']]

mystr = ""
for x in mylist:
    mystr = mystr + str(x) + '\n'

# test
print mystr

filename = "data1.txt"
fout = open(filename, "w")
fout.write(mystr)
fout.close()
Ene Uran 638 Posting Virtuoso

The hardware should achieve microsecond resolution, but the layers of software you have to go through will negate that!

Even if the Python interpreter has a high priority level, the timing will change, since the operating sytems runs plenty of other programs in the background (keyboard, mouse, screen updates, virus, active malware, spyware etc.).

If you want to achieve just millisecond resolution amongst samples, you will have to average a fair number of samples. That holds true for many things you do in the sciences.

Ene Uran 638 Posting Virtuoso

The datetime module will do micro-seconds

import datetime 
print datetime.datetime.now()
time_now = datetime.datetime.now()
print time_now

Not really! If you look at the output, the digits that correspond to microseconds will always be zeroes. But you could hope for millisecond resolution.

Ene Uran 638 Posting Virtuoso

Can ne-1 explain 2 me the output of the following code ?

(Mind well, it's completely legal C code !! ; n it actually won the International Obfuscated C Code Contest.)

#include<stdio.h>
main(t,_,a)
char *a;
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}

Code tags won't help here! I guess in some countries April first falls on a later date! This code has only one purpose, to test the mental constipation of the typical C programmer.

Ene Uran 638 Posting Virtuoso

I M A Girl Reading A Degree At A Local University , I M Having A Assignment To Do Please Help Me On That Fact

Very funny, but a little late for an April first joke!

Ene Uran 638 Posting Virtuoso

The most optimized execution speed can only be achieved with assembly code. However, Microsoft's 20,000 programmers would now be half way through the fist version of Windows.

You have to balance execution and development speed to make a little money in the trade.

Ene Uran 638 Posting Virtuoso

The experimental computer language 'Nemerle' (http://nemerle.org/) allows you to mix object oriented and functional programming styles. It can use library code from .NET or Mono. The syntax looks a little bit like C#.
OOP style:

class Hello {
  static Main () : void {
    System.Console.WriteLine ("Hello world! using Nemerle");
  }
}

]
Simple functional style:

System.Console.WriteLine("Hello world! using Nemerle");
Ene Uran 638 Posting Virtuoso

Don't forget to take a look at the Python module BioPython.

More info, free download and docs at:
http://biopython.org/wiki/Main_Page

Ene Uran 638 Posting Virtuoso

Just an exercise in drawing letters with the wxPython GUI toolkit:

# a nifty 'Hello' using wxPython drawing stuff
# (you can add 'World' as a coding exercise)

import wx

class MyFrame(wx.Frame):
    """a frame with a panel"""
    def __init__(self, parent=None, id=-1, title=None):
        wx.Frame.__init__(self, parent, id, title)
        self.panel = wx.Panel(self, size=(500, 200))
        self.panel.Bind(wx.EVT_PAINT, self.on_paint)
        self.Fit()

    def on_paint(self, event):
        # establish the painting surface of given color
        dc = wx.PaintDC(self.panel)
        bg_color = 'yellow'
        dc.SetBrush(wx.Brush(bg_color))
        dc.DrawRectangleRect((0, 0, 500, 200))

        # draw 5 adjoining red circles with red fill
        dc.SetPen(wx.Pen('red', 1))
        dc.SetBrush(wx.Brush('red'))
        y = 100
        r = 50
        for k in range(1, 6):
            x = k * 100 - 50
            dc.DrawCircle(x, y, r)

        # cut out a few notches for the letters
        # draw background colored rectangles (x, y, w, h)
        dc.SetPen(wx.Pen(bg_color, 1))
        dc.SetBrush(wx.Brush(bg_color))
        dc.DrawRectangleRect((40, 50, 20, 40))
        dc.DrawRectangleRect((40, 110, 20, 40))
        dc.DrawRectangleRect((150, 70, 50, 20))
        dc.DrawRectangleRect((150, 110, 50, 20))
        dc.DrawRectangleRect((240, 50, 60, 70))
        dc.DrawRectangleRect((340, 50, 60, 70))
        dc.DrawCircle(450, 100, 20)
        

app = wx.PySimpleApp()
frame1 = MyFrame(title='the hello circles')
frame1.Center()
frame1.Show()
app.MainLoop()
Ene Uran 638 Posting Virtuoso

Somethin along this line:

# get the IP address of the machine the program is running on

import socket

print socket.getaddrinfo(socket.gethostname(), None)[0][4][0]