851 Posted Topics
Re: [QUOTE=dvdreplication;1068008]Well buddy i am not getting the idea. Plz let me clear your question.[/QUOTE]Translation: I am a frigging sig spammer! Look at my signature! | |
Re: Here is another example of formatting a string with %s and %d placeholders. The syntax pretty much follows the C printf() function formatting. [code=python]def visits(name, n): """ adds an s to 'time' if n > 1 """ return "%s visited you %d time%s" % (name, n, ['','s'][n>1]) print( visits("Harry", 1)) … | |
Re: [QUOTE=ihatehippies;1074977]as someone here once showed me: [CODE=python] x = [1, 2, 3] y = x[:] # y is now a copy of x [/CODE][/QUOTE]This will not work for nested lists. Example [code=python]x = [1, 2, [3, 4, 5]] y = x[:] x[1] = 99 print( x ) # [1, 99, … | |
Re: [QUOTE=jbennet;1071696]I like C++. C# annoys me. Java is OK. Better than c++ for [I]some[/I] things. After using c-type langs, VB makes me want to cry. People in that link are missing the bigger picture. "Pure C as opposed to C++. No idea why. ". Thats because linus likes C more … | |
Re: Minnesota POEM ... It's winter in Minnesota And the gentle breezes blow Seventy miles an hour At twenty-five below. Oh, how I love Minnesota When the snow's up to your butt You take a breath of winter And your nose gets frozen shut. Yes, the weather here is wonderful So … | |
Re: Easy: [code=python]if 'fummy' in text: print 'fummy found in text' [/code] | |
Re: [QUOTE=Narue;1065263]Are you a complete idiot?[/QUOTE]A complete idiot would imply perfection. ![]() | |
Re: What exactly do you need? The goal seems to be changing all the time. | |
Re: [QUOTE=dvdreplication;1068011]Wow what a funny post. I really like your post. Thanks a lot for sharing such a nice post.[/QUOTE]Wow, these sig spammers show up like weeds! | |
Re: Microsfoft seems to always copy Apple's efforts, but Windows7 puts them a step ahead. Not sure which computer language pioneered OOP, my guess is Smalltalk (at Xerox), Lisp followed by C++. The Mac OS X used Objective-C, a C extension based on Smalltalk early on. ![]() | |
Re: If you have Python3 you can take a look at cturtle.py and see what this person did to customize the standard turtle.py Free download from: [url]http://www.cs.luther.edu/~pythonworks/PythonContext/cTurtle.py[/url] | |
Re: Remember Miss Dani that you only have a limited number of birthdays, so on with the festivities! Happy Birthday! Wonder what kind of cake you will have? | |
Re: [QUOTE=vmanes;524503]99% of lawyers make the the other 1% look bad.[/QUOTE]Well, my dad is a very successful lawyer and has helped a lot of people in his life. Something he and I are proud off. Looks like this thread is more about envy, by folks who have an unsuccessful and poorly … | |
Re: American football is a bunch of overweight yahoos in expensive padded gear running into each other, chasing an almond shaped ball. Hardly a game of strategy and, as long as you run into the right direction, no need for brains. | |
Re: Amazing what steroids can do for you when you are younger, but it all catches up when you get older! | |
Re: What do you mean if Bill Gates watches this link. He made the flash presentation himself. :) | |
| |
Re: When I was a few years younger I played the "tsimbl" | |
Re: I just checked my notebook computer and just about all the ports are female ports. | |
Re: I am a morning person just like my mother. My mind is shot in the evening and is only good enough to watch sports on TV. | |
Re: My Grandpapa says: "Men really live longer than women, they just don't say much so you don't notice them." | |
A closer look at some string methods, just having a learning experience and fun with this C# class. This program uses a simple MessageBox to display the results. | |
I could not resist to put this little utility into a GUI dress. The code shows you that the C# StringBuilder is nicely suited to create the binary string. Also included is a check to assure that the input is an all digit numeric string. | |
A quick look at finding a substring in a string and giving the position of the substring, if found. The string method IndexOf() has a number of options to explore. | |
Re: Thanks vegaseat, looks like it may be possible to teach C# after all. I am thinking of a hands-on course, where I can hand out assignments on various subjects, and expect single code file returns. This way I can best evaluate the student's performance and assist in the learning experience. | |
Here I made a GUI template with a Form, Button and Listbox using MS VCS 2003. MS VCS 2003 still produces a single file usable as a templet, whereas MS VCS 2005 smears files all over the map. Must be some marketing persons idea of market dominance. I took the … | |
It's spring break, so let's beep in C# code, actually a 440 Hz A. We are just borrowing the Beep() function from the Windows kernel. | |
There are plenty of things you can code in C# without having to rely on the ever so omnipresent MS-VCS. Here is an example of some typical drawings like lines, arcs, circles, text, curves and gradients you can create with C# and actually retain some control over the program. This … | |
A very simple C# console program to give you a table of investment (savings) growth over the years. To compile the program, copy and paste the code into an editor, and save it for instance as "savings.cs". Then find the C# compiler "csc.exe" in the "C:\Windows\Microsoft.NET\Framework\ ..." folder and run … | |
A simple picture viewer written in C# that allows you to view jpg, bmp, gif and animated gif image files. Uses a file dialog to load files, and keeps track of pictures already viewed with a list box. | |
A simple C# program showing you how easy it is to create a basic Windows GUI program which will display the results of a factorial number calculator. | |
| |
Re: Spiritual healing using some form of art has its place. There is alot more to healing than the usual "take three aspirins and go to bed" and here is my bill for $147. | |
Re: There must be something wrong at sourceforge, right now every download request for wxpython2.8 flips into the wxPython2.7.1.2 page :) This direct link may work: [url]http://downloads.sourceforge.net/wxpython/wxPython2.8-win32-unicode-2.8.10.1-py25.exe[/url] | |
Re: You could use / both Windows and Unix allow that. | |
Re: I think of Barack Obama as a modern day Abe Lincoln! As to Republican taxcuts, what are all those unemployed folks going to do with a taxcut? | |
| |
Re: If paulthom12345's suggestion does not fix your problem, try to bind this way: [code=python]import wx ID_FILE_QUIT = 101 class MainFrame(wx.Frame): def __init__(self, title): wx.Frame.__init__(self, None, wx.ID_ANY, title=title) self.menuBar = wx.MenuBar() self.fileMenu = wx.Menu() self.fileMenu.Append(ID_FILE_QUIT, '&Quit\tCtrl+Q') self.Bind(wx.EVT_MENU, self.quit, id=ID_FILE_QUIT) self.menuBar.Append(self.fileMenu, '&File') self.SetMenuBar(self.menuBar) self.Show() def quit(self, event): self.Close(True) app = wx.App() frame … | |
Re: [QUOTE]get your PhD in post-hole digging[/QUOTE] Wow, is there such a thing? Sounds interesting. | |
Re: I ran this from the IDLE editor: [code=python]s = u'Rash\u00f4mon' print s # --> Rashômon a = u'\u00bfC\u00f3mo es usted?' print a # --> ¿Cómo es usted? [/code] | |
Re: Python code is actually very similar to your Perl code, just a bit more readable: [code=python]# Convert string "HelloPythonWorld" to "HELLO_PYTHON_WORLD" s1 = "HelloPythonWorld" s2 = "" for index, c in enumerate(s1): if c.isupper() and index > 0: s2 += '_' + c else: s2 += c s2 = s2.upper() … | |
Re: Some people even believe that here are angels. Why not ghosts? | |
Re: Zetlin, your code was almost there: [code=python]def test(): number = input("Number: ") scale = range(1, number+1) total = 0 for count in scale: n = count * 20 print n total += n return total total = test() print "Total sum =", total [/code] | |
Re: My friends in Mexico tell me that this is the way they get taught about Mexican history. In 1848 the US stole about half the territory of Mexico (California, Arizona, New Mexico, Nevada, half of Texas) when the Mexicans were still reeling from their war of independence from Spain. I … | |
Re: Use something like this: [code=python]s = "Function1 (text1) (text2) (text3) [text4]" print s.count('(') print s.count(')') print s.count('[') print s.count(']') [/code] | |
Re: Give us an example of the filenames, are they distinguishable so they can be grouped? |
The End.