« first day (2720 days earlier)      last day (2453 days later) » 
01:00 - 19:0019:00 - 00:00

01:11
Well, installing mysql workbench failed, so trying adminer. This might be why phpMyAdmin is popular...it just installs with all packages. Let me test Adminer.
01:50
Hmm, no instructions on Adminer install. Search showed some install steps. So added adminer.php into a /home/domain/public_html/admin directory and chmod permissions to 777 and error: Forbidden You don't have permission to access /adminer/ on this server.
 
2 hours later…
03:54
yo what's popping?
Can you post to pastebin your mysql database dump?
If you have phpmyadmin, you can use the export option.
04:29
<form id="availability">
Person1 <input type="checkbox" id="person1" value="1">
Person2 <input type="checkbox" id="person2" value="1">
Person3 <input type="checkbox" id="person3" value="1">
Person4 <input type="checkbox" id="person4" value="1">














</form>



<script>
$( '#availability' ).submit( function()
{
$.post(
'include/new.php',
{
persons: {
person1: ( $( '#person1:checked' ).length ? 1 : 0 ),
person2: ( $( '#person2:checked' ).length ? 1 : 0 ),
person3: ( $( '#person3:checked' ).length ? 1 : 0 ),
I'm getting en error in the for-each statement. could someone figure it out please
put it in a proper code paste site
3v4l.org is another
04:34
the error is "Invalid argument supplied for foreach() in C:\xampp\htdocs\new.php on line 60"
you don't need a foreach for a db query
and you should be using prepared statements
you're open to SQL injection
shall I remove it then?
not really I'm new to PHP
ok thank you!
or if that site doesn't work for you, ... like it doesn't for me at work, since it's blocked in our firewall ... this one should: wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
more info on SQL injection: bobby-tables.com
05:09
Google PageSpeed test for my website - "Leverage browser-caching for the following resources - https://maps.googleapis.com/…[...]&callback=initMap"
Uhh, that's your link
:P
So did R11 Discord die?
05:58
Can you pastebin products.php as well?
06:28
!!friday
@IROEGBU Only 1 day, 17 hours and 31 minutes left until Rebeccaday, OMG!
morning room.
mornin
@Linus Did you finally get the joke?
@Tiffany lol, now i undestand.
@mega6382 yeah :P
hi
I am facing a problem in laravel environment file call in php class its return null I tried to clear all ccache files
06:47
moin
'nin
o/
You can't put if else statements in html a href?
07:07
@J.Ende Please, explain what you are trying to do.
Let the a href check first if you are logged in , if you are not redirect to the login page otherwise go further but yeah i can easy solve this but i was just wondering if I could write it shorter into the html a href but it gives errors so i guess that isnt possible
@mega6382 3v4l.org/EVXck
that is what I tried
Please, learn php properly first.
oh wait ye you probably didnt understand
I have echo this , I didnt copy full row
mybad
But i already got another way, but thanks for your answer atleast I know that it works
@J.Ende Even then, the thing you need to understand is that you cannot just concatenate an if inside a string, it doesn't work like that.
mornin
07:18
\o
mornin
@mega6382 that looks strange ... 3v4l.org/kKnSj
\o
@JoeWatkins Yeah, I first wanted to do this, but I thought he might not understand. So, reformatted his own code. :)
Both your codes doesnt work for me , had to change it anyway
oh rly
07:31
I have it like this now 3v4l.org/1Eb2Y if you are wondering
Could have been shorter but w/e
spaghetti ftw
are people still doing this in 2018?
nevermind, just wondering...
you will come to regret writing code like that ...
Ye that's why I asked a lot ;) but still maybe some explanation so I could also learn something about it
07:44
moin
mbstring was always terrible, but when we merged ng, we made it so much worse ..
To the guy who invented NULL, thanks for nothing
08:00
timeserver a person who shapes his or her conduct to conform to the opinions of the time or of persons in power, especially for selfish ends.
!!dad
Don't trust atoms They make up everything
@Gordon The replies are even funnier. :D
@JoeWatkins saw that
you've interrupted my watching repeats of family guy ... thanks ...
08:38
> Pregnancy test = Maybe Baby
oh god the vibrator...
@tereško are you Stitch?
also, it's -6°C outside ... I am not amused anymore
@FlorianMargaine I fail on the "eat everything" .. so that's 5 out of 6
Anonymous
09:26
What does it mean anyway? "you eat all kind of food"? Then I guess that includes everybody :)
Inconsistency in the doc – #76156
@samayo I think it means eat too much.
09:47
@samayo I didn't accept your invite?
Test....
Anonymous
@Naruto yeah in overwatch ... I see you only and I always send a request to join but not replies
is threading a better option in PHP compared to Java?
@samayo The past week has been pretty rough for me (personal life), So I wasn't really there with my head, sorry if I missed your invitations
Anonymous
Nah, no worries ...
Anonymous
09:50
feel free to invite me whenever you want, I'm getting too strong with Orisa
Anonymous
@samayo Lvl 73, wow, I am still probably around 20 something.
Anonymous
Lvl 173 actually
Anonymous
1 star means 100 levels
10:01
Is there a way to determine the error cause of a failed file_get_contents?
Unfortunately, error_get_last doesn't return a specific error type (apart from E_WARNING), and parsing it from the error message seems unclean.
@ComFreek from a local file or url?
Local file
Well, checking the existence or the permissions before hand introduces race conditions.
10:20
youll probably want to use flock and fopen etc if you want to get specific errors
Will have a look at flock, thanks
11:02
> 'pub_date' => int(-62106393600)
distraught_crow.mp4
that's meant to be a unix timestamp btw.
Wes
Wes
morn
11:21
@JoeWatkins sorry joe, I don't know why that build failed while it worked here and on travis, etc. If no one wants to look into it I guess just revert the change.
Morngind
@samayo seems you've been freaking alot ^^
@PeeHaa o/
11:38
%d token for access.format supports "miliseconds" – #76157
Wes
Wes
12:03
morn2
Wester o/
Wes
Wes
went out for a quick lunch, ended up replacing the car's battery
did not see that coming
fortunately i could turn on the car. pushed to a slope
ugh
@PaulCrovella me neither, could you have a play around and see if you can get it to fail, if it's reproducible we can probably fix it ...
there's no particular rush, it's master anyway ...
Wes
Wes
@PeeHaa this is why manual transmission wins
good luck turning on a car with automatic and a flat battery :B
12:15
Manual is more fun either way
buuuuuuuut
automatic is also kinda nice and gets nicer and nicer while I get older :P
Was the battery actually gone btw or just flat?
Wes
Wes
gone
never happened on my cars
i only heard it on others... it does a very distinctive sound when trying to turn on the car
I had a flat battery last month, but that was more because I worked a lot from home and only drove short legs + it was reeally cold
@Wes Yep
UTF-8 character C29D handling – #76158
Wes
Wes
you usually can tell that battery is dying if after you turn on the car the power steering is not keeping up
but it didn't do that for me
was running ok. however, it was 2013 old
Ah not bad
Wes
Wes
12:19
lasted quite a lot yeah
12:31
@JoeWatkins I don't have enough information to start looking. All I've got is "it broke over there", which is pretty shoddy as bug reports go. At best I could guess (building against some ancient version of ICU?), break and fix that guess, then cross my fingers that it's the same problem. I don't think that'd be helpful to anyone.
Hi guys, if you are used to Symfony Form can someone explain me how I could use validator to check if a selected value is not null (my default one in this case)
Wes
Wes
13:13
div{
display:block;
width: .6ex;
height: .6ex;
}
you would think it displays a square..... but guess again. it doesn't
f****** css.
apparently subpixel rounding on the x and y axis work differently
What the fuck is ex?
I swear css is trying to become a proper programming language
@PeeHaa Cascading Home Page Hypertext Processor?
@Wes it does for me in jsfiddle
Wes
Wes
@PeeHaa x-height of the font
o/
13:21
o/
@Machavity lol
@Wes TIL
Wes
Wes
@Tiffany it depends on the rounding
@PeeHaa I have heard that CSS+HTML is Turing complete.
2
It is
It's based on radios/checkboxes iirc
13:26
I think it is turing complete in a way that powerpoint is turing complete.
Because I remember someone made a turing machine in powerpoint. Similar functionality can be achieved by CSS+HTML
Yep
blah, we switched firewalls at work and I can't VPN in now
stuff is breaking and I was going to help... I'm only home because my bed is delivered today and I don't know what time, and I don't want to leave a huge ass package with my mattress waiting on my doorstep...
13:42
jesus... I'm going to have to carry a mattress that's about 60% of my weight to my bedroom...
(it just delivered :D)
someone, not me, should do a composer package with useful transformations gist.github.com/krakjoe/aa24fb43d94f0e3c4844f591cf43a066 ... go ...
it's 30 degrees outside, I'm going out there ... lata pheepz ...
@JoeWatkins I thought you had quit the internet, what are you still doing here, huh?
that was so yesterday ...
Wes
Wes
14:13
@JoeWatkins think it's possible to print markdown lists like this:
<li><p>xxx</p></li>
rather than this
<li>xxx</li>
nvm. i can do that. i am slow sometimes
often.
A week or so ago, I had to scrap over 2500 pages from a site and it took me almost 4 hours with PHP. Today I had to do a similar thing. Opted for Node.js for its Async functionality. About 1500 pages scrapped within 5 mins.
So, I wonder if something like this can be done using Amphp.
@kelunik ^ ?
Can I use any library, like guzzle, goute? or does amp provides its own?
That is artax
It's the http client of amp
@PeeHaa OK, great. Thanks.
14:22
np
@PeeHaa Is there an asynx XML parser too? :)
Not provided by amp itself
Wes
Wes
i think paul made one
well, not async
That's json
Wes
Wes
scratch that :B
yes :B
14:25
:-)
Well you should make an async XML parser. :B
I would just start here php.net/xmlreader
I am serious though :)
Depending on what you want to do that may just be at least a good starting point
@PeeHaa I have never used this library, I have used simpleXML and that is very resource heavy. how does this compare to simpleXML?
ThW
ThW
14:28
not for that usecase however, you can split by request - here no need to split the XML parsing.
@ThW How do you know? :P
Not like you wrote the library for it :D
ThW
ThW
@mega6382 XMLReader allows you to read huge XML files (database dumps)
SimpleXML is something nobody ever should use @mega6382
ThW
ThW
all 3: SimpleXML, DOM and XMLReader are based on libxml in PHP
@PeeHaa pfff
@ThW :P
14:32
evening room.
hola
o/
you know that is why I like goutte, cause it takes care of xml parsing by it self. But I do need a http client that is async. So, I will try to use XMLReader
\o
!!github goutte
ThW
ThW
14:33
@mega6382 that will not work
Well that's a fail
@ThW So, what do you recommend?
Looks kinda like what @ThW made
oh wait
ThW
ThW
@mega6382 use an event loop to fetch the data
That abstraction
ThW
ThW
14:37
@mega6382 If you fetch the pages one after another I would expect that the most time is spent waiting for the other servers to respond.
@ThW So, with that can I use any http client?
@mega6382 are you just fetching and parsing simple html pages?
Because all the request will be sent concurrently(almost)
@PeeHaa Kinda sorta yeah.
Juts follow the example I linked of artax and use a dom parser
Wes
Wes
i checked, it's not their fault. it's how it's done in javascript too. they have just copied it (the library is a port)
14:41
@Wes Not sure whether it was that one specifically, but I remember trying to extend some MD parser and it was balls hard and confusing
Wes
Wes
in the js world commonmark is king
i suppose it's sane in php too
kip
kip
Hello, someone has worked on some development of an api ?
14:58
From our room's description:
> Support group for those afflicted with PHP. Don't ask to ask, just ask.
@Linus two years later, everyone is arguing about angular vs react
:P
@tereško same thing happened in my office today :D
Morning.
Wes
Wes
15:39
\o
I freaking hate editing over SFTP.
My IDE is doing this weird thing where I save, and it blanks out the file locally and remotely. Then I have to undo and save again and it will save.
you're inflicting this over yourself
just don't do that
kip
kip
@Allenph what ide do you use ?
@FlorianMargaine It's not my idea. I want to develop locally.
@kip Atom.
Didn't used to do that before I changed workstations. :p
15:56
@Allenph why are you not mounting the files system locally?
@tereško Like with SSHFS?
kip
kip
I never heard about SSHFS, interesting !!
Mostly because Nautilus doesn't do it natively, but I probably should.
Actually looks like that is what Nautilus does.
posted on March 28, 2018 by CommitStrip

