« first day (1966 days earlier)      last day (2979 days later) » 

Anonymous
9:00 AM
I know cron/nohup .. but linking files is the issue.
 
@samayo You need a parent script with logic in it
You can probably do it with a well crafted shell command but that would basically just be a shell script in a command, might as well put it in a file
 
@FlorianMargaine asking callcenter agents "you are following a script there, right?" will freak them out. I do that for fun when I get cold calls
 
Anonymous
How will this parent shell receive if first operation was a success? Can I output something like a STDERR from a python file? @DaveRandom
 
@nanne yep, well i'm supposed to use these rectangles and i've tried all of the different ways to connect them (connector or relationship)
i've watched tutorials and i'm doing what they do but it wont work
 
@samayo Usually you use exit codes (as in the integer passed to exit() in a PHP script, which can be retrieved in PHP by passing the 2nd and 3rd reference args to exec()).
 
9:03 AM
Morning.
 
I'm not sure how you'd do it in Py of the top of my head but it will be easily possible, it's just basic posix stuff, windows works the same way
 
Anonymous
@DaveRandom Ah, that is a good idea. I hope there is an exit in python, and it's status will be successfully caught by the bash.
 
You can use the script's output, but that's a lot more complex, and if all you need is success/fail, maybe an error code, then usually you'd just use exit codes
@samayo I 100% guarantee there is
 
Anonymous
import sys
sys.exit()
 
sys.exit()
 
Anonymous
9:05 AM
I'm using 3.3, actually.
 
61
Q: Exit codes in Python

sundeepI got a message saying script xyz.py returned exit code 0. What does this mean? What do the exit codes in Python mean? How many are there? Which ones are important?

 
@ircmaxell So it revolves around Laravel basically, there's my problem
 
good morning
what is the best way to import innodb_file_per_table to mysql ?
 
9:09 AM
@Gordon Can I change my close vote reason?
 
there goes our first rebecca link
 
Sorry, forgot you're not a mod any more :P @MadaraUchiha
(Because I chose the wrong one doh)
 
Just let us close it properly :)
 
Bottom posted duplicate in comments is the dupe
 
@Jimbo Wow, you really want that question closed huh? chat.stackoverflow.com/search?q=35750032&room=11
 
9:13 AM
@Oldskool Yep :-)
 
moin!
Flagged it as a dupe yesterday, marked as helpful but no duplicate question flag yet. o.o
 
@DaveRandom I always read
 
No, those are decidedly above the SO mean
 
heh
 
9:18 AM
The SO mean is something along the lines of "I want to make <terrible idea for application>. I have tried asking random passers by in the street, and rubbing my computer with a house brick. None of it has worked! Halp!"
 
what is the best way to import innodb_file_per_table to mysql ?
 
Holy firewall gods batman. Setting up FTP over TLS is terribad
 
@PeeHaa s/ over TLS//
 
@PeeHaa Y U NO SFTP???
 
Anonymous
\0/ for SFTP via FileZilla
 
9:33 AM
FTP is a terrible terrible overly complex protocol. FTPS is an encrypted terrible terrible even more complex protocol. You're gonna have a bad time.
 
Anonymous
SCP is better imo.
 
Anonymous
scp -P x foo.tar.gz root@IP:/var/scp
 
@DaveRandom my brain is weird. It parsed that as "you're gonna have a bed time".
 
Any protocol which uses multiple ports (with the data stream unverified!!!!) instead of the sane thing, which would be inline verification tokens, is fundamentally broken.
@FlorianMargaine Ah yes, the anthem of the recent father :-P
 
@samayo learn rsync
@DaveRandom hehe
 
9:36 AM
@Jimbo no
 
@DaveRandom Because I don't allow port 22 for the world
 
what is the best way to import innodb_file_per_table to mysql ?
 
I only allow a couple of my own ips to ssh into my machines
 
In PHP7, is there any way to type hint a return value for $this? I regularly use fluent setters and have them return $this, but function foo($bar) : $this is not parsed correctly. Any other way to achieve the same?
 
