Like Tree1Likes

Google and c

This is a discussion on Google and c within the C Programming forums, part of the General Programming Boards category; Originally Posted by MK27 I just mention this because it kind of sounds like someone has taken a very wacky, ...

  1. #31
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,749
    Quote Originally Posted by MK27
    I just mention this because it kind of sounds like someone has taken a very wacky, excessively complex route to accomplish a fairly straightforward task, and if you are interested in learning about things like this, you are being led astray...
    Hence my Rube Goldberg machine comment

    Quote Originally Posted by Angel45
    The reason there is so many lines of code is because the information is being stored into text files everywhere.
    If you're using what I suggested, then you should just be storing the data in memory. If you do write to file, it will because you are writing the translation obtained from the service to file as output.

    Quote Originally Posted by Angel45
    And everything is getting evaluated twice to get the correct size for malloc to be called.
    What do you mean by "evaluated twice"?

    Quote Originally Posted by Angel45
    It gets exactly what the chrome developers tools get, which is .html, with .js as I believe. We technically are not even running that code, we are just collecting and reorganizing it to display just the results which are stored in the code.
    Then that sounds like you are not actually leveraging the developer tools. My impression is that you used the source inspection from the developer tools, decided that you would like to parse that for the translated text, and so went about trying to leverage the developer tools do that.

    But the truth is that if you just want to get the translated text, then trying to format source in the same way as the developer tools is pointless. You might need the source of the page in order to get certain pieces of data so as to mimic the AJAX request to the service, but you don't need to mimic what the developer tools do. You need to mimic what the script on the page itself does.
    MK27 likes this.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #32
    Registered User
    Join Date
    Mar 2012
    Posts
    38
    Yeah there was no reason to write to file, we just wanted to see what we were getting. We evaluated it once to see the size of the string and other information, then did the same thing to fill it into a new string with the correct size after changes. And thanks for all the help.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The end of Google
    By Mario F. in forum General Discussions
    Replies: 34
    Last Post: 09-22-2010, 12:06 AM
  2. Reading Google Sketchup (.skp) or Google Earth (.kmz)
    By Zeeshan in forum Game Programming
    Replies: 9
    Last Post: 03-07-2008, 04:25 PM
  3. google down
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 07-28-2004, 03:11 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21