« first day (2622 days earlier)      last day (2317 days later) » 
02:00 - 13:0013:00 - 00:00

2:13 AM
If anyone's company is hiring and willing to relocate someone for an entry-to-intermediate level full stack or back-end developer position, I've got a cover letter, a resume, and I'm willing to live anywhere in the world. :P
 
hi, anyone knows how can I move elements of array to the last part?
for example if the array dont have image
 
Is it a specific index you want to move to the end of the array?
 
yes the array which doesn't have an image
and I'm using this to find which photo has the empty image they upload
$pos = strpos($v['photo'], "secret-lady");
 
I think you are approaching it the wrong way
 
hmm any suggestions?
 
2:22 AM
What are you trying to do? The user uploads an image, and you want to check if the image has the substring "secret-lady" in it?
 
by using that code I filtered those post which doesn't have an image..but they don't want to remove it..they only want to put it in the last part of foreach
yes you are right
@Alesana here is my current code if you don't mind
 
I will take a look in a minute
 
sure thanks
 
2:44 AM
Okay I have a little bit of time
 
thanks, glad you can help me :)
 
So right now you have it so if "secret-lady" is not in the string, it will add everything to the end of the string $html, and if "secret-lady" is in the string, it does something different
 
right now I have, if secret lady have it will hide all html post with secret lady
 
And what is it you are trying to do?
 
what I'm trying to achieve is all secret lady must not hide
just put them all to the last part
 
2:50 AM
You mean, after looping through everything, you want to loop through all ones that have secret-lady in it a second time with the same loop?
Or you mean you want to do the same thing, but have all the ones with secret-lady be at the end of $html instead of dispersed in the middle?
 
yes the second one...because right now if I removed the strpos the secret-lady will randomly joined to the post archived
what I want is to put it all in the last part
 
I see. So I will start off and say that you should look into ways of separating your PHP and HTML
But if you are insistent on doing it how you have it, you would want to put it in a separate string, let's say $html2, if "secret-lady" is in the name.
Then after the loop, you would do something like $html += $html2;
Does that make sense? I can write up an example, if not.
 
can you give me example pls
use my code as guide :)
 
Can you put the code in a pastebin?
 
sure there you go pastebin.com/kdZg5knA
 
2:59 AM
.chm page formatting broken – #75709
getimagesize with "&$imageinfo" fails on StreamWrappers – #75708
 
3:15 AM
Okay so yeah outside of the loop I think you would just want to have $html += $html2;, I mean the concept is that all of the HTML you want at the end goes in $html2 and then after that you add $html2 to $html
 
yeah got it..my code works
thank you so much
 
3:42 AM
posted on December 20, 2017 by trowski

- Allow `amphp/file ^0.3` - Fixed sending pending responses when shutting down the server (#211) - More portable CPU count detection (#207) - WebSocket updates: - Reject websocket frames if RSV is not equal to `0` (will update as extensions a...

posted on December 20, 2017 by trowski

- Fixed an issue where the timing of WebSocket writes could cause out of order messages.

 
 
2 hours later…
5:27 AM
morning
 
5:41 AM
@LeviMorrison broken, but will attempt to find some time in the mornings ... I may have more time after 25th, I'm thinking of booking a week off ...
 
5:53 AM
o/
 
6:38 AM
@JoeWatkins Thank you for your help =)
 
\o
 
o/
 
\o
 
Hello, i have a question. I've been reading a lot of different opinions about MVC (Laravel). Right now i am so confused i don't know what is right anymore. I hope someone can clarify it a little. If i have a (1)function that get's data from the database, this data will be returned and used in another (2)function to place it in a pdf and stores it on the server. Where do i place each function. Right now i have function (1) in controller and (2) in the model. Is this wrong?
Function (2) will be used for mulitple eloquent/query results form function (1)
 
6:53 AM
@Marc forget about laravel.
 
@Linus that is one answer :P
 
> Don't learn about MVC from frameworks, a framework will always try to sell whatever it has as "mvc" by tereško
 
