« first day (1575 days earlier)      last day (3376 days later) » 

12:00 AM
@PeterVaro rhubarb
 
rbrb
 
Mmmm, soundtracks... think I will listen to Metropolis for the remainder of the work day (the Rintaro one, not the Fritz Lang one)
 
enjoy @AirThomas
 
12:22 AM
interesting... netflix is showing subtitles - even though I've said not to... and can't quite tell if they're Spanish/Portuguese
 
Spanish only has a tilde ~ above the letter n, while Portuguese has it above several letters, including vowels.
 
12:36 AM
Spanish: ñáéíóü / Portuguese: lots
 
I'm friends with a woman named Sarah who's a polyglot -- that is, she can hold conversations in something like a dozen languages with native speakers.
(sorry got pulled away by work)
Anyhow, she has a decent working knowledge of programming, has taken a couple courses, one specifically in Python, so I swap stories with her occasionally about Stack Overflow answers I've written or etc
I was telling her about my horrible ugly any(all(...) ) construction yesterday to find more than one vowel in a row
her response: "How do you detect y as a vowel?"
 
argh.
 
12:53 AM
Hmm ... okay, if it's preceded by a vowel or nothing it's a consonant; if it's preceded by a consonant it's a vowel. Any counterexamples to that?
(in English of course)
 
"Key"
 
I'm no linguist, but that looks like a consonant to me: it's the same as "yik" backwards.
 
bye == bie ?
 
similarly, lye
 
bah i dunno
 
12:56 AM
Well that's where it gets weird - that's "yab" backwards, which would make "e" a consonant :-/
English orthography is odd.
 
when is q a vowel again?
 
iff it's preceded by a u
 
vowels/consonants strangely reminds me of Countdown and this numbers game: youtube.com/watch?v=pfa3MHLLSWI
 
Anyhow, I countered that my code also couldn't tell if it was English. She started looking up NTLK.
quittin' time -- rbrb all
 
this answer is a lousy answer to a lousy question stackoverflow.com/a/28377329/541038 but I dont understand why I got -1 ... I think it answers OP question
 
1:07 AM
I think it's implied that if u is micro, m is milli, G is giga etc.
 
1:27 AM
@Joran who knows? I've gotten random downvotes on some of my seemingly correct answers (or at least as far as I can tell from what the OP gave). Just think of it as punishment for not being a mind reader...
that is an awful question, though... who does that?
 
2:03 AM
@tohster Your inability to understand what my answer meant doesn't effect whether the question was a duplicate. In fact, no answer in any form effects whether questions are duplicates. Please stop (a) (b)'ing me and just graciously end the conversation. — davidism 17 mins ago
this guy really doesn't get it
 
2:35 AM
0
A: how can I evaluate math expressions with human readable units in python?

Zero PiraeusThis answer expands somewhat on Joran's to replace all SI affices with the appropriate exponents: import re from collections import OrderedDict SI = OrderedDict([ ("T", 12), ("G", 9), ("M", 6), ("k", 3), ("h", 2), ("da", 1), ("d", -1), ("c", -2), ("m", -3),...

:-)
 
nice job. Have a +1
 
It's a silly question, but once I started messing around with it I found it quite entertaining.
 
2:51 AM
@ZeroPiraeus Why use eval when you can do literal_eval
>>> a = '1e-6+1e-6'
>>> ast.literal_eval(a)
2e-06
works in py3
doesn't in py2
 
Because it doesn't work in Python 2 ;-) (and claims not to in Python 3, for that matter).
Also because I was too lazy to go much further than "but don't do that", if I'm honest ...
 
3:26 AM
"too lazy" The universal programmer excuse ....
 
The best programmers I know are the laziest people I know
 
@AdamSmith Congo on 10k
 
because ultimately the kind of person who ends up programming for a living figured out sometime early in life "Hey, I bet I could make this COMPUTER do my work for me!"
ty @BhargavRao
 
