« first day (217 days earlier)      last day (4713 days later) » 

1:30 AM
does this interpretation of what the OP means by "swap" make sense?
 
2:02 AM
6,667 rep – quick, someone downvote me
oh wait, that's -2, I need to downvote to get -1 :((
 
 
2 hours later…
3:53 AM
Hi all
 
4:26 AM
Warning 1 warning C4819: The file contains a character that cannot be represented in the current code page (1257). Save the file in Unicode format to prevent data loss c:\documents and settings\blah ...\desktop\ip programs\2nd\imagetool\dibfilter.cpp 1 1 ImageTool
i am getting warning in include file : #include "StdAfx.h"
what does that mean?
any one can guide me ..please
@luc: hi
 
4:47 AM
hmm well ok thanks ...
 
5:08 AM
I just realized something. When I think of the magnitude of the universe I have always thought about this horizontally. But there are just as many planets 'above' and 'under' us as well...
 
5:22 AM
@StackedCrooked or how primaxstudio.com/stuff/scale_of_universe is presented circularly/flatly, but then look at the marks that indicate distances between things
like the distance between the earth and sun is several levels of magnitude farther up than the size of either
(that's a great link, btw)
 
@FredNurk Cool.
 
@frednurk..Cool .. nice ...
 
I just realized, that link is the closest I've yet seen to a real Total Perspective Vortex
 
@FredNurk Heh
 
@FredNurk I've got my linux copy of SpaceChem
 
5:39 AM
@LucDanton played much yet? addicted? :)
 
@FredNurk Oh I've been on world 6 for some weeks already
 
6:17 AM
@FredNurk If you downvote an answer, you get -1
 
@FredOverflow that's why I said "I need to downvote to get -1"
 
/me is apparently still half asleep
 
worse sins have been committed, like using /me without StackExchangeScripts
 
ok good bye all and C++ chat room ...
seee ya ... :)
 
 
2 hours later…
8:03 AM
morning
 
8:27 AM
Sweet, "You've earned the "coding-style" badge"
I guess this means I officially have a coding style
 
Isn't that subjective and argumentative? :)
2
 
8:58 AM
@StackedCrooked not any more!
can't argue with a badge
2
 
 
1 hour later…
10:23 AM
Or maybe it means that I code in style
 
sbi
@jalf The it would have been the coding stylish badge.
 
you're just jealous because you're not a stylish coder
 
lol
 
sbi
@jalf Yeah, that's it. You hit the nail on the coffin.
 
;)
ok, I probably can't drag this joke out any further now
 
sbi
10:32 AM
@jalf OTOH, it can't deteriorate much beyond where it already is either, so don't let dignity stop you...
 
10:49 AM
HI ALL
 
11:15 AM
@fredNurk: can you please guide me ...
i need to apply compuss operator
that used to find the edges in 8 different directions..
that means when click on a menu .. i should get 8 difference edge dectected windows
now i am not sure that how do i apply coding for opening 8 windows by clicking on one buttion
as i think ./......
i think make 8 dialogue box.. and on each dialogue , it should represent each functions ....
but i am not sure...
hi @jalf:
@jalf: i need some guide ,,,
 
oh?
 
thanks .. well i need to apply a function on abutton ..
and when click on button it should open 8 difference dialouge box..
i am using MFC c++ .. but i do't understand how do i code up ..
i need to see an example. . can you please help me
i think you did not udnerstand my point
right/?
ok let me think it again ...
 
11:36 AM
hi
 
No clue, I've always avoided MFC like the plague
 
