What are you working on today?

  • (133 Pages)
  • +
  • « First
  • 76
  • 77
  • 78
  • 79
  • 80
  • Last »

1991 Replies - 54742 Views - Last Post: 12 December 2013 - 11:56 AM

#1156 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6180
  • View blog
  • Posts: 10,683
  • Joined: 28-September 07

Re: What are you working on today?

Posted 25 October 2013 - 10:51 AM

DON'T RUIN MY FANTASY!
Was This Post Helpful? 0
  • +
  • -

#1157 ybadragon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 255
  • View blog
  • Posts: 1,386
  • Joined: 11-May 12

Re: What are you working on today?

Posted 25 October 2013 - 10:54 AM

Just ready to go home for the weekend. Been working for over an hour trying to get Crystal Reports for VB6 on this Windows 7 machine. It's extremely annoying. Crystal Reports keeps erroring out during installation.
Was This Post Helpful? 0
  • +
  • -

#1158 h4nnib4l  Icon User is offline

  • The Noid
  • member icon

Reputation: 1182
  • View blog
  • Posts: 1,677
  • Joined: 24-August 11

Re: What are you working on today?

Posted 25 October 2013 - 10:55 AM

View Postsupersloth, on 25 October 2013 - 11:43 AM, said:

View PostBenignDesign, on 25 October 2013 - 08:58 AM, said:

Call me "Sugar" again and I'll carpet staple your wiener to your inner thigh. :wub:/>/>

his wiener reaches all the way to his inner thigh!?!?!


Maybe if she staples his right foot to his left shoulder first?

This post has been edited by h4nnib4l: 25 October 2013 - 11:02 AM

Was This Post Helpful? 2
  • +
  • -

#1159 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2736
  • View blog
  • Posts: 15,813
  • Joined: 24-September 08

Re: What are you working on today?

Posted 25 October 2013 - 03:50 PM

I dunno, I always kinda thought he had an innie.
Was This Post Helpful? 1
  • +
  • -

#1160 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6180
  • View blog
  • Posts: 10,683
  • Joined: 28-September 07

Re: What are you working on today?

Posted 25 October 2013 - 05:49 PM

I prefer to imagine he's hung like a well endowed elephant. Maybe it's just me...
Was This Post Helpful? 2
  • +
  • -

#1161 bingy  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 106
  • View blog
  • Posts: 716
  • Joined: 15-December 06

Re: What are you working on today?

Posted 26 October 2013 - 10:29 AM

I'm just baking cookies that I have been craving for a while now
Was This Post Helpful? 0
  • +
  • -

#1162 Berret  Icon User is offline

  • New D.I.C Head

Reputation: 7
  • View blog
  • Posts: 16
  • Joined: 26-October 13

Re: What are you working on today?

Posted 26 October 2013 - 11:27 AM

I am working on my midterm assignment for my Webpage Design & Development with HTML5/CSS online course. It's due Sunday at midnight, and it may well take me that long to finish it.
Was This Post Helpful? 0
  • +
  • -

#1163 MentalFloss  Icon User is offline

  • "ADDICTED"[2:5]
  • member icon

Reputation: 526
  • View blog
  • Posts: 1,397
  • Joined: 02-September 09

Re: What are you working on today?

Posted 26 October 2013 - 01:56 PM

I'm learning python (started yesterday and today is my code-off)

I'd like to show off the (novice) code I have created so far today. I hope you do not mind.

# This script plays a simple game of rock-paper-scissors.
# User input is done through 1 = rock, 2 = paper, 3 = scissors
# It is only a two player game of humans as I have not learned how to do random yet.
# It is a single game implementation.
# It will be ugly...

#============================================================
# Compare player1 to player2 and return who won as a string.
def who_won(player1, player2):
	# Make sure we can play the game
	if not (is_valid_choice(player1) and is_valid_choice(player2)):
		return "This is an invalid game."

	# Player1 = Rock, Player2 = Paper
	if player1 == '1' and player2 == '2':
		return "Player Two won with %s." % get_move_name(player2)
	# Player1 = Rock, Player2 = Scissors
	if player1 == '1' and player2 == '3':
		return "Player One won with %s." % get_move_name(player1)
	# Player1 = Paper, Player2 = Rock
	if player1 == '2' and player2 == '1':
		return "Player One won with %s." % get_move_name(player1)
	# Player1 = Paper, Player2 = Scissors
	if player1 == '2' and player2 == '3':
		return "Player Two won with %s." % get_move_name(player2)
	# Player1 = Scissors, Player2 = Rock
	if player1 == '3' and player2 == '1':
		return "Player Two won with %s." % get_move_name(player2)
	# Player1 = Scissors, Player2 = Paper
	if player1 == '3' and player2 == '2':
		return "Player One won with %s." % get_move_name(player1)
	else:
		return "The game is a tie."
