6502

Italy

gripho.it

Age: 48

Programmer... some quite outdated infos on my website (that is abandonware because I've yet to find a way to create time, so I had to take decisions instead).

6h
comment Loops through Array executes "else" even when "if" statement is true (Javascript)
indexOf would return 0 for New York City. You need to use >=0 for the test. Also the original code checks for a lowercase version.
6h
revised What's good algorithm for getting color to make text on image outstanding?
added 139 characters in body
6h
answered What's good algorithm for getting color to make text on image outstanding?
6h
revised Multiprocess vs Instantiated class
indentation
9h
answered How to fill area between multiple points in a graph
9h
answered C++: creating an instance of an iterator nested class
9h
comment Error in finding object in vector
@maregor: a Point * is a pointer and C++ already knows how to compare pointers for equality. Note however that it will check something different (i.e. two distinct point objects with the same coordinates will compare different).
9h
comment C++ How to get fixed digit after decimal in cout<<
So you took the cout path. You deserve a punishment for this and the punishment will take the form of C++ formatting. You'll suffer this pain for the rest of your C++ programming life.
9h
comment C++ How to get fixed digit after decimal in cout<<
I'd downvote the answer given how ugly and wrong this code is on so many levels. I won't just because it is, unfortunately, what C++ texts recommend to do. But I really cannot upvote it, that's too much.
9h
answered Error in finding object in vector
19h
answered what kind of statement before for loop is possible in python
22h
comment Cyclical Sliding Window Iteration
@AmiTavory: I'm used more to building a sum table because often I need to access the sliding window sum randomly and only for a tiny subset of the values. Of course you can also keep a running sum and add/subtract from it.
22h
revised Cyclical Sliding Window Iteration
added 234 characters in body
22h
answered Cyclical Sliding Window Iteration
1d
comment C++ - For loop not working
@AnirudhBalaji: see edit for some more of the truth about array parameters in C++. Until you get enough understanding of C++ however it's much better to just use std::vector instead (and once you'll have enough understanding you'll see that using std::vector is better 99% of the times).
1d
revised C++ - For loop not working
added 881 characters in body
1d
comment C++ - For loop not working
You cannot pass an array to a regular function in C/C++. When passing an array the argument decays into a pointer to the first element.
1d
answered which one is faster and better? declaring a new variables or just assigning to the global one?
1d
answered C++ - For loop not working
1d
answered What is the exact behaviour of delete and delete[]?
1 2 3 4 5