Jump to content

sug15

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

sug15's Achievements

Member

Member (2/5)

0

Reputation

  1. Haha, yes, I hate that too. Are there any languages something like this might be particularly useful for? I get that it's sort of "meh, already kinda there" for most.
  2. I made a quick mockup to give you a better idea. But, I think you've pretty much answered the question, unless I didn't explain it very well. It would work sort of like Google instant, the results would just be loaded via AJAX. "More details" would go to PHP's doc.
  3. Ok, thanks guys. So essentially, it sounds like even though something could be made that was slightly easier to use, PHP's doc is still good enough that something like I propose would not be worth switching to. Are there any other languages this might be useful for that don't have a great doc like PHP? Python maybe?
  4. For PHP. The documentation could be better. Often I just want an example or a quick run through, and I don't want to have extra clutter. Probably more likely to be true for newcomers.
  5. Essentially, it would be a "quick" documentation. You enter a keyword, function, etc. and the relevant function pops up, gives a one-sentence explanation, and gives an example. Just a little idea I had. Would you find this useful? Is there anything that could make it more useful?
  6. I finally figured it out. The trick was to use createElement while the page was loading (in other words, before onload). This worked: document.createElement("testele"); window.onload = function() { document.getElementsByTagName("testele")[0].innerHTML = 'hi'; };
  7. I have the non-standard element <testele></testele> In every browser except IE, this bit of JavaScript will successfully change the content of the above element document.getElementsByTagName("testele")[0].innerHTML = 'hi'; However, if I change the <testele> to just a <span> (in the HTML and the JavaScript), it now successfully changes the content of the element in every browser, including IE. Is there any fix? I have searched around and tried a bunch to no avail. Thanks!
  8. Let's say I'm requesting a 5 megabyte data file with cURL. I want to echo it for the user as it gets downloaded with cURL. Is there any way to do this? I'm also just using cURL as an example, it could be file_get_contents(), or something else as well. Thanks!
  9. I actually have a thread asking a similar question: http://www.phpfreaks.com/forums/index.php/topic,295323.0.html Read that for some ideas.
  10. Yeah, that's a good idea, I was thinking about doing something like that. Then just split: ." .' !" !' ?" ?' . ! ? But anyone have an easy way/API to split sentences/determine valid sentence endings?
  11. Hey, I want to be able to extract each sentence from a block of text. I could just use either explode() or something like: preg_match_all("/(.+)\./Uism",$text,$match); $sentences = $match[0]; However, the problem is that this will also split abbreviations, for example, "The fox jumped over Mr. Smith's sheep." Would be split into 2 sentences. Does anyone know of a simple way to get past this? There's also abbreviations for middle initials, etc. It's not so simple, though, because 2 sentences could be "John is bigger than I. However, I am faster." Regardless if that is correct grammar or not, things like that could come up as an issue. I was thinking about just trying to identify abbreviations by matching any group of 5 letters or less without a vowel and ending in a period, and manually compiling a list of abbreviations that contain vowels or are over 5 letters and matching those. Then, I could determine name abbreviations, such as "John H." by checking to see if the word before single-letter words followed by a period begin with a capital letter. The above solution could work well, but it might run into issues, and is pretty complex. Anyone have an easier way or some code I could build off of? Or anyone know of an API? Thanks!
  12. Alright, I have been trying to work on this but it has been difficult. I looked at the Python NLTK but I don't think that will be of much help. Let's say I have a database full of facts, and one of them is "highway - a main road". The user enters a question, let's say "What is a highway?". I want to be able to pull the the answer from the database and then form it into proper English. For example, in this case, I would like it to form "A highway is a main road". Let's say the user asks "what are highways. It should answer "Highways are main stretches of road". Then I could get into more complex sentences as I gather more data, for example "What is the average distance of a highway in the United States?" wouldn't just be giving a definition. Yes, I know this is pretty complex, but does anyone know where I could start? I have the basics, obviously - break up a sentence, interpret the words, try and figure out what tense it is in and if it's plural, then figuring out what it's asking, and then of course generating an answer. I don't have much of an idea how to do this, though. If anyone could give me an idea of where to start that would be great. Thanks a lot.
  13. Alright, thanks. I figured it out, but I was was just wondering for an expiriment I was doing. I wasn't actually planning on generating them all
  14. Let's say I have an array: array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); And I want to generate all possible outcomes of the array that are 32 characters, yes I know this will be a huge list. For example it would generate: 00000000000000000000000000000000 00000000000000000000000000000001 all the way up to fffffffffffffffffffffffffffffffd ffffffffffffffffffffffffffffffff And after each time one is generated, echo it, or do something. I have tried to do this, and can only really do it by generating a random one after another, but obviously that's not the best way. Does anyone know how? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.