hmm...:(
 
@Miss how is the image processing thing going?
 
i have idea in VB and little in c#
but not in c++ MFC
@nils: i am doing work according to the concepts
but i am not satisfied with my results
i need discuss ... its very important...
 
I got a cold :(
@Miss load the image from the cam and then..?
 
11:39 AM
ahh...
@nils: i understand the laoding image from cam using open cv
but i need help to make up my first step..
 
which first step?
 
i meant i want to make my program where i can load an image from cam.. for this i need help ...
 
little crygirl :D
 
ehehhe crygirl
 
so ur still stuck with loading and showing via mfc?
 
11:42 AM
heheh
yes ... i understand the loading way.. but i am not sure how to apply in my program ...
i am trying./..
 
but OpenCV examples compile?
and work
 
yes that worked ...
@nils Do you know about Compuss Gradient operators ?
 
codepad.org/FDXfjA59 like that? That's quite simple, can't help u with MFC since I only have my MacBook at home
compuss gradient?
 
i have jsut one confusion ..
yes
 
11:52 AM
about how gradients are approximated in digital image processing
 
no .. see gradient compuss give edge detection in 8 different directions.. right?
if so that mean i should get 8 images by clicking on compuss gradient operator button.. am i right?
or i have to apply all 8 direction filters operator on a single output image..
i am little confuse in this ...
 
which filter?
 
compuss gradient operators that apply 8 fitlers for 8 different directions
 
it's compass not compuss
never heard of that before :D
 
hmm sorry for spell mistake
really you never heard it
 
12:00 PM
Prewitt and Canny I recall, but not compas
 
hmm
 
and yes it seems you get for each direction one image
 
hmm that mean i should get 8 different images as a result
right?
 
and Sobel
yes
 
hmm i understand now
 
12:02 PM
since you are looking for intensity changes in a given direction
 
oof, image processing made my brain hurt
 
yes
 
well, computer vision, at least. The rest of it was somewhat manageable
 
@Miss What kind of Script, book etc are you using?
 
@jalf: heheh there should be a room for image processing @nils ..
 
12:03 PM
@jalf well it's a very interesting field
interesting usually means also non-trivial
 
anyways .. i am using simpilfied approach to image processing
 
Very. It just made my brain hurt ;)
 
@Miss type doc edge in matlab
 
and one more thing @nils i do't understand that how to get threshod value from image gray level intensity
 
I think I got kind of discouraged when we did the lab where we had to reconstruct a lecture hall at uni from a couple of photos, and every single group ended up with a cloud of points with absolutely no relation to the actual room
 
12:06 PM
as i think , i need to get the mini value and max value and then take a mean for them that will be threshold
 
@Miss by looking at the histogram, for example if it's an image with black lines and a gray background you should see a bimodal distribution (meaning two peaks) then you just figure out which one is the background and you can set it to white extracting the actual image
Thresholding is the simplest method of image segmentation. From a grayscale image, thresholding can be used to create binary images (Shapiro, et al. 2001:83). Method During the thresholding process, individual pixels in an image are marked as “object” pixels if their value is greater than some threshold value (assuming an object to be brighter than the background) and as “background” pixels otherwise. This convention is known as threshold above. Variants include threshold below, which is opposite of threshold above; threshold inside, where a pixel is labeled "object" if its value is be...
 
hmm its not a threshodl
 
it's also explained in the gonzales book
 
hello folkes
 
in other news, abruptly having to stop working on some code, and then trying to figure out what you were doing a month later kinda sucks
2
 
12:10 PM
hi
@Miss use matlab to play with it, then you will see things work out
 
12:22 PM
@nils .. hmm .. ok i try it
 
The safe bool idiom is pointless, now that we have explicit conversion operators and a special treatment for the if condition, right?
 
@MartinhoFernandes yes
iostreams removed their void* conversion, for example
 
Awesome.
 
oh, cool
 
sbi
12:45 PM
@jalf You think that's bad? How about all developers being torn away from product D (based on some product B) which already was close to the end of its beta phase, to first create a new version of product B, and then going back to D (based on the now considerably changed B) to pick up where the developers left it, with management expecting the "closing phase" of D to take about 10% longer, because the developers will have been away for 7 months...
 
Derived and Base projects? :)
the "fragile base project" problem
 
