« first day (1748 days earlier)      last day (3200 days later) » 

7:01 PM
(is "I got the job" british english or acceptable, pun slightly intended ?)
 
@MarcelBurkhard 'got' would be preferred.
 
@Danack ok thanks
 
Hello guys !
 
Morning Guys
I have a question
Suppose we have 2 tables
And we join them using the JOIN Clause
Both tables have a column called "Date"
 
USING(date)
 
7:05 PM
@ircmaxell correct me if I'm wrong but white listing would be insufficient for mitm attacks? You would have to limit to local whitelisted entities.
 
But these contain different dates
 
Different types?
 
use alias while joining
 
No same
 
USING(`date`)
 
7:06 PM
@DanLugg that not what he is asking for
I hope
 
I dont think he wants date for a join condition
 
I'm impatient.
 
My question is:
I want to arrange the rows using Date column
 
thats not a question
 
But From Both tables :P
 
7:07 PM
'arrange'? You mean order?
 
select t1.`date` as `date1`, t2.`date` as `date`
from table1 t1
join table2 t2 on whatever
 
Yes
 
@ZahidSaeed in your select do table1.date as table1_date, table2.date as table2_date .....
 
UNION
 
questions typically end with '?'
 
7:07 PM
 
@ZahidSaeed IMPORTANT: questions end with a question mark "?"
 
@DanLugg mornington crescent.
 
@tereško ok ok
 
lemme guess, @ZahidSaeed, you are from India
 
@tereško you were too slow :P
 
7:08 PM
@Danack Northern Line?
 
@tereško Nope :)
 
.. strange
 
Actually I'm trying to create Ledgers
 
so .. what is your question ?
 
Can we order rows by using 2 columns ?
 
7:09 PM
@Danack Yay for references so obscure that only 2% of people have any hope of understanding them
 
@ZahidSaeed yes, kinda.
 
Like So ?:
ORDER BY table1.Date AND ORDER BY table2.Date
 
no
ORDER BY col1, col2
 
oh
I thought I have to run 2 queries
Will those be Ordered by the sequence we type ?
 
@ZahidSaeed this pretty much covers your options
 
7:11 PM
the results will be ordered by the fist column, and the duplicates will be ordered by second column
1 | 1
4 | 2
4 | 3
6 | 0
7 | 1
7 | 2
7 | 3
kinda like this
 
@DaveRandom and only marginally more people will understand them, even after they've been explained.
 
is that what you are looking for @ZahidSaeed ?
 
Didn't get it :/
 
@SebastianBergmann What's the correct phpunit release (for composer.json) to use it with phpdbg coverage?
 
@Danack I suppose a game with no rules is inherently derstandable
 
7:16 PM
'derstandable' - from the German, 'the supporter'.
 
@bwoebi Probably dev-master.
 
Anyone tell me please
I want the rows to be ordered using the both "Date" columns
Those "Date" Columns have been joined using the JOIN clause
 
@ZahidSaeed remove the join and use UNION example here: stackoverflow.com/a/4715863/982075
 
@Charles good points, thanks
 
7:34 PM
@ZahidSaeed you still havent explained what problem you are trying to solve
 
@Orangepill whitelist HTTPS would be OK
 
and your descriptions of what you claim to "want" are kinda lacking
 
@tereško are you really the famous snowboarder/skateboarder Shaun White? google.com/…
 
nope
 
7:37 PM
What's the difference between using UNION and JOIN ?
 
join is on tables
union is on two select queries
union adds rows, join adds columns
that's the lazy way to conceptualize it
 
But that still doesn't meet my requirements
 
10
Q: How to guarantee a specified file is a device on BSD/Linux from PHP?

