636 Posted Topics

Member Avatar for sergent

> every byte in a dword gets a separate push mov call sequence, every letter in the text I am afraid you misinterpret the disassembly. Can you post the disassembler output?

Member Avatar for GunnerInc
0
182
Member Avatar for markfw

If you mean lines 79-82, the logic is as follows: [ICODE]p_clause[/ICODE] is declared as [ICODE]struct __clause **[/ICODE]. [ICODE]*p_clause[/ICODE] is [ICODE]struct __clause__ *[/ICODE], that is, a pointer. [ICODE]sizeof(*p_clause)[/ICODE] yields the size of pointer (most likely, 4), regardless of how much memory you did allocate. Do realize that (1) sizeof is calculated …

Member Avatar for markfw
0
123
Member Avatar for Labdabeta

You really need to check your spelling. It is glVewport, glClearColor, umsg, etc.

Member Avatar for Labdabeta
0
470
Member Avatar for yongj

> So this is called a "script"? No. This is called a makefile. > Does that mean this is what the code looks like? Can you clarify the question? > Also, how does each line function? [CODE]deletes.obj: deletes.c deldir.h cl /c /Zid deletes.c [/CODE] The first line tells the [ICODE]make[/ICODE] …

Member Avatar for zaraki
0
164
Member Avatar for saisakthi

Take a look at how UltraStar and/or Perfomous (both are open source) do the scoring. Looks like almost what you are looking for.

Member Avatar for quuba
0
244
Member Avatar for stereomatching