sbi
@FredNurk Basically yes. (I couldn't use the real names, and had to pick some identifiers I wouldn't mess up. I still managed to do so initially...)
 
maybe I just read a lot of inheritance examples that use B and D for base/derived
 
1:11 PM
@nils : i am applying with command in matlab : a = imread('aab.jpg')
but i am getting error..why
 
what err?
 
that this image do't exit
??? Error using ==> imread at 361
File "aab.Jpg" does not exist.
i put that image in same folder
 
well then the path is wrong
"A = imread(filename, fmt) reads a grayscale or color image from the file specified by the string filename. If the file is not in the current folder, or in a folder on the MATLAB path, specify the full pathname"
 
full path name mean full path for image
 
yes
like c:\.. on windows
 
1:16 PM
hmm you mean a = imread('C:\Documents and Settings\My Documents\MATLAB\aab.jpg')
right/?
well still it give me error that path is not correct,,
i put the right path where imges exist
 
does matlab use \ for string escapes?
 
thats why i do't like matlab.. i tried everytime. and . it make me this error
 
@FredNurk I believe so
 
sbi
@Miss Welcome to the world of software engineering. Here, nothing works at first try, and everything has to constantly be coaxed and talked into doing anything useful at all. If you don't like the constant uphill battle, you might want to change profession.
 
@sbi: well i can't accept your offer,, i will do it
and i can do it...ok
thanks for your comments
@sbi thanks for your comments.. i got success
@nils : specially thanks to you,...:)
hyy @nils: work in matlab is pretty easy..:)
i got successs... but did small works ...
and here we are using predefined function..
i think thats not good
 
1:37 PM
:)
 
if we use predefined functions then how can you knwo logic behinde that function ...
 
@nils: SO should hold chat room for Image processing ...
 
create one :)
 
@JohannesSchaublitb , just a side question, is there a difference between sizeof(1) and sizeof(-1) ?
 
1:46 PM
@StackedCrooked nopes :)
 
sbi
@JohannesSchaublitb What help do you need? Pete is right, this won't work with all compilers. You can do this with static_assert, so what's your problem?
 
@nils wow matlab is good.. but we are using predefined function.. thats not good
 
why not? to play around with it and see how things work out that's perfectly fine
 
hmm .. now i want to apply functions instead of using predefined functions
 
@JohannesSchaublitb test UINT_MAX instead
 
1:50 PM
@sbi it was a trap..
 
@nils can i create room for image processing
how can i create a room?
 
Bytew if "sizeof -1 > 4" then shouldn't the message be that it does work on 64 bit?
 
@fredNurk: you meant i have little votes to create a room.. hmm ok ok
 
@Miss there is a button on chat.stackoverflow.com
 
1:53 PM
Should I use ::std::istream instead of std::istream just to be sure, or is that too paranoid?
 
@nils: no there is not.. i checked it
 
@MartinhoFernandes unfortunately, it's not
but I only use leading :: in macros, within your own namespace you're fine
 
Als
RAII...
 
sbi
@JohannesSchaublitb For whom?
 
I've been trying to solve this C++ puzzle. I want to generate exact-width types without relying on the preprocessor (or compiler extentions).
typedef Integer<8> Int8;
typedef Integer<16> Int16;
typedef Integer<32> Int32;
typedef Integer<64> Int32;
I think it's possible, but my mind doesn't reach (due to sleep deprivation most likely)
 
1:58 PM
@sbi for everyone
 
sbi
@StackedCrooked TMP. Have a compile-time list of integers, sorted by size, ascending, and walk it until you find one that's at least as big as needed.
 
Pete has been caught into the trap
@StackedCrooked this is where the D manual claims C++ has no generic solution
bullshit
 
@sbi Hadn't considered using a typelist.
 
@JohannesSchaublitb: 0 - 1 > 4? you're seriously trolling?
 
sbi
@StackedCrooked I have done this somewhere, years ago.
 