#============================================================

#============================================================
# Find out if player1 is equal to player2 and if so return true.
def is_tie(player1, player2):
	if player1 == player2:
		return True
	else:
		return False
#============================================================

#============================================================
# Checks if the choice is a valid one (1, 2, 3). 
# Accepts a string
# Returns true/false
def is_valid_choice(choice):
	if choice == '1' or choice == '2' or choice == '3':
		return True
	else:
		return False
# ===========================================================

#============================================================
# This returns the name of the move based on the choice
def get_move_name(choice):
	if choice == '1':
		return 'rock'
	elif choice == '2':
		return 'paper'
	elif choice == '3':
		return 'scissors'
	else:
		return 'invalid selection'
#============================================================

#============================================================
# This simply prints all options out to make sure I didn't miss anything
def test_game():
	print "R v R = %s" % who_won('1', '1')
	print "R v P = %s" % who_won('1', '2')
	print "R v S = %s" % who_won('1', '3')

	print "P v R = %s" % who_won('2', '1')
	print "P v P = %s" % who_won('2', '2')
	print "P v S = %s" % who_won('2', '3')
	
	print "S v R = %s" % who_won('3', '1')
	print "S v P = %s" % who_won('3', '2')
	print "S v S = %s" % who_won('3', '3')

	print "? v ? = %s" % who_won('?', '?')
	print "1 v ? = %s" % who_won('1', '?')
	print "? v 1 = %s" % who_won('?', '1')
#============================================================

# Main Program:
print "P1: [1 = Rock, 2 = Paper, 3 = Scissors]:"
player1 = raw_input("> ")
p1_is_valid = is_valid_choice(player1)
print "Player 1 selected a valid input: %s" % p1_is_valid
print "Player 1 selected: %s" % get_move_name(player1)

print "P2: [1 = Rock, 2 = Paper, 3 = Scissors]:"
player2 = raw_input("> ")
p2_is_valid = is_valid_choice(player2)
print "Player 2 selected a valid input: %s" % p2_is_valid
print "Player 2 selected: %s" % get_move_name(player2)

print "Playing Game..."
print "The game is a tie?: %s" % is_tie(player1, player2)
print who_won(player1, player2)

print "=========================================="
print "Doing Tests"
print "=========================================="
test_game()



output said:

P1: [1 = Rock, 2 = Paper, 3 = Scissors]:
> 2
Player 1 selected a valid input: True
Player 1 selected: paper
P2: [1 = Rock, 2 = Paper, 3 = Scissors]:
> 3
Player 2 selected a valid input: True
Player 2 selected: scissors
Playing Game...
The game is a tie?: False
Player Two won with scissors.
==========================================
Doing Tests
==========================================
R v R = The game is a tie.
R v P = Player Two won with paper.
R v S = Player One won with rock.
P v R = Player One won with paper.
P v P = The game is a tie.
P v S = Player Two won with scissors.
S v R = Player Two won with rock.
S v P = Player One won with scissors.
S v S = The game is a tie.
? v ? = This is an invalid game.
1 v ? = This is an invalid game.
? v 1 = This is an invalid game.


So, then I got this idea that (after all these years) maybe I can make RPS numeric after all. Viola:

# This is an idea about RPS where the moves can be calculated numerically
# Basically Player 1 is all positive numbers and Player 2 is negative.
#
#	3	2	1		-1	-2	-3
#	R	P	S	|	S	P	R
# ...Wow.

def calculate(player1, player2):
	result = player1 + player2

	if result == 0:
		return "TIE"
	elif result == 1 or result == -2:
		return "P2 WINS"
	elif result == 2 or result == -1:
		return "P1 WINS"
	else:
		return "INVALID"

def test_game():
	# Player 1:  3 = Rock,  2 = Paper,  1 = Scissors
	# Player 2: -3 = Rock, -2 = Paper, -1 = Scissors
	print "R(3) v R(-3): %s" % calculate(3,-3)
	print "R(3) v P(-2): %s" % calculate(3,-2)
	print "R(3) v S(-1): %s" % calculate(3,-1)

	print "P(2) v R(-3): %s" % calculate(2,-3)
	print "P(2) v P(-2): %s" % calculate(2,-2)
	print "P(2) v S(-1): %s" % calculate(2,-1)

	print "S(1) v R(-3): %s" % calculate(1,-3)
	print "S(1) v P(-2): %s" % calculate(1,-2)
	print "S(1) v S(-1): %s" % calculate(1,-1)

def get_move(choice):
	if choice == 'R' or choice == 'r':
		return 3
	elif choice == 'P' or choice == 'p':
		return 2
	elif choice == 'S' or choice == 's':
		return 1

