« first day (183 days earlier)      last day (4767 days later) » 

12:40 AM
is there any mistake in this code.?
 
12:56 AM
i am getting assertion message for "j is being used somewhere"
but i did not find anything wrong with that code
any one can help me with that..
 
1:09 AM
well i found the error..:) but my result is not good...:(
i am getting white image...heheh
 
1:38 AM
any one can help me...
i am getting assertion in this code
any one can help me please.. i did not find any mistake there
 
1:54 AM
@tony hi
i am trying to achieve last result from the figure
so
 
@Miss not having any luck right
 
i maked this program
@rayons what do you mean?
 
I dont do any C++ so I cant help. I was just commenting on how no-one was here.
 
hmm i see
ok
i do't want to open this as a question
because i guess its little things to discuss
that i am not getting my mistake
i guess i should come here after some time....
 
Or not at 3am GMT :)
 
2:02 AM
well its 11.02am here..
 
2:13 AM
@ronald, hi
 
@ronald, i need some help... i have this figure
can you see it please?
and i maked this program
i am receiving message of imageTool.exe.. may be my program is stuck
i did not find any mistake in that code
can you please see and tell me my mistake?
 
2:28 AM
does DibHistogram initialize your histo array?
 
it find the histogram of image
yes you can say..
 
ok
what is the intent of the loop at line 21?
 
well since Histo LUT have values from 0 to 255
so line 21, loop is used to find the maximum threshold from histo array
you can understand from figure
i posted figure also
 
ok, but that is not what it does
 
hmm
 
2:32 AM
what it does is set low to the last index in histo where histo[i] is greater than 0
the loop at line 29 does the same thing for high
 
hmm
well for first loop, if there is any value found by starting from 0..
then assign that value as low
say, starting from 0, i found value 20...that is starting point of original histo
so set that value as low
right
i guess i should find maximum and mini value of original histo
 
hm
 
and I would guess you'd want a minimum other than 0
 
yes
 
2:38 AM
so if you start by looking for the maximum, you can use that to initialize low and look for anything smaller that is not 0
 
hmm i see
well after discussion i got any idea to recover that problem
thanks
 
something like this
you need to initialize high though
 
hm
 
something like this
now, I assume limit is a function?
 
yes
 
2:43 AM
what does it do?
 
limit is used for claming to image .. if 0>image values >255 ,
 
should line 42 read: cBaseHisto[i]=limit( (histo[i] - histo[low])/(histo[high] - histo[low]) )*255; ?
 
yes
right
well let me first explain clamping
if image get the problem of overshoot and undershoot then we have to remove it using clamping method
 
since mostly image pixel values stored as 2^8
 
2:46 AM
line 45 - what do you mean with indexI<indexI<w ?
 
ohh that is index of image
i mean image row and column, w and h is width and height of image
 
do you mean indexI < w ?
 
that mean x value of first index <width of image ,y value of first index <height of image
i guess i should change the names
 
that wasn't the point - the point was that you repeated indexI
it would amount to (indexI < indexI) < w which is 0 < w which is always going to be true
btw: do you intend to go through the image vertically?
'cause that's what you're doing
and that's probably not what you want (bad use of cache for no good reason)
 
hm
 
2:51 AM
your code now looks like this (you'll excuse the indentation)
 
oh sorry recently i notice it
yes you are right
 
one final thing: do you really want to call limit again on line 49 (in the new code) ?
you'd be clamping twice
 
yes
its compulsory
how twice
 
ohh yes
 
2:53 AM
because you call it on line 42 as well
 
you are again right
yes i just need clamping once that has done
 
right, so now your code looks like this
 
ohh i got result
yes
let me check histogram of result image
well result is pretty different
difficult to analysis
let me show you
@Ronal, figure
 
ok
well, now it's mostly a question of what limit does
 
but the result is not good
 
3:04 AM
and how the histogram is built
 
i am pretty sure
well i already naked function for that...:)
so i just apply base contrast on image and then check its histogram
thats it
well i should show you original histogram of lenna
original hiso of lenna
original histogram show that image is little bright but not good contrast
 
that looks pretty different from the histogram in your other image
 
well yes
we have to set good contrast by using technique contrast Base
that mean our result from program is not good..
 
what does your limit function look like?
 
well let me change the image
because Contrast Base is used when all pixels have concentration in one part..
no no i guess our program is not giving right output
let me try with one more picture
 
3:15 AM
again, what does limit do? all the function you pasted does is find the min & max values in the histogram and call limit to find new corresponding pixel values
 
yes
D
ok thats clamping
ok ok
 