If you had reached 10000 exact ... you could have posted a pic ... :(
 
Nah I was stuck at like 9994 or 9996 or something when my rep cap kicked in
so I had to get a checkmark to get my over 10k
 
3:29 AM
Now you hafta downvote 19 answers ... Lol
 
lol I don't think it's worth it ;)
 
Yeah ...
 
3:44 AM
Hey fuys
*guy
I need some help
self.Button1 = tk.Button(self, text="Start Server", command=lambda:Application.startServer(int(self.rounds.get())))
The problem is, the button doesn't off-click until the function is done
@AdamSmith shoutout
@BhargavRao shoutout lol
 
4:05 AM
If we don't answer it implies that we don't know. Wait for some one else in this room to answer
 
@StaticCast please don't ping people like that if they're not already part of the discussion. I'd ask a question about it
 
lol
kewl beenz
 
user559633
I really need 1 rep, so I'm answering bad questions
 
user559633
neat, got there
 
@tristan oof ... have a little rep to rinse the nasty taste of answering that question out of your mouth.
 
user559633
4:16 AM
yeah, thanks. bothered me to be at 2699
 
user559633
4:27 AM
neat, and an accept
 
user559633
5:47 AM
i.imgur.com/e857Sft.jpg not many rabbits posted now that poke isn't around as much
 
6:54 AM
cbg
 
7:23 AM
cbg
 
SNMP is the simple network management protocol and is to mail attachments as double-entry bookkeeping is to cheese.
 
7:38 AM
@AnttiHaapala That's certainly a dupe, but the original doesn't have an answer. So what do we close it as? I guess it counts as a typo, presuming the OP really meant SMTP...
 
i'd say unclear on original
 
@AnttiHaapala I voted; OTOH, I guess the code could be rather large, and it might be hard to construct a MCVE.
 
true, but the ERROR, oh the errorr
 
:)
 
"However, each time I execute the code, python just keeps on going for ever or the shell restarts. Is my understanding of the tree wrong?"
it is like "Is my understanding of the tree wrong" belongs to the category "I do not know what you can..."
such a bad question that any close reason would be good :d
 
7:44 AM
> The question is, in your opinion, is it too hard for the children to follow these rules?
 
mmmmhmh the middle one
 
All three at 4
 
that last one could be good IFFF... but better match for programmers
 
The first one ... and the question asked.... So easy to close ...
Why are dupes answered by gold badge holders?
 
@BhargavRao There are no hard bound rules saying, you should not answer duplicate questions?
 
7:53 AM
Naw ... But answering them when you hold the gold ... Just asking...
(I didn't dv btw)
 
I would
that answer is not good even
 
He returned to action after years... SO has changed a lot in that time. Probably he may not be aware, how much we care about the quality of the site now.
 
Lol...
 
I mean it is not a good answer by someone of 396k :d
if martijn answered that, it would be mind blown :d
 
@BhargavRao As david.pfx said, it takes me back to early dialects of BASIC. But I didn't find it painful to have explicitly typed variables - it made sense when I was 11. As well as strings having $ at the end of the name, numeric variables with names beginning with [I-N] were automatically integers, all the rest were reals, although you could over-ride that. IIRC, FORTRAN also used that convention. Which lead to the old joke "GOD is real, unless declared integer". :)
 
7:58 AM
damnit wrong dupe target:D
 
8:22 AM
@PM2Ring I didn't quite get the context ...
Oh ... Got it .. WRT to the Logo Question ... :)
 
 
1 hour later…
10:16 AM
few days ago, somebody gave me this code
http://pastebin.com/0aTwWwZM
to find my mouse pointer coordinate using python
I am using python 3.2
so I changed from Tkinter import * to from tkinter import *
now it executes with no error but I get no output
can anybody help me, how to get my mouse pointer location with that program? what i need to change
i know nothing about python
anybody can help me with that program?
 
sample with Nyquist rate
 
cel
i know nothing about python is probably a major issue here
 