def play_game():
	prompt = "Enter R = Rock, P = Paper, S = Scissors > "
	p1 = raw_input("P1 %s" % prompt)
	p2 = raw_input("P2 %s" % prompt)
	print calculate(get_move(p1), (get_move(p2)*-1))

test_game()
play_game()



output said:

R(3) v R(-3): TIE
R(3) v P(-2): P2 WINS
R(3) v S(-1): P1 WINS
P(2) v R(-3): P1 WINS
P(2) v P(-2): TIE
P(2) v S(-1): P2 WINS
S(1) v R(-3): P2 WINS
S(1) v P(-2): P1 WINS
S(1) v S(-1): TIE
P1 Enter R = Rock, P = Paper, S = Scissors > r
P2 Enter R = Rock, P = Paper, S = Scissors > s
P1 WINS


Then I created a run of the mill temperature converter:

# This program asks which temperature to start with:
# F = Fahrenheit
# C = Celsius
# K = Kelvin
# Then it asks for the temperature and tells you what the other temperatures are
# converted.

# C  x  9/5 + 32 = F
# (F - 32) x 5/9 = C
# C + 273.15 = K 

# OP = F to C:
# call fahrenheit_to_celsius

# OP = F to K:
# call fahrenheit_to_celsius
# call celsius_to_kelvin

# OP = C to F:
# call celsius_to_fahrenheit

# OP = C to K:
# call celsius_to_kelvin

# OP = K to F:
# call kelvin_to_celsius
# call celsius_to_fahrenheit

# OP = K to C:
# call kelvin_to_celsius

# (F - 32) x 5/9 = C
def fahrenheit_to_celsius(value):
	return (value - 32) * (5.0 / 9.0)

# C  x  9/5 + 32 = F
def celsius_to_fahrenheit(value):
	return value * (9.0 / 5.0) + 32;

# C + 273.15 = K 
def celsius_to_kelvin(value):
	return value + 273.15

# K - 273.15 = C 
def kelvin_to_celsius(value):
	return value - 273.15

# Main Program:

choice = raw_input("Start with? (1 = Fahrenheit, 2 = Celsius, 3 = Kelvin): ")

if choice == '1':
	fahrenheit = float(raw_input("Enter degrees in Fahrenheit: "))
	celsius = fahrenheit_to_celsius(fahrenheit)
	kelvin = celsius_to_kelvin(celsius)
elif choice == '2':
	celsius = float(raw_input("Enter degrees in Celsius: "))
	fahrenheit = celsius_to_fahrenheit(celsius)
	kelvin = celsius_to_kelvin(celsius)
elif choice == '3':
	kelvin = float(raw_input("Enter degrees in Kelvin: "))
	celsius = kelvin_to_celsius(kelvin)
	fahrenheit = celsius_to_fahrenheit(celsius)
else:
	print "That is not a valid option."
	quit()

print "%.2f F is equal to %.2f C is equal to %.2f K" % (fahrenheit, celsius, kelvin)



output said:

Start with? (1 = Fahrenheit, 2 = Celsius, 3 = Kelvin): 1
Enter degrees in Fahrenheit: 32
32.00 F is equal to 0.00 C is equal to 273.15 K


