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. fmaurer

    recv function - winsock

    Hi, thank you for your interest. My code is just rudimentary implementation of echo server. The part of code responsible for receiving and sending the echo is here: do { bytesSent = 0; sPosition = 0; if((bytesReceived = recv(client, buffer, BUFFER_SIZE, 0)) ==...
  2. fmaurer

    recv function - winsock

    Hi, is there any option to check how big message size is in order to invoke recv() with the proper buflen parameter? I tried the option to put recv in while loop with fixed buflen, tmp buffer and reallocated the proper buffer, however, it didn't work as I intended. Any help will be appreciated.
  3. fmaurer

    Remove redundancies

    That is really good idea, however, what to do if those defines comes from some include files that cannot be changed. Of course I can perform mapping of those defines #include fileWithDefines.h map["1ST_OPTION"] = 1ST_OPTION; and I believe it would be much improve but maybe there is another...
  4. fmaurer

    Remove redundancies

    Hi, I have the following problem #define FIRST_OPTION 1 #define SECOND_OPTION 2 #define THIRD_OPTION 3 #define FOURTH_OPTION 4 … Then I have some STL input string, let’s say inpStr and do sth like that if (inpStr == "FIRST_OPTION") importantVariable = FIRST_OPTION; else if (inpStr ==...
  5. fmaurer

    Calculator

    I have to write a calculator which will be able to calculate expressions similar to ((2+4)*4)/((3+2)-(5*5)) so I need a parser to parse such thing and compute the result. My question is as follows. Is there any built-in class which is able to parse such expression or do I have to use regular...
  6. fmaurer

    Get subnet mask

    Hi, I am the very beginner in network programming and need to find a way to show all IP addresses being in the same network. I considered solution of getting machine's IP and subnet mask and perform some bit operations. I've already found the code to get the IP address of the local machine...
  7. fmaurer

    Turning off system shortcuts

    Thank you very much for the link but could you specify where I can find the way to disable those system shortcuts, since after skimming the text I didn't find such information
  8. fmaurer

    Turning off system shortcuts

    Is there any possibility to turn off system shortcuts while running swing application. What I mean is that for instance having accelerator set for "ctrl presssed C" shortcut is recognized as a copy operation, not as a call for an action listener. Unfortunately I cannot avoid having accelerators...
  9. fmaurer

    Dangling meta character '+'

    It works :) Thank you stefan. Seems that I have to read much more about reg. expressions.
  10. fmaurer

    Dangling meta character '+'

    Unfortunately I've already tried it "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
  11. fmaurer

    Dangling meta character '+'

    Hi, what I am trying to do i to split an expression like 1+2+3 and use + as delimiter. The problem is that I cannot do it neither using String s = new String("1+2+3"); s.split("+"); nor Scanner s = new Scanner("1+2+3"); s.useDelimiter("+"); What I've read is that + cannot be used as a...

Part and Inventory Search

Back
Top