2:00 PM
@Miss created one for you, maybe you don't have enough rep
 
Well, isn't CPP also a part of C++? :)
 
hmm
i see ...@nils ok thanks
 
I wrote a generic solution long ago to prove them wrong
also years (2?) ago
Oct 27 2008
@FredNurk lulz
 
@JohannesSchaublitb: not lulz. lame. some of your pranks are pretty bad.
4
 
2:06 PM
Lol main.cpp:12: error: declaration does not declare anything
 
can happen for int; although that is not valid syntax. there's a constraint that forbids to consider this as a simple-declaration
 
@JohannesSchaublitb That's really nice!
@JohannesSchaublitb You mean the one written by Alexandrescu?
 
Ah, ok, cause that would be a strange for him to say.
 
2:28 PM
@FredNurk you're just frustrated that you've fallen into the trap xD
 
^^ Just found this... Eh..
Hard to watch :)
 
@JohannesSchaublitb I am frustrated that this is not the first time I've seen you try a lame prank
repeatedly leeching on the goodwill of people honestly trying to help you is not a good thing
3
 
@FredNurk Seriously?
 
lol
@FredNurk they learned something new.
i see it this way: they show love when they send out possible solutions to my problem. and I show love when I show they are fallen into the trap and help them out
answering a usenet question is not only to help the questioner. it's to help the whole world afterwards searching and finding that particular answer. That'S the end goal I'm seeking to achieve when I'm doing such an artificial question
 
you'd be better off saying you were bored and wanted to troll
3
 
2:37 PM
@FredNurk for the same reason, I enjoy myself falling into a trap like that
 
cpx
@JohannesSchaublitb hm trap doesn't compile.
 
because I've seen there are people that don't understand this. See stackoverflow.com/questions/6081842/…
no of those answers explain what is going on
 
nerd rage, raaah! Can I be angry too?
 
@JohannesSchaublitb do you know how to post an answer that has the information you believe is missing?
 
i felt that posting a usenet question is more fun to everyone
but my heart said that I shall at least put a comment that has the information I believe was missing.
 
2:43 PM
yes, trolling usenet is definitely a better way to educate people on how the preprocessor is unintuitive
 
@JohannesSchaublitb well, definitely not for everyone
 
especially when the people that could use the information are at that SO link
 
@FredNurk see how things come together. that's why I posted it here
lol
 
3:00 PM
and also, there actually seem to be different definitions of "troll" on urbandict
one of them (topvoted) is "One who posts a deliberately provocative message to a newsgroup or message board with the intention of causing maximum disruption and argument" to me as a non-native speaker doesn't inherently sound bad
and I didn't even post a provocative message -.-
 
oh, well if urbandictionary supports you, you're probably right
 
You weren't trolling imo. It was just a clever question, like GMan's question about the "-->" operator.
 
at least one guy who feels with me
 
4:01 PM
I noticed my GCC headers contain this: struct is_function<_Res(_ArgTypes......)> where _ArgTypes is a variadic pack
oddly enough just above there's the 'regular' specialization struct is_function<_Res(_ArgTypes...)>
 
WTF? Six dots? Is that supposed to compile?
 
I'm just as baffled
It's repeated for all the const/volatile specializations, too
 
And if it should compile what does it mean? Is it a pack of packs?
 
I'd like to try some experiments but unfortunately I have to go so it'll have to wait
 
It's been asked on SO some time ago, I think. Or maybe even here.
 
4:46 PM
@LucDanton I suspect it handles varargs functions
int f(int...) is the same declaration as int f(int, ...)
 
i am using MFC , i want to add some data in combo box..
i can't find out property "edit " for putting data in combo boz
any one can tell me
 