Oke clear, do you have experience with laravel?
@Linus let me read it thank you:)
 
@Marc if you want to live happy life forget about laravel or don't put MVC with it.
 
Well i am almost done with my little project better to finish it in laravel
than switching right now
 
6:57 AM
@Marc I had some bad experience with Larevil, don't use it, choose deliberately
 
@Linus
What framework do you suggest?
 
@Marc ok for now but remind it for future.
 
7:16 AM
lol
 
@marc what makes you think you need a framework?
 
moin o/
 
hi all
 
Wes
choose deliberately
sorry :B
 
what is the best practice to keep same name in key of an array having different values?
I have tried this.. 3v4l.org/jBg7S
please suggest if you guys have any other.
 
7:25 AM
You may use slugify
"Star Wars" & "Star wars "... => "star-wars"
 
Morning...
 
\o
 
@exception any reason you are not just using a multi-dimensional array?
 
Wes
"same name" "having different values"
doesn't compute for me
\o
 
o/
 
7:32 AM
@exception like 3v4l.org/rQO3p
 
mornings r11ers
today is my last day before vacation
 
thanks for rubbing it in :D
 
morning
 
8:06 AM
mornin
 
monrin
today is our xmas party
we'll go to amsterdam
 
single-char vars get lost – #75710
 
hi guys
 
8:23 AM
morning
0/
 
Hi, i have a class for user authentication, and use global variable for DB connection. what is best alternative method instead of using global variable?
 
@Orangepill the reason behind this requirement is that I want to display 2 names(if that exists)
I mean 2 names may be same and their other information is different so I want to display that names and when user clicks on them then it will show their other info
 
@Mostafa heard of dependency injection?
 
how we can call a class with constructor inside a class
 
Protect your 🍆 from cell phone radiation with these trunks https://t.co/fa8hAseE3W
buy three, get a tinfoil hat for free
 
8:28 AM
@Mostafa what... ?
Do you know how classes work?
 
@Mostafa $db = new DB(); $auth = new Authentication($db);
 
I have a class names User .. I use it for login and register .. i send mysqli Db connection through constructor of this class.. every things fine...untile when i want create new instant of User class inside of this class.
 
Wes
you want to create User inside the class DB?
 
@Mostafa please go learn about dependency injection
 
unless your User class is an ActiveRecord, you shouldn't need to send the mysqli db connection to the User class
I suggest to use a TableDataGateway with a TableModule. It's not as complex as a DomainModel, which can overwhelming for beginners but it also provides a good level of maintainability without shooting yourself in the foot with ActiveRecords.
 
8:38 AM
good advice ^
 
in getByMobile method i should create new instant of User class.. but now how i pass db connection to constructor?
 
@Mostafa it's an active record. usually, the db connection is a static member of the class then
 
Wes
welcome to php, you did everything wrong already :B
you shouldn't use magic methods or you will be yelled at
 
And please use braces for fucks sake
and don't randomly indent code
 
Wes
and check what a data mapper is
 
8:47 AM
@Wes Thanks. That's right.
 
9:07 AM
morning, bitches
 
mornin Joe
 
o/
 
\o
 
o/
 
9:10 AM
I think I know what all the red on the Spanish flag symbolises ...
it's red tape ... there's so much of it, I'm surprised I don't wake up in the morning choking on the shit ...
@JayIsTooCommon are you ok ?
 
9:30 AM
@DaveRandom nah that's just you :p
 
9:47 AM
morniongs
 
Wes
damnit
i'm trying to separate two panels of furniture joined by two glued dowels. i'm hitting with hammer hard but no luck
 
21 hours ago, by SaitamaSama
@Wes do you use any sort of drawing tablets?
 
Wes
no. already answered that
 
when? sorry. I didn't get the ping
 
Wes
i have one. it was even expensive at the time i bought it, it's like A4 size or bigger
but i never use it :B
 
9:51 AM
do you recommend any, tho?
 
Wes
i don't know enough about them. but you need to get those that can get different pressure levels
 
hmm...
now I know what to get for my birthday :D
 
