954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

split up sentences and place in diff label?

hi , i need to know how to split up and place in diff label.?
and randon up the labels

i attach a sample program of wat i need.
can anyone please help me..

Attachments randomDrag.zip (1.8KB)
bang2711
Newbie Poster
24 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

I don't understand what you are wanting to do.... do you want each word of the sentence in a new label, or do you want a random word of the sentence in the one label???

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

I'm Pretty Sure This Is What You Are Asking For. The Key To Understand How This Works, Is To Take A Good Hard Look At The Collection. A Collection, Which Is Like An Array, Has Methods That Makes Working With Data Easier. We Populate The Collection With All The Words Of The Sentence, And Then Loop Through All The Words We Have, Generating A Random Number Between Zero And The Same Length As The Collection. Then, We Remove The Element Of The Collection That Was Randomly Selected (After Assigning It To An Array), Which Will Make The Max Variable (The Variable Used As The Upper Border Of The Random Seed) Decrement, Making The Random Selection One Less Than Before (Not Just One Less, But The One We Have Already Randomly Chosen On The Previous Loop).

I'm Probably Complicating The Situation By Trying To Explain It So In Depth, So Examine The Code And Comments, And Let Me Know How It Works Out For You.

Attachments RandomSent.zip (2.4KB)
Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You