@cel what do we do with that?
@ShubhamNishad sample with nyquist rate yes, and the rate is ..? :D
 
depends upon the bandwidth
 
cel
10:23 AM
@AnttiHaapala mhm, I don't know - completely off topic?
@AnttiHaapala or maybe dsp
 
In signal processing, the Nyquist rate, named after Harry Nyquist, is twice the bandwidth of a bandlimited function or a bandlimited channel. This term means two different things under two different circumstances: as a lower bound for the sample rate for alias-free signal sampling (not to be confused with the Nyquist frequency, which is half the sampling rate of a discrete-time system) and as an upper bound for the symbol rate across a bandwidth-limited baseband channel such as a telegraph line or passband channel such as a limited radio frequency band or a frequency division multiplex channel...
 
@ShubhamNishad I know
 
@cel, in your question, you don't have any "python" tag
 
cel
@ShubhamNishad that's true
@ShubhamNishad still off-topic imo
 
The question there is: what is the highest frequency that needs to be sampled.
 
10:27 AM
Antti, can you see my question. that's related to python
why this program doesn't work
?
 
@ShubhamNishad did see, can't help, no windows, sorry.
I can check it without the windows...
indeed the window never opens
@ShubhamNishad hmm that ought to work?
so you do not see any window ha?
 
i run that with command line
and it doesn't give any output
it does execute but no output
few days ago, somebody gave me that program, here in chat
 
it will create a window
it does not give any output in the console
it will create a window that will be very very very small
just large enough to contain the stringified coordinate tuple
 
so what's the way to run it? should i double click on it?
 
so if it runs it should have opened a window.
try this one, should have a running counter in a window
 
10:33 AM
LOL... I myself answered a dupe ... I don't know what to do ... Good that I don't have py gold
 
@BhargavRao so go on and delete that answer and move it to the other q
 
yes, it opens window
with your program
 
Deleted ....
 
but not with the old program that I gave you
you have not used this line import win32gui
 
10:48 AM
 
russians <3
3 coders arguing which one is the proper encoding
 
cel
religious intolerance brought to a new level :D
 
... and of course all 3 proposed 3 source code / email encodings for Russian, none of which was UTF-8
 
my program finally worked. Thanks @AnttiHaapala
 
10:58 AM
re-cbg
 
cbg
new construct in python: IF loop
sounds like the "for-case" paradigm
 
cel
so right somehow :D
 
@Ffisegydd you know the sampling frequency of ECG and pulse oximetry? :D stackoverflow.com/questions/28378210/…
0
Q: How to match roman numbers with regular expression?

sleeWhat's the difference between below there regex patterns? pattern1 = "^ab|cd$" pattern2 = "^(ab|cd)$" pattern3 = "^(ab)|(cd)$" I try to write a regex expression to match roman number format(0~3999). And I wrote a pattern as below: pattern = "^M{1,3}|(CM|C?D|D?C{1,3})|(X?L|XC|L?X{1,3})|(I?V|IX...

the said pattern did not match IIII
 
oh fantastic.. just re-calcing a client's account system
how HRMC hasn't been on their arse amazes me
been charging VAT wrong for about 5 years it appears
 
12:02 PM
cbg!
 
12:13 PM
Cgb
I don't know why there is a need to check this x % 2 == 0 condition for this question
 
checking ..
I think its based on the OP's request , actually for detect between odd and even the best way is %
 
1:06 PM
cbg
 
cbg
@AvinashRaj because that's the canonical way to check for odd or even.
if x % 2:
    print('odd')
else:
    print('even')
@KasraAD If you use the [tag:cv-pls] format our tools can track the OT post.
 
@MartijnPieters aha, OK sure.
 
1:21 PM
Thanks Martjin...
 
Just saw Martijn's answer without italics ... So rare
 
@AvinashRaj never use is to test equality, indeed it is implementation defined when small integers match...
 
-5 to 255 ?
 