5:02 PM
@FredNurk Is that standard? My google-fu gives me no answer (at least it's not a GCC extension)
 
yes
iirc, it's a holdover from C
 
ahh i found my Answer of above question ..
thanks to all of you. .
 
@FredNurk In any case GCC happily chomps away any kind of such declaration (whether in a template or not) but it seems to be a show stopper for Clang
 
@LucDanton §8.3.5p3 lists "parameter-declaration-list(opt) ...(opt)"
 
what is the function for accessing the the data from list of combo box.?
 
5:09 PM
I'm going by 0x FDIS since you mentioned variadic templates
 
Clang does accept void f(int...) so it appears it's bugging out in templates parameter lists
 
are you compiling your code? does adding the (usually expected) comma help?
 
It's a libstdc++ header (and no)
main.cpp:5:22: error: expected ')'
struct test<void(T..., ...)> {};
If this message is any indication it seems there's a bug in the parsing
 
I can see support for varargs functions getting missed
 
it T is not a parameter pack this works, comma or not comma
 
5:17 PM
whats wrong with it :
if(dlg.m_Combo_Operators.AddString("Prewitt") )
{
switch(dlg.m_nFunction)
{
case 0: ret ;
}
}
i am getting error at addstring funtion
 
@FredNurk The bug is documented in the Clang bugzilla so that's that
 
@LucDanton is it what you suspected? you sounded on track :)
 
@FredNurk Sorry I don't get what you mean
 
@LucDanton misparsed in a variadic template, as it's looking for packs rather than ellipsis
room topic changed to Lounge<C++>: Ask me about SBRM
 
5:23 PM
@FredNurk Well it seems they went for the Simplest Thing That Works and only expect a closing ')' after a pack expansion
(in this case anyway)
 
 
1 hour later…
6:24 PM
can we convert from void to BOOL ?
 
void has no value, what do you want to convert?
 
i need to convert void to int
for example:
CCompussGradientOperator dlg;
string p = "preqitt";
string k = "Kirnch";
string r3 = "Robison";
if(dlg.DoModal() == IDOK)
{
CDib dib = m_Dib;
BOOL ret = FALSE;

if(dlg.m_Combo_Operators == p )
{
switch(dlg.m_nFunction)
{
case 0: ret = (DibPrewittEast(dib)); break;
}
}
ret is BOOL ,... while my DibPret return nothing...
thats a problem
 
7:20 PM
It's not something you can fix at the callsite, the function need to be returning something if you want it to communicate success.
 
7:41 PM
hmm \yes i am thnking about funtion ..
 
Hello.
I'm here to seek help.
Of the psychological kind.
I have lots of reputation.
so much, in fact, that i could buy points on Whose Line.
and yet, someone just downvoted my answer.
And I'm hurt.
Help?
 
Happens. Whine a bit, downvote someone unrelated in anger, and you'll feel better tomorrow.
 
@wilhelmtell be like Mr. T and pity the fool.
@CatPlusPlus That could cause a chain reaction.
But, the chain will stop when it encounters a Ghandi-like personality.
 
7:57 PM
@StackedCrooked Well, the world is supposed to end. Why not with a chain reaction-induced bang? :P
 
It's all one big chain reaction, I tell ya.
If you could break the internet by typing "Bing" into the Bing search engine then you could say that the internet went down with a bing.
 
Internet usually goes down with a ping.
 
If you could send a ping to the Internet then it would probably go down.
If all devices on the internet had to send the reply back to you.
 
8:12 PM
I think you can ping broadcast addresses.
 
@CatPlusPlus yes you can, but these are blocked by routers.
Which is probably a good thing :)
@CatPlusPlus template<> struct Warranty<void> { /* no monies */ };
 
that was also asked before on SO
ill look to see whether i can find the Q
29
Q: What is the meaning of "... ..." token?

VitusWhile browsing through gcc's current implementation of new C++11 headers, I stumbled upon "......" token. You can check, that the following code compiles fine [via ideone.com]. template <typename T> struct X { /* ... */ }; template <typename T, typename ... U> struct X<T(U......)...

 
 
2 hours later…
10:07 PM
how does thinning operator work??
 
