Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

works ok for me.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My resolution for the rounded corners dilemma was to go ahead and add an option into the USER CP that allows members to disable rounded corners, the navigation dropdown menu, or both.

Please use this option instead of disabling individual scripts via your web browsers as this ensures that nothing will accidentally be broken or result in JavaScript errors.

I don't see any difference. What rounded corners are you talking about? I turned them off and everything looked the same to me.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster


>And of course, you can also disable avatars in posts
Perish the thought. :-O

p.s. It is a great deal faster. Thanks! :)

Necessary at times -- especially in C++ board where class scope :: operator will sometimes turn into a smiley face

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

below is a screenshot of what I was complaining about earlier. I can't see what rep has been given to that thread until I give someone else rep.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The decimal value 99 is two ascii digits -- a '9' and another '9'. So your program has to convert the integer into two digits, then convert each digit to ascii for display.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what assembler are you using? I don't recognize some of those assembly instructions. See complete listing of 8085 instruction set here.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>What I am trying now is to reduce the number of lines.
That doesn't mean you have a poor program. Pure assembly programs are typically very huge.

one way to do it is to write a small program in C that demonstrates the problem you are trying to resolve then have your compiler generate the assembly code (I know that all Microsoft compilers have that option). That way you can see how any given algorithm works.

Salem is correct -- programming in assembly is the hardest possible computer language (except programming in pure machine code). And that's why the really good assembly programmers will make more $$$$$. And its why not very many people do difficult tasks in assembly.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Welcome to DaniWeb -- hope to see a lot more of you around. Please go to the Coffee House and introduce yourself in Community Introductions

>>I am using asm and writing code using the emulator in assembly language

You need to be a lot more specific. What flavor of assembly (there are hundreds of them). What "emulator" do you mean -- didn't know there was such a thing except for wireless devices and os such as PocketPC ? What operating system ? what assembler ?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Good heavens I'm glad I didn't study biology -- ain't ignorance bliss ;) I'm not going to read this thread any more -- I might just learn something new.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

binary search algorithms normally expect the elements to be unique and sorted in either ascending or descending order.

Comments about coding style:

It would be a lot better if you indented the code properly, such as indent sub-blocks of code that is enclosed in '{' and '}' braces by 4 or 5 spaces. For example, line 12 and all following lines should be indented 4 or 5 spaces to the right of line 10.

It isn't necessary to put a blank line between each line. Delete all those blank lines and it will make your program look a little more professional and easier to read.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you forgot the break statements after each case statement beginning on line 77. That's why the ID_FILE_EXIT menu falls through and executes each of the other case statements too.

[edit]I see you added those break statements :) [/edit]

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

For someone who still thinks I am bragging / joking, here is the proof. I am using FF on Win 2003 if that makes any difference.

You are not hallicunating -- I see the problem in Vista Home Premium and IE7.:D That probably only happens when you have to many green dots that they won't all fit on the line.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Now tell me -- how far-fetched is the Planet of the Apes ?

iamthwee commented: Too right! +9
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The problem I have is that if I've already given rep to someone I can't see who else might have reped him/her. Get the error message that I must spread rep around before I can rep that person again.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I tired the solution posted by ANCIENT DRAGON. It is not working too....:

Post your code. fgets() has been working perfectly on all platforms for over 20 years. Its your code that is wrong, not that function.

Take a look at this function:

int *getline( char *string, size_t size )
{
<snip>
    return string;
}

Why does that function say its return int * when it is in fact returning char * ?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

there is a lot easier way to get a line from the keyboard than what you coded in the program.c file. fgets() will do all that nasty work for you, like this -- notice there are no loops and only 1 line of code other than the buffer declaration.

char line[100];
fgets(line,sizeof(line),stdin);

BTW: your question is ok, its the poll that is a dumb one.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How do you use .rc files in DEV-C++?

Dick

read the tutorial I posted, I think it will show you how to create it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I research on the site and I found hexa code form ancient dragon

Please don't blame that code on me!:) I didn't write it.