Wes
maybe they are all like that these days
if i had to do that professionally i would probably use paper and a scanner
because you need to redo the strokes in illustrator anyway
also illustrator can make vectors out of a bitmap image
 
@Wes hmm, for that, you need to use smth like pen tool right?
 
@Wes do you know where they are ?
 
Wes
9:54 AM
yeah
@JoeWatkins yes
 
@Wes can we do something like that in PS?
 
if you know their precise location, send a drill through 1-2mm larger than the size of the dowel, then if you are joining the boards back together just use a larger dowel in the hole you drilled ...
 
also, I could never figure out how to edit the hand drawn sketch after scanning
 
cut the end of the dowel flat, sand it, put filler over the top, you will hardly notice them, or you can make a feature out of them if you drill nicely ...
wood glue dries stronger than wood, you will break something if you use a hammer ...
 
Wes
@JoeWatkins they are not visible sketchtoy.com/68453888
they are in between two panels joined at 90°
and i can't saw them. not enough space
 
9:58 AM
are you putting it back together after ?
 
sorry
 
Wes
yes but that's not the problem. i have spare dowels, glue and everything. problem is disassembling the thing
 
Wes
yeah i'm trying to not ruin any visible parts
i'm hammering from the inside with a bit of wood in between the actual panel and the hammering. that's how i've been taught to do. but failing hard
 
it won't ruin it ... go get a scrap bit of wood, drill in a dowel, cut it flat with normal hand saw, sand over it with orbital sander (and the rest of the piece), apply whatever stain/top coat you are going to apply, and see how the finish looks ...
if you do it tidy, it will look tidy ... so long as the dowel absorbs the stain/top coat you're using ...
(I've joined lots of wood this way)
 
Wes
10:02 AM
it's not real wood. it's laminated plastic wood looking on top, and plywood or something in the middle
 
oh ... that's horrible ...
 
hoho (10k+ rep) :p
 
go get normal real wood, work with that :)
 
Wes
it's the office furniture and i don't want to change it :B it's relatively new. like 2 years old
 
yeah, get some wood and work it! pervert!
 
10:04 AM
I hate everything but real wood ...
 
Wes
i've always wondered why they don't just use screws. and i'm an idiot because i glued this thing myself
 
screws are horrible ...
 
Wes
i should've used screws.
 
wood is good for screws
 
or real wood ...
 
Wes
10:04 AM
yeah but you can unscrew them -__-
and apparently i've used the best glue in the world. it just doesn't want to break free
 
yeah but they are ugly as hell ... so you have to punch them in far enough to fill over the top, and then you have the same problem you would have if you done it properly ...
any wood glue is extremely excellent at holding wood together ... you won't get it apart with sudden force ... if anything is going to work it's going to be applying force slowly and precisely ... but it probably won't work still, it's going to break surrounding wood, you will not get the glue to release if you can't get anything on the glue ...
could you stand to loose in length of the top piece the width of the side piece ?
and can you buy some of whatever nasty plastic, or something that takes it's place ?
maybe just saw it off and start again, get some nice aluminium or something for edges possibly ...
 
Wes
i would rather not do that
 
it's probably better than broken furniture ... which is what you are currently trying to make :)
 
Wes
i'm sure i can put it together easily. i'm fairly good with this kind of things
i was thinking to drill on the side, hoping to get the thing weak enough to hammer it out
 
no plastic on that side ?
 
Wes
10:12 AM
yes plastic but it's not visible
 
why are you buying plastic shit if you can make it yourself ?
 
Wes
you mean why i did buy plastic covered furniture? it's cheap office stuff
 
wood is cheap
 
Wes
and i don't have the tools to actually do anything. i don't even have an electric saw
 
I miss my tools, I even had a table saw ...
you're screwed ...
 
Wes
10:14 AM
i've always wanted a table saw :B
 
dude, they are so excellent, mine could cut steel too ...
 
Wes
my grandpa had one. it was a '70s monster
 
