20 Discussion / Question Topics
Remove Filter This is the message I get while trying to answer in a thread. Only, there is no clue of what I could do to prove that I'm actually a human, so that the robot would be satisfied. Can you help me ? (qupzilla/linux) edit: with firefox, it works. Only it's … | |
4 hours after [my last post](https://www.daniweb.com/software-development/python/threads/497125/python-program-crashes-after-using-too-much-memory#post2175367) in [this thread](https://www.daniweb.com/software-development/python/threads/497125/python-program-crashes-after-using-too-much-memory), the python forum page says that the post was written by Raisefamous. I tried to empty my browser's cache (qupzilla in linux), but it didn't work. It is obviously a bug. | |
Some unicode characters such as dice symbols or chess symbols (see https://en.wikipedia.org/wiki/Miscellaneous_Symbols) dont display properly anymore in the forums. What's going on ? there are examples here [Click Here](https://www.daniweb.com/software-development/python/code/492854/another-visit-to-string-formatting-python#post2155656) and here [Click Here](https://www.daniweb.com/software-development/python/code/423640/unicode-chessboard-in-a-terminal#post1814200). | |
Given a unicode string or file, what is the best way to find a short unicode string that is **not** a substring of the first one ? I want a working algorithm that avoids transforming the first string into a list of characters. My first idea is to choose a … | |
Importing a hierarchy of firefox bookmarks in konqueror can be tricky, as konqueror's bookmarks editor doesn't read firefox's sqlite databases where the bookmarks are stored. Konqueror bookmarks are normally stored in a file `~/.kde/share/apps/konqueror/bookmarks.xml` , which is actually a dialect of `xml` named `xbel`. I found very little documentation about … | |
Today is 70th anniversary of D-Day in France, with 20 heads of state, including Queen Elizabeth and Barack Obama ! Great weather and nice speeches ! https://twitter.com/FranceinChicago/status/474910715237502977/photo/1 Let's remember these 150000 soldiers ! http://online.wsj.com/articles/d-day-invasion-view-from-above-1402005875?tesla=y#1 | |
My old hard drive with Linux Mint 15 Olivia refused to boot yesterday: kernel panic etc. I tried to repair the file system and now some shared libraries are missing. On this computer, I have a brand new second hard drive with Kubuntu 13.10 freshly installed. From this OS, I can … | |
I just started a new small python project on google code which goal is to easily create clickable graphs on a GKT+ goocanvas. The initial idea comes from this code snippet [url]http://www.daniweb.com/software-development/python/code/323792[/url] . I want to do about the same, but instead of simply drawing the graph, I want to … | |
I thought users of the python forum could be interested in a seminar conference by Guido van Rossum about the design and implementation of the python language, so here is the link [url]http://irbseminars.intel-research.net/GuidoVanRossum.wmv[/url] (it may be easier to download the file first instead of reading it directly from your browser) | |
How would you safely round a floating point number to the nearest integer ? Python has the built in function [icode]round[/icode], but it returns a floating point number [code=python] >>> round(4.9) 5.0 >>> help(round) Help on built-in function round in module __builtin__: round(...) round(number[, ndigits]) -> floating point number Round … | |
I'm looking for C++ libraries to manipulate real and/or rational polynomials. Does someone know such a library ? | |
Suppose that I have a program named myprog, and I type this in a shell [code] $ myprog -z hello -m "this is a message" [/code] The function main in myprog will receive a char** argv containing the following strings [code] "-z", "hello", "-m", "this is a message" [/code] So … | |
Does anyone know how I can test if an object's type is a builtin type or a user defined type ? | |
Consider the following script [code=python] #!/usr/bin/env python # foo.py import sys print sys.argv [/code] When I run this in a terminal with arguments, here is the output [code] $ ./foo.py -h hello -m "this is a string" ['./foo.py', '-h', 'hello', '-m', 'this is a string'] [/code] My question is: is … | |
What do you think would be the best way to write this structure [code=python] if testA: actionA() if testB: actionB() if textC: actionC() else: actionDefault() else: actionDefault() else: actionDefault() [/code] if I want to write only one call to actionDefault() ? | |
In python, a "function object", that is to say an object which can be called as a function, is simply an instance of a class which has a [icode]__call__[/icode] method. An example is [code=python] class FuncObj(object): def __call__(self, *args): print("args were %s." % str(args)) func = FuncObj() func(1,2,3) # output … | |
Python 3.0 comes with a builtin [icode]print[/icode] function which breaks old code. In order to write code wich is compatible both with the 2.x series and with the 3.x series, I'm using the following [icode]Print[/icode] function [code=python] import sys def Print(*values, **kwd): fout = kwd.get("file", sys.stdout) sep = kwd.get("sep", " … | |
The following program is able to download the python programs contained in a thread of the python forum. Just start the program, it will prompt you for the thread number and create a directory with the code extracted from the thread. I used it to download all the wx examples. … | |
I'm on linux, and I'm using a command called 'espeak' which reads sentences on stdin and writes phonemes on stdout. Whe I run it in a console, the output is the following [code] bash$ espeak -q -v mb-fr4 -s160 bonjour tout le monde # <-- I type this input, the … | |
In the Perl language, you can fork a child process with the following syntax [code=perl] open CHILD, " | programA | programB | program C"; print CHILD "this is an example input"; [/code] (at least, you can do this under linux). This statement starts 3 processes in fact; programA, B … |
The End.