avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday August 9, 2020, 8:56 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Kniht [ switch to compact view ]

Pages: [1]
While you're at it, get me a second monitor too. This external video jack is just going to waste.

Here's a short program. It accepts input from stdin in roughly the format you gave. (It just reads an integer, ignores 2 characters for comma and space, and reads the rest of the line for the string.) I don't have a compiler setup to distribute windows executables, so you'll have to compile this or find someone who can.

#include <cstdlib>
#include <iostream>
#include <vector>
#include <utility>
#include <string>

double random() { return std::rand() / ( RAND_MAX + 1.0 ); }

int main() {
using namespace std;

srand( time(0) );
rand(); rand(); rand();

typedef unsigned long ulong;
typedef vector< pair< ulong, string > > Data;

Data data;
ulong sum = 0;

for( Data::value_type input;
cin >> input.first &&
cin.ignore(2) &&
getline( cin, input.second );
) {
data.push_back( input );
sum += input.first;

ulong which = ulong( random() * sum );
for ( Data::const_iterator n = data.begin(), end = data.end(); n != end; ++n ) {
if ( which < n->first ) {
cout << n->second;
which -= n->first;

cout << '\n';
return 0;

// this code is released into the public domain for those who care

Living Room / Re: Carol's Clothes come off ...
« on: February 14, 2006, 04:51 PM » about a mod, like "do not show .gif avatars"?

How about a browser that allows you to disable gif animation?  :D *cough*Opera*cough*

Or, if your browser supports site-specific stylesheets, just add one for the forums with
img[src$=".gif"] { display: none; }
That means img tags with a src attribute that ends in .gif.

Your browser does support CSS, right?  ;)

Living Room / Re: build your own shirt folding machine:
« on: February 06, 2006, 05:48 PM »
I built one (modified to fold in thirds instead of in half). Works well. These look wrinkled because I let them sit in the laundry basket for days first.

Mini-Reviews by Members / Re: Fewer system tray icons?
« on: February 05, 2006, 12:37 PM »
Everything that was originally asked for can be done by windows already.

I know Windows does this natively, but I would love to be able to just select which icons would always be hidden, and show them again with a mouseclick.  Anybody know?

Right clicking on the clock in the taskbar (or any other blank space in the system tray) and selecting "customize notifications" brings up a dialog similar to my first screenshot. You can also get there from the 'customize...' button on the taskbar properties dialog.
I've highlighted the three different choices, "always hide", "always show", and "hide when inactive". The last is the default. Icons that are always hidden will not be shown until you open the systray, by clicking the arrow button. When the systray is closed, active icons and those set as "always show" will be present.

In my use, I find an icon rarely needs to be specified as "always show", but several will be "always hide".

Of course this isn't perfect. It may not do everything you want. However, it will work well for many people -- once they find out about it.

Get MusicBrainz.

Doesn't do exactly what you want, but it may be a step in the right direction.

General Software Discussion / Re: Winamp Advanced Control
« on: February 03, 2006, 01:59 PM »
I've used a plugin for Winamp global hotkeys since 2.x, now it's built in. winkey + z, x, c, or v for next, play/pause, stop, and restore/hide winamp. Works much better for me than any graphical plugin for the same I've tried, though the song display feature might be useful.

Here's two more I came up with.

Pages: [1]