Top tag
Next privilege 2,000 Rep.
Edit questions and answers
7 12
~15k people reached

  • 0 posts edited
  • 7 helpful flags
  • 272 votes cast
comment Is O(1) random access into variable length encoding strings useful?
Could you give an example situation where random access to glyphs is useful?
comment projective geometry: how do I turn a projection of a rectangle in 3D into a 2D view
You are looking for a Homography. This can be computed directly from the four corner points of the rectangle in your input image, plus your (fixed) target points. I'm sorry I don't have time to write up a full answer, but this is a standard part of any computer vision course (for example, these lecture notes are relevant). For a library solution, OpenCV has findHomography.
comment What does it mean that StAX parsers aren't complete or correct?
Have you tried emailing the author of the slides for clarification? (Elliotte Harold). (If you get a response, perhaps you could post it as an answer here)
comment How to implement string matching based on a pattern
@PeterSmith: That also accepts '0', which is out of range.
comment Avoiding duplicate bug reports
I think, particularly in open source, you will occasionally come across developers who treat duplicate bug reports with contempt. They might just be having a bad day, or they might be too focused on their own concerns (e.g., a massive existing todo list) to recognise the value of bug reports, or they might be overestimating how easy it is to find the existing report (perhaps because they already know what search terms to use). Whatever the reason, don't let them make you feel bad -- reporting the bug is still the right thing to do.
comment Why did the ISO 8601 committee choose Monday as the first day of the week?
Sunday is part of the weekend. It wouldn't make much sense for the weekend to be at the beginning, would it? (only partly serious)
comment Is it possible for a good programmer to have never used version control?
@Jaydee: The only binary files I can think of (other than output files) are .dfm files, and Delphi supports saving those as text instead; it's a setting somewhere. (last time I used it was back with Delphi 5 though, which is over a decade old, so this is probably out of date :P)
comment How many types of programming languages are there?
So according to my activity log I downvoted this on August 2nd, but I frankly can't even remember seeing this question before, and don't see anything wrong with this answer right now. I've removed my downvote. Something fishy going on? (maybe just something went wrong in my brain)
comment Can I do a git merge entirely remotely?
You seem to be implying that pulling down both branches will involve a lot of data transfer or effort, but that isn't actually true -- the stable branch and the work branch contain the same commits. If you have a copy of the work branch then the only extra data you need to have a copy of the stable branch is the sha1 hash of its tip. And if you don't have the work branch, then how can you make any sensible edits to the repository contents?
comment Can a language support something like “Retry/Fix”?
@crucifiedsoul: Because this involves multiple levels of the call stack. A single level of the call stack may not have all the context necessary to fully resolve an exceptional situation. Detecting an error often requires low level details which a high level function lacks, while selecting an appropriate response to an error often requires application specific logic which a low level function should not include -- therefore, the low level function must be able to communicate the exceptional situation up the stack (and possibly continue execution after the error is resolved).
comment Why do some open source projects do not accept pull requests, but emailing patch files only
@CrazyEddie: github sends (or can send) an email to project maintainers when a pull request is submitted. That email contains the pull request description, plus list of commits and changed files. Obviously you have to be online to receive that email and grab the commits, but that's true for patch emails too.
comment Which hashing algorithm is best for uniqueness and speed?
@IanBoyd: City Hash "too large to be used in practice"? Can you explain? Nothing forces you to use the whole 64-bit result. Also, it doesn't require SSE 4.2 for normal City Hash. There is an (incompatible) variant, CityHashCrc, which requires SSE 4.2 and produces a longer hash, but you can ignore that if it's inappropriate for your needs.
comment Using EC2 instance as main development platform
@GrandmasterB: No monthly fee? You mean electricity doesn't cost money where you live? And maintenance of your home server takes you zero time?
comment Is Functional Programming possible in Java?
@ThorbjørnRavnAndersen: What makes you think that "functional programing" is defined by "lazy evaluation"? It seems an odd example to pick...
comment How do you update copyright notices?
What's the point in putting a year in the copyright notice if that year has no relation to the content which the copyright notice attaches to?
comment Do job postings exaggerate their requirements?
Programmers love to think that programming is somehow fundamentally different to other intellectual jobs. But it isn't. Experience does correlate with skill in programming, though of course it's not a perfect correlation because there are other factors at work too. And do you really think that lawyers and doctors are all the same? That they all work equally hard and have equal aptitude and the number of years they've spent on the job is the only thing that differentiates them?
comment Password hashing and support to your user
I would also note that revealing plain-text passwords that users have set (in fact, storing passwords in plain-text at all) is, in my opinion, hugely worse than giving customer support the ability to directly change user passwords.
comment Password hashing and support to your user
I agree that this is a big security hole. And I agree that it may be the most appropriate solution. It does however seem incredibly silly for customer support to have to temporarily change the customer's email address to reset that user's password: if you're going to let customer support reset passwords, just let them do it directly.
comment What does CR mean in version numbers?
Interesting. I've only ever seen "release candidate" before, never "candidate release".
comment Functions with side-effects in Delphi/Pascal
Odd, then, that the SysUtils.DeleteFile function in Delphi returns a boolean in exactly the way that the OP suggests. And clearly the System.Random function can't be much use if it returns the same value every time.