-
Edited Convert between various ieee754 floating formats.
This code snippet provides methods to convert between various ieee754 floating point numbers format. For example double precision to single precision. The format is given by a pair (w, p) … -
Edited Convert between various ieee754 floating formats.
This code snippet provides methods to convert between various ieee754 floating point numbers format. For example double precision to single precision. The format is given by a pair (w, p) … -
Replied To a Post in help with something (probably easy code)...
It is a typo at line 64, it should be `display4_txt`. Try to understand the code. -
Edited Convert between various ieee754 floating formats.
This code snippet provides methods to convert between various ieee754 floating point numbers format. For example double precision to single precision. The format is given by a pair (w, p) … -
Replied To a Post in help with something (probably easy code)...
Yes it looks correct. Does it work the way you want? -
Replied To a Post in help with something (probably easy code)...
Well exactly where you put this function in the above code. -
Replied To a Post in help with something (probably easy code)...
You can write the reset function like this def reset(self): global number, tries number = random.randrange (100) + 1 result_msg = "Game reset. Start guessing!!!" tries = 0 self.update_display(guess='', result=result_msg, … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
There will probably be some time before Dani is given a fine for abusing market dominance ;) -
Gave Reputation to pty in Dani isn't killing DaniWeb with Dazah, she's saving it
So how come the link is marked as broken in my post? It works just fine. `https://help.qwant.com/help/overview/how-does-qwant-index-the-web/` The button to continue to the page should be more strongly coloured than … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
Well, engines such as Qwant seem to be on their way to partially achieve these incredibly complicated and expensive tasks. I don't think their financial wealth and their software production … -
Revoked Solved Status for Having an issue with implementing money in a Python text based adventure
I've recently been learning on how to write Python. I'm still a beginner. I've read multiple times that creating a text based adventure game in Python is a good exercise … -
Marked Solved Status for Having an issue with implementing money in a Python text based adventure
I've recently been learning on how to write Python. I'm still a beginner. I've read multiple times that creating a text based adventure game in Python is a good exercise … -
Replied To a Post in Having an issue with implementing money in a Python text based adventure
It looks quite simple. You need to add an attribute to dungeon items, such as `GoldValue: 25,`. From the character's point of view, you can invent a new variable similar … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
The main question is the amount of work it would take to build your own search engine. I don't think you should worry too much about the need for alternative … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
There are other engines, such as Startpage, I know a french engine named Qwant, a german engine named Metager, etc. If you had your own engine, you could insert some … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
Some people try to compete with google by launching their own search engine. You could perhaps create a search engine of your own, advertising user privacy for example, and send … -
Replied To a Post in Conversion code from Python to C#
@alc6379 The code reads a list of file names in an excel (xlsx) file. The image files (.jpg) are displayed in a resizable window and the video files (mp4) are … -
Replied To a Post in Dani isn't killing DaniWeb with Dazah, she's saving it
I don't think it's correct to blame Google for Q&A sites' success. I think these sites meet a specific programmers' need: we want to use software and libraries and we … -
Replied To a Post in Resulting Print String Issue
As long as you think the result of an expression is a string, you can append a string operation. For example the result of `raw_input('name? ').strip()` is a string, so … -
Replied To a Post in Resulting Print String Issue
You wrote `raw_input(nameAsk)` instead of `raw_input('What is your name')`. I would also use a while loop. The idiom `while True` means *repeat indefinitely*, so my loop runs until the `break` … -
Replied To a Post in Thread and queue problem in call function and blocking code in python
If you have a working solution, it's OK, although I don't see the difference with my solution... -
Gave Reputation to rproffitt in Installation
Hi Howard. Installing can vary as laptops could be running a number of OSes from Linux, Windows, BSD, ChromeOS, Android and what else? For some OSes folk install an Antivirus … -
Replied To a Post in Thread and queue problem in call function and blocking code in python
It's hard to believe, can you post the same screenshot, but with the code window this time? Or perhaps the console is a part of the Geany editor ? IDE's … -
Replied To a Post in ATM alogorithm in C.
I removed the calls `clrscr()` and `getch()` because I'm on Linux. When I run the program, it doesn't go into an infinite loop. When I enter 5 in the main … -
Replied To a Post in Thread and queue problem in call function and blocking code in python
No, no, you don't have to play with the select function's arguments. These must be lists of python files, or linux file descriptors. To make things simpler, I wrapped the … -
Replied To a Post in ATM alogorithm in C.
See how your code looks better after I used the [astyle](http://astyle.sourceforge.net/) beautifier astyle --style=python --align-pointer=middle --max-code-length=79 atm.c For human readers, formatting matters in programming #include<stdio.h> #include<conio.h> void main() { float … -
Replied To a Post in Thread and queue problem in call function and blocking code in python
The print part may be a problem if you are using python 2 instead of python 3. If this is the case, my advice is to always write from __future__ … -
Replied To a Post in Thread and queue problem in call function and blocking code in python
This is a long post and there are many questions. Let's first start with a simple code that waits for console input with a timeout. A correct way to do … -
Replied To a Post in Color changing window demo of tkinter after timer events
@jklotzner Thank you for the input, but this has nothing to do with today's python vs yesterday's python. The difference is that your code is written in the local namespace … -
Replied To a Post in Function returning a value (multi-thread)
@sekmani Hi, yes you can directly `print my_queue.get()`. Also it is a good habit to call `my_queue.task_done()` after each call to `my_queue.get()`, although in this simple example, it doesn't change … -
Replied To a Post in Computer Language
@diafol You'll probably have a slightly better experience with [Idlex](http://idlex.sourceforge.net/), which enhances idle with some missing functionalities. However, a powerful editor such as [Kate](https://kate-editor.org/) may be more comfortable to use … -
Replied To a Post in Why i cant import txt files using numpy?
The way you wrote the code snippet, it works only if `data_file.txt` is in the current working directory. A solution is to use the full path to the data file. … -
Replied To a Post in Computer Language
I think he means **indentation** instead of deviation. Python's success is amazing in this thread! I think the best reason for a beginner to choose python is that it is … -
Edited Python user pw program help
Hello everybody! Today i am writing a program to connect usées without database, with only one function: `createaccount(username,password)` That you must write on the beginning if the program. But i … -
Replied To a Post in Blew up my boot loader, I think
I don't know why the #2 direction is here. I never had a failure using the boot-repair-disk from a CD/DVD. So you can try it if you prefer this. But … -
Replied To a Post in Blew up my boot loader, I think
Yes this one. It usually works very well to detect installed OSes and repair the boot. -
Replied To a Post in Blew up my boot loader, I think
Did you try the boot repair disk ? -
Replied To a Post in Python Bank System
@sam_38 Your question is way too vague. The best way to use a programming forum is to start your own thread and post code containing your attempts to solve the … -
Replied To a Post in A Simple PySide Digital Clock
@Stuart_5 PySide is a third party module that needs to be installed separately. See https://pypi.python.org/pypi/PySide -
Replied To a Post in How can I specify the size of the python command line window in my code?
@DubWine hi, it seems that there are solutions by using the `ctypes` module and the `setconsolewindoinfo` method in windows api. See https://stackoverflow.com/questions/3646362/how-to-control-the-size-of-the-windows-shell-window-from-within-a-python-script for example. Also google the keywords python and … -
Replied To a Post in rsync not syncing some files
@rproffitt Luckybackup invokes rsync, and it can display the rsync command line that it uses. It means that one can use luckybackup as a GUI tool to figure out the … -
Replied To a Post in rsync not syncing some files
Did you try using a case sensitive filesystem such as ntfs ? -
Replied To a Post in Python loop over files in directory then list
I think you get this error because of `with open(f, 'r') as var1`. It should be `with open(os.path.join(destdir, f), 'r') as var1`. A more up-to-date approach is to use module … -
Replied To a Post in how to include a function from other .c file?
I think you need a file `complex.h` containing the line void read_comp(complex, int, int); -
Replied To a Post in Program
Don't learn software development, instead 1. Find something useful that you want the computer to do for you. 2. Find whatever way to obtain this from the computer. 3. That's … -
Gave Reputation to deceptikon in Advices to become a better developer
> I’ve realized that I’m a little weak when it comes to fix, modify and understand code within large applications, and, needless to say, I need to find a way … -
Replied To a Post in Converting C++ Code to Python
@doctorjay This is interesting. In that case we could propose def calculate(values, size): return sum(values[:size]) assuming that `values` allows random access (eg tuple or list). This is not perfect however … -
Replied To a Post in Advices to become a better developer
I just found a straightforward python app named seqdiag to generate sequence diagrams, see [blockdiag.com/en/seqdiag/examples.html](http://www.blockdiag.com/en/seqdiag/examples.html) -
Replied To a Post in Unable to pass data in variables between functions
You need at least a `return r` statement in `c()`. Also, if you have more errors, please post the whole exception traceback. There are other errors: `process_files()` expects a sequence … -
Replied To a Post in Unable to pass data in variables between functions
Which value is not passed to the function ? Is it the call to `processFile(x)` ? Did you try to add statements such as `print(sys.argv[1:])` before line 21 or `print(x)` …
The End.