-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
yes, it is possible to create standalone apps with c++. You said you already did, with your "hello world." Maybe we should talk about your use of terms here. By 'standalone app' do you mean a windows application where you can click on an icon on your desktop and a window pops up with your program, etc..? yes, that is possible. But again, you need to learn to crawl before you learn to walk. If you are looking for fast results and immediate windows apps, you should look into visual basic instead of c++ but I should commit hari kari for even mentioning that...
-
well you need to learn to crawl before you learn to walk....
-
He probably feels that whatever he does must be the standard, or even above standard. It probably does not occur to him (look to his shameless self ego feeding as proof) that he might, in fact, be below the bar. burn! oh well. I'm jealous. I don't have a ps2 anymore :(
-
looks like just a plain old client app to me..probably done with java if i had to take a guess, seeing as how a lot of the other stuff on their site is applets. if you wish to make a standalone client/server app, learn a programming language like java or c++ or vb. Personally I'd advise c++.
-
it doesn't work because you put it inside your strcasecmp condition. the stristr will only be checked if your string passes your strcasecmp, making it a 100% match in the first place. So it is indeed passing as true, but by the time you get to that condition, $a==$b already. The stristr should come before the strcasecmp. But actually, depending on what you are trying to accomplish, you should get rid of the strcasecmp altogether. For instance, do you want your script to return a list of partial matched results, even if there is a 100% match? or do you want it to only return the 100% match and disregard the partial matches if it found a 100% match? If you want it to just return everything, then get rid of the strcasecmp altogether. If you want it to only return the 100% if found, then add the strcasecmp into your condition somewhere, where it checks if strcasecmp is true and disregards partial matches and keeps it if true. Personally, I would have it keep all of them and then sort it by % when displaying it later, but that's just me. But just so you know, if you put your info into a db you can run queries on it that would get rid of almost 100% of all of this code you are trying to do. That's the whole point of databases. For instance, if you had a table with 'title' 'author' etc.. columns all you would have to do is run this simple little query and it will return everything with $titleValue in the title. query: "select * from table where title like '%$titleValue%'" And you can sort it by any way you want. Auther? Title? % returned? Just add a sortby to it, etc.. you say you want to 'look into it' as soon as you get this working. hey, more power to you, but you'd be saving yourself a lot of grief.
-
Need php password login help with existing page
.josh replied to justjack's topic in PHP Coding Help
php is parsed on the server. then it all gets sent to the client. if you had for instance: blah.php [code] <html> <head></head> <body> <table><tr><td> <?php echo "blahblahblah"; ?> </td></tr></table> </body> </html> [/code] The server will look at that, parse the php and send this to the client: [code] <html> <head></head> <body> <table><tr><td> blahblahblah </td></tr></table> </body> </html> [/code] -
Alternative row coloring for php pages' tables.
.josh replied to ted_chou12's topic in PHP Coding Help
that $max has nothing to do with alternating row colors. the modulus condition is what alternates it. the $max looks like it is just setting how many rows to actually display. If you do not set them, you create in infinite loop, because it loops WHILE $i is less than $max. If you do not set them, the condition will never be false, hence the infinite loop. -
any reason why you didn't bother to post some code?
-
a lot of hosts differentiate php4 and php5 by the mime type. For instance, making a script to be parsed by php4 might use the regular blah.php extension, but if you want php5 to parse it, try blah.php5 (php5) as the extension. That would be the first thing I try. edit: also, your include in your __autoload is commented out. no include == no class being defined..
-
you can't do that. what you would do is make a temporary variable that calls the function like $blah = nl2br($row['description']); and then use that variable inside the heredoc.
-
[code] <?php echo ($_POST['myCheckbox'] ? "your box was checked." : "your box was not checked."; echo <<<FORM <form action = '{$_SERVER['PHP_SELF']}' method = 'post'> <input type = 'checkbox' name = 'myCheckbox' value = 'somevalue'> blah <br/> <input type = 'submit' value = 'submit'> </form> FORM; ?> [/code]
-
isn't etiquette dictated by the majority? if so, it wouldn't be good etiquette to read the faq.
-
thanks! I also figured out from that that i needed to remove the COUNT. Final query looks like this (example): [code] SELECT length( word ) - length( replace( word, 's', '' ) ) AS d, word_list. * FROM word_list WHERE length( word ) - length( replace( word, 's', '' ) ) < 4 ORDER BY d DESC [/code]
-
Okay I'm fiddling around with this list of words and I'm just trying to figure out what kind of neat things I can do with mysql, as far as selecting words. So I thought I'd try selecting all words in my list, based on for example, how many s's are in it. For example, I want to select all words that contain exactly 4 s's in it Now, after some researching, I came up with the following: [code] SELECT * FROM word_list WHERE length(word) - length(replace(word, 's', '')) = 4 [/code] This works great! However, I am running into some problems when trying to do the same thing, only selecting words with (for instance) [i]more than[/i] 4 s's in it, or [i]less than[/i] 4 s's in it. It returns the results just fine, but I can't seem to wrap my head around how to order it by occurance. I am thinking I have to somehow do something like [code] SELECT count(length(word) - length(replace(word,'s','')) as d, * FROM word_list WHERE length(word) - length(replace(word, 's', '')) = 4 order by d [/code] but obviously that doesn't work... Am I even remotely on the right track here? I know how to manipulate a list of words just fine with php. I can pull them all out and into an array and then sort it out just fine using some regex and stuff...but dealing with 58,000 words.. i'm thinking I should make mysql do the work, if I can somehow get it to work, lol..
-
well whatever eric did, I have not had a single timeout, too many connections, etc.. error, since he did it.
-
I think you should use neon colors all around. Neon green background, Hot pink letters, Yellow borders, etc...Then people might be like "omg, he must be so confident in his services that he can get away with this cheese, so let's hire him!" You know, kinda like how real men can wear pink and cry. It's one of those psychological things. or..you could just go somewhere like here... http://www.behr.com/behrx/workbook/index.jsp
-
well i certainly like the idea of surfing the internet in a 3d virtual reality type of way. Go Sci-fi!
-
Best Way To Remove A Character From A String And Replace With A Space
.josh replied to mcloan's topic in PHP Coding Help
www.php.net/yourfunctionhere example: www.php.net/str_replace -
you mean like 1881? or 16891? wow..that's almost contest worthy.
-
look, here is a little example: test.shtml [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <!--#include file="somepage.html"--> <br/><br/> another SSI command: <br/><br/> test.shtml last updated on: <br/> <!--#flastmod file="test.shtml" --> </body> </html> [/code] somepage.html [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> hello from somepage.html </body> </html> [/code] the page you want to include it in has to be .shtml not .html if that doesn't work then your host probably has SSI disabled and you are gonna have to go the .php include route (or similar)
-
did you try changing your filename extension from .html to .shtml when you tried that SSI?
-
telnet to nethack.alt.org you're welcome.
-
I can't imagine paying that much for a game system in the first place. I'd rather just buy a computer. $250 for a wii is still a bit much for a gaming system for me, but it's a hell of a lot more realistic.
-
because i can't send a query to thesaurus.com to pull words based on conditions i'd like to set. For instance, just for shits and grins if I wanted to do a query to list all words that are 7 letters or have 2+ vowels in them. Can't do that with thesaurus.com. It's not some "website" thing I'm going to offer the general public. It's just my own personal "i'm bored so i want to play around with a really big list of words" sort of thing.