soon as I have a garage, I'm spending a bunch of money on tools ... I had made all the furniture in my house ...
 
Wes
i've had an idea
i can use the car crick
 
I nearly cried when we sold it all ... wife and I both done it actually, she's better at finishing type work than me, I'm impatient ...
 
Wes
10:16 AM
to lift the thing apart. i think it might work
i just need to extend the range, like two pieces of scrap wood
 
I'm unsure what a crick is, but if you can apply pressure slowly and precisely, then it might work ... but be prepared to have a bunch of broken wood covered in plastic and spend the rest of the day crying cross legged on the floor ...
 
Wes
how do you call this?
to lift the car, in order to change tyres
 
wait a week for the picture to load and I'll tell you ...
 
Wes
lol
 
jack, never seen an electric one ... seems lazy ...
scissor jack to be precise ...
have you got a manual one ?
 
Wes
10:20 AM
mine is not electric yeah. but looks like that. it's the one that was bundled with the car
 
not sure how fast it will lift, or with what kind of torque, hands might be better ... the difference between it working, and it breaking the piece will be miniscule ...
ah good
 
Wes
lemme go get it
4 stupid dowels... incredible
 
they're not the problem, its the glue ...
can you maybe find an epoxy resin that will dry roughly the same colour as the plastic ?
is it bright red, I'll bet it's bright red, or white ?
maybe if you drill from the top, and send the new dowel in so there's enough space to get something that looks like plastic when it dries, you'll just have some spots in the corners ... not the end of the world ...
 
Wes
damn i don't have a piece of wood long enough to reach the other end
this is not going to work lol
omg it worked lol
it's actually 8 dowels, and apparently i did glue also the back panel
 
10:52 AM
nice
lucky :)
 
https://chat.stackoverflow.com/rooms/11/woodworking
 
@Wes change of career?
 
moin
 
Wes
i would be shit at it otherwise that would be my dream job
it's not finished yet @JoeWatkins the back panel, the thin plywood one won't come out of the housing
what glue did i even use
 
> Linux's unix socket implementation supports passing ancillary data such as passing file descriptors (SCM_RIGHTS) or credentials (SCM_CREDENTIALS) over the socket. There is no support for ancillary data in the Windows unix socket implementation.
what's the point then? :-(
 
Wes
11:04 AM
I FUCKING DID IT
 
that said, could be useful for amp win proc wrapper @kelunik ^
 
Anonymous
hmm.. anyone know which xhr.responseType to use for base64 images?
 
@DaveRandom Unix sockets on Windows?
 
yes, upcoming
although tbh without SCM_RIGHTS I don't see much advantage over TCP
esp on windows, where the loopback TCP overhead is much smaller than *nix (typically)
It's better from a security standpoint, I guess
 
@Wes you are basically a god of woodworking right now ...
 
11:07 AM
@DaveRandom We don't need the handshakes anymore.
 
@kelunik theoretically yes, but since it likely won't be backported to W7/8/2008/2012 we will need it for the foreseeable
 
Do they allow non-blocking I/O on those or are they also file handles?
 
good point
it works with the winsock API so hopefully they are SOCKETs
they will be, in fact
whether they will actually be select()able is another question
 
Wes
@JoeWatkins all i did might have been wasted time... i need to cut the housing for the plywood panel
and i don't have the tools
 
will have a play around with it over christmas
 
11:11 AM
They should just make process pipes sockets.
 
they should just unify fds and sockets
or at least provide some kind of API abstraction that works with either
the notify handle system does work nicely though, if you actually implement it properly
 
!!comic
 
Usage: !!comic <mood> <quote text> Supported moods: neutral, angry, sad, grumpy, hangme, reply, thelook, wat
 
!!comic grumpy Unix domain sockets on Windows is the epitome of square peg, round hole ...
 
11:13 AM
 
Wes
i need to create the housing in the new top
 
tricky without a saw ... unless you are willing to sharpen your teeth ...
you need a router actually ...
 
@Jeeves generally agree, but (as long as they support actual non-blocking ops) it does work as a middle ground between non-blocking stdio and TCP loopback
 