Scott ArciszewskiWhile working on a project that reads from /dev/urandom to generate random bytes, it was suggested that I check to make sure that /dev/urandom is a device not just a file. The most straightforward way seems to be something like: /** * Is the given file a device? * * @param string|resource $...

anyone care to chime in? Or should I accept the filetype() answer and award the bounty? :P
 
@ScottArciszewski nobody here know the answer by default. And discovering the answer requires A LOT of work
 
7:40 PM
You try union two tables, you result set will populate with two tables of data, then you can order by date @ZahidSaeed
@발렌탕 anneyong
 
@Rafee that would be terrible for performance
 
@tereško fair enough, I just wanted to invite anyone who knew to chime in before they miss out on 100 rep :P
 
hmm. yeah
 
which to most people here is probably the same as 0
 
/me haven't written an answer in 4 months or so
 
7:44 PM
I'm trying to run the following query
SELECT * FROM ogygafsf_pos . sales JOIN ogygafsf_pos . cheque_received USING(Sale_ID)
But why the "Date" Column of both joined are having the same values ?
It has effected all the rows !
 
ogygafsf looks like one of @DaveRandom's aliases
 
Moreover the Primary Key given to the ID column is also gone
 
anybody who uses Curl here ?
 
How can I send a pic here ?
I want to show a screenshot
 
7:47 PM
curl.haxx.se/dlwiz/?type=bin i am on win7 64 bit
which options do i select ?
 
All of them
 
@tereško Did you get my question now ?
 
@PeeHaa ??
 
What options do you mean?
 
select curl executable from this link curl.haxx.se/dlwiz
select win64 !
 
7:50 PM
@ZahidSaeed why are you using random generator for naming tables?
 
and tell me what you see !
 
@tereško What Random Generator ?
 
ogygafsf
that's a meaningless random string
 
@tereško It's the database name
@tereško I know that but the user doesn't want to change it
@tereško Can you tell me now ?
 
@ZahidSaeed you shouldn't put the schema name in the query SELECT * FROM sales JOIN cheque_received USING(Sale_ID) works just as well
 
7:54 PM
@ZahidSaeed Word of warning: don't keep pinging someone if they don't respond.
 
@DanLugg ok I get it
 
@ZahidSaeed .... have you tried my answer?
 
@Charles I looked at my code and this issue doesn't apply to me. I have an array of inputs defined, and the input has to be found in that array before a getter/setter is mapped
 
@ZahidSaeed upload button next to send
for uploading images
 
@Rafee I only have a Send button
 
7:59 PM
strange, what are you using..
 
@Rafee Chrome
 
@DanLugg is Vanilla PHP a joke? That's pretty hilarious
 
@MarcelBurkhard It says the number of columns doesn't match
Error:
#1222 - The used SELECT statements have a different number of columns
 
@ZahidSaeed trying resize your browser, may be.
 
This is the query
SELECT * FROM sales UNION SELECT * FROM cheque_received
 
8:01 PM
@ZahidSaeed well the columns obviously have to match
 
@Rafee Nope
 
um
they serve two very different purposes
 
try other browsers
 
@MarcelBurkhard Then what is the other solution ?
 
@ZahidSaeed select the same columns in the same order in both statements, you can do something like 'BLA' as Test if one table is missing a column
 
SELECT s.* FROM sales s JOIN cheque_received r ON r.sale = s.saleid
 
and there are 3 people who starred it?
 
will get you all the sales for which a cheque was received
 
@DavidGraham May just like Valina javascript.. its just pure php with new custom functions to implement
 
8:03 PM
@rafee You need 100 rep to get the image upload button source
 
see the last line "Finally, you can copy curl.exe into %windir% and it should become available on the command line."
how what is %winddir% ?
 
oh i see..
 
@ZahidSaeed you need 100 rep to upload to chat
 
I know, now.. thanks @Orangepill
 
8:05 PM
oh
 
so, use postimg the
then
 
@AlexanderSolonik Dunno. When in doubt start with generic
 
New car hacking trick discovered, hundreds of models affected! http://t.co/QEPDjOLLGY
3
 
@PeeHaa thanks brother ! :)
 
8:06 PM
rofl
 
damn..
haha
 
has something been done to the PHP built-in server since 5.5.15? when I set both document root (-t web) and a script web/app_dev.php resources like css are not loaded
however -t web and accessing app_dev.php in the browser works
its the same path so why wouldn't the resources not load?
 
and ` Hopefully the firmware can be reset.`
 
brute force attacks always work
 
@ircmaxell that's somehow seems like an excessively low-brow "joke"
 
8:08 PM
:-P
@Orangepill reply to the tweet with that
 
fragile security measures
 
web/test.php
web/style.css

php -S localhost:8000 -t web
GET localhost:8000/style.css: 200
php -S localhost:8000 -t web web/test.php
GET localhost:8000/style.css: 404
 
See this pic please
Here 2 tables have been joined
I have some questions here
First Why the Primary Key Given to the ID column is gone ?
 
@ZahidSaeed sorry but enough is enough, are you trolling?
 
 
8:13 PM
god I hope so
 
@MarcelBurkhard That didn't worked for me
 
Which side are you. Right
 
@ZahidSaeed it works, and it would also work for you
@ZahidSaeed do me a favour and leave
 
@Rafee that child looks vegan
 
@zahidsaeed you are seeing exactly what you are asking for ... this is what the results of a one to many join looks like
 
8:17 PM
@Orangepill But why the data in the Date column has been changed after joining ?
Look at that pic. All the rows have the same date !
 
it hasn't... there are two date columns... one on the sales table, one on the check table.. since there is one sale and many checks the sale data will be repeated for each check
I suggest you go out and buy a beginners book on sql and read it.... then read it again.
 
@Orangepill ok I get it now. But isn't there anyway to preserve those removed dates ?
 
look at the column labeled date on the right side of the screen those are your check dates
 
@Orangepill Yes I know
 
user895378
Does it seem like more super-low-quality questions are finding their way into chat now than there used to be? Or is that just me?
 
8:21 PM
@Orangepill stop trying pls
@Orangepill he is completely lost :D
 
user895378
Like ... the "I literally don't know anything about what I'm trying to do" questions ...?
 
@rdlowrey I think it's getting worse
 
user895378
It's worse than I remember it being in times past.
 
@rdlowrey yeah seems to be getting worse, but not dramatically
 
I should be happy ... I used to be the dumbest guy here :)
 
8:22 PM
> Rails is low on dependencies ...
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Fetching: activesupport-4.2.3.gem (100%)
Successfully installed activesupport-4.2.3
Fetching: rails-deprecated_sanitizer-1.0.3.gem (100%)
Successfully installed rails-deprecated_sanitizer-1.0.3
Fetching: mini_portile-0.6.2.gem (100%)
Successfully installed mini_portile-0.6.2
Fetching: nokogiri-1.6.6.2-x64-mingw32.gem (100%)
^^ And it's not even done.
 
I like this types of "questions":
"I have a question: I want to make a website like facebook"
 
Though, it's alotta docs.
 
user895378
> Fetching: rails-deprecated_sanitizer-1.0.3.gem (100%)
 
user895378
That sounds like a really necessary dependency
 
The no 1 problem with open source is docs
 
user895378
8:24 PM
Good docs are harder than good code I think ... and more time consuming.
 
@rdlowrey It's getting worse, I should fill my permanent ignore list.
 
that's one area PHP has historically kicked ass at
 
Successfully installed nokogiri-1.6.6.2-x64-mingw32 -- nokogiri isn't that a type of anime porn?
 
user895378
@ircmaxell It really has. For years I basically lived on manual.php.net
 
@rdlowrey Nope, docs won't need 3 years. :P
 
user895378
8:25 PM
@kelunik haha true
 
@rdlowrey Yes ... I've been writing non-docs today and I'm moving at something like one paragraph the hour
 
user895378
What I need is a tool to cross-check prose documentation against real code to search for errors ... things like function names that no longer exist and parameters that don't appear to be correct.
 
user895378
Sounds like a job for php-parser
 
@rdlowrey +1
 
user895378
It should be relatively straightforward to scan markdown docs for code blocks. Then you could use php-parser to work from there.
 
8:28 PM
Sounds like a good idea (I'm not volunteering)
 
I have a lot of documentation I need to go through and fix, so I feel your pain.
 
Some languages run doc code snippets as part of the test suite
 
user895378
@NikiC yeah me neither lol
 
user895378
@Trowski It's really hard to keep that kind of stuff up-to-date amiright?
 
@Orangepill I am fairly certain that it's means something like "tiny girl", because onnanoko means "girl" (referring to a child)
 
8:30 PM
yay to reading specs for work
 
my japanese is worse than my latin
 
@rdlowrey During development it's a real pain... but if you don't document anything no one will try it to know what works or doesn't.
 
user895378
Right ... I think back to the days where if it wasn't in the php manual it might as well have not existed as far as I was concerned. I think the majority of programmers are like that -- if it isn't loud and in your face and easy to see in the documentation they're probably not going to know about it.
 
user895378
I get that you should really be reading the code as authoritative (not the docs)
 
user895378
But in reality nobody has time to do that for every tiny dependency they use. The important ones, sure. But the rest you're just going to scan the docs for quick copy/pasta samples to get started.
 
8:33 PM
@rdlowrey why not do it the other way round. Write the examples as actual code, with comments that indicate which bits are for which examples, and then extract them and insert them into the documents as needed?
 
user895378
@Danack I've thought about this too -- you could use the IDE to verify correctness that way
 
I don't think most people want to have to look at code to figure out how things work, so if there aren't docs they aren't going to try.
 
user895378
How do publishing formats handle this? I assume with "links" of some kind to code files?
 
On one of the pulls I submitted for mocking PHP 7 return types, someone was surprised I knew about the new reflection methods because they weren't documented anywhere.
 
I don't know. I just extract the code and use it where required. If you want to insert it into markdown, you'd need to make a custom tool to do it.
 
user895378
8:37 PM
It would be easy to just do a find/replace tool to "compile" your docs. You could just use something like {@code-snippet:relative/source/path.php}
 
/me starts the new Mr robot episode... \o/
 
user895378
@RonniSkansing nice, watched it last night :)
 
@rdlowrey you may actually need to do it slightly more cleverly than that. Sometimes an example will need a bit of bootstrap that you don't want to include in the document. So having in say a PHPUnit test file something like:
 
> 1. We use robust hashing techniques to protect passwords. If you have logged into your account since January 1, 2015, your password is hashed with Bcrypt with a work factor of 10, using a per-user randomly generated salt and a site-wide pepper. Older passwords are hashed with SHA-1 stretched over multiple rounds and using the same salt and pepper approach.
 
8:42 PM
function testSimpleExample() {
    $injector = foo();
    //ExampleStart simpleExample
    $injector->delegate('someClass', 'someFunction');
    //ExampleEnd simpleExample
}
 
> We have no evidence that the attacker was able to access the pepper. Both our salts and pepper are 40 characters in length and are randomly generated.
 
user895378
@Danack Ooh, doing something where you could add phpunit tests would definitely be a good way to go
 
> The salt, pepper, and password were concatenated together to form the string that was in turn passed to the hashing function.
 
@rdlowrey yeah, either phpunit, or for phpimagick.com/Imagick/annotateImage all of the examples are, pretty obviously, the actual code for what you're seeing.
 
@ircmaxell what the fuck
 
8:44 PM
@ircmaxell get a beer
or 3
 
Seriously, what the fuck
 
user895378
@Danack That's a good way to do it -- associate a single code file with a docs "page"
 
Actually, I think I misunderstood that and it's not so WTF after all
It's unclear what was concatenated how
 
@NikiC it's a HUGE WTF depending on order
if they did $salt . $pepper . $password, then it's password-less authentication
 
yes
that's the question...
 
8:47 PM
but the login stilll works and users are not complaining
isn't that the most important for the shareholders?
:)
 
@kelunik dev-master has a reference to "phpunit/phpunit-mock-objects": ">=3.0", which I fail to resolve.
 
@rdlowrey to be clear, I don't actually do that, just because I need to do some trickery with functions and namespace, to make it look like header() is calling the PHP function header, when it's actually calling \ImagickDemo\header(), in order for me to capture the content-type.
 
@bwoebi You'll have to set "minimum-stability": "dev"
 
I hate that minimum-stability thing … grr
 
So everything is marked up with:
//Example ImagickDraw::circle
//Example end
 
8:49 PM
@bwoebi Yeah, it's really dumb, just tried to install tuli during composer init and the whole thing exploded with a exception...
 
@Danack You make my browser cry as welll
 
@ircmaxell You just need a valid email to test it.
 
By the way… what can I do against:
  [Composer\Downloader\TransportException]
  The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: Operation timed out
 
user895378
@bwoebi probably just retry
 
@bwoebi Retry.
 
8:51 PM
You have SSL enabled/compiled ?
 
@rdlowrey I did like a 5 times^^
 
user895378
@bwoebi --with-openssl ?
 
@rdlowrey yes
 
Maybe try -vvv to see what is happening.
 
user895378
¯\_(ツ)_/¯
 
8:52 PM
@bwoebi Can you download it manually?
 
@kelunik sure.
 
@kelunik and I don't know of one
 
@ircmaxell Can you explain why this order matters?
 
Bobs-MacBook-Pro-2:amp bob$ /Users/Bob/amp-mysql/composer.phar -vvv self-update
Downloading getcomposer.org/version
Reading ./composer.json
Loading config file /Users/Bob/.composer/config.json
Loading config file /Users/Bob/.composer/auth.json
Loading config file ./composer.json
Executing command (CWD): git describe --exact-match --tags
Executing command (CWD): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /Users/Bob/.composer/composer.json
@Danack ^
 
@Trowski Because bcrypt truncates everything after 72 bytes.
 
8:54 PM
Wouldn't the result of the hash be determined by the entire string value anyway?
 
@Trowski bcrypt truncates at 72 bytes. So $pepper . $salt . $password where pepper and salt are 40 bytes each would mean that the password doesn't enter the hash at all
 
You are all assuming they actually use bcrypt here :-)
oh nvm
 
@ircmaxell I think that refers to their previous hashing method
 
Must learn to read
 
@ircmaxell I thought that scheme was only used with sha1.
 
8:55 PM
Because the whole thing of "concatenating salt" does not make sense with bcrypt
As the salt goes a different place than the password
 
right
which is why the whole thing doesn't make sense
 
Right, so that's why I was a little confused.
Since the salt is a separate param for bcrypt.
 
I suspect they are likely using a static salt into bcrypt, and using the dyanmic salt passed in as the password parameter
 
eek
 
@bwoebi fyi, I don't recommend using self-update, just download it from getcomposer.org/download ?
(assuming that is reasonably up-to-date, though it may not be).
 
8:58 PM
@ircmaxell I certainly hope not, lol
 
I've seen scarier
 
You mean rot13(rot13($password))?
 
no, the password supplied as the salt parameter
password_hash($password, ["salt" => $password . $pepper])
 

« first day (1748 days earlier)      last day (3200 days later) »