Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
ToxicFrog
Apr 26, 2008


madeupfred posted:

This is a really tiny and kind of stupid, but I would be willing to pay for an app that takes the County Results by state at http://www.politico.com/2012-election/results/president/(Insert State Here)/ and saves them in an Excel workbook.

Arranged how? Same way as on the site, with county - candidate - party - %votes - nvotes, and multiple rows per county?

Adbot
ADBOT LOVES YOU

madeupfred
Oct 10, 2011

by FactsAreUseless

ToxicFrog posted:

Arranged how? Same way as on the site, with county - candidate - party - %votes - nvotes, and multiple rows per county?

Preferably something that looks like this:

where values would be the popular vote or nvotes as you called them.

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.
I didn't see your post above about the formatting, but I scraped all the data and put it into an excel file:
http://www.filedropper.com/electionresults

I'll look into getting it into the format you want, or someone else can go ahead and do it.

madeupfred
Oct 10, 2011

by FactsAreUseless

Bodhi Tea posted:

I didn't see your post above about the formatting, but I scraped all the data and put it into an excel file:
http://www.filedropper.com/electionresults

I'll look into getting it into the format you want, or someone else can go ahead and do it.

Haha, that's great. How did you do it, just out of curiosity?

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

madeupfred posted:

Haha, that's great. How did you do it, just out of curiosity?

Here's my disgusting python code:
http://hastebin.com/bukoxuvawa.py

it creates a CSV file, which I then imported into Excel.

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

madeupfred posted:

Preferably something that looks like this:

where values would be the popular vote or nvotes as you called them.

Created a pivot table to get the data into the format you wanted:
http://sharesend.com/fi6smhib

madeupfred
Oct 10, 2011

by FactsAreUseless

Bodhi Tea posted:

Created a pivot table to get the data into the format you wanted:
http://sharesend.com/fi6smhib

Holy poo poo dude, above and beyond. :stare:
Do you have a PayPal or something like it?

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

madeupfred posted:

Holy poo poo dude, above and beyond. :stare:
Do you have a PayPal or something like it?

Don't worry about it dude, glad to help.

smitz
Nov 5, 2003

I don't actually need anything built, just an answer on how something like this would be built.

I'm stuck with a legacy windows app that displays various information, including a product ID number. I want to create a utility (in any programming language) that finds the app's window, finds the column of product IDs, read them, and overlay the ID with a corresponding product name. None of this should actually interact with the legacy app, I just want to see and overlay of product names.

Any ideas what kind of tools exist to make something like this happen?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

smitz posted:

I don't actually need anything built, just an answer on how something like this would be built.

I'm stuck with a legacy windows app that displays various information, including a product ID number. I want to create a utility (in any programming language) that finds the app's window, finds the column of product IDs, read them, and overlay the ID with a corresponding product name. None of this should actually interact with the legacy app, I just want to see and overlay of product names.

Any ideas what kind of tools exist to make something like this happen?

AutoIT should do all of that for you.

dirby
Sep 21, 2004


Helping goons with math

Sylink posted:

Python can do this easily…
Thank you for your help, but this wasn't quite what I was looking for. I PMed you for clarification.

MrPablo posted:

This Ruby script should do what you want: replacer.rb.

Usage:
code:
  ruby replacer.rb subs.csv input.txt output.txt
