3,386 Posted Topics

Member Avatar for hisan

This is not database or excel forum but here for example seems to be instructions [url]http://www.automateexcel.com/2005/11/01/connect_excel_to_mysql_database/[/url]

Member Avatar for raptr_dflo
0
212
Member Avatar for jamie-pu

But one sure thing is that you are calling findroots instead of giving findroots method as parameter in line 37 in error message, line 18 in posted code.

Member Avatar for TrustyTony
0
170
Member Avatar for patrick k

I think you have infinite loop with recursions, as you do not return the result of the recursive calls.

Member Avatar for TrustyTony
0
297
Member Avatar for mukthyar1255

Sometimes it is too easy, no dir (kwlist is suprisingly list): [CODE]>>> keyword.kwlist ['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'with', 'yield'] >>> print('\n'.join(keyword.kwlist)) and as assert break …

Member Avatar for TrustyTony
0
152
Member Avatar for WolfShield

Reading does not create file, only writing does: [CODE]>>> f = open('newfile.txt','w+') >>> import os >>> print([ n for n in os.listdir('.') if n.startswith('new')]) ['newfile.txt', 'new_top95_s.txt'] >>> [/CODE]

Member Avatar for WolfShield
0
469
Member Avatar for TrustyTony
0
365
Member Avatar for Arthas

Don't the[URL="http://www.linuxjournal.com/article/8381"] /proc file system[/URL] have all those details in Linux?

Member Avatar for Arthas
0
84
Member Avatar for podcast

Really single "turing machine types" googling brought the information to me. Time 10 s tops.

Member Avatar for TrustyTony
0
56
Member Avatar for mukthyar1255

There is [url]http://pypi.python.org/pypi/setuptools[/url] and the better [url]http://pypi.python.org/pypi/pip[/url], then most big name packages have also Windows installer in binary format, like here for SciPy: [url]http://www.scipy.org/Download[/url]

Member Avatar for TrustyTony
0
58
Member Avatar for JohnMG
Member Avatar for TrustyTony
0
954
Member Avatar for Sandmann

IronPython runs under .NET: [url]http://ironpython.codeplex.com/[/url] so you do not need convert. If you want to ask some question ask specifically about that function, but the wiki algorithm should be easy to convert to your language and already in pseudocode more suitable for coding than code in other language: [CODE]Algorithm: set …

Member Avatar for vegaseat
0
169
Member Avatar for sahityaonprakri
Member Avatar for bleedblue

post your code with code tags and probably you get help with your difficult parts.

Member Avatar for griswolf
-1
191
Member Avatar for Ronene

You have looked through Code snippets, haven't you? What you think of my snippet [url]http://www.daniweb.com/software-development/python/code/364647?[/url] Not helpfull?

Member Avatar for vegaseat
0
193
Member Avatar for hisan

I wrote one snippet reasently and also vegaseat put some swing stuff in his sticky threads. My snippet is in code snippet archive: [url]http://www.daniweb.com/software-development/python/code/358809[/url]

Member Avatar for vegaseat
0
149
Member Avatar for daviddoria

I do not think that any reasonable question stays very long with no answers at all, if it is going to be answered. So maybe it would be ok to have initial state "no indexing" and have reply side effect as turning the indexing on. But problem is the threads …

Member Avatar for Dani
0
228
Member Avatar for MaYouSHka

Tilde is valid file name in windows and I do not think you meant it. It is quite common to have the script and the work file in same directory, then you can just use the name without directory part. Or you can give proper name of directory that exist …

Member Avatar for TrustyTony
0
339
Member Avatar for Zeruba

You imported complex but did not use it. You must include the module name: [CODE]complex.Complex(3.0, -4.5)[/CODE] By the way Python has complex numbers like 3.0-4.5j (enginering style j instead of i for imaginary unit)

Member Avatar for vegaseat
0
137
Member Avatar for blackrusader

I trust that you have actual user who think they prefer this compared to learning to progrm (say easygui)

Member Avatar for blackrusader
2
324
Member Avatar for thetwig

You could gain some insight from my upvoted Python code for floating point number check, at least it is not cheating as it is in other language. [url]http://www.daniweb.com/software-development/python/threads/278529/1203340#post1203340[/url]

Member Avatar for WaltP
0
215
Member Avatar for freakvista

Maybe you need to save the pieces in some kind of data structure. I see only control variables in your program.

Member Avatar for freakvista
0
3K
Member Avatar for Improzigw

Nobody in they right mind should write 200+ lines of code before compiling the code. 10-20 lines is more like it with fixed data in code and simple printf instead fancy stuff. BTW (*variable_pointer).record is same as variable_pointer->record and generally thought to be more readable. You must be sure that …

Member Avatar for yan0
0
282
Member Avatar for mekhoo

Post your code and explain the status of your progress (Something like "I tested these functions with these values and they work, now I am writing function xxx with these input values it should return .... but I am getting ...." Or you can post the function you have problem …

Member Avatar for TrustyTony
0
283
Member Avatar for ineedhelpasap

[CODE]mydict = dict(line.strip().split('\t') for line in open('mytabfile.txt')) print(mydict) [/CODE] This prepare the dictionary with [B]string key 1 and 2[/B], if you want numbers as key, you must first change the keys to int and divide the job in more lines.

Member Avatar for ineedhelpasap
0
88
Member Avatar for srw0801

I do not know about the error you are now getting, but I see other problems. You define two variables x and y to same value which is confusing. And you are not changing variables any time inside your while loop which leads to program not stopping as you have …

Member Avatar for woooee
0
309
Member Avatar for thetwig

At least with GNU GCC, there is not need to reinvent the wheel, they are declare (very logically) in [B]math.h[/B]: [url]http://www.gnu.org/s/hello/manual/libc/Rounding-Functions.html[/url]. As that is standard header they could be even part of standard: [url]http://en.wikipedia.org/wiki/Math.h[/url]

Member Avatar for thetwig
0
208
Member Avatar for flebber

Example: [CODE]filetype = 'rtf' files = ['doc.txt', 'stuff.rtf', 'artfunction.exe', 'rtfunc.bat', 'doc2.rtf'] print('\n'.join(filename for filename in files if filename.endswith('.'+filetype))) [/CODE] BTW iteritems is being deprecated, use items method instead.

Member Avatar for TrustyTony
0
352
Member Avatar for TrustyTony

This I did also after 'spying' discussions in other forum. Of course you would use sieve prime generation for bigger numbers, but I proved other simple way for a change. Slightly more advanced primes list generator would use primes % 6 in (1,5) property: [CODE]def primes(n): """ primitive non-sieve prime …

Member Avatar for TrustyTony
0
748
Member Avatar for Thropian

Of course you can move the triangle up/down or left/right only as canvas is 2d surface.

Member Avatar for Thropian
0
2K
Member Avatar for ret801

Usually now a days recommended way is normally subprocess, there is also nice code snippet from gribouillis easying the use:[URL="http://www.daniweb.com/software-development/python/code/257449"] A Command class to run shell commands.[/URL]

Member Avatar for hondros
0
230
Member Avatar for Behseini

All your if branches self.Make_Red(), use the string value of selection for configure instead.

Member Avatar for Lardmeister
0
9K
Member Avatar for TrustyTony

I did some code to refresh my C. So many things have happened since 1987, but at least I started with ANSI instead of K&R. As I used the language so little, I think it is time to do some practise and even to learn some C++ to support my …

Member Avatar for Narue
0
1K
Member Avatar for nethero

Use access instructions here [url]http://eutils.ncbi.nlm.nih.gov/entrez/query/static/eutils_help.html[/url] or ftp access. [url]http://www.ncbi.nlm.nih.gov/guide/data-software/#downloads_[/url]

Member Avatar for nethero
0
245
Member Avatar for weblover

Any sample of data possible say 20x20 top left corner? And formula for output in normal form with one example count from that data?

Member Avatar for TrustyTony
0
180
Member Avatar for darkdai
Member Avatar for ocramferreira

For me hard disk is plenty fast enough. My Python code for candidates for multiword anagrams can be found in: [url]http://www.daniweb.com/software-development/python/code/365540/1566911#post1566911[/url], based on my only exact anagram words finding one. Of course with many words the most simple approach takes little time, like with long names. It is highly usable …

Member Avatar for iamthwee
0
572
Member Avatar for gork000
Member Avatar for gork000
0
209
Member Avatar for spixy

if 'sieged' in lastline or 'attacked' in lastline or ') pillaged' in lastline: is never true, as there is not those words in your input. Also the output sample has not any 'counters' as in your print statements.

Member Avatar for TrustyTony
0
131
Member Avatar for elshan0011

You aren't using the variables you are defining, but define ans as 12. And you should post to c# forum.

Member Avatar for ddanbe
0
219
Member Avatar for Celtrix
Member Avatar for evaldaskowka

low+random(maximum-low+1) So 10 + random(100-10+1) random(10) gives values until 9.

Member Avatar for Wolfgan
0
176
Member Avatar for evaldaskowka
Member Avatar for [V]

One more way is to use defaultdict, but I think this is unnecessary optimization, as your alternatives are what I consider good Python style. [CODE]from collections import defaultdict keys = defaultdict(list) for key, value in results: keys[key].append(value) [/CODE] Then there is more functional programming style with groupby, must transpose and …

Member Avatar for vegaseat
0
156
Member Avatar for rssk

Can I request the purpose of doing this? We are not here to do your home works one by one.

Member Avatar for woooee
0
103
Member Avatar for radical43144

Please fix your enter key and use CODE tags. Please explain your package structure and what does not function in it.

Member Avatar for woooee
0
151
Member Avatar for potchi

Here test, subprocess module functions OK in Jython, as it should: Test batch file batch.bat [CODE=text]@echo off echo Hello, from batch file [/CODE] Test in Jython prompt: [CODE]>>> import subprocess >>> subprocess.call("batch.bat") Hello, from batch file 0 >>>[/CODE]

Member Avatar for vegaseat
0
1K
Member Avatar for TheWolverine

Maybe you would benefit from reading how [URL="http://bugs.python.org/issue476814"]universal newline support[/URL] is implemented in Python (or you can use it yourself)?

Member Avatar for TheWolverine
0
564
Member Avatar for can_surmeli

It would pay to separate your data pay load from node as in that case you could have pointer to same info and do not need only have three pointers twice instead of two pointers and much string data. So I think you should use pointer to entry not entry …

Member Avatar for TrustyTony
0
718
Member Avatar for ekailan

3. You allocate needed amount and let operating system deal with virtual memory.

Member Avatar for predator78
0
114
Member Avatar for can_surmeli

Are you sure that for example Address never has ' ' in it? See for example [url]http://www.crasseux.com/books/ctutorial/sscanf.html[/url] how to allocate memory while reading in file and do error check. Notice that arguments of sscanf must be pointers.

Member Avatar for can_surmeli
0
2K

The End.