3,386 Posted Topics
Re: Of course he did not say, he would prompt what iit is again, as it does not change as he said **date** not time. so just store it to variable and track how far the midnight is, and repeat echoing it. (the Date command though has the time also included, … | |
Re: Equalize the case of compared strings http://www.codingunit.com/c-reference-ctype-h-convert-to-lower-case-tolower | |
Re: Check that you can open the file in your browser, the second is not found, so it does not exist. | |
Re: It is better in future to not give full answers to guestion (even I undestand not all points listed are implemented in posted code). It is also difficult to do performance to last point if she does not code it herself and the code is not really hers. | |
Re: No luck using Python Image Library with Jython, I am sorry. The Python code idea looks interesting though in all stylistic points I do not find code agreeable (like using small el for variable name and capitalized function names, which should be dedicated to Classes in Python). There is also … | |
Re: So "nag windows" == kind suggestion for not logged in users to register or log in? How much DaniWeb is browsed **without** login in? | |
Re: How is male and female declared? Why in pricePerm, longHair is defined -50 and shorthair -19, for female and similarly for male. -24 and -25? | |
Re: I think this is html and javascript problem, not scientific question, so I move it to JavaScript section. | |
Re: Play in computer human to human or human against computer? I think first one as checker playing logic for computer is not ready in one week (except random play) | |
Re: I definately also get threads where I was last poster also listed: The following article(s) have recently been updated: > > Sets module help > 2 Replies ; Last updated 11 Minutes Ago by vegaseat > > How to check if table exist? > 2 Replies ; Last updated 32 … | |
Re: I do not know what is your guestion, but after running this, main problems seem to be that you are not checking if the number is not given as input before and in correct range or that it is numeric. Also instructions to player are missing including info how to … | |
Re: > windows console API, [This refenrence](http://msdn.microsoft.com/en-us/library/windows/desktop/ms682073%28v=vs.85%29.aspx) seems at least online. | |
Re: You are comparing entered value to method self.rnumber, not integer. | |
Re: You must deal the case of head node being deleted separately. Otherwise you just copy the next pointer from deleted node to preceding node's next pointer. You are passing unnecessary variables to function instead of defining them locally, then you try to refer variable current defined in main inside the … | |
Re: As impression I get that you are doing loop to calculate [compound interest](http://en.wikipedia.org/wiki/Compound_interest#Simplified_calculation), but also same time use pow funcition, which does it without loop. Therefore I would say the difference is that first one is even more mixed up than second. But I could be totally wrong. | |
Re: you are not saving the pointer to head node returned fro, list building routine. You are also not using global head pointer in the display, but ininitialized local one? Pass head node as parameter. | |
Re: It would ve also more proper to state what legacy language you are dealing with. | |
Re: Create empty file when starting and delete at end, then refuse to start if the file exist. Problem is if your program crashes in middle, so be sure to have proper **finally** clean up which you run even program ended prematurely. I think in c++ it means the deletion of … | |
Re: Did you solve this by yourself, or would you have any specific quiestion? | |
Re: OK, here is Python solution for model. I give this, as I do not want to give ready solution. Instead of slicing out ends of string for recursion you must find C version to do it or use extra parameters. def pali(s): # if longer than one and ends match, … | |
Re: from here http://biopython.org/DIST/docs/api/Bio.Align.MultipleSeqAlignment-class.html looks like you should do just slice the part you want print align[:,:1] Can not test without any data even if one installs the biopython. | |
Re: I do not see you inputting second number, you only read second **digit** of the first number, but your comment is little incorrect, in order to read two digits number, you **must multiply first digit by 10 and add second number to it*, and I can also not see how … | |
Re: Why you put "more" to note but only use the first letter? | |
Re: You are not making sense, you loose old value if you write over another value. Show all code for ths part. | |
Re: Check [url]http://www.daniweb.com/software-development/python/threads/378039[/url]., [url]http://www.python-excel.org/[/url] and [url]http://www.daniweb.com/software-development/python/code/293490[/url], there is loads of posts on data files here. | |
![]() | Re: Yes, that was good way, and other way was to remove the condition from line 57 and preferably make that [an assertion](http://docs.oracle.com/javase/1.4.2/docs/guide/lang/assert.html) at line 58, so it would check that your conditions are without holes between conditions (with proper test cases). |
Re: Like base conversion with modulo, backwards, adding numbers in front of string instead of end. Pseudocode: def wordy(n): w = '' if n == 0: return 'zero' else: while n > 0: w = number[n%10] + w n /= 10 return w number = "zero one two three four five … | |
Re: else is not according to Python syntax, also your naming of variables does not follow convertion of PEP8, which says that Capital letter names should be class names and also your spacing does not follow the standard, there should not be space before indexing bracket, for example. | |
Gribouillis has allready posted code similar to this in his snippets, but here version for input suitable for for expressions, generators and list comprehensions. Need to add robustness by some try...except blocks for real world use. | |
Re: OK, just post your code and example data, so we can see how it looks to us. | |
Re: Thanks for your shared work, came to my mind that extraction of base 2 logarithm from floating point representation should be possible without using math log function. But maybe regular log function is currently so fast in hardware that it is not worth to special case this log2 case, or … | |
Re: You could check ths old daniweb thread in PHP, here more verbal explanations out of DaniWeb: http://www.electrictoolbox.com/check-if-mysql-table-exists/ I have not unfortunately personal experience of using them yet. EDIT: actually there seems even to be [Python discussions about topic](http://www.daniweb.com/search/query/check+if+table+exist+mysql/114?q=site%3A*%2Fsoftware-development%2Fpython%2F*%2F+check+if+table+exist+mysql) here, like http://www.daniweb.com/software-development/python/threads/103597/python-mysql-for-checking-table-exist-or-not Using try... except looks most sensible for me, ie … | |
Re: Basically you are doning 1...N permutation of max N repeats. There is ways, like recursion to one less loops until at zero you have each value doing the statements, but probably you need to copy the array before the recursive call. And as you mention any language it could not … | |
Re: I do not like the way you use global variables everywhere. | |
Re: Have you tried to enter the BIOS or to push ESC to see text instead of the splash, then hit PAUSE before monitor goes? | |
Re: Please do not cross post: http://stackoverflow.com/questions/10499063/zimbra-url-for-caldav You are wasting answerers efforts. Zimbra's support pages seems to be [here](http://www.zimbra.com/support/) | |
Re: Do a for loop checking each number of guess with numbers after it and give error or do not accept guess, if you find same ones. | |
Re: I think this is your job as even only you know the topic of the questionare. | |
Re: You can just make dictionary from card values to file names fo the cards. Then just show the card's images for the chosen cards from deck (pop from deck and add to hand). | |
Re: Your algorithm is still producing rubbish result for 123123, guess 0.1, even when correcting the missing absolute value for error. | |
Re: One general piece of advice: You do not just throw pieces of code together and hope something works. I tell that it does not work, or if by some miracle it worked, the amount of debugging it **half bugfree** would bee **twice the effort** of starting from beginning and building … | |
Re: Maybe you got this guestion answered through your code posts? http://www.daniweb.com/members/939925/sandz24/posts | |
Re: Your logic does not make sense. You try to unify start of arity 1 but you only have start/0 defined. | |
Re: sort only the part of inputted numbers upto guess, [median is the middle number](http://www.mathsisfun.com/definitions/median.html), maybe you are calculating for average in your function? Allways use only part of array used, not rest of it. Better would be to use ArrayList, which would only contain the inputed values. | |
Re: You must write the information in string or actually bytes way, if you want to write binary format, you need to produce those bytes by using the [struct module](http://docs.python.org/library/struct.html) import struct nums = [0x1234, 0x5678, 0xabcd, 63, 44] with open('filename', 'wb') as bin_file: bin_file.write(''.join(struct.pack('H', number) for number in nums)) | |
Re: First of all you must indent your code correctlly. And global is meaningless outside of functions. Also put your function definitions right after import statements. play, stop and exit functions are compeletely unnecessary, however. as they only call another function. Do use single empty lines (double after imports) to clarify … | |
Re: Prolog has not loops. I do not understand what you try to accomplish as we have not any examples of input or expected output. | |
Re: I think it should boil down to number of differing bits in numbers and ther bitwise `xor` and `and` should be usefull. | |
Re: That crashed on me: I:\Java\code>java everythingcombined Enter 5 words: tony jarkko veijalainen kalastajankuja, Espoo word assigned to word[0]. word assigned to word[1]. Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String in ex out of range: 1 at java.lang.String.substring(Unknown Source) at everythingcombined.firstLetterToUpperCase(everythingcombined.java:44 at everythingcombined.firstLetterToUpperCasePrint(everythingcombined.ja a:52) at everythingcombined.getData(everythingcombined.java:27) at everythingcombined.main(everythingcombined.java:22) I:\Java\code> |
The End.