2
16:14
@tereško That fixed it. Annoying that Nautilus doesn't have this as an option.
16:38
@mega6382 A parser doesn't do I/O and doesn't need to be async.
@kelunik Yeah, I figured that. If I could use event loop for the requests, there is no need for any async functionality in parser.
@Ocramius :)
17:28
Sup guys, actually captain asshat is here, he may be able to help <3 You ever put BL in your repositories?
I have a repository of locations. I want to find the closest x locations from all of those, given location Y. Service method, or repo method?
@Jimbo read model
Something said to me repo, I think because it's basically a filter
@Ocramius I have a repository just for reading, if that counts?
This isn't PHP, btw
rename it to read model :D
hrhr
doesn't matter
Base class is ReadRepository :D
it's what in a DB you'd call a "view"
17:30
So, you would actually place it in this object then? It currently has one findById method
either that or a new interface
@Jimbo Why not just add a method to find "by distance" from a point
@IROEGBU That's what I'm considering, find closest X to location Y, because I don't want to perform multiple queries for each one
Hmmmm... How do you get the id when using findById? Same way you should supply Y
17:46
evenin
any recommendations for a torrent site, with good set of books?
@IROEGBU Ah, actually it's not the id but the number which is part of the domain. I see your point, not using ID though :)
@tereško For books i always use libgen
18:10
@Jimbo What did you end up doing? Interesting question. o.O
Also, game of PUBG mobile?
I heard Polygon complaining that the evil PC users are playing that with keyboard and mouse
as they described it - cheating
Yeah. I know a guy who does that with an Android emulator.
I don't know if it's cheating, but it's like...come on. Go play on PC if you're playing on PC. The only reason to do that is because you suck.
Fortnite is going cross-platform I guess though.
@Allenph wrong.
What other reason is there? :p
the "only reason" would be "because I wanted to see if I can"
18:15
Huh?
you as a developer should understand the mindset behind that
No. I know a guy that definitely does it because he can't beat people on PC.
that's strange
SELECT * FROM tableName LIKE postTitle=q AND LIKE (address=location OR city=location)
How do I write this above query using Active Records Codeigniter
@AbhiBurk WHERE is WHERE?
18:24
$this->db->like(q);
$this->db->or_like(array('address'=>$location,'city'=>$location));
Tried something like that
@mega6382 Yeah their is where clause as the query is large enough
@AbhiBurk I don't think I have ever seen a query like this, is this even a valid query?
@mega6382 Bro It is just a rough query I would paste whole one but then I thought that It would not be good to do so
that query needs at least to JOIN's
also, why would you use active record ?!
^ There it is.
I was waiting for it.
@tereško I was practicing those and nothing more than it
18:29
well .. active record is useless for anything that contains JOIN statements
yeah I also find difficulties in JOINS
Yeah buddy do you any solution on that above query using active records ?
@AbhiBurk He already answered.