>>Second question is how can I write hexadecimal numbers? can c recognize hexe??

I assume you mean a string that contains hex, such as "0x0a".

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Given that the code posted by me/Vijayan works both on windows and unix #ifdefs won't be needed in this particular case.

agreed that kind of messy stuff isn't needed when using portable functions like clock(). I think I was referring to using non-portable code such as getrusage(). And there are, of course, hundreds of other non-portable examples.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I think the CIO is right -- he sets the goals and its up to subordinates to figure out how to achieve them. My supervisor when I was on active duty in the US armed forces once told me "If I tell you to cut the grass don't ask me how to do it." Similar situation here. I would think there is one or more management levels between the people on the bottom and the CIO at the top. Its the job of those managers to determine how to achieve the goals, not the job of the workers at the bottom, unless of course there are no other management levels.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm clueless as to why the programmer decided to use %6.6f instead of %d in the second printf statement. I'm just as clueless about why the programmer used void main.

I did not look at that part of the code -- but you are right.:)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>is this the best way to do this?

Yes, that's how all the programs I've seen does it, although there are other os-specific functions. The code you wrote is completely portable and correct.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

lol if IQ=(mentalAge/physicalAge)*100then i am 4/17 * 100 = 24?

Oh Dear! :-O That makes my iq 156.:D

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I :* MFC :) Most things (but not all) are a lot easier with it. If you have been working with pure win32 api for the past year or so you won't have to learn everything all over again, and you can still use win32 api functions within an MFC program. MFC is really a heavy-weight wrapper around win32 api. If you want to write an MDI program then MFC can't be beat because the Microsoft compiler will generate a workable program for you in just a few clicks. I (or anyone else for that matter) can write a program with MFC in 1/4th the time that someone else will write it with pure win32 api. Sort of like the difference between writing a program with assembly or C language. Assembly is rarly ever manually used any more because it is a great deal faster easier to write it in C, C++ or other higher-level languages.

jan1024188 commented: Im glad to read this post +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It is a resource file for MS-Windows programs, and describes the dialog boxes, controls on the dialog boxes, string tables and other graphic resources used in the program. If you use one of the Microsoft compilers the IDE will generate the .rc file for you and you don't have to worry too much about them. But if you use another compiler such as Dev-C++ you may have to generate it manually. I believe this tutorial has more about resource files.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

No, it was this:

Wtf ever happened to giving your opinion? I think Jackson should be executed like a criminal.. Perhaps the mods don't like it when you say something they disagree with..

lol.. Big Brother is watching..

It was ancient dragon.. I pm'd him b/c there is no problem with my post.. And even if there is.. who cares? It's my damn opinion and I'm free to say whatever the hell I want (not really, but I like to think so).

I don't give out infractions because I disagree with someone (even you). If I did that then you would have been banned a long long time ago. I do however give infrations for violations of the posted public rules. If you have not read them, now would be a good time to do that. I almost never ever given infractions for minor violations of the rules in Geeks Lounge, which people are allowed to let their hair down and discuss things in a more light-hearted, relaxed way then they would be able to in other boards, such as the C/C++ board.

iamthwee commented: testing 123 -2
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

265

I ran out of fingers and toes. :$

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

using Vista Home Premium. When I click a link such as this one by cutepinkbunnies I see the video but no audio. Anyone know how to correct that ?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you sure that's from Iraq? How can such great music come out of such a misurable war-torn place ??? I think the war would be stopped pretty quickly if they produced more music similar to that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>Which I guess means I'm sort of working on unix doesn't it?

Yes and No. You are working on both environments and will probably have to program for both by using preprocessor directives for each compiler

#if defined _WINDOWS
// do MS-Wndows specific code here
#else
// do *nix specific code here
#endif

I know the above looks like a pain, but that's the way portable programs are written when os-specific api calls and even compiler-specific calls are made.

In your case, I think I would install cygwin on your ms-windows computer and use gnu compiler so that you don't have to do that sort of messy preprocessor stuff as shown above.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

