Reputation
1,055
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
6 12
Newest
 Nice Answer
Impact
~13k people reached

  • 0 posts edited
  • 7 helpful flags
  • 272 votes cast
Mar
21
comment Why is Java boolean primitive type name not 'bool'?
"I think C++ had decided to use bool quite a bit earlier than Java decided to use boolean" Why do you think that?
Jan
6
awarded  Yearling
Dec
29
comment Is a day really 24 hours long?
@ChrisF: The day does not end at 23:59:59, that's just a limitation of our quantised time representation. 23:59:59 is a point in time, not a period of time one second long. The point of time 00:00:00 is exactly at the boundary of two adjacent days.
Dec
20
comment How do we differentiate between a computer and a calculator?
@ManojR: Recursion is a form of looping construct.
Dec
16
comment What is the reason behind the if syntax of CoffeeScript?
@RossPatterson: CoffeeScript also has unless.
Dec
6
answered Is there a purpose for using pull requests on my own repo if I am the only developer?
Nov
15
comment Do functional generics exist and what is the correct name for them if they do?
My understanding of the example code was that Person and Car are types. Probably best to wait for the OP to clarify or respond.
Nov
15
comment Do functional generics exist and what is the correct name for them if they do?
I don't believe this question is about dependent types. None of the examples in the question require dependent types.
Nov
15
answered Do functional generics exist and what is the correct name for them if they do?
Nov
12
comment Is O(1) random access into variable length encoding strings useful?
@JoachimSauer: Yes, that's why I included the caveat: "In either case it'll only work for a subset of Unicode -- combining marks, bi-di text, complex shaping rules et c. will break it".
Nov
12
awarded  Enthusiast
Nov
11
comment Is O(1) random access into variable length encoding strings useful?
Ok, here is a specific example: if you're rendering with a monospace font, then being able to jump into the text by codepoint allows you to select a segment of the text to display a scrolling ticker/marquee, or place the cursor at the right codepoint boundary based on the position of a mouse click. (For the ticker, it's easier to store a byte-index directly, so it just turns into normal sequential iteration over the text which doesn't need random access. In either case it'll only work for a subset of Unicode -- combining marks, bi-di text, complex shaping rules et c. will break it)
Nov
11
comment Is O(1) random access into variable length encoding strings useful?
Sorry, did you forget to push the change? I don't see any specific example of an operation that benefits from random access, only mention of the general areas of word processing and text rendering.
Nov
11
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?
Nov
11
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.
Oct
25
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)
Oct
20
revised How to implement string matching based on a pattern
correcting a typo
Oct
20
revised How to implement string matching based on a pattern
Note that integer ranges can still be recognised as part of the regular language.
Oct
20
comment How to implement string matching based on a pattern
@PeterSmith: That also accepts '0', which is out of range.
Oct
19
answered How to implement string matching based on a pattern