Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. abbeman

    Trouble understanding signed numbers

    To get two's complement of a number take the bit representation of it's positive counterpart (64 in this case), invert every bit, that is 0 becomes 1 and 1 becomes 0, then add 1 and you have got it's two's complement. E.g. if we have 00011100 (28) we invert it. The result will be 11100011, then...
  2. abbeman

    sys/ioctl.h

    How about man 2 ioctl? =)
  3. abbeman

    help

    The problem is that y is not initialized to anything, it can point absolutely anywhere (probably somewhere outside the memory segment appointed to your program). This means that you are putting stuff into memory that you have not allocated, and possibly memory that doesn't exist. This is most...
  4. abbeman

    does anyone know of a good linux ut

    There's a program called memprof (I bet it's available at freshmeat.net), I'm not quite sure how it works since I've only heard of it, but it's some sort of a memory profiler. Seems to me that's what you want. =)
  5. abbeman

    char representation of a double

    Well, if you mean that you want to access the bytes that make up the representation of the double you can simply do: char *sDb = (char *)(& nDb); However the representation is not exactly trivial, if you want more info on that I wrote quite extensively in the following thread: thread205-316090
  6. abbeman

    initialising and freeing matrix

    I believe that this code does not exactly do what you want it to do. Calloc takes as first argument how many elements you want to alloc space for and as second how large each such element is. As you have written, you allocate sizeof(int*) * sizeof(int*) * NUM_ENTRIES bytes of space when all you...
  7. abbeman

    Replacing spaces in perl with %20 for netscape

    I'm not sure I've gotten your code correctly, but I think you would want it in the last for-loop. just before printing the URL. Do it on all the variables you use for constructing the URL, ie $b and $keywordpara. That should do it.
  8. abbeman

    how to start or kill a process using unix c

    I think that you have misunderstood what execv does. Execv, and it's sibblings do not spawn new processes to run the program that you tell them to run, they replaces the calling program with the one you want to run. This means that if you do the following: .. ... execv("new_program&quot...
  9. abbeman

    the power of assembly

    Well, the fact that many assemblers are written in C doesn't necesarily mean that C is closer to the computer, it just means that many people find C to be better suited and easier to use for writing such things as operating systems, compilers and assemblers. By all means, you could write...
  10. abbeman

    Getting rid of cookies, resetting,...

    Are you using the back button to get to the page that shows the content of the cart? If you are you are probably seing cached values and not the actual ones.
  11. abbeman

    Replacing spaces in perl with %20 for netscape

    To replace all spaces with "%20" you would do my $string = "test of replace" $string =~ s/ /%20/g However, there are several other characters that have to be escaped if ther are to be sent in paremeters through a URL (such as "?", ";" or "&")...
  12. abbeman

    perl hangs

    135, sounds like something in the vicinity of SMB (I know at least port 139 is used for that).
  13. abbeman

    parcing question

    perl ;)
  14. abbeman

    compilation problems

    I believe you can find information about installing GLibC here: http://www.tldp.org/HOWTO/Glibc2-HOWTO.html
  15. abbeman

    HOw can I make a square using just

    I think you have a type-o in the outer for loop, the for line should read: for (int i = 0; i < rows; i++) not for (int i = 0; rows; i++) And I would write the cout-line like this: cout << array[i*rows+j] << &quot;\t&quot;; Not that there's anything wrong with your way of writing it, I just find...
  16. abbeman

    compiling a very simple module

    I'm guessing you used the include files from one kernel but you are running a different one. It doesnät automatically use the include files corresponding to the kenrel that is currently running when you compile. Try to specify that you want to use the include files for kernel 2.4.18-3, not...
  17. abbeman

    ARRGGG How do i simulate a form post within PERL?

    Well, you might be able to make your script generate a new html-page with a form containing all the variables you want to submit to the other script. Then you enter an onLoad handler (javascript) for the page that pushes the &quot;submit&quot; button. I'm nowhere near sure if this would work at...
  18. abbeman

    $search help

    The line: $search = '$line[7] =~ /' . &quot;$JOBEND&quot; . '/'; will set the $search-variable to a string containging '$line[7] =~ /' then the content of the $JOBEND-variable and then '/'. So if $JOBEND contained the text &quot;miffo&quot; then $search would contain: '$line[7] =~ /miffo/'...
  19. abbeman

    how to start or kill a process using unix c

    starting: man 2 fork, man 2 exec stopping: man 2 kill I believe you'll find all you need to know there =)
  20. abbeman

    Global variable in DLL not visible

    The thing is, since you create a local copy with the same name in your program, that variable will overshadow the one in the Dll. What you should do is declare it as extern in your program, that means that it is only declared there but will be defined (given a value) somewhere else, the linker...

Part and Inventory Search

Back
Top