@Oldskool I think there's self?
 
9:42 AM
@PeeHaa They must be some way around that one, surely? For one thing you could demand known client certs and issue them to whoever you are allowing on to the machine
 
@FlorianMargaine Yeah, but that just points to the current class, not to the object being handled at that moment. so I'm not sure that'll work. Worth a try though.
 
@Oldskool ?
won't $this be the current class too?
oh, you mean it won't follow inheritance?
 
@Oldskool yuck! unless it's a DSL
 
I don't always write object oriented PHP, but when I do I unset($this);
 
@DaveRandom Sounds like that would involve more maintenance than just creating an account
 
9:44 AM
@DaveRandom real developers use $this = (unset) $this;
 
@PeeHaa Have them mail you flash drives. That way you have absolute control over what's on there, and you get a load of free flash drives.
:-P
 
lol
I have asked it before, but most were afk then. Why isn't my domain on the hsts preload list of FF / IE / Edge?
 
@DaveRandom that sounds like ssh keys?
 
It has been on the chromium master list for a long time now
 
@FlorianMargaine self seems to work, thanks :)
 
9:46 AM
cc @ScottArciszewski ??
Don't tell me mozilla and ms just took the list once without updating :(
 
@FlorianMargaine That's what I meant, I get confuddled by SSH and SSL terminology sometimes :-X
 
@Oldskool how does self behave with inheritance?
 
At one point I got quite into all that stuff but I found I was losing the will to live
 
Think I can bug the firefox issue tracker with my question about hsts? Or is there some SE site where it is on topic?
 
If two columns must always add up to 100, is it wise to enforce that on the DB layer?
 
9:53 AM
Yes
If only because you are going to dive into the db directly at some point
 
@Gordon Hmm, not sure yet. But worth to keep in mind, might be funky.
 
@PeeHaa It's a question about Mozilla's internal process, I see no reason not ask them directly
wtf
my hands are not gramming as well as my brain this morning
 
@PeeHaa on the other hand you're introducing two possibly different arithmetics
 
@nikita2206 Why?
Code and db?
 
@PeeHaa yes, it may be that x + y in the program will not be the same as x + y in the DB
 
9:57 AM
Isn't that always the case of constraints?
 
@PeeHaa you mean isn't it always the DB where you should enforce data constraints?
In my experience ORM works better here
 
You are assuming non-integers, which he did not specify...
 
@Oldskool on a side note: method chaining has very little value outside internals DSLs imo. Putting return $this in each of your setters is one more line to contain a potential bug. And since you likely don't test your setters, you'll only realize in production. Also, it violates CQS.
 
If your app and database don't do the same integer math, you are definitely having a bad time and will not release your application today
 
I don't think I understand what you are trying to say @nikita2206 :P
 
10:01 AM
@DaveRandom yeah, you have to consider data types, that's the burden that kind of renders it impractical to have constraints at DB level. If you have more than one app on your database then it's better to have those constraints though
I mean having data constraints in the application code is easier than having it in the DB
 
Imo you should have both
On the application side to prevent a trip to the db to fail early and on the db side to prevent incorrect data from entering the db in another way
 
Wes
it's 11 am and i'm drinking wine
 
Kez
hey guys i asked this question before but didn't solve it. I have an insert query, that when i paste any data in to the form fields it won't pass the data to the database, however if it type it out manually it stores it successfully in the database. I have no jquery keyup function. any help is appreciated.
@Wes niiiiiiceeeee!
 
Wes
i'm unsure about that
 
Kez
@Wes #sarcasm :D
 
Wes
10:11 AM
okay then :P
 
@Wes ...not sure that's something to be proud of ;)
 
Wes
well, i'm about to go to bed. that is even worse, maybe :P
 
@nikita2206 It depends whether you need the constraints to be transactional, though
I like to have as many constraints as reasonably possible at the DB layer, but I don't rely on constraints violation errors for input validation because that would be silly
 
@DaveRandom yeah, that's true.
 
ok ... time to clean out the tiny avatar list
 
