3,386 Posted Topics
Re: 9 does not exist in octal numbers, which has digits in range of 0..7. Octal numbers is signaled with 0 at beginning of number, you can however tell that number is actually base 10 by using optional second parameter to parseInt <html> <FORM> <table name="tblSamp" border="1"> <tr><th>Time</th> <td><input type="text" name="alpha" … | |
Re: class lines are misindented and also function lines from line 38 Correct code seems to be in http://www.koders.com/info.aspx?c=ProjectInfo&pid=SC78E2QBLRAQS1XVU32CHKWEEF. in ...\trunk\pyspkrec\pyspkrec\ | |
Re: Your are taking singleton tuples as result, so you could append **`album[0]`** not album at line 24. | |
![]() | Re: You could try [pyjs](http://pyjs.org/) and do OO in Python . Web site is done in pyjs of course ;) . |
Re: You have only a in second case, but all letters before it also in first case. >hash.update(arg) > Update the hash object with the string arg. Repeated calls are equivalent to a single call with the concatenation of all the arguments: m.update(a); m.update(b) is equivalent to m.update(a+b). import hashlib, string … | |
Re: I did longest common subsequence to here once, but there seems to be little similarity, mine is so much shorter and simple http://www.daniweb.com/software-development/python/threads/284870/improve-this-method/3#post1245223 | |
**_Greetings, dear Python forum users, from newly appointed moderator pyTony!_** There have been some development lock up of the Forum database occuring due to debugging process of current transition process to new Forum software. I have today been appointed as moderator and I have started to learn the processes involved … | |
Re: You can add a onclick call in href of the menu item, this reacts to click of first menu item with alert <div id="fl_menu"> <div class="label">MENU</div> <div class="menu"> <span onclick="alert('m1 pushed')" class="menu_item">An menu item</span> <span class="menu_item">A long menu item</span> <span class="menu_item">Item 3</span> <span class="menu_item">Another one</span> <span class="menu_item">A really, really long … | |
Re: So what kind of errors/wrong output are you getting from[ xlrd/xlwt](http://www.daniweb.com/software-development/python/threads/416065/help-creating-a-spreadsheet-and-input-information-from-python-output) and what is your code causing those errors? | |
Re: You are doing linear scan of all txt when you use index. Read up on [dictionaries](http://www.tutorialspoint.com/python/python_dictionary.htm) in Python. | |
Re: Just use raw_input like you say yourself. name = raw_input('Enter a name\n') What is your problem, actually? | |
Re: Python 3 has only unicode strings and does not use u'' but only '' > pieces = u''.join(unichr(9812 + x) for x in range(12)) >>> pieces = ''.join(chr(9812 + x) for x in range(12)) >>> pieces '♔♕♖♗♘♙♚♛♜♝♞♟' | |
Re: Which can be expressed also: import random with open('file_containing_the_questions_separated_by_newline.txt') as question_file: my_questions = random.sample(list(question_file), 10) | |
Re: >score == wordJumble This does nothing You should use if ... elif ... else for if statement at last lines. Most stuff you are doing by yourself could be done by standard functions, like random.choice and random.sample. score parameter given to functions is 0, so score is allways zero. >score … | |
Re: row is None, how about changing the loop to for row in cur: print row or at least on line 26 the range should be `range(1, numrows)` What is the meaning of with con: It does not make sense to me, here seems to be class to make mysql library … | |
Re: line 12 should not work, as parameter of write must be string, you do not need remove the file, just overwrite it. I would not use variable named inp for file opened for writing. It is slightly confusing to use file instead of open. | |
Re: I do not get the idea of code as switch statement is a advanced control structure, compared to flags and jumps in machine level, not to talk about [Turing machine](http://www.mapageweb.umontreal.ca/cousined/lego/5-machines/turing/turing.html). Could you state exactly the sourch of theory you refer? | |
Re: Make test cases and test it, have you coded it or not? For me I would leave out at least the conio, clrscr and getch bit. And how are you reading the 33 or 55 square matrixes when it says input 3x3 matrix? I can not imagine anybody typing in … | |
![]() | Re: Why did you put variable definition in when you call the function, should you not give it existing variable with value? And you do must end the statement with semicolon, like it clearly says in error message. Also the actual function does not return value, but you are using it … |
Re: Maybe you would like to compare your code with for example [url]https://github.com/liudmil-mitev/Simple-Python-Chess[/url] (7 months not updated) by [url]https://github.com/liudmil-mitev[/url] or some other gui chess and for example improve that code for enpassant for/with him, as you have experience of implementing in your program. | |
![]() | Re: The system has it's own current dictionary, you want to change Python's directory by os.chdir |
![]() | Re: > if path.exists(PATH) and path.isfile(PATH): There is no extra value of using both only the latter is enough. But in multitasking conditions, the situation can change between execution of the test of condition and execution of the following statements as they are not 'atomic'. So it is considered more correct … ![]() |
Re: I do not understand what you are doing. I have not used the software myself, but you are not seeming to do anything like this document for mpi in Sage is saying for example: http://www.sagemath.org/doc/numerical_sage/mpi4py.html Here seems also to be some warnings about MacOS Universal binaries: http://mpi4py.scipy.org/docs/usrman/install.html | |
Re: [Google is your friend ;-)](http://lmgtfy.com/?q=xlrd+date) Here seems to be instructions of topic. http://thoughtsbyclayg.blogspot.com/2008/12/get-dates-from-excel-with-python-xlrd.html | |
Re: Yes it means just that, and because the increment is pre-increment, it means same time and that age was 64 or more before if the condition was true. And regardless the age will allways be increased by one. If consider the meaning of naming of variables, it looks likely that … | |
![]() | Re: Check [Colorama](http://pypi.python.org/pypi/colorama) pip install colorama |
Re: > datetime.timedelta(0,170) >>> str(datetime.timedelta(0,170)) '0:02:50' | |
Re: I have not experience of topic but could something ready like https://github.com/sanbornm/Site-Monitor be of help or inspiration to you? | |
Re: your have 16*3=48 values and you are trying to put them in three variables, maybe you mean to assign the array values transposed, but left out trasposing? | |
Re: First of all if you really must, do it, otherwise go with currrent offerings like Code::Blocks or Visual C++. Here seems to be instructions for what you must do, if you are forced to do so: http://blog.bestsoftware4download.com/2010/02/how-to-install-turbo-c-on-windows-7-64bit/ | |
Re: I can not imagine how your neighbour check function would work at sides of board where there is not all neighbours available. | |
| |
Re: Like: # -*- coding: utf-8 -*- for d in (u'data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|', u'''data1|data2|data3|┌data1|data2|data3|┌data1|data2|data3|┌ data1|data2|data3| data1|data2|data3|''', u'''"data1|data2|data3|" "data1|data2|data3|" "data1|data2|data3|" "data1|data2|data3|"'''): if d.strip(): print(''.join(c for c in d.replace(u'┌', '\n') if c.isalnum() or c in ('|','\n'))) | |
Re: Post your code/pseudocode and explain the point of difficulty/unclarity. | |
Re: Few: 1. My most stupid (nontrivial) mistake and how I found it and solved it 2. My most succesfull software project and why I think it was successfull 3. How my program met the original spec and user exceptions... no scratch this, it never happened in this world **;)** ![]() | |
Re: For 'My PC Specs', or whatever it was called, part how about short multiple selection for Windows/Linux/Mac/Mobile/Other etc so the nuts need not be frustrated to not fit in the speed and type of their graphics card or kWs of their power suply to the text field? **;)** | |
Re: I marked it solved then, next time do it yourself, *cocfly123*! | |
Re: And 12, but I would call them [divisors](http://en.wikipedia.org/wiki/Divisor). | |
![]() | Re: As long as they do not use something like https://github.com/wibiti/uncompyle2 |
Re: Recursion can be usefull as you are reasonable sure it does not go too deep, see for example this recursive connections code of mine: http://www.daniweb.com/software-development/python/code/323868/recursive-connection | |
![]() | Re: On the contrary doc strings are one essential piece of Python coding practice |
Re: Good reminder us who have dabled in the field of AI, that when you finish your Turing test passing program, be sure to check yourself beside it and hopefully you can pass the test, or you must rethink the results :) | |
Re: Interesting, as my solution splitting the string at zeroes and testing the subsequences longer than 4, took around 2.457 ... 2.751 ms in Python (including split and conversion of the 837 digits to integers before check) | |
Re: Scratch this code and start again from zero. Your code is *completely bad design*, sorry to say. Also the **basic logic** of finding number of matches fitting in matchbox is **wrong**. Number of matches is not volume of box divided by volume of match (which I think you are aiming … | |
Re: I have not real experience, but I think that Qt has it's own thread system. | |
Re: > titleString = '<span rel='lightbox'><img src='(.*)' alt='Posted Image' class='bbc_img' />' Use double quotes to include the single quotes inside the string (I fixed it when moving your code here) But listIterator is not defined, what is it? Maybe # Print out the results to screen for t in findPatTitle: print … | |
Re: You could try triple quote the outer double quotes for query. Path name seems Ok, it is only single back slash escaped. Next time do not hijack old thread but make your own, include link to old thread if necessary. | |
Re: I suggest storing format string with %s in article name placr for other and then you only use % to fill in the name in template | |
Re: I unfortunately have not worked in Maya environment, but Googling for Maya Python I came accross this example for first UI, which seems to have 3 buttons. http://www.rtrowbridge.com/blog/2010/02/maya-python-ui-example/ |
The End.