Notices
Non Scooby Related Anything Non-Scooby related

AnNoYiNg TeXt - where from ??

Thread Tools
 
Search this Thread
 
Old 12 October 2005, 01:52 PM
  #1  
rgv_stu
Scooby Regular
Thread Starter
 
rgv_stu's Avatar
 
Join Date: Jan 2005
Location: Cirencester
Posts: 890
Likes: 0
Received 0 Likes on 0 Posts
Default AnNoYiNg TeXt - where from ??

anyone know where i can convert text into annoying up/lower case ??

dont want any colour or moving text, just plain text

there too much for me to rewrite...

cheers
Old 12 October 2005, 02:04 PM
  #2  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

s/(\w)/rand(1)>0.5?uc($1):$1/eg
Old 12 October 2005, 02:31 PM
  #3  
King RA
BANNED
 
King RA's Avatar
 
Join Date: Jul 2002
Posts: 2,818
Likes: 0
Received 0 Likes on 0 Posts
Default

\/\/|-|/\T T|-|3 |=\_/<|< ??
Old 12 October 2005, 02:44 PM
  #4  
+Doc+
Scooby Senior
 
+Doc+'s Avatar
 
Join Date: Oct 2002
Location: Sunny Ilson
Posts: 4,119
Likes: 0
Received 9 Likes on 3 Posts
Default

7h1z 1z c4113d 1337 741k 4nd 1z c|24p
†Hî§ î§ Çå||€Ð |€€† †å|k åñÐ î§ Ç®åþ
Old 12 October 2005, 03:47 PM
  #5  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

It was perl, but it does it randomly rather than EvErY OtHeR character.
Old 12 October 2005, 08:52 PM
  #6  
boomer
Scooby Senior
 
boomer's Avatar
 
Join Date: Feb 2000
Location: West Midlands
Posts: 5,763
Likes: 0
Received 0 Likes on 0 Posts
Question

Originally Posted by stevencotton
s/(\w)/rand(1)>0.5?uc($1):$1/eg
Steven,

purely out of interest, what does the above say in "pseudo-code" (BASIC/FORTRAN/COBOL/PASCAL/C-esque)?

Cheers,

mb
Old 13 October 2005, 02:33 PM
  #7  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

Originally Posted by boomer
Steven,

purely out of interest, what does the above say in "pseudo-code" (BASIC/FORTRAN/COBOL/PASCAL/C-esque)?

Cheers,

mb
It assumes there is some text in $_ that one wants to transform:

$_ = 'some string';

s/(\w)/rand(1)>0.5?uc($1):$1/eg

Substitute all word characters (actually that includes underscores but that doesn't matter) for (if a random number between 0 and 1 is greater than 0.5 then uppercase the letter that matched, otherwise leave it as it is). Do this globally, and evaluate the substitution, because it's code instead of verbatim.

Code:
steven@jovian:~(0) % perl -e '$_ = "some string"; s/(\w)/rand(1)>0.5?uc($1):$1/eg; print "$_\n";'
SOmE StriNG
steven@jovian:~(0) % perl -e '$_ = "some string"; s/(\w)/rand(1)>0.5?uc($1):$1/eg; print "$_\n";'
soMe STring
Old 13 October 2005, 02:51 PM
  #8  
OllyK
Scooby Regular
 
OllyK's Avatar
 
Join Date: Feb 2005
Location: Derbyshire
Posts: 12,304
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by boomer
Steven,

purely out of interest, what does the above say in "pseudo-code" (BASIC/FORTRAN/COBOL/PASCAL/C-esque)?

Cheers,

mb
What is being achived is essentially

for each character in text
if randomNumber > 0.5 then
Output = Output & UpperCase(Character)
else
Output = Ouput & LowerCase(Character)
end if
next character

It assumes your random numbers generated are between 0 and 1.
Old 13 October 2005, 02:53 PM
  #9  
Chris L
Scooby Regular
 
Chris L's Avatar
 
Join Date: May 2000
Location: MY00,MY01,RX-8, Alfa 147 & Focus ST :-)
Posts: 10,371
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by stevencotton
It assumes there is some text in $_ that one wants to transform:

$_ = 'some string';

s/(\w)/rand(1)>0.5?uc($1):$1/eg

Substitute all word characters (actually that includes underscores but that doesn't matter) for (if a random number between 0 and 1 is greater than 0.5 then uppercase the letter that matched, otherwise leave it as it is). Do this globally, and evaluate the substitution, because it's code instead of verbatim.

Code:
steven@jovian:~(0) % perl -e '$_ = "some string"; s/(\w)/rand(1)>0.5?uc($1):$1/eg; print "$_\n";'
SOmE StriNG
steven@jovian:~(0) % perl -e '$_ = "some string"; s/(\w)/rand(1)>0.5?uc($1):$1/eg; print "$_\n";'
soMe STring
Congratulations Steve - that post made you the inaugural winner of Scoobynet's 'Geek of the Week' award






Only joking mate
Old 13 October 2005, 03:31 PM
  #10  
stevencotton
Scooby Regular
 
stevencotton's Avatar
 
Join Date: Jan 2001
Location: behind twin turbos
Posts: 2,710
Likes: 0
Received 1 Like on 1 Post
Default

Originally Posted by Chris L
Congratulations Steve - that post made you the inaugural winner of Scoobynet's 'Geek of the Week' award
Fantastic, can that be official?
Old 13 October 2005, 03:34 PM
  #11  
Chris L
Scooby Regular
 
Chris L's Avatar
 
Join Date: May 2000
Location: MY00,MY01,RX-8, Alfa 147 & Focus ST :-)
Posts: 10,371
Likes: 0
Received 0 Likes on 0 Posts
Default

Absolutely - it all yours
Old 13 October 2005, 03:54 PM
  #12  
ChefDude
Scooby Regular
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

I wrote an app to do this and got carried away with a custom activeX button

not geeky enough to post it up though

ps, i put a l337 translator in it too.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
55
05 August 2018 07:02 AM
alcazar
Computer & Technology Related
2
29 September 2015 07:18 PM
Jamz3k
Non Scooby Related
15
28 September 2015 02:35 PM
lozgti1
Non Scooby Related
8
28 September 2015 03:49 AM



Quick Reply: AnNoYiNg TeXt - where from ??



All times are GMT +1. The time now is 09:53 PM.