ok, and what does the DibHistogram function look like?
 
3:31 AM
if I understand what you're trying to do, you want to spread the histogram out over the range to even out the lighting - is that right?
gotta go - good luck :)
 
3:47 AM
stackoverflow.com/questions/5691232/… What do you think about the @Chris Lutz response?
@JamesMcNellis When ever you are logged in SO I can't even start to THINK about winning some rep on C++ question.
@JamesMcNellis (This is a strange way to say that I appreciate your answers)
 
 
2 hours later…
Xeo
5:38 AM
Always encouraging to write an elaborative answer only for the questioner to say he didn't bother with more than the first few lines. :(
2
A: Passing function as class template argument

Xeo Is it invalid to pass a function into a class template as above ? Totally yes, you're mixing up type and non-type parameters. fun is a non-type argument, it's an address of a function, like an arbitary number 0x12345678. typename T is a type parameter. You can only pass it types, like int,My...

 
 
1 hour later…
Als
6:54 AM
@Xeo: Happens all the time! And some OP just don't mark answers as accepted....hit by that a few times recently
 
 
1 hour later…
8:01 AM
morning all
 
sbi
@Xeo By then I must already have been in deep slumber.
Re the LOL/COBOL fun you had while I slept: When I heard that there was an OO version of COBOL, I immediately thought that it should be named COOBOL.
Oh, and "morning!", @Tony.
That sounds a bit like Morning Glory.
Or is this "Mourning Glory"?
Oh. My. God. I shouldn't read Fforde. Or at least not before getting up.
 
Xeo
mornin @sbi! and @Tony :)
 
8:19 AM
morning everyone
 
Xeo
@jalf mornin javalf
 
sbi
@Xeo Did you sleep at all this night?
 
Xeo
sure
 
sbi
@Xeo So you got up before 7:30 on a Sunday? Aren't you a student??
 
Xeo
@sbi Yes, the problem being? :P
I just have some stuff to do today, tomorrow we got meeting again and i FFS can't figure out, why the project takes like 5 to 10 times more memory on my machine than on the others
 
sbi
8:26 AM
@Xeo Whatever happened to the youth today. <shakes_head/> Now, When I was a student, I learned to make sure to not to have any lectures before noon, which fits much better into the schedule of a student in Berlin. (And mind you, Berlin's schedule wasn't as bad as it is today. There were actually events starting before midnight, you know.)
@Xeo Oh, and if you got stuff to do, what are you doing here in the chat? The chat is likely the time killer #1 for me.
 
Xeo
@sbi to duck out of that damn debugging
it's got something to do with lua, as that makes my memory jump up to the sky
@sbi oh, and I'm playing around with debian on a virtual machine right now, so the chat isn't the only time killer :)
 
sbi
@Xeo "To the sky"? Which window do I need to look out from Pankow to see it? :)
 
Xeo
@sbi s/sky/cloudy sky/
:)
 
sbi
@Xeo Yeah, but IME the chat dwarfs any other time killers by several orders of magnitudes.
Anyway, I got stuff to do today, too, so I'll be afk here. See you!
 
hi everyone youtube.com is filtered in my country can give link and you download it and send to my mail the move is very Little and i must show it ????
 
Xeo
8:31 AM
@maysam try a proxy
@maysam proxy.org
 
also proxy dont work
it also is filter
can anyone help me?
 
Xeo
@maysam then if you got the link, try some youtube-to-video converter sites
 
i try all of the way none of them dont work
 
oof, I've got a ton of stuff to do today too, can't lie around in bed all day, I guess :/
 
vpn is blocked
hello
 
Xeo
8:38 AM
@mayasam: We're no helpdesk, you know? :) We're coder, not people who download videos and send them over the net to someone, sorry
with the most important point being that we're coder, not people.
2
 
i am programmer (python C# c/c++ f# Qt , device driver ,..... ) but need this video
if you cant help me it is not problem , but read some book for can help other in programming :)
 
8:59 AM
Anyone care to comment on the efficiency of the following solution?
0
A: What is the fastest algorithm to return the power of a number which is a power of 2?

FredOverflowWell, you could use the fact that the binary exponent is explicitly stored in floating point numbers: unsigned log2(unsigned x) { float f = x; memcpy(&x, &f, sizeof x); return (x >> 23) - 127; } I don't know how fast this is, and it surely is not the most portable sol...

 
@sbi hello! How are you this morning?
 
sbi
@FredOverflow What's wrong with shifting bits to the right until zero, and counting?
 
@sbi That would be O(n)
 