Where subs.csv is a CSV file containing the value to search for in the first column and the associated replacement value in the second column.
Thanks for making that for me. It sounds like it should do what I wanted, but when I ran it, I got the following error:
code:
replacer.rb:35:in `block in <main>': undefined method `gsub!' for nil:NilClass (
NoMethodError)
        from replacer.rb:32:in `each'
        from replacer.rb:32:in `inject'
        from replacer.rb:32:in `<main>'
Edit: Thanks anyway, but this seems to work for me in python:
Python code:
import csv
with open('replacements.csv') as csvfile:
    replist = csv.reader(csvfile)
    with open('input.txt') as inputfile:
        text=inputfile.read()
        for row in replist:
            text=text.replace(row[0],row[1])
        with open('output.txt','w') as outputfile:
            outputfile.write(text)

dirby fucked around with this message at 15:34 on Dec 23, 2012

Womens Jeans
Sep 13, 2007

by LITERALLY AN ADMIN
Done.

Womens Jeans fucked around with this message at 18:13 on Dec 25, 2012

Happiness Commando
Feb 1, 2002
$$ joy at gunpoint $$

I want something that will hang out in my taskbar and every time it detects N minutes of activity - mouse, typing, whatever - it pops up with a "shouldnt you be doing something else right now?"

This app must exist somewhere, has anyone heard of something similar?

Otis Reddit
Nov 14, 2006
Does anybody have an app which can calculate the amount I pee each day? I'm looking for maybe just an applet where I can plug in amount of time spent peeing, and maybe choose one of a few options for 'stream intensity' (I guess on the backend this would probably correspond to an x value for cfm. I'm trying to watch my weight/health and I've determined monitoring my urine uptake to be the next step, but I'm utterly loving useless as a coder. I would gladly Paypal $5, or even more if my expectations on the scope/time spent on this project are out of whack. Any questions and you can PM me. Thanks.

epswing
Nov 4, 2003

Soiled Meat

juche mane posted:

Does anybody have an app which can calculate the amount I pee each day? I'm looking for maybe just an applet where I can plug in amount of time spent peeing, and maybe choose one of a few options for 'stream intensity' (I guess on the backend this would probably correspond to an x value for cfm. I'm trying to watch my weight/health and I've determined monitoring my urine uptake to be the next step, but I'm utterly loving useless as a coder. I would gladly Paypal $5, or even more if my expectations on the scope/time spent on this project are out of whack. Any questions and you can PM me. Thanks.

Does the "amount of time spent peeing" mean you pee with a stopwatch in hand?

Otis Reddit
Nov 14, 2006
Ha! No, not exactly, at least not yet. Up until now I've been doing it the old fashioned way, until my mother caught me Christmas morning, when I forgot to rinse out the measuring cup. So I'm looking to optimize the process, so to speak.

Sylink
Apr 17, 2004

Try this:

http://office.microsoft.com/en-us/excel/

or the old fashioned way:

http://www.amazon.com/Moleskine-Ruled-Notebook-Large/dp/8883701127/ref=sr_1_1?ie=UTF8&qid=1356641767&sr=8-1&keywords=notebook

Doctor w-rw-rw-
Jun 24, 2008
I'm interested in playing around with OpenCV and feeding screenshots from League of Legends into it, but I have no clue how to start with C++ and the Windows API. Is anyone with experience willing to make a simple app (in C++) that does nothing other than detect a LoL game window (not the pre-game PvP.net client, but the game client), then save screenshots of it to a folder?

the littlest prince
Sep 23, 2006


juche mane posted:

I'm trying to watch my weight/health and I've determined monitoring my urine uptake to be the next step

Do you have some strange disease? I have never heard of the amount of excreted urine as an indicator of health, only its color.

crumpuppet
Mar 22, 2007

ROBORT > EVERYTHING

IfIWereARichMan posted:

I want something that will hang out in my taskbar and every time it detects N minutes of activity - mouse, typing, whatever - it pops up with a "shouldnt you be doing something else right now?"

This app must exist somewhere, has anyone heard of something similar?

Check out EyeLeo, here's a good write-up: http://lifehacker.com/5896358/eyeleo-reminds-you-to-take-breaks-dims-your-screen-so-you-actually-take-them

Otis Reddit
Nov 14, 2006

the littlest prince posted:

Do you have some strange disease? I have never heard of the amount of excreted urine as an indicator of health, only its color.

I've altered my diet to a healthier one and I haven't seen any gains. What I have seen is that for every pound of liquid that I consume, I release probably half of, later in the day. I want to put this into data so that I can figure out what to do next.

This isn't getting any traction at $5, so would $15-20 be more in line? Give me an idea people.

corgski
Feb 6, 2007

Silly goose, you're here forever.

Do you have any medical basis for doing this or are you just flailing in the dark? You might do better talking to a nutritionist.

dirby
Sep 21, 2004


Helping goons with math

:aaa: This looks amazing, and has the potential to be even more useful for me than f.lux (program to adjust color temperature so you don't have bluish sun colors at night).

the littlest prince
Sep 23, 2006


juche mane posted:

I've altered my diet to a healthier one and I haven't seen any gains. What I have seen is that for every pound of liquid that I consume, I release probably half of, later in the day. I want to put this into data so that I can figure out what to do next.

This isn't getting any traction at $5, so would $15-20 be more in line? Give me an idea people.

What you're trying to do isn't going to tell you anything. Go lurk YLLS for a bit (if you aren't already) and you should pick up on what might be wrong (e.g. not enough sleep, not enough protein, not pushing yourself hard enough in your workouts, expecting too much progress too quickly, etc.).

Otis Reddit
Nov 14, 2006
I'm nearly positive that this is a moisture retention issue. About four months ago I switched from Soda to Diet, and even though this substantially cut the amount of sugars in my blood stream (Diet soda is basically just water) I haven't lost much weight since then. Some cursory internet look-ups have yielded talk of 'water retention' from Diet sodas, from the aspartame, etc. and I think this is my issue. However I need a quick shorthand way to collect the raw data necessary to figure out just how much of the extra urine my body is keeping, and I will cross-reference this with my weight in the AM, PM, the weight (metric system for all figures) of the amount of food and drink I consume. I'm not about to weigh my BMs, but fresh urine is sterile and it's a start.

epswing
Nov 4, 2003

Soiled Meat

Anyways...why can't you just use a spreadsheet? This is exactly what spreadsheets are for.

Otis Reddit
Nov 14, 2006
Excel is an expensive program, that I don't know how to use to it's full capabilities, and I want something with a front end (GUI?) I guess. Are there any other places that I could go to online to order/request small programs?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

juche mane posted:

Excel is an expensive program, that I don't know how to use to it's full capabilities, and I want something with a front end (GUI?) I guess. Are there any other places that I could go to online to order/request small programs?

Google Spreadsheet is free and so is LibreOffice. This is so simple.

Otis Reddit
Nov 14, 2006
OK. I will look into them. Thanks, I guess.

gary oldmans diary
Sep 26, 2005

thelightguy posted:

Do you have any medical basis for doing this or are you just flailing in the dark? You might do better talking to a nutritionist.
A dietician would be preferable.

Otis Reddit
Nov 14, 2006
After reading about what they did to Oracle, I don't think I'll be giving these Libre Office people a lick of my support. I think I might just wing it, this thing is the size of a hand-ball so I think the weight/volume be damned, I'll just drain it tonight and see how it goes.

Dicky B
Mar 23, 2004

juche mane posted:

After reading about what they did to Oracle, I don't think I'll be giving these Libre Office people a lick of my support.
What did they do?

ToxicFrog
Apr 26, 2008


juche mane posted:

After reading about what they did to Oracle, I don't think I'll be giving these Libre Office people a lick of my support. I think I might just wing it, this thing is the size of a hand-ball so I think the weight/volume be damned, I'll just drain it tonight and see how it goes.

:psyduck:

Ok, I know I'm probably going to regret this, but I'll take the bait: what, in your mind, did the LibreOffice devs do to Oracle, and how is using LibreOffice "supporting" them (given that it's free software that they don't even get ad revenue from)?

Happiness Commando
Feb 1, 2002
$$ joy at gunpoint $$

gently caress yeah. Thank you

hayden.
Sep 11, 2007

here's a goat on a pig or something

IfIWereARichMan posted:

gently caress yeah. Thank you

Pretty late to this, but I made a simple version in Java. I'm terrible at programming so I can't be held responsible if this blows up your computer or is otherwise terrible. I didn't bother adding checking as to whether the computer is idle, since I assume if you're not at the computer it doesn't really matter if it's still running or not. It uses a tray notification so it won't clutter your screen with a million dialogue boxes if you walk away. Requires Java 7 to be installed.

http://www.goonreviews.com/SubtleReminder.jar

Timer defaults to 5 minutes at run time. Duration and message can be changed but isn't saved between launches.

River
Apr 22, 2012
Nothin' but the rain
Does anyone know of a program/script that would work on CentOS 6 that could log the average download speeds and IP addresses + timestamp of people that downloaded files from a particular web directory, then outputs the logs to shell or file?

afen
Sep 23, 2003

nemo saltat sobrius
Hello! I'm looking for an app that shows the current time (24H, with seconds) as the title of the program. So that I can use it as a clock in my UltraMon taskbar on my secondary monitor.

hayden.
Sep 11, 2007

here's a goat on a pig or something

afen posted:

Hello! I'm looking for an app that shows the current time (24H, with seconds) as the title of the program. So that I can use it as a clock in my UltraMon taskbar on my secondary monitor.

Someone will probably post something better with amazing magic powers, but here's mine. Requires Java 7.

http://www.goonreviews.com/GoonClock.jar

code:
import javax.swing.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class Clock {

	public static void main(String[] args) {

		JFrame f = new JFrame("GoonClock 9000");
		f.setSize(200, 0);
		f.addWindowListener(new ExitListener());
		f.setVisible(true);

		while (true) {
			SimpleDateFormat sdf = new SimpleDateFormat("h:mm a");
			String str = sdf.format(new Date());
			f.setTitle(str);

			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

	static class ExitListener extends WindowAdapter {
		public void windowClosing(WindowEvent event) {
			System.exit(0);
		}
	}

}

hayden. fucked around with this message at 02:53 on Jan 4, 2013

nuvan
Mar 29, 2008

And the gentle call of the feral 3am "Everything is going so well you can't help but panic."
Actually, given that he wanted a 24 hour clock, with seconds, the SimpleDateFormat should be "HH:mm:ss"

Adbot
ADBOT LOVES YOU

crumpuppet
Mar 22, 2007

ROBORT > EVERYTHING

afen posted:

Hello! I'm looking for an app that shows the current time (24H, with seconds) as the title of the program. So that I can use it as a clock in my UltraMon taskbar on my secondary monitor.

I think this will do what you asked for. It starts minimized.

https://www.dropbox.com/sh/vpbjvn42rivcnoj/wjlBjHuFil/TimeTitle.exe

AutoIT code:

code:
#include <GUIConstantsEx.au3>

$gui = GUICreate ("TimeTitle", 200, 100)

$btn_exit = GUICtrlCreateButton ("Exit", 110, 60, 60, 25)

GUISetState (@SW_SHOWMINIMIZED)

While 1 = 1
   $curtime = "" & @HOUR & ":" & @MIN & ":" & @SEC
   
   WinSetTitle ($gui, "", $curtime)
   
   For $i = 1 to 10 step 1
   
	  $msg = GUIGetMsg ()
  
	  Switch $msg
		 Case $GUI_EVENT_CLOSE
			Exit
		 Case $btn_exit
			Exit
	  EndSwitch
      
	  Sleep (100)
   Next
   
WEnd
Do you want anything inside the window, or is it purely for UltraMon to grab the window title? It seems a bit strange to only want the time in the title bar. Unfortunately you have to have the emtpy window somewhere (can be minimized), otherwise the process loses its Window Title.

Keep in mind AutoIT also has the ability to change the title of any other window, given its current title or class name.

  • Locked thread