• We've upgraded our forums. Please post any issues/requests in this thread.

Pick Random Line

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,922 (6.24/day)
Likes
10,023
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#1
Takes input either from a file (drag and drop on the executable supported) or from typing with one "item" per line. Click on "Pick One" and it will select a random line and place it in the result textbox where it can be copied/manipulated. This is great for having a computer make up your mind when you can't.

Requires .NET Framework 4.0 (Client Profile).



In 1.1, I added the "Weighted Delimiter" field which, if it contains something, will attempt to split the line with the first part being the weight and the second part being the value. For example, if I set "Weighted Delimiter" to a semicolon (;) and then input this line: 2.1;MyValue MyValue would be weighted to 2.1 (default is 1.0). If there was another line containing NormalValue, MyValue should get picked 2.1 times more frequently than NormalValue.

Here's an example of what I used to test. I'm using /// for the delimiter.


Note: Due to rounding errors, the last item will always be slightly more preferred than the rest. In my test, Mercenaries 2 had a percentage of 0.078740157480315 while Supreme Commander 2 had a percentage of 0.078740157480315. They matched in that case but in effect, it is adding 0.00000000000000011 to the last. This isn't likely going to matter unless you're doing something scientific but something you should be aware of.

If you want to eliminate that rounding error, theoretically, you could add a 0///value at the very end. It should completely eliminate that 0.00000000000000011 from picking a line.

Version history:
-1.2.0: Fixed bug where last line wouldn't be picked if not using weights. Added drag and drop for files on the file name box and text on the main text box.
-1.1.0: Added the ability to weight lines. See the above "spoiler" for details.
-1.0.0: First release.
 

Attachments

Last edited:

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,922 (6.24/day)
Likes
10,023
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#2
Uploaded 1.1.0. It nows supports weighting lines. Details of how to use that feature are in the "Weighted Lines" spoiler. If you don't use that feature, it is functionally identical to 1.0.0.
 
Joined
Jun 3, 2007
Messages
22,401 (5.82/day)
Likes
8,923
Location
'Merica. The Great SOUTH!
System Name The Mailbox 4.5
Processor Intel i7 2600k @ 4.2GHz
Motherboard Gigabyte Z77X-UP5 TH Intel LGA 1155
Cooling Scythe Katana 4
Memory G.SKILL Sniper Series 16GB DDR3 1866: 9-9-9-24
Video Card(s) MSI 1080 "Duke" with 8Gb of RAM. Boost Clock 1847 MHz
Storage 256Gb M4 SSD, 500Gb WD (7200) 128Gb Agelity 4 SSD
Display(s) LG 29" Class 21:9 UltraWide® IPS LED Monitor 2560 x 1080
Case Cooler Master 922 HAF
Audio Device(s) SupremeFX X-Fi with Bose Companion 2 speakers.
Power Supply SeaSonic X Series X650 Gold
Mouse SteelSeries Sensei (RAW) and a Wacom Intuos 4 tablet.
Keyboard Razer BlackWidow
Software Windows 10 Pro (64-bit)
Benchmark Scores Benching is for bitches.
#3
Just get married. You will never have to make up your mind again. She will do it for you and you don't even need to install .NET Framework 4.0
 

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64
#4
So Ford this would be good for picking a winner for the next game giveaway? I'm all for it if so!
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,922 (6.24/day)
Likes
10,023
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#5
Yeah, that's what it was originally created for. The weighting was added to make it easier to decide what game to play (lower weights for games we've already beat/started).
 

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64
#6
Very cool, I'll try it out this weekend! Thanks
 

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64
#7
Hey Ford, beer me a minute of your time (haha, Office reference). Can you look to see if you get the same thing that i'm getting... If i input say 10 numbers/names, it seems to never choose the last one. I tried with 4, 10, and 11 entries. These are just normal, nonweighted entries. Maybe it's user error, but i'd appreciate the insight.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,922 (6.24/day)
Likes
10,023
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#8
You're right. I'm sure I checked for that but must have some how broke it. I'll see about fixing it.