sbi
@TonyTheTiger Right now I'm in a hurry to leave the house.
@FredOverflow Yeah, but look at the n!
Max is 64.
 
@sbi oh ok, then you should leave really!
 
sbi
9:04 AM
@TonyTheTiger afk
 
 
2 hours later…
Xeo
11:14 AM
bwahaha, I just cracked up on this answer and the commentary
53
A: What are the barriers to understanding pointers and what can be done to overcome them?

TrykeIn my first Comp Sci class, we did the following exercise. Granted, this was a lecture hall with roughly 200 students in it... Professor writes on the board: "int john;" John stands up Professor writes: "int *sally = &john;" Sally stands up, points at john Professor: "int *bill...

 
12:13 PM
0
Q: Making auto_cast safe

Konrad RudolphGMan has posted a code for the delicious auto_cast “operator” that allows to write code such as the following in C++: float f = 4.0f; int i = auto_cast(f); // instead of: int j = static_cast<int>(f); or, more saliently, T x = value; typename nested_type<with, template_arguments>::...

For your consideration
 
 
3 hours later…
Xeo
3:33 PM
1
Q: Boost how to create a map for types selection?

Blenderso i use BOOST.EXTENTION to load modules. I have a special file that describes each module. I read variables from that file. so such example: shared_library m("my_module_name"); // Call a function that returns an int and takes a float parameter. int result = m.get<int, float>("function_n...

your thoughts on that matter please :)
 
 
2 hours later…
5:35 PM
How do you sort tags in SO by alltime activity?
Not clear to me what sort of sorting it is you get when you click on Tags, but I'm sure C++ doesn't have only sixty six thousand questions.
 
@wilhelmtell Here it says 166041.
 
@Martinho Are you sure you're not confusing C++ with C#?
 
@wilhelmtell Oh, yes, you're right. Silly me.
But yes, that's alltime activity. Apparently there are only 66k C++ questions.
 
The C++ tag is listed third. It used to be 7th or so just one or two weeks ago. Which is wonderful, only questionable because the question count numbers look totally wrong.
 
It's not third, it's ninth. The list reads left to right, not top to bottom.
 
5:41 PM
Oh my. You're right.
-1 stackoverflow ui effectiveness
 
If it read top to bottom, the tags that are currently in the bottom below the fold would get more visibility than tags with more questions. I don't think that would be good. This way, all the top tags are above the fold.
@wilhelmtell +1 StackOverflow UI effectiveness :P
 
Except, it used to be top to bottom.
i think that @jeffatwood has made a name for himself for having no clue about applying ui changes to a shipped product.
 
what is the difference between micrometer and nano meter?
 
@Miss There is 1000 nanometers in one micrometer.
 
5:49 PM
@Miss A micrometre is 10^-6 metres. A nanometre is 10^-9 metres.
 
@miss micro is 10^-6 and nano is 10^-9
 
Damn. <sup> doesn't work here.
 
hm i see
nano meter used for shorter wavelength
what about micro meter
recently i googled it...
 
@martinho go and see every single change stackoverflow has done since it was created. except for its creation, it just pissed off users on meta. because they do changes abruptly, taking things out and put new ones to replace them. this is ui 101. you can't do that. if you change to make "things better" then you're doing it wrong. you're making things worse. users don't appreciate being lost, having to look up every monday and thursday things they knew where to find.
it has to be subtle and slow.
or else in a different branch, a parallel different url for users to play with if you wish. but not shoved down users throat.
 
Ok, I need a second opinion. Does this look good? ideone.com/EEUiu
 
5:55 PM
@miss micrometer is a longer wavelength than nanometer and therefore has less energy. one thousand times less energy, one thousand times lower frequency.
 
hmm i see
 
@PiotrLegnica some context ... do you want us to read the code and figure out the context and what it does and what for and what's the goal on our own?
 
To help compare different orders of magnitude this page lists some items with lengths between 10−6 and 10−5 m (between 1 and 10 micrometres, or µm). Distances shorter than 1 µm *~0.7–300 µm — Wavelength of infrared radiation *1 µm — the side of square of area 10−12 m² *1 µm — edge of cube of volume 1 fL *1–10 µm — diameter of typical bacterium *1.55 µm — wavelength of light used in optical fibre *3–4 µm — size of a typical yeast cell *3–5 µm — size of a human spermatozoon's head (radius by length) *6 µm — anthrax spore *6–8 µm — diameter of a h...
 
hmm i see .. thanks
 