@DaveRandom That's odd.
 
you're odd
 
11:14 AM
:P
 
Wes
yeah a router would help. all i have is a dremel and a drill
 
I had a router, and built a table for it ...
I wouldn't, unless I had a suit of armor ... probably cheaper to just buy a router anyway ...
 
It's the sort of thing you can get in B&Q for £25, as long as you don't expect it to be particularly robust
I think I have one somewhere, it will be a B&Q el-cheapo one
 
yeah, spent more on bits than the actual tool ...
you don't want cheap bits ...
shards of metal really hurt ...
 
+1 ^
I still have a bit of a scar from a cheap 1mm drill bit
although tbf those things last <1day no matter how much you spend
unless you have a pillar drill
 
11:22 AM
yeah, anything under 3mm is disposable ... I had a mount for my drill so you could use as pillar .... table mounted, very handy ...
 
I have a thing like that but it has at least 0.5mm movement in it even when fully tightened, 0.5mm movement in a 1mm hole is a hole that is 150% of the size you wanted it
 
I don't like cheap drills, I got an electric shock from a drill once, it was horrible ... won't pick up a cheap one anymore ...
 
I have a black & decker variable hammer that I have had for over a decade, was about £70, still works like it did on the day I bought it
 
I saw it happen too, came out of vent at sides of motor and got me on my hand, no shoes on ...
 
:-S
 
11:24 AM
yeah, very recommended also ...
I wear proper shoes also now ...
it wouldn't have likely made a difference, was working on metal ...
bathroom, wasn't earthed yet ... probably other parts of me were touching unearthed metal, but saw it hit my hand ... nothing on feet though, probably came straight back out and into metal work and found it's way to earth ...
 
I've only ever had one, quite muted (through water) mains electric shock and I'm not anxious to repeat the experience
I've had 50/110V shocks from phone lines more times than I can remember though
 
done it a few times ... the worst was when put my hand in a lamp to change the bulb, large shade on, and bulb already taken out and switch left on ... I'm very paranoid about changing bulbs ... it properly threw me a couple of feet backward ...
to be precise it held me rigid for a second (felt like an hour) then threw me across the room ...
shocks from car ignition systems hurt too ...
(just checking spark plugs, the stupid way, the only way I know of)
lucky to be alive really
 
11:42 AM
yeh those are all the sort of things that could do you some serious damage :-P
phone lines hurt because they have some proper voltage but there's no real power behind it, you'd have to be very unlucky to get an actual injury
 
ignition systems are the same I think, extremely high voltage, but for a tiny tiny amount of time, and low amps ...
TIL you can buy something called a plug tester ...
I don't do oily anymore anyway, I hate it now ... too many scraped knuckles and near death experiences to consider anything more than changing a flat ...
I almost killed my wife while working on a car, she was not a happy bunny ...
fell off jack, no axle stand ... luckily there was an alloy under the car and she is small, so it hurt, but didn't crush ...
breaking a ball joint, very large sledge hammer involved .... I say it fell, she probably tells people I knocked it off ...
if she ever tells anyone ...
 
shit .. scary stuff
 
I also dropped a motorbike on her ...
that was nobodies fault ... I just lost my footing ... she had a good sense of humour about that one, and was more worried about the bike than herself ...
 
it happens (=
 
12:41 PM
Testing PHP inside VSCODE directly (in a split screen), possible in Win10? I would prefer raising the webserver on WSL and not on WAMP, though I'm not sure that's possible as well... It's important for me because I exercise PHP locally and it's not efficient that I would keep copy and paste codes from VSCODE into php testing sites online...
 
Wes
made new holes in the new top @JoeWatkins but didn't come out quite straight. it's like 1mm off :(
i measured twice :B i probably needed 3 or 4 :B
should've used screws
again...
 
Wes
@Ekin and i can't even do CRUD apps
would love to see the code of that kind of stuff
 
02:00 - 13:0013:00 - 00:00

« first day (2622 days earlier)      last day (2317 days later) »