Then I did a simple high-low game (but I don't know random number generation and learning it today is breaking my rule)

# This is a simple hi-lo guessing game.
# Unfortunately, I do not know how to do random numbers yet so the number will
# always be 42 because why not right?

def get_high_low(guess, answer, low, high):
	if guess > answer:
		if guess < high:
			high = guess
		
		return low, high, "That is too high."
	
	elif guess < answer:
		if guess > low:
			low = guess
		
		return low, high, "That is too low."
	else:
		return 0, 0, "You got it!"

def get_answer():
	print """
	This would normally pick a random number between X and Y
	but I don't know random in python yet so we'll just use
	42 for now.
	"""
	return 42

def game(low, high, guesses):
	guessed = False
	answer = get_answer()

	while not guessed:
		print "You have %d %s available." % (guesses, ("guesses" if not guesses == 1 else "guess"))
		guess = int(raw_input("Enter guess between %d and %d: " % (low, high)))
		low, high, message = get_high_low(guess, answer, low, high)

		if not guess == answer:
			guesses -= 1
			if guesses == 0:
				print "You have run out of guesses. Game Over."
				guessed = True # Not exactly... just getting out of the while loop.
			else:
				print message

		else:
			guessed = True
			print message

low = 1
high = 100
guesses = 5
game(low, high, guesses)



output said:

This would normally pick a random number between X and Y
but I don't know random in python yet so we'll just use
42 for now.

You have 5 guesses available.
Enter guess between 1 and 100: 4
That is too low.
You have 4 guesses available.
Enter guess between 4 and 100: 77
That is too high.
You have 3 guesses available.
Enter guess between 4 and 77: 34
That is too low.
You have 2 guesses available.
Enter guess between 34 and 77: 43
That is too high.
You have 1 guess available.
Enter guess between 34 and 43: 42
You got it!


So there you have it. Newbie stuff but still... gotta start somewhere.
Was This Post Helpful? 0
  • +
  • -

#1164 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9392
  • View blog
  • Posts: 35,273
  • Joined: 12-June 08

Re: What are you working on today?

Posted 27 October 2013 - 10:48 PM

My mind was blown after the meet and greet, signed poster, center 2 feet back from the stage of an amazing concert.. at the Candlebox and Hinder concert. The key being Candlebox. So freaking much awesome.
Was This Post Helpful? 0
  • +
  • -

#1165 ybadragon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 255
  • View blog
  • Posts: 1,386
  • Joined: 11-May 12

Re: What are you working on today?

Posted 28 October 2013 - 05:39 AM

Had a decent weekend. Got to spend time with my daughter. Only bad part was having to hear her mom bitch when I brought her back. Now I'm at work waiting on a co-worker to finish the work he was supposed to do over the weekend, so we can start a collaboration to play catch up for his client.
Was This Post Helpful? 0
  • +
  • -

#1166 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 6180
  • View blog
  • Posts: 10,683
  • Joined: 28-September 07

Re: What are you working on today?

Posted 28 October 2013 - 06:30 AM

Great weekend... took my not-so-little ones trick-or-treating on Friday. We had a devil and a homemade Gir-in-his-dog-costume.

Saturday was a long awaited Halloween party with a houseful of my closest friends. The kids wore the same costumes, I went as a viking - with a beard made from my own hair (thanks for the link, modi123_1!). The beard, sadly, did not last long as I couldn't stand the tickling on my nose and lips... so after everyone had their laughs at my expense and finished taking pictures, I dismantled my face fro and returned to a somewhat normal state (if you ignored the tights, the helmet, and the plastic sword).

Sunday was spent in domestic goddess mode: laundry, dishes, housework, grocery shopping, screaming at the kids to clean their pig sty bedrooms or so help me, I was coming in with trash bags and setting fire to everything they've ever loved.

This morning, I overslept, didn't have time for a shower, my 12-year-old forgot to take her insulin, my 10-year-old missed the bus, I was late to work, my inbox is overflowing, and I'm about to hike across campus for a meeting with my boss... better known as "Yes, ma'am, I can do that. No, ma'am, you have not given me too many projects to tackle in a week's time. Thank you for employing me, ma'am. I'm happy to be not homeless."
Was This Post Helpful? 0
  • +
  • -

#1167 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2736
  • View blog
  • Posts: 15,813
  • Joined: 24-September 08

Re: What are you working on today?

Posted 28 October 2013 - 06:30 AM

I'm at the orthopedic dudes office. Gonna see about this cast.
Was This Post Helpful? 0
  • +
  • -

#1168 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: What are you working on today?

Posted 28 October 2013 - 07:08 AM

Now that the contract has finally paid me (as of about 30 mins ago via wire transfer...only a week late) I'll be deleting all their data and code and informing them, hopefully somewhere before the lunch hour, that I'm closing the contract.

When the client states (not asks but declares) that he'll be sending monitoring software that I am to install on my machine and to go buy a web cam so that it can be on 24/7 so he can confirm that I'm doing his work...it's time to bail. Forget that I've cleared more tickets in the past 3 weeks than his established F/T staff and that I'm doing it on subjects that aren't my strengths (most notably, ridiculously complex database SQL SPs and functions). I haven't used a single atom of the skillset I was supposedly hired to bring to the party (CF development) and, as far as I can discern I won't be doing so anytime soon.

So, micromanagement + not using me properly + not paying on time = go find someone else.

Me voluntarily installing spyware on MY machine...yeah, it'll be a cold day in Hell before that'll happen.
Was This Post Helpful? 4
  • +
  • -

#1169 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10667
  • View blog
  • Posts: 39,615
  • Joined: 27-December 08

Re: What are you working on today?

Posted 28 October 2013 - 07:21 AM

It's hell week this week. I've got a Real Analysis test this evening (better two hours to write proofs than 50 minutes in class at 10:00 AM), an Econ test on Thursday, and a ton of homework. This weekend looks to be quite exciting though!
Was This Post Helpful? 1
  • +
  • -

#1170 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 851
  • View blog
  • Posts: 2,599
  • Joined: 29-July 11

Re: What are you working on today?

Posted 28 October 2013 - 09:29 AM

Healthcare.gov, and I need lots of help. :)
Was This Post Helpful? 1
  • +
  • -

  • (133 Pages)
  • +
  • « First
  • 76
  • 77
  • 78
  • 79
  • 80
  • Last »