Xeo
10:32 PM
I just noticed that Part 5 of Advanced STL is out since some days!
 
10:48 PM
@Xeo yep, noticed it as well.
 
Xeo
And it's dealing with boost
yay
 
There were some interesting parts about low-level optimization too.
 
Xeo
I love that stuff
 
I should watch it again though..
 
Xeo
Sometimes I think I won't make a good programmer because I'm way too interested in low-level, "behind-the-scenes" and "under-the-hood" stuff...
 
10:53 PM
That does make a good programmer I would think.
Especially for games.
 
Xeo
No, I'm that interested in it that I keep losing focus
 
Ah, like wanting to fine-tune instead of getting the job finished.
 
Xeo
Well, sometimes, but optimization is the least problem. It's more like I just want to learn more and more and more of this low-level stuff
 
In any case a good understanding of under-the-hood stuff will differentiate you. I'm thinking that my next endeavor should be to become familiar with assembly.
 
Xeo
There's a really good wikibooks on that
read through it in like 2 hrs and now I understand assembly (mostly). :)
 
10:57 PM
Optimization is a top down process.
Have you ever used valgrind and kcachegrind?
 
Xeo
Didn't work on Linux yet. :(
 
Pity that Windows doesn't seem to have good profilers (not that I know).
Mac has Shark. Linux has Valgrind.
 
Xeo
The problem seems to be tha accessibility of system and low-level stuff in the OS
doesn't valgrind work on mac too?
 
Yep, I've used it on Mac also.
Today even.
 
@StackedCrooked What's the Valgrind tool for profiling? Callgrind?
 
11:00 PM
@LucDanton, yep callgrind.
It dumps a file that you can then open with kcachegrind, a GUI tool that nicely visualizes it all.
However, kcachegrind only seems to work well under linux. But you can run valgrind under mac, then open it via VirtualBox linux :D
@Xeo have you seen the slides from Scott Meyers on cpu caches?
 
Xeo
Negative.
 
Xeo
Ew, I still need to watch his ACCU talks
 
I was posted on the "c++ subreddit": reddit.com/r/cpp . Occasionally there's good stuff there.
@Xeo yeah, the slides are very limited
 
11:19 PM
Wasn't there going to be a meetup in Germany today?
 
0
Q: Should non class/namespace functions be used?

vorbis5Excuse me for the elementary question: In C++, should all functions be inside a class or namespace? In what sort of circumstances should one write a function that is outside a class or namespace?

I wanted to answer, but I really have no idea what to say.
This is one of those things where I just pick what "feels right".
 
Xeo
@StackedCrooked Yeah, but sadly I had to babysit ....
 
Hm, I wonder if Tony went..
 
Xeo
Seems like it
 
@StackedCrooked He was planning staying at sbi's. Or something.
Hey @sbi, is Tony there?
 
sbi
11:38 PM
@MartinhoFernandes Yeah, he actually is! We've just came home after having beer with @Konrad and "SpaceC0wb0y. Had a wondeful evening. (IMO anyway.)
 
Xeo
:(
 
sbi
@Xeo Sissy! :)
 
Xeo
@sbi :(
 
sbi
11:49 PM
@Xeo How was babysitting? The baby's been quite and sleeping?
 
Xeo
@sbi Fast. Er hat eine Stange vom Babybett rausgenommen und is nochmal stiften gegangen, aber danach hatter gepennt, saß also sinnlos hier rum...
 
sbi
@Xeo Well, lemme tell you: It could have been worse, much worse, than sitting idly. We once had a babysitter who was waiting on Potsdamer Platz, our carrying smallest, while we were in the cinema. When the movie was out, and we left, we heard our baby yelling all across Potsdamer Platz, and the baby sitter said she had been doing this for 20mins. (The babysitter just didn't want to disturb our last 20mins of the movie.)
 
Xeo
Ouch
 

« first day (217 days earlier)      last day (4713 days later) »