Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

06-11-2012 , 07:50 PM
Quote:
Originally Posted by unluckyboy
lol that is frustrating. i just made duplicate variable this time around

all_data2 = all_data

then when i screwed up the all_data variable it automatically screwed up all_data2 in an identical manner. didnt see that coming
Python variables are references to data structures so setting b=a below just creates a new label for "a" rather than copying a:

Code:
a = [1, 2, 3]
b = a
b.append(4)
print b # outputs 1, 2, 3, 4
print a # outputs 1, 2, 3, 4
print a is b # prints True
if you want to get a copy of a list you can do:

Code:
a = [1, 2, 3]
b = [x for x in a]
b.append(4)
print b # outputs 1, 2, 3, 4
print a # # outputs 1, 2, 3
print a is b # outputs False
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 07:53 PM
Quote:
Originally Posted by clowntable
Has anyone here used Mathematica? Comments?

Seems like it could be a neat toy to play around with but comes at a hefty price, I can probabaly get it for free if I make up a good enough excuse :P
I've used it a bit and it's pretty sweet for doing physics and stuff. Take a look at Sage which is an open source alternative based on Python.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 08:30 PM
Quote:
Originally Posted by jjshabado
By the way, I love the new mac book pro. Just saying.
Dat ass--I mean screen. Seriously impressive
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 08:37 PM
I love it too, but when the Apple store a half hour away said they had them in stock when they actually didn't it made me a very sad Panda.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 09:04 PM
I just ordered mine now. It's at 3-4 weeks for delivery now. When I first checked it was 5-7 days. Why did I wait???
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 09:09 PM
predictions on the future of the war between microsoft, linux, and mac? (oxford comma ftw).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 09:15 PM
I for one predict 2015 will be the year of the Linux desktop.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 09:26 PM
Quote:
Originally Posted by Ryanb9
predictions on the future of the war between microsoft, linux, and mac? (oxford comma ftw).
That's like asking for predictions of the future of the war between the USSR, Albania, and the USA.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 09:46 PM
Quote:
Originally Posted by Ryanb9
(oxford comma ftw).
dont know why this isnt standard, it tilts the shiit out of me. i was taught this way in school so whenever i saw the comma missing i would curse the editors for allowing such injustices to seep through. then one day i googled wtf was going on and saw that some people actually dont use it
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 10:01 PM
Quote:
Originally Posted by greg nice
dont know why this isnt standard, it tilts the shiit out of me. i was taught this way in school so whenever i saw the comma missing i would curse the editors for allowing such injustices to seep through. then one day i googled wtf was going on and saw that some people actually dont use it
amen! the oxford comma is the only punctuation i never forget and the only one I hate to not see. when I read articles that are missing it I pat myself on the back for being more civilized than the author xD

Does anyone here use Sandcastle for c#? http://sandcastle.codeplex.com. I'm starting to like that I can hover over a function call and have a popup window show me a brief description I wrote about the function so now im looking into it a bit more. Also, do any C++ compilers support a similar feature? And while I'm on the topic... is it possible to write code to make your own "IntelliSense" type of thing? Or at least customize it in detail by writing code to adjust the 'stock' IntelliSense? =P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 10:59 PM
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-11-2012 , 11:02 PM
I didn't realize they came up with another name for "right."
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 12:00 AM
I favor the Oxford comma and that's the best defense of it I've ever seen.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 01:05 AM
does it come in the printed-on-the-back-of-a-t-shirt variety?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 08:37 AM
i googled that image and found apparently the full? version which complains about both ways:

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 11:38 AM
Found this pretty interesting. The guy has been playing the same Civ II game for 10 years. The outcome strikes me as a pretty likely real life scenario:

http://www.reddit.com/r/gaming/comme...vilization_ii/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 12:22 PM
Quote:
Originally Posted by MrWooster
Found this pretty interesting. The guy has been playing the same Civ II game for 10 years. The outcome strikes me as a pretty likely real life scenario:

http://www.reddit.com/r/gaming/comme...vilization_ii/
Wow!

Juk
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 12:45 PM
Yeah that was cool, and quite hilarious/depressing how it's turned out!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 02:41 PM
Quote:
Originally Posted by jukofyork
Wow!

Juk
Wow is right! Oh and Jesus!

Inga
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 04:17 PM
ASP.NET gurus:

How much should hosting cost for an ecommerce site that does, say, 100K hits/mo and is built on DNN?

What hosts do you recommend (US based)?

What factors would make it cost more or less? And what if the number of hits was 1M hits/mo?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 04:36 PM
It's possible that I missed something, but when I was trying to develop for Mac on a windows machine, I tried a ton of things that didn't work for a while, then gave up and used a Mac.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 04:46 PM
Quote:
Originally Posted by Neko
Python variables are references to data structures so setting b=a below just creates a new label for "a" rather than copying a:

Code:
a = [1, 2, 3]
b = a
b.append(4)
print b # outputs 1, 2, 3, 4
print a # outputs 1, 2, 3, 4
print a is b # prints True
if you want to get a copy of a list you can do:

Code:
a = [1, 2, 3]
b = [x for x in a]
b.append(4)
print b # outputs 1, 2, 3, 4
print a # # outputs 1, 2, 3
print a is b # outputs False
b = a[:] is significantly faster and a bit clearner IMO:

Quote:
In [6]: t = timeit.Timer(stmt = 'b = a[:]', setup= 'a = range(1000000)')

In [7]: t.timeit(100)/100
Out[7]: 0.04913121276955991

In [8]: t = timeit.Timer(stmt = 'b = [x for x in a]', setup= 'a = range(1000000)')

In [9]: t.timeit(100)/100
Out[9]: 0.21962228900826575

It does indeed work:

Quote:
In [10]: a = range(4)

In [11]: a
Out[11]: [0, 1, 2, 3]

In [12]: b = a[:]

In [13]: b
Out[13]: [0, 1, 2, 3]

In [14]: b.append(4)

In [15]: a
Out[15]: [0, 1, 2, 3]

In [16]: b
Out[16]: [0, 1, 2, 3, 4]
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 05:13 PM
Quote:
Originally Posted by Ryanb9
predictions on the future of the war between microsoft, linux, and mac? (oxford comma ftw).
Linux wins in the long run.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 05:40 PM
Quote:
Originally Posted by NoahSD
It's possible that I missed something, but when I was trying to develop for Mac on a windows machine, I tried a ton of things that didn't work for a while, then gave up and used a Mac.
You can also install a Mac VM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-12-2012 , 06:26 PM
Quote:
Originally Posted by NoahSD
b = a[:] is significantly faster...
Forgot all about that somehow...definitely preferable.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m