writing to video ram is easy as writing to any other ram -- just set a pointer to 0xA0000:0000 and write to it. But be warned that it will be ungodly sloooooow. Here is a link to some more useful information

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks everyone for all your posts. Will try different solutions and see what works. Thing is, does the fact that noone has mentioned getrusage() mean that noone here uses it?

never heard of it until yesterday. Its a linux/unix-specific function and most posters here use MS-Windows os.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Please read this thread. posted a couple days ago

gotoxy is a borland-specific function which was never implemented by any other compiler. If you want to use it with other compilers you will have to write your own gotoxy() function using operating system specific api calls.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is more information. I think I left out something in my instructions. Scroll down to the Examples section.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

nonetheless, i found out that clock() works different depending on which compiler you are working... 4 example... in dev c++, i measured clock measured 1/1000... but turbo c++ measured 1/20...

the thing is... i don't know why...

In the original MS-DOS 6.X and older operating systems the clock speed default was 18 ticks per second, thus clock() return 1/18. Programs that wanted to use milliseconds had to deliberately reprogram the clock speed to 1000 ticks per second and reset it back to 18 before the program exited. If the program failed to reset the clock speed then all sorts of funny, and sometimes disasterous, things would happen.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

WW2 was mine too -- that's when I was born ;)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Lol. Did you know that SE england is sinking and NW scotland is rising?

How cool is that...

maybe because the brits are eating more McDonalds and the Scots aren't :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

1. Don't know the first question.

2. Functions must often be run hundreds or even thousands of times in order to get measureable time. The clock() function is in milliseconds and usually sufficient. So, to get a measurable amount of time

start timer
run the function 1,000 times
stop timer
delta time (stop - start) / 1000 is the average time per iteration of the function.
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Step 1: Tell the eVC++ 3.0 IDE to create a makefile, which is a text file that contains all the commands the compiler needs to compile the project from the command line. Select menu Project --> Generate Makefile (near the bottom of the program menu). This will generate a file with *.vcn extension.

Step 2. Open the *.vcn file with Notepad. Scroll down a few lines and you will see a line that looks something like this: !MESSAGE NMAKE /f "example.vcn" CFG="example - Win32 (WCE ARM) Debug" Copy that line into a batch file. Then look at the *.vcn file and you will see down a few more lines other lines that begin with !MESSAGE. Choose the configuration you want and replace the text in the batch file you just made with it.

Step 3: you will have to run another batch file that sets up the compiler's environment variables for the target processor. When you installed your compiler it also installed these batch files in the <install directory>/bin directory. On my compiler they are here: C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN Now in the batch file you created in Step 2 above you will have to call one of the batch files in the above bin directory. For example: if you are compiling the ARM target processor then call the file WCEARM.BAT

Step 4: compile the program from the command line. Just execute the batch file you made above.

Here is the complete batch file that I …

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>Can you run most windows xp software on vista?
Most -- probably not.

>>some sort of emulation software
I doubt it. You can install XP and duel boot with Vista.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why don't you ask them

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

vista folders are the same as xp. So just use Explorer, look in the folder, sort files by size then check which file(s) are taking up all that space.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

never heard of it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I found it in just a few seconds from google

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If companies give away all information then just how do you expect them to pay the programmers and other staff ??? Yes, I'd like to have Microsoft give away their operating systems and other products too, but if they did that they would have to fire most of their staff. Not very good sense.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

moved

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have no clue -- what in the world are you talking about??????

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I think there are only a handful of users who post in those silly games -- and some of the mods have posted in them too. I've even seen Ms. Dani a couple times, which is very very rare occasion. Rather than stop it probably having their own board in Coffee House would be better solution.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Seems like a big improvement loading pages -- I don't get the few seconds delay like I used to see. Tried the CP suggestions and did not notice any difference in any of the forums or blogs. Eveything is loading ok now.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

SetFocus is a method of all CWnd derived classes, which include, but not limited to, edit controls, combo boxes, buttons, etc. You need a handle to the edit control that you want to set focus to.

CWnd* pWnd = GetDlgItem(IDC_EDIT1);
pWnd->SetFocus();