10:26 AM
they are going to creep back in
 
of course, but probably 2/3 of that list dont actually use chat
 
Kez
anyone?
 
it's pointless to compromise my chat experience just because of people who have been fucktards a year ago
that ignore-list get handled on the frontend
 
@Kez anyone is no one.
 
10:31 AM
:|
 
Kez
@iroegbu hmmm, would seem so. . . :/
 
@DaveRandom Yeah that's how I think about it too
 
Great Insane minds...
 
constraints are for preventing DB from getting compromised
it's just another layer for your "security" onion
though, there is one type of constrain that I use as validation tool, @DaveRandom, the UNIQUE
 
@tereško I tend to do a SELECT check for error feedback on there, mostly because I find it easier to read than checking SQL error codes. It's perfectly valid to check the codes instead, if it was a highly concurrent application I probably would go down that road
 
10:36 AM
@DaveRandom Yeah same here
Now I am scared we agree twice
 
That's really just about writing readable code over defending against something that's very nearly impossible
 
We must be doing it wrong
 
Standard procedure
 
10:48 AM
What do you think about this weird syntax: array_filter($list, (!==)(null, ...))
 
Fuck, @tereško That video you linked the other day
 
yes, what about it?
 
> "If you inherit from a class, and add logging, then guess what, your program behaves differently, and you violate LSP"
 
I completely agree
 
> We have strict LSP, then general idea of don't break the contract
 
10:49 AM
... then again, I have been advocating for using decorators to implement logging since before I saw that video
 