it is implementation defined
not -5 to 255
-5 to 255 is what 1 implementation defines
 
1:36 PM
Oh Ok
 
acutally it is -5 to 256
you even can't count on it not changing on future version of cpython :D
 
Damn ... Had written 255 in coll exam ...
 
I'd switch college if they ask such things
 
They ask all sorts of stuff here ... Education system is completely different
 
that is like asking "what was the temperature outside yesterday"
 
1:40 PM
@BhargavRao lol :)
 
@AvinashRaj You'll understand my situation better ...
 
coll? college exam?
 
Yeah .... 4th Sem BE
 
Oh nice, which dep?
 
Obvi ... CS
 
1:43 PM
>>> 256 is 255 + 1
True
>>> 257 is 256 + 1
False
 
>>> 257 == 256 + 1
True
>>> 256 == 255 + 1
True
so it's because of is operator.
 
IMO it is important to know that such behaviour can exist, but
to ask any limits in an exam quickly makes people assume it is true always (and maybe even the professors and lecturers think so)
 
@AnttiHaapala The exact question was In CPython implementation, small numbers are stored for <More blah blah> What is the upper bound on this range
 
even so, I'd answer: "256 in 3.4, though I'd rather check this from documentation on the version I am working on" :D
And get - for being smartass
 
Lol ... The version was 3.4.2 .... They put such disclaimers
 
1:49 PM
see, you answered wrong because you didn't check from the manual but instead relied on your memory :D if you had checked from the manual you'd have known better ;)
 
Yeah ... I always thought it was -5 to 255, if they had asked lower bound .... :(
 
@BhargavRao my point being that if say they taught say software engineering: an SW engineer that relies on memory and remembers occasionally wrong is not better than an engineer who always checks from primary source when in doubt but that is my personal viewpoint.
 
Yep ... you are correct ...
 
2:50 PM
The main difference between your solution and mine is that it has to process the formula multiple times, rather than just once. Unless performance is an issue, that's not a problem, but yes, it does feel somewhat inelegant to write nearly the same line of code a dozen times. There's nothing to stop you iterating over a dict instead, though ... — Zero Piraeus 3 mins ago
Trying to gently nudge a beginner OP toward enlightenment here without being condescending; not sure I got the tone right.
 
3:28 PM
sunday is coming :(
hello
 
cbg
 
@tilaprimera Cabbage :) Long time...
Potato?
 
3:47 PM
damnit
wrote a question and now I think someone would close it as too broad anyway :d
 
Post it anyway ...
 
cbg
 
4:03 PM
done
 
@davidism Cabbage :)
 
cbg btw
0
Q: When to do or not do INVLPG, MOV to CR3 to minimize TLB flushing

Antti HaapalaPrologue I am a operating system hobbyist, and my kernel runs on 80486+, and supports virtual memory already. Starting from 80386, the x86 processor family by Intel and various clones thereof has supported virtual memory with paging. It is well known that when the PG bit in CR0 is set, the proc...

here, already got a downvote
 
4:33 PM
@AnttiHaapala there, you got a few upvotes too.
Surprised this got downvotes until I spotted the tag.
 
I know nothing about the subject, but it's obviously not too broad.
 
As a feature request I do think it needs downvoting (but I already motivated that in an answer).
 
it is still a bit broad though... I tried to frame it down quite a bit, but I guess it will serve osdev folks better to have up/downvoteable commentable answers on stackoverflow than a multitude of irc discussions and forum postings and half-assed code in github
 
@Martijn yep, dv'd Q and uv'd your answer. The idea of keeping "offensive" content out of the review process is just bizarre.
 
reversal!!
 
4:45 PM
I have too many Java answers recently.
 
why not ask it so that ask in stackoverflow for the comprehensive list of operator overloads
 
@davidism weird that that one has so many upvotes, when he includes exactly the thing needed in the question itself. What is he asking for?
 
