Jonas Wielicki

Germany

sotecware.net

Age: 22

2d
comment Detect mime type of an image via Javascript
@SripathiKrishnan Detecting gifs and replacing them with placeholders comes into mind …
Jul
21
comment How to assert class overrides default __hash__ and __eq__
@MartijnPieters Ah right, thanks. I was thinking about disabling hashability, indeed, but didn’t remember that it must be __hash__ which is set to None.
Jul
21
comment How to assert class overrides default __hash__ and __eq__
Let us continue this discussion in chat.
Jul
21
comment How to assert class overrides default __hash__ and __eq__
@user2357112 But the method must be declared in the object class, so it is correct to search the classes __dict__ for the method.
Jul
21
comment How to assert class overrides default __hash__ and __eq__
Also, what is the actual problem you’re trying to solve? Because it is possible that solutions suggested here (such as the one from Martijn Pieters), won’t work for you. If you need e.g. hashabiliy, you also need to chech that __eq__ and __hash__ are actually callables
Jul
21
comment How to assert class overrides default __hash__ and __eq__
You have to traverse the inheritance graph, because you don’t actually want to take all bases into account—namely you don’t want the methods from the object base, appearantly, otherwise hasattr would be the way to go
Jul
15
comment Is it really necessary to close the unused end of the pipe in a process
Generally, not closing file descriptors is just like not freeing memory. You’re hogging system resources which may be rare. There is also a common (soft) limit of 1024 total file descriptors.
Jul
14
comment Baking smoke on headless machine
At least on recent blenders, it seems that you need to explicitly specify an external cache for blender to work with, otherwise headless baking won’t work (although it would create a blendcache_* folder automatically if run with a gui, I think). I might have misinterpreted something here though.
Jul
14
revised WARNING: this script is deprecated, please see git-completion.zsh
clearly separate file names from separators (looked like a path before)
Jul
11
comment google plus doesn't show meta information snippet from xhtml documents
No, there is no other resolution I know. The google bot can be identified as something along the lines of a Firefox version 6. You should be able to match it by looking for Firefox/6. (maybe also Gecko/6.—I don’t remember exactly anymore and there is too much abstraction between the UA parsing and the workaround in the codebase to be sure) in the User Agent string.
Jul
9
comment Killing a daemon using a PID file
I think there is even some security-related mechanism which uses the (startup-time, pid)-tuple to securely identify a process. As I was unable to find a source for this, I prefer to have this in a comment. Maybe someone knows in which mechanism linux does this?
Jul
9
comment Killing a daemon using a PID file
The daemon manager (such as systemd) usually runs all the time and is PID 1. It thus has total knowledge of all daemons (as they are direct children of PID 1 as soon as they have forked and detached), which puts it in a slightly different position.
Jul
9
answered Killing a daemon using a PID file
Jul
9
comment Killing a daemon using a PID file
From which point of view are you asking: From the point of view of a systems programmer who wants to manages daemons, or from the point of view of an daemon developer, who wants to supply a script for the users to start/stop her own daemon?
Jul
8
revised select system occaionally not failing with EINTR
formatting
Jul
8
reviewed Approve suggested edit on openshfit apps and better domain names
Jul
8
reviewed Approve suggested edit on Android HttpClient Exception Control issue (Manager is shut down)
Jul
8
reviewed Approve suggested edit on stop/start animation loop on click? jquery
Jul
8
reviewed Approve suggested edit on Execute external program with specific parameters from windows c/c++ code
Jul
8
reviewed Approve suggested edit on Java - execute a program with options, like ls -l
1 2 3 4 5