There are two ideas brought together - exporting operator as a function (it's (!==)), and partial application (the one that I don't really like syntax-wise, but I don't have better ideas): $func(arg1, arg2, ...) - partially applied function
 
My mind is breaking right now, and yep, logging / caching in decorator
 
I think these two together (and short closure syntax) would bring a lot of value, but again I don't like partial application syntax
 
So ... did anyone else get sad, when watching "Ghostbusters" reboot trailer?
 
I have avoided watching it so as to avoid exactly that
 
10:58 AM
It was terrible. The jokes were bad. It has cheap looking CGI, even the original had better quality.
 
I don't require good CGI for a remake of something that originally had bad CGI, but I do require "good" bad CGI (yes, I realise that doesn't make a lot of sense #friday)
 
How to assign (if not existing) and get with PHP 7:
$var = $field ?? $field = $val;
\o/
No, seriously… nobody likes if(isset())
 
I do like a bit of symmetry. Fuck sanity.
 
=D
 
@bwoebi useful
 
11:04 AM
Apart from parser fixes, ?? is one of the greatest additions to PHP 7.
 
well ... according to media, all the Ghostbusters haters have my soggy knees, or something: usatoday.com/story/life/entertainthis/2016/03/03/…
but seriously, it looks like made-for-tv
 
Just wondering… what are your most important new features in PHP 7?
For me it's parser fixes > ?? > Generator returns > Throwable/Error > weak scalar types > return types
 
Is the removal of ext/mysql a feature? If so, that.
 
^ that
 
It's nice to have for me … but the removal is not that important…
most everyone is just going to use a mysql polyfill…
 
11:10 AM
@bwoebi in long term the largest impact will be from type hints & return types
 
@tereško you think so? why?
 
it's a syntax-level change: with new syntax options you usually get also new practices
then again, it will be 2020 till php 7 becomes the primary version
 
@tereško well… ??, uniform variable syntax, generator returns, three way comparison operator etc. are also syntax level changes
And btw. I feel like <=> is the new goto
 
uniform variable syntax is still my fav
 
yeah, that's what I meant with parser fixes :-D
 
11:13 AM
?? and <=> are just syntax sugar
 
@tereško Seems too early to bet on that unfortunately.
This industry pushes boundaries quickly but adopts things incredibly slowly it seems.
 
@tereško ?? is sugar but makes code much more legible and less boilerplaty
 
Does composer play nicely with PHP7 yet?
 
yes
 
Excellent
 
11:18 AM
http://stackoverflow.com/questions/35794338/codeignter-shows-code-in‌​stead-of-decoded-text
 
except if your shitty library did "php": "^5" and doesn't install with 7 thus. (Shut up, Marco!)
 
@bwoebi such a lovely low-key thing that removes an entire class of "wait, why can't I do that? oh right, php hates me"
 
Hmm, about composer: I maintain a small package and would like to bump it to php7, but I'm not sure how to go about versioning. I can just bump the major version, but that sort-of implies the other version is old. I am planning to maintain both versions for at least some time. What would be the best way to version this?
 
@Nanne or you can just have your code compatible with both versions?
 
@bwoebi obviously that's an option
 
@Nanne if your php5 version won't be getting any bc-breaking changes you can get away with just a major version bump for 7... otherwise you might want to spin off a new package entirely
 
@tereško refusal is one thing
What if the company just can't?
 
then it's just refusing, while making some strange excuses
they should just make a special plug for the internet pipes
 
@PaulCrovella another option might be I'd just make a non-standard version for the php 'port'. I don't see the benifit of an extra package as it might be confusing, but a separate variant might be an option. not sure fi composer supports that though
 
Well thankfully it hasn't passed yet, and if the first one went down in flames here's hoping that one does too.
Maybe let's not try and pry on your citizen's private lives and put that cost to making the world a better place to live instead?
 
11:33 AM
France has been stupid regarding encryption for years
 
With terrorists taking advantage of the present situation, soon regular people will start shifting base and siding with the "stupid" people.
it's just like the gun situ in USA, you have criminals giving people reasons to own guns and you have people killing at will for the sake of it
 
I'm unsure whether I should use parse_str($data, $fields); or rather:
            $fields = [];
            foreach (explode("&", $data) as $pair) {
                foreach (explode("=", 2, "$pair=") as list($arg, $val)) {
                    $fields[urldecode($arg)][] = urldecode($val);
                }
            }
 
@iroegbu maybe france could just ban use of electricity
 
the advantage is that parse_str() provides a way to parse args into array with named keys
though… do you need named keys?
 
@tereško haha! It's funny, in Nigeria there are no direct laws pointed at things like this
let's not talk about cryptography
 
11:44 AM
@bwoebi parse_str also does what anyone working with your stuff would expect.. there's an advantage in consistency too
 
@PaulCrovella Well, I'm not sure. parse_str also converts e.g. dots into underscores which is totally counterintuitive…
 
R.P
How big of the chance is that APC and PHP SoapClient module conflict - thus segmentation fault ("zend_mm_heap corrupted")?
 
@bwoebi There's a funny thing, I've never used a list within a foreach like that, thanks!
 
@Jimbo urghs … why did I foreach that? lol
should be list($arg, $val) = explode("=", 2, "$pair="); o_O
 
:D
/me pretends that my comment was sarcasm when in fact I was serious
 
11:56 AM
hehe
 
12:06 PM
since Thread::kill() was removed how should i kill a infinitely running thread from the parent ?
 
12:37 PM
Is viper7 anyone I know (think I meet him once on irc) ..
 
He used to be the go to codepad
He supported multiple version before it was cool and still allowed you to run functions norammly blocked on other services
 
Plus it's the only one I know of that renders output as HTML rather than text, so you can do things like rebecca-roll people in really convoluted ways using it
 
voila!! created that thing!! phew
how's it ?? ^^^^^^^^
 
it uses tabs instead of spaces, so it is crap
 
???
Why is tab so bad?
 
12:54 PM
tabs are inventions of the devil. and if you use them, you are a communist.
 
> In fact, the solution is exactly the opposite: NEVER REPLACE TABS WITH SPACES! All editors can be configured to present whatever "indent distance" is desired and without having to add all kinds of crazy comments (as jwz seems to suggest). As long as no one in a group of developers uses spaces to indicate an indent, nobody should ever even have to know what other people's preferred "number of columns" is!
Go forth and tabify!
That sounds clear!
 
@bwoebi COMMUNIST!!
 
@Gordon yeah, tabs are indeed for the common good.
 
@bwoebi tabs destroy individualism and thus freedom itself
they are inherently unamerican
 
@Gordon and that's a good thing, in this specific context.
 
12:59 PM
@bwoebi someone ought to ask Donald Trump on his opinion on that
 
He'll obviously say spaces.
And because he's always wrong, I'm right.
 
😝😝😝😜😜
anyway, but what are yall's views about that project??
 
Bonjour :) I'm having a bit of a problem with deleting a mysql row by id when a button is clicked. here's the code: pastebin.com/Z0CReK7w
 
