|
Rilhas wrote: You don't know how old I am. You say insults don't offend you, but your reaction just states otherwise. And it was not an insult, was the observation of a fact.
I wasn't referring to your age, rather your mentality.
Rilhas wrote: I did read it. You keep saying the same. When will you admit that MFC is a better alternative to console than Win32? Never? Ok, just keep arguing.
When will you admit you have a comprehension problem?
Rilhas wrote: Yes, I used the term window. Dialog appeared especially when pointing out compilation erros. You didn't comment on that either, you just talk, you don't solve problems. Dialog and window are confusing terms to you? Well, they souldn't. And you should feel confused if I used them interchangeably... especially since I also mentioned buttons and text boxes.
Oh, so now you're pulling a 180 just to argue?
And for you not being a newbie I find it rather amusing you get compilation errors from a wizard generated project.
Rilhas wrote: I'm the one still waiting to hear from you defend that MFC is not closer to CON than WIN32.
For starters, your comparison of the two is retarded in the first place and only shows your ignorance. Nevertheless, this wasn't what I was talking about. The fact you choose not to listen really only means you want to argue, probably because you have no life and are bored.
Rilhas wrote: I have some time to spare now, so no rpblem for me.
Yup, looks like I was right. Get a hobby.
|
|
|
|
|
My mentality? That of a child? That was insightful. Thanks.
So you will not admit? Is that your quick intelligent answer? I was hopping for something more along the lines "I will admit MFC is a good alternative to CON when you admit that Win32 can have a graphical interface built by the wizard". But no: your great comeback is about my comprehension problem? He he he! That just made me laugh. You think that comment looks good on you? You realize that that is the same as admiting you should have been quiet from the start, don't you?
No, no 180. I wrote that Win32 as a CDialog missing, typically, when you use the resource editor to try and create a button in a dialog. Why do you think this is a 180? I don't see where you note the change... I guess you are trying to confuse me, you succeeded. Maybe 180 is not the same as in Portuguese. 180=PI/2? Then I'm sorry to disapoint you, no 180 here.
Major mistake on your part. The errors don't apear when compiling the Win32 skeleton. You think they did? And you thought that was my fault? That is consistent with the rest of the things you think you know. No, the errors appear when you manually try to add a resource with a button. Maybe you have a special technique, I'm all ears.
The comparison is not retarded. I can prove it to you. Do you want me to teach you how to do a printf and scanf in an MFC (windowed) application in about 10 extra short lines? If you think that is retarded it just goes to show that 1) you have a lot to learn, and 2) you missed the point. But, of course, you don't need proof. You're just saying that because you think it makes you look smart.
Yes, I have a life. But it is 12AM here (almost time for bed), and my computer is near the TV. So I just comment away, don't worry about me.
Again: you think you know, but you just guessed wrong. You do that a lot, don't you?
|
|
|
|
|
Have fun arguing with yourself. I have a life. See ya.
|
|
|
|
|
I bet you have. If it involves other people then I feel sorry for them. Anyway, nice escape.
|
|
|
|
|
Rilhas wrote: MFC application without window? You have a wizard for that?
Yes, I do. However, I wrote it. I know you two are officially beating a dead horse at this point. We do run MFC for various supporting routines without interfaces, but we wrote the wizard. Now if you want to only use exactly and only what Microsoft gives you, without 3rd party interference, options, additions, or training, then you are technically correct. If you want to argue pure semantics, that it is physically possible to build an MFC application without a GUI, Jeremy is technically correct, you can, I can (and have), and so can Jeremy, but this is NOT something Microsoft wants to encourage, so it isn't available in their default wizards.
Now I can play horse and you two can beat on me for a while.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
You got me!
I know you can have MFC without any windows (some coleagues of mine do that, but they don't have a wizard). Anyway, nice humurous comment!
|
|
|
|
|
I am trying to reverse engineer the index.dat files used by internet explorers cache manager. As you may know all your history, cookies and offline content are stored in these files. Extracting the data is quite easy, but I am looking to do a little more than that.
Anyway, the files contain a hash table which IE uses for fast lookup. Each table row has a DWORD hash, a WORD index and a WORD flag. The hash is giving me a headache since I have so far been unsuccesful in reversing it. Here are a few samples:
0: 73A7A400 10: D83D7500 20: 668A2540 30: 82E183C0
1: A7D808C0 11: 348B4DC0 21: FFE4CF40 31: 71DEEC00
2: AD9C5680 12: CA96CF40 22: 24B68100 32: 114A0B80
3: F4DA5FC0 13: 7BD6FD40 23: 34A14800 33: 01421C40
4: 4EA85FC0 14: C94CEF80 24: D8252AC0 34: 4F5CDA40
5: 6F40B200 15: 7509CD80 25: 92C1A440 35: DEE1BCC0
6: 526FB400 16: 77128380 26: 4601BF00 36: 8AF84BC0
7: DA715A40 17: DB5EAA80 27: 55018DC0 37: CD960100
8: 04E3AEC0 18: 46D03340 28: E9998EC0 38: 839C2600
9: 7FB4E800 19: B6849080 29: A4203E00 39: 94B5DF40
As you can see it's a 32 bit value. You may also notice the last byte of the hash always contains similar numbers, I'm hoping this will help in determining which algorithm was used. The last byte values are usually x00, x40, x80, xC0, there are some less common values of 0x04, x05 and x08. Could they be flags?
I'm guessing the url entered into the browser is what's being hashed, though without knowing the algorithm used it's uncertain.
Has anybody ever seen output like this, or do you have an idea why the last byte is consistent? Or better yet, do you know the algorithm?
|
|
|
|
|
WalderMort wrote: The hash is giving me a headache since I have so far been unsuccesful in reversing it
This is my stab at it, could be right or wrong...
It may be a secure cryptographic hash, and if that is indeed the case, then you will not be able to reverse it without doing some kind of brute force testing.
You will see a delete button on each of your posts. Press it. - Colin Angus Mackay
|
|
|
|
|
I had already thought about that, of course it's a possibility, but I feel it improbable. Whichever file is responsible for generating the hash has no need to encrypt it since everything else in the file is in plain ANSI ( including user/pass values for some websites ). I have a strong feeling the hash is one way, and optimised for speed rather than security. If only I could determine what exactly is being hashed, then I would have a starting ground to run some tests.
|
|
|
|
|
Try Google.
Here's[^] one example.
"Oh, what a tangled web we weave, when first we practice to deceive." - Sir Walter Scott
Web - Blog - RSS - Math - LinkedIn - BM
|
|
|
|
|
Do you think I am stupid enough to ask a question without doing some research first? I asked if anybody could help me identify the algorithm, where on that page does it mention anything about the hashing algorithm, the hash values or for that matter the hash record?
|
|
|
|
|
|
I hadn't seen that particular page, but it just goes toward confirming what I have so far learnt about these files.
I have a feeling the wininet set of functions will perform these hash generations behind the scenes somewhere. I didn't want to do it, but I'm going to have start stepping through assemblies in order to find the loop which is creating these crazy numbers. Thats a job for tomorrow...
|
|
|
|
|
WalderMort wrote: going to have start stepping through assemblies in order to find the loop which is creating these crazy numbers. Thats a job for tomorrow...
Have fun
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
WalderMort wrote: I didn't want to do it, but I'm going to have start stepping through assemblies in order to find the loop which is creating these crazy numbers.
Walder out of curiosity what ultimately are you trying to do and did you make any progress on figuring out the hash?
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Can i perform a comparison operation without using IF statement.
For example:
<br />
if( x< 0.5 || x > 1.0 )<br />
return 0;<br />
else<br />
return 1;<br />
Here the values 0.5 and 1.0 are fixed ie. the condition always check for 0.5 and 1.0 and no other values.
Can i replace the above If-else statement?
-- modified at 9:37 Monday 11th December, 2006
i made the mistake of puting && instead of ||.
|
|
|
|
|
Yes. As the condition never will be true, you can replace it with:
return 1;
---
b { font-weight: normal; }
|
|
|
|
|
What happens when x = 0.75 then?
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
I see that you have changed the condition since I answered the question.
---
b { font-weight: normal; }
|
|
|
|
|
There are many ways to do it (but why would you ?). To show a few:
1.
bool valid=x<0.5 && x>1.0;
2.
return x<0.5 && x>1.0 ? 0 : 1;
3.
for(; x<0.5 && x>1.0; ) return 0; return 1;
4.
while (x<0.5 && x>1.0) return 0; return 1;
5.
int[] array=new int[1];
array[(int)(2*x-1.0)]=1;
array[(int)(1.0-x)]=1;
remark: your specific example will always return 1 !
Luc Pattyn
|
|
|
|
|
This looks like C#; not c or C++.
Steve
|
|
|
|
|
You are right, my examples were using C#, but the first four do have a C equivalent.
Luc Pattyn
|
|
|
|
|
The condition itself has a value. Simply change it so that it evaluated to True when the variable is inside the interval, and return the value.
return (x >= 0.5 && x <= 1.0);
I'm not sure, but the value of True might be -1 rather than 1. It might also depend on the implementation. Anyhow, a binary and with one assures that the value is 1 in either case.
return (x >= 0.5 && x <= 1.0) & 1;
---
b { font-weight: normal; }
|
|
|
|
|
No.
Even if they are not written in the code, they will be implicitly done. I can also imagine that the optimizer will resolve that code into something optimal; do not try to outsmart the compiler and write code that is as simple as possible and as readable as possible.
if you have a function that does something like
return ( x< 0.5 || x > 1.0 )
The caller will mostly do something with that boolean value :
double x = 0.2;
bool bValue = MyFunction( x );
if ( bValue )
...
|
|
|
|
|
Try this:
return (x>=0.5 && x<=1.0);
Steve
|
|
|
|