1) You need joins.
2) You can't do joins in active record.
3) You can't do what you're doing in active record.
@Allenph Yeah Okay... Thanks both of you
@Allenph technically, you can do joins. They usually have some magical $belongsTo or $hasMany variable for that .. but it ends up being implemented as looped query (when you have more than 1 join)
also, @AbhiBurk, you sure you need to use CodeIgniter?
18:33
@tereško Meh. You can kind of do joins. The problem is that as far as I can remember you can't configure the query for the relations. So, pretty much useless for all but basic "joins".
I have heard that if using active records in case we are changing our database and migrating to new one we dont need to change anything with our queries.All will be handle by active records
I think you do not understand what "active record" is
@AbhiBurk How many times have you done that? :p
... and, yeah, changing RDBMS in the middle of project's lifespan is extremely rare event .. in my ,,, shit, 11 year experience I have never encountered it
@tereško damn. it sounds as worse now that I read that than before.
18:37
and I have worked in 8 different companies (which is above average amount)
@Allenph not a single time but before moving to my project I had to make a decision which one to follow 1. use active records 2. go with normal sql queries. So I thought 1. would be good in case if we need to change in future and nothing than this was the reason of using Active records
@FélixGagnon-Grenier Wut?
@Allenph my opinion of acrtive records has not been improved by reading that description
@FélixGagnon-Grenier that's what happens when you start digging in OOP principles
18:38
Okay I will take all of you peoples recommendation in case of Active Records.
apparently...
Thanks a lot you guys made my problem solved
@AbhiBurk there are 3 major patterns for interaction with database: active record, table gateway and data mapper
Frantically Googles Table Gateway
you should use the data mapper, because it is the most flexible one and best suited for normalized databases (google that, if you do not know the term)
18:40
Yes for sure. I will
Wow. That sounds terrible.
there is one major ORM, that implements that pattern (Doctrine 2), but usually it is quite easy to write your own custom mappers, @AbhiBurk
here is a simple example of a mapper: github.com/teresko/blank/blob/master/src/Model/Mapper/…
@tereško Hmmm that looks interesting Thanks a lot man.
01:00 - 19:0019:00 - 00:00

« first day (2720 days earlier)      last day (2453 days later) »