user559633
5:06 PM
@corvid he's looking for a bootstrap that doesn't need work arounds
 
user559633
which is still off topic
 
so basically he just wants the angular directives for bootstrap?
 
user559633
or a new "framework" to use
 
@AnttiHaapala That sentence makes no sense to me...
 
what sentence?
that one? :D
 
5:16 PM
The one my message links you to. :-P
 
I mean, we could have a canonical how to do operator overloading question on stackoverflow
the python documentation is not the clearest one to read on that subject
 
user559633
Also, cbg all, I hope you and your families are happy and well
 
cabbage :)
 
user559633
@AnttiHaapala it think the official doc is helpful if you already have a decent understanding of python
 
5:19 PM
@AnttiHaapala You mean like a tutorial or similar?
Bit too broad for SO perhaps.
 
user559633
a good new site would be exceptions.stackoverflow.com in which off-topic posts get sent if they can be addressed with a decent enough answer
 
user559633
e.g. "what's a good tutorial or library" that aren't awful or these "explain to me how magic methods work" questions
 
why is "explain how magic method works" is offtopic?
 
user559633
Oh, I guess "explain magic methods" is okay, but it's arguably broad
 
user559633
5:23 PM
stackoverflow.com/help/on-topic on reading the on-topic rules again, i think "software tools commonly used by programmers;" is pretty vague
 
user559633
"if [my] question was generally...about software tools commonly used by programmers," i could take that to mean "which of these two tools is better"
 
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource...
so Which of these two tools is better is offtopic by that
ah the help still says: "Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it."
 
user559633
sure, but there's no "in this order" clause, so one could greedy match and say "okay, this is a fine question" and then say "oh what the hell why am i bleeding internet points"
 
user559633
 
5:38 PM
1
Q: Anonymous Inner Class in Python

Malik BrahimiSo I have a button class that does something when clicked, but different buttons perform different functions. I was wondering if there is such a thing as anonymous inner classes in Python to override such a callback without creating a new class altogether for each type of button. I know that I ca...

:(
"how can I write Java in Python"
and no one does that in Java (using listeners, and those with lambdas in 8) then why does OP want to do it in Python
hmm how do inner classes work in python bytecode
yeah, build_class so a new class for every function invocation
 
Exactly what I mean Antti. You're the only one who seems to understand. — Malik Brahimi 3 mins ago
I think someone has a programmer crush on you :)
 
Yeah, I was keeping away from that one as there are no such things in Python but I wasn't certain on what they were trying to achieve.
 
ewwww
the truth is I don't understand
 
Spam
 
nice 125 flags
i've done half of those in 1 week
 
520 flags
Make that 521
 
morning
 
user559633
6:05 PM
what's a good place to chew through my backlog of flags i raised, ut the questions are still active?
 
1 message moved to Trash
try not to spam the room by association
 
Hey didn't spam ...
Wanted others to flag as spam
 
@davidism got gold yet?
 
<link> spam
so that you don't onebox it
@AnttiHaapala only halfway there
 
6:07 PM
Oh Thanks ... Knew only about tag:cv-pls
 
:D I mean &quot;web developer&quot;
89 it seems
 
@davidism What is spamming the room by association
 
Hey guys, I'm having trouble finding docs on using lxml.etree to move a root element to a subelement; any quick thoughts?
 
oh, I thought you meant python badge :)
 
yeah not that, I am at ~600 myself :(
 
6:09 PM
@BhargavRao I can't believe I have to spell this out for you: you posted a onebox of a spam message, taking up a quarter of the page with the spam message. Do you not see the problem?
 
Oh ... ok ... Did not understand what association was .. Sorry
 
@sadmicrowave can you explain what you're trying to do? I'm not too familiar with lxml
are you trying to get a node from one place and move it somewhere else in the tree?
 
kinda strange, games running on DirectX always take more resources, but OpenGL runs so much smoother... is this common?
 
@davidism sure, I have a root element that needs to be wrapped in a new parent element (moved down the tree) - but I haven't found any docs related to moving/shuffling elements around in the hierarchy -- unless I missed something (which is likely)
 
not using the right terms here, but I think you remove the element then append it to another element
 
6:13 PM
see that was my first idea but I thought I'd look around and make sure I wasn't reinventing the wheel
@davidism essentially if I follow that method I'll be, assigning the element to a variable, inserting the new root element, appending the variable contents to the new root element, then deleting the original root element
just thought I'd poll the experts in here to see if anyone had an idea on the top of their head before I went down that road
 
sure, sounds plausible
 
yea I thought so too. alright, welp if no one else has anything then thats what I'm gonna try
thanks @davidism
 
6:39 PM
in sqlalchemy, is there some datatype for a set of possible options?
 
@corvid mmm...
there are many alternatives
some dbs support enums, for others check constraints etc...
notice, you need to possbily create it ...
@corvid most of the case you ought to be using a join or the check-one...
 
oh yeah, that's probably the best idea there, thanks @AnttiHaapala
 
try this code please: A = ['2009', '2005'] B = ['freedom', 'war'] — user2064809 6 mins ago
is this a troll???
 
user559633
7:13 PM
i have no idea.
 
nope :D
bc in the beginning it was like 'freedon'
 
7:43 PM
0
Q: C++ : Structs : Can I use a variable instead of assigning a number?

IronbugI'm not sure how to phrase the question; I'm using structs, such as Enemy1, Enemy2 etc. When referring to them , is there a way to use Enemy'x', rather than the numeric value every time? Then I could increment it , rather than having to write code for if Enemy1, if Enemy2 etc..

now this must be a troll :D
 
8:06 PM
Can anybody review my ans stackoverflow.com/a/28386712/4099593 and tell me the mistake I have done to get -4
Please
 
just remove the first code box which is so blatantly wrong I'm about to downvote your answer myself :D
 
@BhargavRao d.values()[0] is a fundamentally broken approach ... OP appears to be under the impression that dict insertion order and iteration order are the same, when in fact iteration order isn't even the same between interpreter invocations.
 
it is not "better way to do it" for the second one
the first way to do it is wrong. plain wrong. absolutely wrong. anyone suggesting it deserves 5 downvotes :D
 
Oh ... Ok ... Thanks .. will delete
 
just delete the first code box
and say: "you are doing it wrong pal, this is how you do it" instead of "better way"
 
8:15 PM
Hows this edit
 
lol @AnttiHaapala are you talking about OP or isaiah?
 
He's talking about me
 
I'm talking about the c++ structs question
 
Lol... Got it wrong
 
op had: bank = {'bob':[1122,0],'fred':[2211,0]}
 
8:19 PM
Should I edit anythin more?
 
then Bhargav Rao suggested
>>> bank.values()[0][1] = 10
>>> bank.values()[0][1]
10
good :D
now you got upvote from me :d
 
Thanks ... And now people will lift their downvotes ... Thanks ...
 
ah you can mention that: = 10 will override the balance
if you want to add money to the account, it would be += 10
 
I actually thought of that ... In that case many of the other answers would be wrong
 
and ofc the ultimate case of having Users instead or so
 
8:24 PM
Yeah .. Will edit now
 
@BhargavRao but dunno, maybe the User is a bit too ultimate :d
but seeing that the other mentioned "appending to the account"
 
That's even worse
Phew ... Edited it
From +1 to -5 to -2 to 0 ... Whatte ride ...
 
re-cbg
 
9:30 PM
cbg
 
9:48 PM
I want reeeep
 
user559633
10:04 PM
Weird. In flask, I'm returning a redirect, yet the current function wants to continue processing
 
user559633
which means the logic is "throw a 302 back to the user, but then continue with this function," holding up the response until after
 
user559633
(ah, the object gets overriden by the end of the block. ignore me.)
 

« first day (1575 days earlier)      last day (3376 days later) »