@wilhelmtell Er, it's commented. I just want to know if I haven't missed any obvious threading-related stuff.
 
 
1 hour later…
7:00 PM
Hi, Anyone here ?
 
Yes.
 
I have a bsic question about defining structs. i want to create a struct but don't want it to be global. so i go and define it inside main. next i want to pass this struct to a different function as an argument. the problem is that the function is outside of the scope of main, so it does not what is this struct that i have defined.
so i pass a pointer to that struct to the function, but it can't access it's members since it doesn't know it. what's the way of doing it right ?
 
@michael wouldn't a declaration inside a .cpp work?
 
i can paste a code, if my problem is not clear. thanks for any help
 
it will be accessible inside the .cpp, but will be hard to use outside of it
Would this solution work @michael?
 
7:11 PM
@Drahakar this is all happening in the same cpp file. i don't even need to acces it from outside of the cpp file
@Drahakar i can put the struct variable as a global var but i was wondering how i could do it differently
 
@michael well I am not sure I understand your problem :S
 
@Drahakar can i paste code here ?
 
yes you can
Or you can use some webcompiler
 
This looks more like C to me :P
 
7:20 PM
it's basic C, compiles in c++ as well
 
Can you tell me again why you can't extract the struct definition out of the main?
 
maybe i can, what do you mean by that ?
 
Hi @jalf
 
-hey
 
If you would extract the nodeData struct out of the main
it would be available in your listenerThread function
and if you keep it in the .cpp
 
7:21 PM
and make it global ?
 
What is exactly your goal by make it intern to the main?
 
i guess i can, i jst wanted to avoid using global variables. and was wondering how i could do it locally
 
it's not really a global variable if you are only defining your struct
in the global scope
if you are declaring an instance of it at a global scope, than it become a global variable (correct me if I am wrong)
 
you mean just writing struct nodeData{.....}nodeData; ?
 
you don't need to add the nodeData at the end in c++ :)
 
7:24 PM
you do if you want to define a variable of that type
 
struct nodeData
{
};
yes, but not if you are only defining it
 
and you forgot the semicolon
 
yes thank you @DeadMG
 
i see what you mean now
@Drahakar thanks for your help !
 
in your main you can instanciate it by typing
nodeData data;
@michael you are welcome and thank you @DeadMG for your corrections :)
 
7:25 PM
@Drahakar thanks again.
 
 
2 hours later…
9:54 PM
Does this work for you guys? code.google.com/p/tetris-challenge/downloads/… (Windows build)
 
@StackedCrooked Did for me.
 
@GMan Thanks. I usually don't compile with the /MD flag, and want to be sure I'm not missing any obvious dependencies.
 
I'd like to find a good catch phrase to answer when someone is victim of the C++ most vexing parse... It happen so ofter.
*"Why does this doesn't compile?"*
- <insert cool statement here about the C++ most vexing parse>
 
What's wrong with this?

fprintf(stderr,"Error, continue?");
gets(buf);

From: http://pragprog.com/the-pragmatic-programmer/extracts/coincidence
 
gets
Let's say you allocated 10 bytes for buf.
Now I go and when asked to continue I type:
1234567890bam! You're toast!
What do you think happens?
 
10:09 PM
@qwertymk: Well, I see that you're using the hideously unsafe C functions, which is an excellent start for something that's very, very wrong
4
 
And less important, you don't go asking questions to the user in stderr.
 
could I suggest to use std::cerr instead of fprintf(stderr, ...) ? (and I approve what @MartinhoFernandes just said)
 
10:32 PM
0
Q: Firefox interacts with my timers somehow ?!?! This is crazy ^^

user676943Hello guys. I have a problem with the timers in my win32 C++ DirectX game (a little demo). I am using "timeGetTime" to get the current time and use it to playback the animations or for logic by using the delta time (I also use a constant for normalization when animating). I use a tickrate as low ...

Bug in Firefox, bug in timeGetTime, bug in the OP's program, malware-ish things, or PEBKAC? Bets are open.
 
@MartinhoFernandes PEBKAC?
OK nm, wikipedia gave me the answer
Hello @JamesMcNellis
 
Hello!
 
@JamesMcNellis thank you for correcting my answer about the C++ "very vexing parse"
 
I made "very vexing parse" up. I don't know that there's a real name for T x(); being a function declaration. "Most vexing parse" definitely refers to T x(T()); and similar forms, though.
It's all quite vexing and I cannot wait until initializer lists and the new {} initialization syntax is widely supported.
On that note, the sky is a most unusual color this afternoon (blue!) so I'm going to go outside.
 

« first day (183 days earlier)      last day (4767 days later) »