mysql_*!!!
 
$_REQUEST!!! And sql queries with interpolated strings!!!1eleven
@AboutLeros please throw away that code. Use a non-deprecated library for connecting to your db, like mysqli or pdo. Use prepared statements. And don't use $_REQUEST
 
1:04 PM
I wonder how can people even like to use functions to achieve something where there is such a nice interface in OOP ... PDO
 
that code was from a youtube tutorial, I tried using PDO, but no success.
 
@AboutLeros You should definitely give that tutorial a thumbs down/dislike. It's outdated as hell.
 
I really wish I had more time. Then I would do Pluralsight tutorials so people dont have to use crappy YT videos
 
mysql_ has been deprecated/discouraged for about 4 years now and is now officially dead.
 
@Oldskool Ok, everyone keeps saying that but how the fuck do you do it now! I get it's old, but the new code doesn't work!
 
1:08 PM
@AboutLeros PDO is the best way to go. But if you don't have PDO installed or can't use it, use mysqli_ instead. It's almost the same as mysql_ functions.
 
@Oldskool .____. I have PDO installed and like i said i tried that.
 
@AboutLeros Yeah, but apparently you gave up at some point. Why? What didn't work?
 
> Removed ALL comments (these are key, since we have massive lookup tables of register values and bitfields).
Removed all indentation.
Swapped all integer literals so they are decimal rather than hex, so the bitfield values aren't apparent.
Renamed all functions to useless, non-descriptive names.
That is such a dickmove :p
 
@Oldskool I have a table and a delete icon at the end of each row, all i'm trying to achieve is when it is clicked, the row is deleted from the database.
 
@AboutLeros And I figure you had a query for that all set to use with PDO? What did you have that didn't work?
 
1:14 PM
@Oldskool i'll make a pastebin, one sec. just need to find it
 
Damn, Im working on a old project which is still life where people can submit a form with ajax
The problem is since a few days when a user submits the form I receive 10 entries in my databse >< never happend before.
What's the best way to prevent this? Add a delay or something?
 
@Duikboot Disable the button while your request is loading?
 
Do I do that in the AJAX-call?
 
Personally I would disable it right before you send the call and enable it when you get the response
@Duikboot Yup, pretty much
 
yes @Duikboot
 
1:21 PM
Allright
 
do that
 
It is really annoying receive SOOOO much db records now
 
Hey there....
I have an object like this:
 
@Newbie pastebin :)
 
@AboutLeros That's not PDO, but MySQLi. But that looks OK to me, other than the DELETE query not having an actual id and thus deleting everything.
 
1:24 PM
@Oldskool well yes, but it does the opposite and doesn't delete anything.
 
@AboutLeros What error does it throw?
 
I have an object like pastebin.com/0aP1E6FY
And I'm trying to extract EmployeeId,FirstName,LastName and GroupIds
The goal is to save them into the MYSQL DB
 
At least format your paste
 
or just show your code
 
@Oldskool none :(
 
1:46 PM
@AboutLeros Hmm, that is awkward. And if you do a random query like a SELECT * FROM table? Does that return anything at all?
 
yes, i'm echoing out all the data from the table, but it's just the delete button that doesn't want to work.
 
@AboutLeros Hmm, don't forget to quote your $_POST BTW. So $_POST['delete_row']). You now don't have the quotes, which will make it behave like a constant, which is (highly likely) undefined, so make sure to quote it properly.
 
@Oldskool I'll give it a go :)
lol, nope :D
just to make sure, the selector is the name right? so for example name="delete_row"
 
@AboutLeros Yeah, you should have something like <form method="post" action="deletescript.php"><input type="submit" name="delete_row" value="Delete"/></form>
 
1:58 PM
@Oldskool got it working :) had an a tag instead of input. . . >:|
 