Something is wrong here. I run your code (BTW it doesn't compile as is, and produces some warnings), and got the following results (also note that I changed the test loop count to 1E2): [INDENT]time of the(hours : min : sec) testCPPFind : 0 : 0 : 18.03 loop 100 …

Member Avatar for stereomatching
0
132
Member Avatar for ronnieaka

Just wonder what does it print at line 23... Do you realize that 10^100 takes 30+ bytes as an integer? For the rest, read the [URL="http://en.wikipedia.org/wiki/Cyclic_number"]math[/URL].

Member Avatar for ronnieaka
0
209
Member Avatar for yashsaxena

> These are all definitions. Let's get legal. They are [I]tentative definitions[/I] (6.9.2:2). All of them result in the behavior "exactly as if the translation unit contains a file scope declaration ... with an initializer equal to 0". That is, only one [I]definition.[/I] > All three foo declarations look like …

Member Avatar for nezachem
0
131
Member Avatar for Labdabeta

Sure. If you insist on recursive approach, it is better to half the argument, rather than subtract a small decrement. For example, to calculate sin(0.5), your code goes down 50 levels of recursion, while halfing does only 6. Another speedup is achieved by sincos, which calculates both sin and cos …

Member Avatar for mrnutty
0
638
Member Avatar for Efficience

A wild guess: you are running on Windows, right? The png file begins with a signature ID=89h,'PNG',13,10,26,10 which contains a byte with a decimal value 26, that is ascii Ctrl-Z, which is an end-of-file for a text mode. Open your file with "rb" instead of "r" and enjoy a garbage …

Member Avatar for Efficience
0
2K
Member Avatar for Tellalca

The argument is passed by the OS when the signal is delivered. The rationale is that you may install the same handler for different signals.

Member Avatar for nezachem
0
169
Member Avatar for darkdai

Try an experiment and remove the loop at lines 2-5. After that, explain what was it trying to achieve. PS: there will still be a bug, but you'll be able to figure it out yourself.

Member Avatar for nezachem
0
108
Member Avatar for maybnxtseasn
Member Avatar for Fortinbra

OS/360 clone, Fortran IV, punchcards PDP-11 clone, asm, punch-tapes CP/M, Forth, 8" floppies etc

Member Avatar for Kramer49
0
178
Member Avatar for NickJoe

The tgets function has a timeout_secs argument, which you never use. You have to request a SIGALRM to be raised at that timeout. Read a man page for alarm(). The if/else in the signal handler is meaningless: the handler is installed specifically for SIGALRM, so the signum will never be …

Member Avatar for NickJoe
0
295
Member Avatar for wdearth

You created a buffer overflow, and corrupted the stack. Line 17: there's no such thing as s1[40]. The maximal index legal for s1 is 39.

Member Avatar for arjunpk
0
164
Member Avatar for jon.kiparsky

If I understand correctly what you are after, pass relevant properties as command line arguments. For example, -Dsrc=Hello (details really depend on your ant file).

Member Avatar for nezachem
0
172
Member Avatar for jimJohnson

Line 52: you do not return anything from the [ICODE]else[/ICODE] clause. Didn't the compiler warn you?

Member Avatar for jimJohnson
0
355
Member Avatar for quartaela

[QUOTE=quartaela;1548329]it complains about the lines which include [CODE]*(list)[/CODE][/QUOTE] Change it to (*list), perhaps...

Member Avatar for abhimanipal
0
444
Member Avatar for mattloto

Libraries are linked to the project, so they should go into a linkage recipe: [CODE]LIBS = -lmingw32 -lSDLmain -lSDL -lSDL_mixer sdlTest.exe: sdlTest.o $(CC) sdlTest.o -o sdlTest.exe $(LIBS)[/CODE] Notice that since they are 3rd-party, and not likely to change, they are not listed as dependencies.

Member Avatar for nezachem
0
187
Member Avatar for Labdabeta

> First of all, assuming your binary string is stored from most significant bit to least significant bit, you will have to traverse it in reverse No no no. Direct traversal is much simpler. Two methods need to be implemented: double a decimal string and add a bit value (0 …

Member Avatar for nezachem
0
154
Member Avatar for L0s3r
Member Avatar for nezachem
0
190
Member Avatar for asa88

> There was something wrong with my http request (changes are on line 75 and 76) Yes. You shouldn't split those two lines. The correct request is [INDENT]GET / HTTP/1.1\r\n \r\n[/INDENT] At the 1.1 level this is not enough. You must send additional headers, such as Host (I don't recommend …

Member Avatar for nezachem
0
725
Member Avatar for gruffy321

Few problems in your code. First, your pops are in a wrong order. The last thing pushed shall be first to pop. Second, can you explain line 105? The way it is written, you are (a) jailed to state_1 and (b) bound to a stack overflow.

Member Avatar for gruffy321
0
605
Member Avatar for sha11e

> What .depend files are I didn't really understand. Usually they are hints to the compilation/build environment. Obviously, an object file depends on a corresponding source file, in a sense that it should be recompiled once the source changed. Less obvious, the object file also depends on modifications of various …

Member Avatar for nezachem
0
180
Member Avatar for coding101

The behaviour you describe means that a -I option is silently passed to rm. Usually it is done by aliasing rm to rm -I somewhere in the startup scripts; some people think it is a good idea. The simplest way is to directly invoke /bin/rm instead. If you are writing …

Member Avatar for masijade
0
216
Member Avatar for cse.avinash

Sorry people, it is more than I can bear. We all agree that 1. The assignment is stupid 2. The code is ugly 3. OP doesn't have a clue yet none of the above gives a reason to teach things you've not be asked for. If you have nothing to …

Member Avatar for cse.avinash
-1
553
Member Avatar for group256
Member Avatar for template<>

> is this a valid approximation? I don't think so. > If not why? Yielding CPU is not necessarily a context switch: control could be returned to the same context without remapping. I don't see anything forcing a switch. The sample code gives a reliable lower bound of a system …

Member Avatar for template<>
0
381
Member Avatar for thetwig
Member Avatar for BarSed
0
158
Member Avatar for smrati.katiyar
Member Avatar for Akill10
Member Avatar for smee s

First of all, you must realize that on a 5081 architecture a true debugger is not possible. 8051 doesn't have a concept of exceptions, and even though a breakpoint (almost) may be emulated by a call, the resume from breakpoint seems practically impossible. It could be done with a support …

Member Avatar for nezachem
0
148
Member Avatar for ak24

It is (almost) beyond the programmatic control. The backspace character is processed by the console driver and not delivered to the program. You may prepare the file with embedded backspaces and redirect input from it; this way the driver is bypassed, and you will see the "\b".

Member Avatar for ak24
0
1K
Member Avatar for caut_baia

The fact that the second function works at all is an unfortunate coincidence. It returns a pointer to a local variable. You must allocate Value dynamically.

Member Avatar for Ancient Dragon
0
272
Member Avatar for daviddoria

> Is there some reasonable way of writing the internals of this function besides providing a giant switch statement? Of course. Write a separate solver for each case, and keep them in a vector (or a map).

Member Avatar for mrnutty
0
742
Member Avatar for charchar88

Profiling wouldn't help on a bad algorithm, and this is the case here I am afraid. The code tries pretty much all chains on a grid, to match each against every dictionary word. Obviously most of the efforts is wasted. My recommendation is to turn the table around, and instead …

Member Avatar for nezachem
0
220
Member Avatar for sha11e

[QUOTE=mike_2000_17;1538549]They are shared because you can group many functions that could be useful to many different applications into one DLL and then different applications can share that DLL and its set of functions without the need for recompilation from source.[/QUOTE] Correction. Sharability is a runtime property. A static library also …

Member Avatar for mike_2000_17
0
278
Member Avatar for atticusr5

The problem is in the Search function, specifically at lines 144 and 155. Can you explain the logic there?

Member Avatar for mike_2000_17
0
148
Member Avatar for Auraomega

Something is wrong here: [QUOTE][CODE]kputs: ; get our first argument address into esi push ebp ... jmp kputs[/CODE] [/QUOTE] What state is the stack in when the end of string is reached? [QUOTE]It might be worth noting I have no debug tools that I know of available[/QUOTE] gdb works fine …

Member Avatar for Auraomega
0
104
Member Avatar for Takafoo

Through my crystal ball I see that you need to add -llapack -lblas to your linker command line.

Member Avatar for Takafoo
0
216
Member Avatar for e-papa

> What is 'filo'? Probably [URL="http://en.wikipedia.org/wiki/David_Filo"]Filo[/URL].

Member Avatar for e-papa
0
672
Member Avatar for daviddoria

This particular problem has an iterative solution as well. Set up an array of N ints, and treat it as a max-base number. The increment function gives you a next combination: [CODE]bool increment(int arr[], int N, int max) { int i; for(i = 0; (i < N) && ((arr[i] += …

Member Avatar for nezachem
0
211
Member Avatar for swatipoddar

[QUOTE=rubberman;1531924]Tried that. No luck.[/QUOTE] Are you running Python 3.x? The code is written for Python 2.6; you need to either downgrade Python, or convert the code with 2to3 tool (a part of Python distribution).

Member Avatar for swatipoddar
0
565
Member Avatar for TinhornAdeniyi

The line [CODE] fp=fopen("random.txt","r");[/CODE] makes me believe that the file contains textual representation of data. It must be converted to doubles via a proper format specifier of scanf, or via strtod, etc. fread doesn't do any conversion. It just reads bytes.

Member Avatar for WaltP
0
105
Member Avatar for ThatGuy2244

[B]> I was wondering how I could display more than 256 colors with the VGA color palette[/B] You can not. It is a fundamental limitation of the VGA architecture. VGA may hold just that many colors at a time. [B]> the reason that you can't display more than 256 colors …

Member Avatar for ThatGuy2244
0
316
Member Avatar for G_S

Take a look at McMillan's [URL="http://davidf.sjsoft.com/mirrors/mcmillan-inc/install1.html"]installer[/URL]; looks like archives is what you are looking for. Disclaimer: I never used it myself.

Member Avatar for G_S
0
8K
Member Avatar for kchyn

For starters, which controller are working with? Usually, the necessary toolchain is distributed by the manufacturer. Check on their site.

Member Avatar for ziggystarman
0
366
Member Avatar for Buffalo101

While "validating" (line 49 and below) you change name and text. They are not pointing to the correct places anymore.

Member Avatar for Buffalo101
0
688
Member Avatar for dare599z

Python doesn't like global variables. If you insist on using them, be explicit. Declare them as such. As for your current arrangement, the assignment at line 13 makes Python think that strPlayer1 is a local variable - it doesn't bother to check its global existence. Just add [CODE] global strPlayer1[/CODE] …

Member Avatar for dare599z
0
187

The End.