Also, I wanted to add drag n drop support so I might as well do that too while I'm at it.
 

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64
#9
You're right. I'm sure I checked for that but must have some how broke it. I'll see about fixing it.

Also, I wanted to add drag n drop support so I might as well do that too while I'm at it.
That would be terrific. I tried to drag and drop something earlier, just not thinking, but that would be pretty awesome.

With the other issue, the temporary workaround is to just add another line, anything I suppose, and it'll suite me just fine. Thanks for looking into, and thanks for the great utility, really good for giveaways lol!
:toast:
 
Joined
Aug 10, 2007
Messages
4,059 (1.07/day)
Likes
1,123
Location
Geneva, FL, USA
Processor Intel i5-6600
Motherboard ASRock H170M-ITX
Cooling Cooler Master Geminii S524
Memory G.Skill DDR4-2133 16GB (8GB x 2)
Video Card(s) Gigabyte R9-380X 4GB
Storage Samsung 950 EVO 250GB (mSATA)
Display(s) LG 29UM69G-B 2560x1080 IPS
Case Lian Li PC-Q25
Audio Device(s) Realtek ALC892
Power Supply Seasonic SS-460FL2
Mouse Logitech G700s
Keyboard Logitech G110
Software Windows 10 Pro
#10
Bug confirmed.

random-line-bug.png


It just won't pick that last line ;)
 

qubit

Overclocked quantum bit
Joined
Dec 6, 2007
Messages
14,554 (3.97/day)
Likes
8,061
Location
Quantum Well UK
System Name Quantumville™
Processor Intel Core i7-2700K at stock (hits 5 gees+ easily)
Motherboard Asus P8Z68-V PRO/GEN3
Cooling Noctua NH-D14
Memory 16GB (4 x 4GB Corsair Vengeance DDR3 PC3-12800 C9 1600MHz)
Video Card(s) Zotac GTX 1080 AMP! Extreme Edition
Storage Samsung 850 Pro 256GB | WD Green 4TB
Display(s) BenQ XL2720Z | Asus VG278HE (both 27", 144Hz, 3D Vision 2, 1080p)
Case Cooler Master HAF 922
Audio Device(s) Creative Sound Blaster X-Fi Fatal1ty PCIe
Power Supply Corsair HX 850W v1
Software Windows 10 Pro 64-bit
#11
Typical little utility to write for when you have too much time on your hands. I like it. :)

@mailman: it sounds like you need to move on to Wife 2.0. ;)
 

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
20,922 (6.24/day)
Likes
10,023
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#13

manofthem

WCG-TPU Team All-Star!
Joined
Jan 9, 2011
Messages
10,727 (4.23/day)
Likes
26,177
Location
Florida
System Name bBox | tOffice | mDonk
Processor i7 4770k @4.3 | i7 2600k @3.5 | i7 4790 @3.8
Motherboard MSI Z87 G45 | MSI Z68 GD55 | MSI H97M G43
Cooling Water | Reeven Justice RC-1204 | can't remember
Memory G Skill TridentX 8GB 2400 | Patriot Viper 3 8GB 1600 | G Skill Ripjaws 8GB 1600
Video Card(s) 2x R9 290's | 980 SC ACX2.0 | n/a
Storage 850 Evo 250GB & 2TB Desktar 5K3000 | 830 256GB & 1.5TB & 3TB Barracudas| 830 256GB
Display(s) QNIX WX2710 (96Hz OC) & Shimian Achieva QH270-Lite | Acer 27HL | n/a
Case 900D | Fractal Define S | n/a
Audio Device(s) Siberia v2 | onboard | n/a
Power Supply Corsair AX1200 | XFX 550Pro | SeaSonic 660XP2
Mouse Razer Mamba 2012 | Corsair M95 | n/a
Keyboard Das Keyboard Pro 4 (blues) | Cougar Attack X3 (blues) | n/a
Software Win 10 Pro x64 | Win 10 Pro x64 | Win 10 Pro x64
#14