@AboutLeros Good :)
Yeah an anchor is not going to help you post ;-)
 
however, if you have an input, how can you use an icon?
@Oldskool yeah, my bad :(
 
@AboutLeros You're going to need javascript to attach a post event to the image. But you'll have to ask yourself if the eye candy is worth that additional dependency of javascript being enabled/functional.
 
@Oldskool hmmm, got a point.
 
Oh no wait, there's also an image input type...
I just use that way too little to remember :p
7
Q: How do I use an image as a submit button?

RolfCan someone help to change this to incorporate an image called BUTTON1.JPG instead of the standard submit button? <form id='formName' name='formName' onsubmit='redirect();return false;'> <div class="style7"> <input type='text' id='userInput' name='userInput' value=''> <input ...

Something like that might work.
 
2:04 PM
:D
thanks, nice one!
 
2:16 PM
Hello All
I'm having issues with e-mail send to @hotmail accounts
With PHPMailer
The e-mail is not received in hotmail. So probably it bounces, but how will I be able to catch bounce emails send by PHPMailer
 
@Timo002 it probably gets bounced to the 'from' address, so check that inbox
 
@Timo002 Turn on debugging then. PHPMailer does everything over a socket so see what the raw responses are
 
The 'from' address is not receiving anything
I will turn on debugging, see if that helps
I'm not sending with SMTP by the way. Just core php
 
@Timo002 Check the logs for the MTA (exim/sendmail/postfix) on your server. The message may have been accepted by the MTA, then dropped by the MTA or (temporarily) blocked by the receiving server.
@Timo002 Note that if you're trying to send volumes of emails / need delivery to be reliable, you probably want to use a service (eg. MailChimp / Mandrill). The big email services like Hotmail implement, among other things, rate limiting and require you to have SPF and DKIM properly configured.
 
That's something I'm thinking of to. I will contact the hosting provider, because I don't have access to those logs myslef!
@AllenJB, SPF and DKIM is fine. mail-tester.com gives the e-mail a 10 out of 10
 
2:23 PM
If you're using a shared mail server then other domains on the server could be causing you to have reputation issues.
 
We have a dedicated IP. It's not blacklisted
 
Small other question:
When using GA in case of site.com/site1/ site.com/site2/
should I generate only a code for the main domain and use it on all /site1/ site2/ versions?
Or should I generate a new one for every /siteX/ on site.com ?
 
GA = genetic algorithms?
 
Google Analytics?
 
Oh. Thanks
 
2:28 PM
@PeeHaa sup
 
@Oldskool you can also do it via css, with content. and use the Unicode name. :)
 
@Duikboot I would make it seperate domains, if they are really separate entities
but if you are going to do comparisons and want to see 'all traffic' , you might be better of making it one thing
@Duikboot where I said 'domain' I meant 'property', which is the term GA uses
you can have both properties in the same account obviously
 
2:43 PM
Hmm, after a conversation with the hosting provider, they came up with changing the SPF records from softFail "~" to Fail "-"
so ~all => -all
Seems to be working
 
hello everyone
i´m doing a echo like this: echo json_encode(array($results, etc etc ....but inside that $results there´s a key i would like to unset...i have tried doing this:unset($results[2]); BEFORE the echo but it´s not working, what am i missing here?
 
@ScottArciszewski Was wondering whether I am doing something wrong or not bugzilla.mozilla.org/show_bug.cgi?id=1253567
 
I don't know where mozilla gets their list
maybe they have a poorly advertised form for populating their own?
 
hmm. They should be using chromium's list AFAIK.
Will just wait for their comment
 
OK
^ Mozilla can be quite derpy, just a head's up
 
2:56 PM
O.o
 

« first day (1966 days earlier)      last day (2979 days later) »