851 Posted Topics

Member Avatar for saisai81

[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!

Member Avatar for MichaelRay
-7
93
Member Avatar for ffs82defxp

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)) …

Member Avatar for vegaseat
0
777
Member Avatar for lrh9

[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, …

Member Avatar for lrh9
0
190
Member Avatar for mrnutty

[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 …

Member Avatar for ddanbe
0
246
Member Avatar for Ene Uran

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 …

Member Avatar for chickenfarmer
0
359
Member Avatar for dvdreplication
Member Avatar for fummy
Member Avatar for Murtan
0
187
Member Avatar for soccerjerseys
Member Avatar for thinkersgroup

[QUOTE=Narue;1065263]Are you a complete idiot?[/QUOTE]A complete idiot would imply perfection.

Member Avatar for diafol
-5
110
Member Avatar for sentinel123
Member Avatar for sentinel123
-2
4K
Member Avatar for Scuppery

[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!

Member Avatar for Lardmeister
7
526
Member Avatar for Phil++

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.

Member Avatar for diafol
0
203
Member Avatar for MRWIGGLES

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]

Member Avatar for Lardmeister
1
152
Member Avatar for Dani

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?

Member Avatar for AndreRet
1
430
Member Avatar for sneekula

[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 …

Member Avatar for vegaseat
1
495
Member Avatar for joshSCH

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.

Member Avatar for atretrioeciii
0
298
Member Avatar for Vineeth K

Amazing what steroids can do for you when you are younger, but it all catches up when you get older!

Member Avatar for daniel12
0
209
Member Avatar for The Dude
Member Avatar for sneaker

What do you mean if Bill Gates watches this link. He made the flash presentation himself. :)

Member Avatar for ayoungpretender
0
147
Member Avatar for grudgemuch
Member Avatar for Dave Sinkula
0
285
Member Avatar for mahgobb
Member Avatar for ahihihi...

I just checked my notebook computer and just about all the ports are female ports.

Member Avatar for Lardmeister
1
225
Member Avatar for quicktpgo

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.

Member Avatar for Lardmeister
0
158
Member Avatar for majestic0110

My Grandpapa says: "Men really live longer than women, they just don't say much so you don't notice them."

Member Avatar for quicktpgo
1
268
Member Avatar for Lardmeister

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.

0
167
Member Avatar for Lardmeister

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.

Member Avatar for Lardmeister
0
380
Member Avatar for Lardmeister

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.

0
230
Member Avatar for vegaseat

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.

Member Avatar for varagpraveen
0
190
Member Avatar for Lardmeister

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 …

Member Avatar for vegaseat
0
456
Member Avatar for Lardmeister

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.

Member Avatar for HLA91
0
179
Member Avatar for Lardmeister

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 …

Member Avatar for nido
0
341
Member Avatar for Lardmeister

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 …

Member Avatar for Lardmeister
0
159
Member Avatar for Lardmeister

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.

Member Avatar for vegaseat
0
175
Member Avatar for Lardmeister

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.

Member Avatar for Lardmeister
0
214
Member Avatar for Mushy-pea
Member Avatar for The Dude

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.

Member Avatar for GrimJack
0
215
Member Avatar for The Dude
Member Avatar for jlm699

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]

Member Avatar for vegaseat
0
221
Member Avatar for Jonx
Member Avatar for Flyin dagger

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?

Member Avatar for Aia
0
783
Member Avatar for freddiecool
Member Avatar for tomtetlaw

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 …

Member Avatar for lllllIllIlllI
0
131
Member Avatar for mgoswami

[QUOTE]get your PhD in post-hole digging[/QUOTE] Wow, is there such a thing? Sounds interesting.

Member Avatar for jephthah
1
197
Member Avatar for johndoe444

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]

Member Avatar for The_Kernel
0
168
Member Avatar for kes_ee

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() …

Member Avatar for shadwickman
0
176
Member Avatar for amrith92
Member Avatar for jephthah
1
347
Member Avatar for Zetlin

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]

Member Avatar for jlm699
0
113
Member Avatar for joshSCH

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 …

Member Avatar for GrimJack
1
1K
Member Avatar for kes_ee

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]

Member Avatar for Lardmeister
0
808
Member Avatar for hughesadam_87

Give us an example of the filenames, are they distinguishable so they can be grouped?

Member Avatar for hughesadam_87
0
89

The End.