![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
making sentances into words...
is there a way to let's say load up a .txt file with a bunch of lines of text and extract all the words as a list 1 word per line ? and maybe eliminate any words larger then 2-3 characters?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: the beach, SoCal
Posts: 107,090
|
and maybe eliminate any words larger then 2-3 characters? That is going to make it a pretty short list.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
this kind of problem is first year computer science stuff, shouldn't be too hard to find a script example out there
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
Good luck to you
![]()
__________________
i like waffles |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: the beach, SoCal
Posts: 107,090
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
so no count necessary, just extract all unique words with 1, 2, or 3 characters and list them in a text file one word per line?
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
yes but all unique words EXCEPT 1/2/3 characters
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
sorry, i installed it and what do I do next ? i put that test.php into C:\wamp\www and go to http://localhost/phpmyadmin/test.php and page is blank....
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
/www is the root directory which means it would be localhost/test.php
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Los Angeles
Posts: 2,706
|
edit the filename to the one of the txt you already have.
make sure the file is in the same directory as your php script.
__________________
www.SwiftNode.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
Is the wampserver icon in the system tray all white? You only need Apache running. Click the icon, goto Apache, Restart Service
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
ok figured it out, skype was using port 80, ok apache started and looks like it tried to execute your code, and came up with an error "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in C:\wamp\www\test.php on line 2"
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
Click wampserver icon, goto Config Files, goto php.ini
Search for "memory_limit" and change the value from 8M to 128M (You may have to restart the Apache service again) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
morning, stay same room keep watch shifts, never more than three asleep time. Hirschel asked. believe. doesn't have windows. angry Cyr's put-down, Jubal said, windows? What does that matter? killer said. still ruling other possibilities. Besides looking each you, don't want have guard windows. Hirschel said, suppose to be : morning stay same room etc etc |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
If you right click and View Source it will not be on one line. Otherwise, replace "\n" with "<br>" for html output.
Revised code to remove extra chars. PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
everything worked.... thanks for your help man you rock
![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
btw do you have icq/skype? i might need more small scripts (next one i wont be asking for free
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
np.
Just post your problems on GFY, it gives some of us something to do besides look at boobies on an "adult" message board. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
One more revision that will give you a listing of unique words (no duplicates).
PHP Code:
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
btw that latest code you gave gives me this error "Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\test3.php on line 13" maybe file too big ?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
yah, i down sized file like 10x smaller, and it worked....
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
You know, if you have 6gb of RAM you can use it all. Change the memory_limit to 512MB or 1024MB.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
Yes, that too. I usually set my localhost to 300 seconds (5 minutes).
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#35 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#36 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
one more thing, in php.ini should it be
memory_limit = 1024M OR memory_limit = 1024 does it need to have M at the end ? thx ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#37 |
Confirmed User
Join Date: Apr 2009
Posts: 1,319
|
I am not 100% sure but I believe it works on a system like "100K", "100M", "100G", so the "M" would be necessary. Sorry I'm a programmer not a system admin.
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#38 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#39 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
hey ProG, anyway you can make me another simple script? to check for any empty lines and lines that start with 0-9 or some weird symbols (such as -,---,===,%---, etc, etc) and remove those lines ?
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#40 | |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
Quote:
if I understand what you are asking for, this will do it nicely: Code:
<?php if ( ( $file = file( "file.txt" ) ) !== false ) { foreach( $file as $line ) { if (ctype_alpha($line{0})) { echo $line . "<br>"; } } } ?>
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#41 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
also note that I used <br> for html output instead of \n so if you need it for your text file use then you should change that part
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#42 |
Confirmed User
Join Date: Aug 2008
Posts: 3,223
|
Good luck!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#43 |
Too lazy to set a custom title
Join Date: Nov 2006
Posts: 16,532
|
im not sure that something like that is exist
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#44 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#45 |
Confirmed User
Join Date: Dec 2001
Posts: 4,513
|
Sentances?
Might wanna incorporate a spell checker into this thing too.. Sorry.. had to be said.. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#46 | |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
Quote:
![]()
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#48 |
Guest
Posts: n/a
|
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#49 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
gfy should have some kind of penalty system set up for stuff like that, like he should lose 25% of his post count for second offence or something like that
![]()
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#50 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
...or maybe you are bot
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |