« first day (2391 days earlier)      last day (2575 days later) » 

@antfuentes87 You should ask your question on the main site. Be sure to read the links given by Kevin.
 
@Code-Apprentice I did ask it on the main site, but no one has answered :( and I feel like it is a pretty clear question, not much to it.
 
Apr 24 at 17:59, by DSM
"doesn't work" is pretty much the standard worst bug report language.
Again, I'd recommend reading those two links.
 
Well not sure how else to describe it, because if I do ExecuteJavascript("alert('ExecuteJavaScript works!');) that works fine... so I am able to execute Javascript, but when I try to use frame.ExecuteJavascript("alert('document.getElementsByName('q')[0].value = 24;") it does nothing, no errors, does not crash, etc... so yeah no idea how else to describe, cause ExecuteJavascript is techincally working
 
Hello everybody, I'm here again!
 
12:11 AM
Those sound like details that should be in your question, then! "doesn't work" is different from "nothing seems to change and no errors occur"
 
I see now what you mean, thanks! How does this sound now stackoverflow.com/questions/43747770/… ?
 
You really should avoid "doesn't work" still. "The textbox doesn't change" would be a good way of putting it
Unfortunately, I don't think many in here have worked with CEF, so we wouldn't be able to help you
 
yay! I got it to work finally!
 
My completely naive guess: does it wait for the page to fully load before executing? the alert() would work fine before anything has loaded, but a document query wouldn't
 
Ok I changed it again, and that is exactly what I was thinking but I do not understand how to use the LoadHandler github.com/cztomczak/cefpython/blob/master/api/LoadHandler.md
 
12:42 AM
with that final note, rbrb
 
 
2 hours later…
2:56 AM
Hello...
Im currently so confused with ACID Transactions on Django. I seem to work it out but I feel insecure..
:(
 
 
1 hour later…
4:15 AM
cbg
Guys I've a Invoice format and I would like to create similar invoice and take print out from python program. simply to say a billing software. The question is can i design the Format as per our wish if so which library can i use
?
 
5:08 AM
Cabbage :-)
 
@Sundararajan when you find that out, then please tell me too :D
@eddwinpaz that's django that makes you feel insecure
 
@AnttiHaapala sure :)
 
 
1 hour later…
6:47 AM
cbg
 
 
1 hour later…
7:53 AM
cbg
 
@antfuentes87 as you saw in the rules: you are free to ask here if you don't get an answer in 1-2 days
 
8:20 AM
Folks, can a dictionary key itself be an array (or a list, or some other kind of collection)?
This would be not unlike a database table that has a composite primary key.
 
@NickAlexeev No, it can't. I try to do it in terminal now :-)
 
@R.Gadeev I see. Maybe, I could fake it by combining multiple keys into a string... or some kind of unique hash.
 
@Sundararajan @AnttiHaapala You can try to use PDF forms. Create a PDF form with appropriate inputs & then use some PDF library to fill the form up & save it anew.
On linux, Master PDF editor 3 is a good tool for creating the PDF form part.
 
8:36 AM
cbg
 
@AshishNitinPatil Can you mention any links regarding that dude
 
No longer tagged python, but it was, in an act of deliberate tag spamming. It's also wildly offtopic and OP has annoyed me ;-)
 
cabbage!
I want to add a line at the start of every function in my C++ code
Do you guys know about python libs that would allow me to do this?
Most of the things I find are about parsing for compiling, but not for modifying the code
 
8:48 AM
@AshishNitinPatil in Finland an invoice front page in paper invoices follows a standard format: kauppa.viestipaino.fi/tuotekuvat/450x450/Lasku131_0002.jpg
or like this scam invoice here:
(if it is payable via bank transfer)
 
@AnttiHaapala This is what my problem too. we actually have a template in India. my Invoice should be printed in that format so How do i design
 
@NickAlexeev the key is immutability. What can be hashed can be a key. So try a tuple.
Your typical hashable objects are the immutable ones
 
9:13 AM
@Sundararajan code-industry.net/free-pdf-editor This is the tool I was talking about. You can create a form from an existing pdf. Draw some fields, name them properly. Then you can use one of the many libraries ( I was working with php, so will have to look for python libs ) to fill the forms and save them.
@AnttiHaapala Yes, you can convert the doc to a pdf and add form fields over it.
The tool I mentioned is free, unlike Acrobat from Adobe.
4
Q: How to fill PDF form in python?

Marek WajdzikI'm searching best way to fill pre-made pdf with forms with database data and "flatten" it. For now I use pdftk, but it does not process national characters correctly Is there any library for python or example how to fill pdf form and render it to non-editable PDF?

 
Annotated pdf's, the best kind of "portable" document format :P
@ZeroPiraeus that user has annoyed me in the past...
With crappy answers, I believe
 
 
1 hour later…
10:24 AM
@AndrasDeak Tried to use tuple for a dictionary key, and that had worked. Thank you!
 
no worries
 
11:01 AM
Finally Stack Overflow pays off, I got $50 for it! Soon, and I'll be able to pay the bills!
 
Did you meet Tim Post in the street and mug him?
 
I stole his keys
 
 
1 hour later…
12:16 PM
morning everyone
 
caw
 
Just had an eight shot vanilla latte, gonna be a good day
 
I'm contemplating a coffee myself
 
I don't understand how you can do that lol
 
There is no need to contemplate coffee -- coffee is always good
I'm pretty sure my blood is 50% coffee at this point
 
12:18 PM
I ran out of coffee :-(
Even worse, too busy with work to get some
 
there is always time for coffee
 
Not for cycling to the shop and buying it :-(
 
don't work in a city? My city has two coffee shops per block, and somehow they're all super crowded still
 
heh
Well, I work from home, and yes, in a city
But ... lots of stuff to do
And not really a coffee shop nearby; I'd have to go to a supermarket
Which is like 2km
 
I'm so confuse, is this not America?
 
12:30 PM
UK
 
oh well there's your problem
 
Such compassion for my predicament
 
Also, what's with all the Dutch being obsessed with bikes? ;)
 
It's just useful @AndrasDeak
Although, I've found that my Dutch fixie doesn't work so well with UK hills :-/
 
heh, fixie
gears are great
 
12:38 PM
Well, it works fine when it's all (mostly) flat
And cheap/easy to maintain
 
they're also great when you're going downhill
 
1:10 PM
OK, finally time for that coffee
 
what would we do without coffee
 
Drink tea?
 
cbg \o
 
tea is for noobs
 
tea > coffee
 
1:19 PM
you noob
 
heck, tea > water > juice > soda > alcohol > energy drinks > any other drinks I don't know about > coffee
 
@Kevin time for more gif. Although you seem to find these before I do :P
 
had to hack that URL
@MooingRawr no coffee for you (you're unworthy)
 
aww man I messed it up. Sorry it's this
 
I know, I hacked it
 
1:29 PM
So what's it like being a hacker?
 
Grammatically correct
also, that gif now makes me want to play Braid but ain't nobody got time for that
 
I also wish I had more time to play
Those fancy in-game points are so enticing...
 
MS is the new Apple
it is becoming cool while apple is becoming crap
 
you need a looooooooooooooooooooooooooooot of cool to get rid of that tiled logo
 
of course the laptop is still overpriced crap
$1000 for (most probably)dual-core core i5, 4GBs of RAM and 128GB of SSD
joke
 
1:35 PM
It's basically a Macbook
with the Windows logo
 
they should have removed 4gb options like a year ago
 
lol
 
but hey it looks cool, so they will sell
 
to the MBAs, not the devs
It's pretty sleek for a businessman, who isn't a developer of course.
 
Well, from MS point of view, MBAs have more money, I guess.
 
1:38 PM
innovation
lol
"Effortlessly open with one hand.", "A simply brilliant touchscreen.", "Easy to clean.",
innovations by Microsoft
 
@AndrasDeak good i dont want any :D
 
Prolly my dirty mind, but I wouldn't put ""Effortlessly open with one hand.", "Easy to clean.", together in my promo material for a new laptop
 
Even MI (Xiaomi) does stuff like this (very beautiful product pages). But they sell good because they're cheap.
 
@khajvah unrelated, but that made me realize that 1 USD went from ~180 HUF 10 years ago to ~300 HUF nowadays. Hooray for our booming economy.
 
from 350AMD to 480AMD here
 
1:42 PM
I prefer nvidia
 
@AndrasDeak me too.
 
just kidding, who needs a GPU anyway
 
Gamers...
 
@khajvah it's not a race but we're much worse off :PP
 
@AndrasDeak we all do
@AndrasDeak :(
I will make sure we win next time
 
1:43 PM
well you have to try much harder
 
I blame Amerikanski spies
 
1:57 PM
@AshishNitinPatil it should be a sin to sell 4GB RAM laptops
 
DSM
Morning cabbage for all.
 
I don't feel the need for 4GB+ just yet even if I'm sitting on a 12gig pc.
 
cmon
 
For the common crowd that is.
 
google chrome and MS excel will eat that 4gb quite quickly
 
1:59 PM
If you are only going to work on MS Office, well, you can probably do with 2GB too.
Hmm, excel heavy stuff may warrant 4GB, but not more.
 
cbg, DSM
 
plus you are buying $1k machine, so you expect it to last for more than 6 months
 
@khajvah oh oh oh you meant to say "to sell 4 GB RAM laptops for windows users"
 
Greater than that, I don't even think Excel handles it good. OTOH, if you need more than 4GB for excel, maybe that's not what you should be using.
Anyway, I should probably stop speculating. Happy with my machine :)
 
@AshishNitinPatil lots of "buisness" people have overcomplicated excel sheets
 
2:01 PM
@khajvah Trust me, I have done complex excel stuff (multiple files simultaneously crunching crap), it's not the ideal solution.
Better invest in a better ERP or some other software.
 
i know i konw
 
I haven't touched windows in a long while, but it and its applications have no respect for resources
"oh, let's just have a 15 GB update"
2 days ago I got a popup on my debian that my root partition was running out of space, only 1 free gig left out of 30. Turns out I had 20 GB worth of cached packages.
I'd never dare to spare anything less than 60 GB for a windows
 
well, to be fair, Windows doesn't have a "root partition"
it comes with Windows 10s, which is so restrictive that you can't install anything outside of its app store. Basically, you can't install Firefox
one more thing about that $1k machine
 
wait, is that a pro or a con? :P
my linux shouldn't have one either; I actually have a home partition
 
it's a con
goddamn Microsoft is triggering me
will earn shitloads of money on people's ignorance
 
2:16 PM
I'd any day trade places with Bill Gates though :-p
 
@khajvah "will"
 
DSM
@khajvah: I'm now the local enforcer for site policy on language; please obey the SE rules.
 
they're not doing embrace-extend-extinguish just to spite their competitors
 
cbg
 
cbg
 
2:18 PM
i am just thinking can i run 3.6 code in 2.7
 
why could you?
and you can, depending on the code :P
 
DSM
Depends on the code. Aaargh, Kevin'd..
 
as i have virtualenv and all the packages and python is 2.7
 
@DSM I don't get it. Which part of my comment was expletive (or whatever that is)
 
$ cat foo.py
print("Hello, world!")
$ python2 foo.py
Hello, world!
$ python3 foo.py
Hello, world!
@khajvah the feces-related part
I was pointed to Carlin's seven dirty words
 
2:21 PM
oh cmon. I know I don't make the rules but that's tooooooooo restrictive
 
SO is still not a democracy:)
 
@AndrasDeak they even use the s-word on TV
 
I don't care
 
I believe we are better than "TV" :-p
*much
 
2:23 PM
better in what way?
does it make us more "professional"
 
DSM
@khajvah: there are lots of alternative places you're free to spend your time where you can set the policies as you like, but the Python room is not the place to hash out the argument. (Which we've already done a few times now, and frankly I'm bored by.)
 
oh, and probably not just the feces-related part
 
ok, I will stop arguing.
 
@khajvah not exactly, but the fact that anything & everything can be used to cite you or any of the website / platform's content, I think we do much better.
 
TV has no problems citing whatever they can sell as a source
just sayin:D
 
2:26 PM
this is absurd but whatever. I will go home from work, so I don't pollute the Python room with arguments about this.
 
Ah, the days when you would get paid for your SO rep...
 
:D
 
Hello World!
 
@khajvah kick some empty cans on the way home :D
 
@AndrasDeak Wondering if there are discussions elsewhere / here talking about the type of system SO currently has (other than democracy of course).
 
2:31 PM
Yeah, on experts-exchange
 
Can't tell if that's sarcasm :-/
 
It's not ;)
 
Sorry for disturbing with yet another dump question, but was it possible to make large numbers easier to read in python 3.5 like:
large_number = 1_000_000
 
DSM
Upgrade to 3.6.
 
I still find that feature uncanny
 
2:44 PM
Cabbage
 
cbg
 
@SebastianNielsen Well, you could do large_number = int('1_000_000'.replace('_', '')) but please don't do that. :)
 
Yeah not that appropriate pm 2ring.
 
There's always large_number = 1e6. This requires you to memorize how many digits each -illion has, but that's handy to know anyway.
 
int(1e6) ftw
 
DSM
2:45 PM
10**6
 
actually the numbers i am working with is thousands
 
show-off
 
>>> 1e6
1000000.0
... Why is this a float :-|
 
DSM
Because it's a float literal. #wellduh
 
is that supported in 3.5
 
2:46 PM
because '%10.6e'
 
I haven't upgraded
 
Because scientific notation's for floats
 
Well they should make it for ints too.
 
1i6
 
DSM
It would be too weird if 1.20e1 was an integer and 1.21e1 wasn't. Type stability is desirable.
 
2:47 PM
it is supported in 3.5, nice thanks. This is handy :)
 
DSM
I don't think it is, actually.
 
It's already weird that 1 is an integer and 1. isn't
 
perhaps "d" for decimal, so 1d6. DnD anyone?
 
DSM
Oh, wait, maybe I'm confused about the reference of "it". I thought SN was talking about underscores.
 
That, too, is what I assumed.
 
DSM
2:48 PM
But if "it" means "1e6" or int(1e6) or whatever, then yeah, that'll work.
 
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1_000_000
  File "<stdin>", line 1
    1_000_000
            ^
SyntaxError: invalid syntax
>>> int(1e6)
1000000
 
A constant expression like 1234 * 1000 + 567 is evaluated at compile time, so even if it's inside a loop or function that's called a million times it only gets evaluated once.
 
Kevin'd
 
(Off-topic, IMO) I thought this one was a test, but someone even approved it! - stackoverflow.com/review/suggested-edits/16017115
 
then again I had to read DSM&Kevin's discussion before doing the same thing Kevin did so it's not surprising this time
 
2:50 PM
from dis import dis
dis('1234 * 1000 + 567')
#output
  1           0 LOAD_CONST               4 (1234567)
              2 RETURN_VALUE
 
@AshishNitinPatil if you see blatant failures in review, flag the reviewer for a mod explaining the situation
 
just make a numbers.py file so you can do from numbers import million
 
DSM
@PM2Ring: for some definition of "like" -- I don't think division gets evaluated at compiletime 'cause it could raise an exception.
 
@AndrasDeak How do I flag a reviewer?
 
flag one of their posts
 
2:50 PM
Or flag the reviewed post.
 
>>> dis.dis("1*0")
  1           0 LOAD_CONST               2 (0)
              3 RETURN_VALUE
>>> dis.dis("1/0")
  1           0 LOAD_CONST               0 (1)
              3 LOAD_CONST               1 (0)
              6 BINARY_TRUE_DIVIDE
              7 RETURN_VALUE
 
or tell Bhargav about it
;D
 
Hmm, thanks.
 
@DSM Ah. Good point. :)
 
2:51 PM
yeah, I guess reviewed post is even better
less room for errors
 
We have an entire room for errors. It's called The Rotating Knives.
 
>>> dis.dis('0/1')
  1           0 LOAD_CONST               2 (0.0)
              3 RETURN_VALUE
>>> dis.dis('1/0')
  1           0 LOAD_CONST               0 (1)
              3 LOAD_CONST               1 (0)
              6 BINARY_TRUE_DIVIDE
              7 RETURN_VALUE
 
@AndrasDeak lol, nopes. It's always better to flag.
 
Wait, Kevin, is dis python 3 you're using? Or was that another computer which you were struggling with?
 
22 eyes in the place of 1.
 
2:52 PM
@BhargavRao I know, I was only joking :D
 
Exponentiation's ok, though:
 
Source diving exercise: determine exactly which class of arithmetic expressions get optimized to single LOAD_CONST instructions.
 
from dis import dis
dis('1234 * 10**3 + 567')
#output
  1           0 LOAD_CONST               6 (1234567)
              2 RETURN_VALUE
 
user6845426
cbg
 
cbg
2**-1 is const'ed, 0**-1 is not
it's all magic
 
DSM
2:54 PM
I think I'm going to politely decline the invitation to "document assumptions on risks" about some unit tests I need to write. #numberfirm #bureaucracy
 
I think Martijn's spirit animal is on the other side, squinting at each literal to determine whether they should be evaluated at compile time
 
user6845426
What convention/style do you guys follow when commenting code? I've seen this stackoverflow.com/a/24385103/6845426 which shows a few
 
Today I need to write a test suite for a collection of classes that don't actually run properly on my machine.
 
I need to test my patience by grading a bunch of mid-terms
@dipper those are not comments, those are docstrings
 
user6845426
You teach?
 
2:56 PM
@DSM "I have assumed all risks are negligible as compared to the risk that I will never do the work due to excessive time filling out forms"
 
they are different both syntactically and semantically
 
The project depends on six other DLLs, each of which have four different poorly documented variants. Finding the magic combination of functional references will take up to 4,096 attempts.
 
@dipper yup
 
user6845426
Nice. University level?
 
yup
 
DSM
2:57 PM
@JRichardSnape: I may use exactly that line in the 11 AM meeting I have. Under the circumstances it'll have to go uncredited, though-- that okay? ;-)
 
I could automate it, but writing it would take six hours and running it would take 4,096 minutes.
 
@DSM Absolutely.
 
user6845426
Thats cool. What do you teach out of curiosity?
 
statistical physics
(tutorial course)
 
DSM
@Kevin: that's what itertools is for.
@AndrasDeak: "maximize the entropy". What do you teach them on the second day?
 
2:58 PM
:D you astroguys and your thermodynamical inclinations
 
Wow, never knew that Andras was Prof Deak.
 
well, for one I'm not
I'm a postdoc with an employment status of "research fellow" or something
 
Dr. Deak? :P
 
that I am :P
 
What's up Doc?
 
3:00 PM
:|
my blood pressure
 
don't worry, only because of the mid-terms :D
 
user6845426
Post grad studies are so expensive :(
 
DSM
In physics, the expense is mostly in opportunity cost, at least in my experience.
 
user6845426
If I was to pursue a masters I needed 10k
 
user6845426
3:05 PM
So instead I've got a job interview tomorrow
 
one of the benefits of the post-socialist Eastern bloc is free university
 
user6845426
No debt must sound nice :(
 
user6845426
Well tuition debt that is
 
yeah, although we have a student loan system just to make sure as much people start their lives in debt as possible
 
Similar to a student koan system.
"It is not enough that education is priceless. The student must also be penniless." And the novice was enlightened (of their cash)
 
3:08 PM
Hmm, interesting malapropism: "X sounds Y" and "X must be Y" both imply "X is Y", but "X must sound Y" implies "at first glance, X is Y, but after further scrutiny, it isn't"
 
user6845426
I'm quite lucky. Because I live in Wales, our government payed 2/3 of tuition fees. I have friends in England who are screwed
 
DSM
"free" != "paid for by other people"
 
"No debt must sound nice, for so many people to aspire towards it. But the hobo living under the local bridge has no debt and he doesn't seem all that happy"
 
That reminds me of "The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread."
 
DSM
Anatole French, I want to say?
 
3:10 PM
C'est vrai
 
@Kevin actually, most of those hobos probably have or used to have debt...
 
user6845426
And now have a 2l bottle of Cider
 
countability eludes me today
 
3:26 PM
@AndrasDeak That's because the number of ways in which students can misinterpret mid term questions is uncountable
2
Bah, trying to cut 25% of the words from my short paper. I hate doing this.
 
Earlier today I read a thread on the xkcd Mathematics forum about Turing's Halting Problem. The OP isn't a coder, and has problems with mathematical symbols, which makes things a little tricky. :) I'm frankly amazed at the patience of the people who've been trying to answer.
Hey @JRichardSnape Did you listen to that Welsh band Calen?
 
@JRichardSnape should've used an agglutinative language
 
Esperanto estas tre facila aglutina lingvo. Lernas kun mi?
 
of course I do
 
@AndrasDeak i squashed em
 
3:34 PM
I just checked the summary of my thesis (the last thing I had to translate into Hungarian): 412 words in English, 313 words in Hungarian
 
@dipper i chose the job path 2 years before graduation with my bachalors degree and I regret already. My grades are horrible, so I can't get into a serious masters program any more
 
user6845426
@khajvah I've got a job interview tomorrow and its looking likely that I'm going to get it. I'm a bit unsure if I want it though. The job isn't really something I'd want to stick with
 
What's the job
 
CEO of Yahoo
 
user6845426
^
 
3:41 PM
:D
 
DSM
Nice.
 
user6845426
The job title is 'Automation Developer'. Basically using UIPath
 
CEO of yahoo is a pretty safe job.
 
user6845426
I'm going to be a macro guru
 
Besides owning alibaba, I have no idea what Yahoo does any more.
I'm guessing "jealously guard the Dorian-gray-esque portrait of their stock value that is hidden in the campus attic"
 
DSM
3:45 PM
@Kevin: I follow their NBA news teams but apparently the Vertical is moving to ESPN. And I have an alias with a Yahoo account.
 
If i was the CEO of Yahoo, i would deliberately mess up so they would fire me with bonuses, enough for the rest of my life
 
If I was CEO I would release a lot of spurious press releases about my dog
Either I get fired with bonuses or my dog makes a lot of new friends. Both are good outcomes
 
first acquire WeRateDogs so that you can raise the apparent worth of your dog
though they're all good dogs, Brent
 
Today I thought of yet another genius idea
A billion dollar one.
It is my 5th billion dollar idea
 
Paper plates, except they can be washed and reused and made out of ceramic
 
3:53 PM
It's a pretty smart navigation/traffic simulation system.
 
The other day I was using a pair of pliers to extract a broken light bulb from a socket. It occurred to me that when people receive an electric shock, their muscles contract, often leading them to have an even tighter grip on the shocking element. So I wondered it if would be practical to make a pair of pliers where you squeeze the handle to loosen its grip, and loosen your grip on the handle to tighten its grip. Then shock-based clenches will free you from the circuit rather than drawing you in
 
Those exist. But also, you should be using half of a potato for that task.
You should be using potatoes for most tasks, really
 
Expected outcomes:
- those already exist. (50%)
- that would be expensive to make. (25%)
- levers do not work that way. This is impossible to make. (15%)
- pliers are already safe thanks to rubber handles. (9%)
- that's a great idea. (1%)
I knew about the potato trick but I had zero potatoes and one plier.
 
Thats a great idea
 

« first day (2391 days earlier)      last day (2575 days later) »