« first day (2256 days earlier)      last day (2920 days later) » 

01:25
Hello @FélixGagnon-Grenier.
 
3 hours later…
05:02
Yo ...!
HI
can any one tell which is the best to make rest api in php currently i'm using latest codeigniter framework for that
Morning
56
A: Creating a REST API using PHP

Martin BeanIn your example, it’s fine as it is: it’s simple and works. The only things I’d suggest are: validating the data POSTed make sure your API is sending the Content-Type header to tell the client to expect a JSON response: header('Content-Type: application/json'); echo json_encode($response); ...

06:01
posted on December 19, 2016

New Cyanide and Happiness Comic

06:23
morning
Wes
Wes
o/
\o
06:40
composer update: Fatal error: Out of memory
I have tried everything
nothing works
it's driving me crazy
morning btw ^^
Wes
Wes
increase memory in php.ini
I did many times
-1
didnt work
@Valentincognito getcomposer.org/doc/articles/… have you tried this?
Wes
Wes
means that you set memory limit to -1?
i don't even know if that works. are you sure you are modifying the right php.ini?
I tried to simply raise it as well
and yes I checked with phpinfo
I can see the memory_limit value changed
06:47
are you doing this on production server?
:) don't do it
But I have separate php.ini files
run it on your local and deploy composer.lock and then install.
I haven't thought about this
I guess that's my only option
Thanks for the tip @Linus I will try
btw it's bad idea to run composer update on production server.
Alright thank you
:) yw
monday morning youtube.com/watch?v=uTMTJlN5u6o happy monday
@Valentincognito Before going any further always make sure you're running the latest version of composer, you can update it via composer self-update
@Valentincognito You should never run composer update in the production environment. as @Linus said You should only update your dependencies when you're developing, and then use composer install to install your last used set of composer dependencies when you're in a production environment.
07:03
@SagarNaliyapara Okay thank you^^
07:25
Hello everyone
friends anyone have idea about game live streaming api
how to get these API?
one of my client require live streaming API for 'NBA'
pls guys help me
Wes
Wes
lol
o͖̣̹/
\o
Wes
Wes
@Patrick you made me try to clean dust off my monitor
moin o/
Wes
Wes
07:39
\o
Hi to all
I want to generate a random number with time interval of 24 hours. I tried stackoverflow.com/questions/15186037/… but not working.
08:28
Mornigns room
morning
Anonymous
main site down for anyone else?
Anonymous
moin
nope jay
Anonymous
ugh
08:31
ohai jay
Anonymous
o/
O/
Anonymous
@Wes aye, 'twas a goodn :)
morning
Morning!
08:44
Morning!!!
09:00
Wondering if ever possible abandon error supression operator @ in PHP. IMHO the right way is handling exceptions, but may be easier to add @ in front of expression. IMHO using error supression is confusing, and it's making debuging harder. Any thoughts on this?
When json_decode starts throwing exceptions I'll stop using @
Sweet
@Ekin nice
If this would be possible, there can be @ used for eg. for annotations in syntax the way as it's used right now inside doc blocks.
@brzuchal How is it confusing?
Just trying to figure out whether it's the way your phrased it or I just don't agree :)
09:13
@PeeHaa because using it cause you don't know exactly why it failed, supressing error gives only false on execution, without checking for errors there can be amount of reasons why something failed, this gives no debug info and can be hard to repeat on dev environment.
@brzuchal Yes, but that's not confusing
That's getting exactly what you asked for
Ok, maybe wrong word.
Annoying.
I agree that something needs to be fixed, but removing the STFU operator is fixing the symptom
Basically this
> IMHO the right way is handling exceptions
The thing I don't get though is how annotations are related to it :)
They could have then syntax as is in doc blocks
They already can?
09:17
$fn = @Annotation function (int $amount) { do_something(); }
Or do you mean without /** */?
WIthout /** */
yeah
Well if you really want that. It means making the API sane of a lot of stuff :)
@Jimbo morning
09:19
It may simplify annotations syntax and drop looking for another alternative ugly syntax like << Annotation() >>
I won't go into the annotation stuff, because I dislike it in other languages too :P
Yeah, I know that there are few peoples on thic chat who doesn't like annotations at all, but ignoring this feature is placing PHP in a back of other languages in that case.
Changed my mind about annotations, used to like them, now they're a pain in the ass
Effing @apidoc, seriously.
@brzuchal (in your opinion)
:-)
Yes IMHO
In case of that feature only
09:21
mornes! o/
In other cases I love PHP
But yeah if you want to free up @ it involves a lot of work rewriting and breaking stuff in a way it isn't need anymore
@pmmaga mornigns
Also it will make code uglier imo because you need try/catches in places you can do simply do @func()
@PeeHaa but we both agree there would be better if exception handling would be used instead of error supressing, right?
@brzuchal It depends. But yes in general some things would benefit from that
But note that the same people who use the STFU operator wrong can (and probably will) just do try{ } catch() { // muhhaha } which results in the exact same situation
Anonymous
^
09:29
@PeeHaa would that be wrong? it may cause some people will do some rewrite and some exception handling and some not. But in all there could be more exception handling usages than they're now I suppose.
Of course it could be deprecated for some long time so people could actually refactor those codes.
@brzuchal No it's not wrong (well it is), but it counters your reason for removing it :)
It may be little confusing that error supression will cause deprecation error
@brzuchal @@foo() :P
@PeeHaa You just blow my mind :P
Is it even possible?
:-)
!!eval @@fopen(__DIR__, 'w');
oh right fatal
It has to be defined
then actually it is possible
3 messages moved to bin
@JayIsTooCommon cough !!undo cough
Anonymous
was just about to comment :P
Anonymous
like I say every night, i'll look at that tonight :B
:D
> It's our way of showing the communities how much we love them.
We love you all so much that we added hates hats to annoy you
09:36
Sorry, but I dont get it.
Anonymous
isn't that what badges are for?
Yes, but badges don't enable people to properly repwhore and clearly SO needs more crap instead of less
/me looks whether they at least finally removec chathats
Oh god fucking damnit
> starred chat, ±12h from Jan 1, 0:00 UTC
Anonymous
@PeeHaa ?
Anonymous
09:43
oic
Anonymous
@bwoebi not really, completely unrelated to the loop things we did yesterday though, positive tweet(s) about that will go out after I fix one more thing, ran into a nasty bug that shouldn't happen :X
@JayIsTooCommon Those numbers don't like right to me
Wes
Wes
\o
o/
09:52
At least I doubt it does that on 7
wes ekn o/
Wes
Wes
@JayIsTooCommon yep. still bad compared to the good old top gears though
Tried to run in on eval:
> This script was stopped while abusing our resources
:P
Sorry sjon
Wes
Wes
anything they do doesn't look as genuine as those. they try too much
There we go 3v4l.org/bkODS
Anonymous
@PeeHaa yeah the 15 seconds isn't right
Anonymous
09:56
@PeeHaa still quite a difference though
¯\_(ツ)_/¯ I don't normally work with arrays of that size
Anonymous
cake devs are considering changing their shifts because of it
lol
@bwoebi found my issue, two different loops are at play in the app >_<
Anonymous
10:03
@PeeHaa for arrays that handle around 10 values.
hehe
For completeness let me just put this here github.com/php-ds
@WyriHaximus ;-)
@JayIsTooCommon ^^
forgot da ping
Anonymous
heh, interesting
the medium post is really useful to get started with that
Wes
Wes
10:17
does anyone know a text to speech thingy for mobile chrome? :B
@Wes It's in by default?
Oct 22 at 19:21, by PeeHaa
var messages = document.querySelectorAll('.message');

for (var i = 0; i < messages.length; i++) {
    if (i > 5) break;
    speechSynthesis.speak(new SpeechSynthesisUtterance(messages[i].textContent));
}
Run that in chat :)
Wes
Wes
:B wow, didn't even know
It's so freaking cool
Wes
Wes
doesn't work :\
Dec 6 at 22:02, by PeeHaa
Mar 5 '15 at 14:12, by Sara
Define "doesn't work", does it sit around on the couch eating Cheetos and asking for more money all day?
10:25
:P
Wes
Wes
i tried to run yours and it worked, i launched it again and... silence
Because it works for me ™
> morning, morning exclamation mark
lol
Wes
Wes
@PeeHaa apparently it fails if the text is too long. need to call .cancel() or it hangs
@Wes Oh :(
10:32
Hello Everybody
I am getting the following error with preg_replace
Warning: preg_replace(): Compilation failed: invalid UTF-8 string at offset 1
with this
$utf8 = array(
'/[áàâãªä]/u' => 'a',
'/[ÁÀÂÃÄ]/u' => 'A',
'/[ÍÌÎÏ]/u' => 'I',
'/[íìîï]/u' => 'i',
'/[éèêë]/u' => 'e',
'/[ÉÈÊË]/u' => 'E',
'/[óòôõºö]/u' => 'o',
'/[ÓÒÔÕÖ]/u' => 'O',
'/[úùûü]/u' => 'u',
'/[ÚÙÛÜ]/u' => 'U',
'/ç/' => 'c',
'/Ç/' => 'C',
'/ñ/' => 'n',
'/Ñ/' => 'N',
'/[\²&~#"\'{(\[|`_\^\)°+=}*;:!§?%’,;]/u' => '', //J'enleve les caracteres speciaux
'/–/' => '-', // UTF-8 hyphen to "normal" hyphen
apparently the error is because of this line
$text =preg_replace(array_keys($utf8), array_values($utf8), $text);

Can someone please help me solve this ?
I don't think manual regex is the best way to go about it
0
A: mySQL - matching latin (english) form input to utf8 (non-English) data

QualcunoA possible solution would be creating another column in the database next to "artist", like "artist_normalized". Here, while populating the table, you could insert a "normalized" version of the string. Search can then be performed against the artist_normalized column. A test code: <?php $transl...

Also you are missing the u modifier for some patterns
@Wes @PeeHaa Thank you very much . I will read right now and get back to you
Wes
Wes
every time my fav tv series get a pause i realize how sad is my life. i'm just gonna watch star trek again for the millionth time tonight...
:(
"tonight"
@Wes BTW what is that fav series?
Wes
Wes
this evening?
oh :P
Wes
Wes
that was meant to be plural. all my fav series-es are on hold
10:52
o//
Wes
Wes
!!? plural of series
Search for "plural of series" (https://www.google.com/search?q=plural+of+series&lr=lang_en)
• Is "series" Plural or Singular? - English Languag… - 12 mei 2014 - Series is both a singular and a plural form. When it has the singular sense of "one s… (http://ell.stackexchange.com/questions/23268/is-series-plural-or-singular)
• grammatical number - What is the proper plural of… - 23 feb. 2012 - The existing question on The possessive and plural forms of “series” suggests the us… (http://english.stackexchange.com/questions/58942/what-is-the-proper-plural-of-a-series)
@Wes Yeah english is weird like that
@Wes @PeeHaa Most solutions are for Php 5.4 or above and i am using php 5.3 because of my customer's server which he does not want to upgrade
Wes
Wes
@JohnMax check iconv with //TRANSLIT
iconv is kinda a dead extension but i think that's your only option
10:58
mornings
how's everyone else?
Wes
Wes
or rather the iconv library is kinda dead
@wes yes i did
setlocale(LC_CTYPE, 'fr_FR');


echo iconv('UTF-8', 'ASCII//TRANSLIT', $string); but it does not remove all special chars
Wes
Wes
\o all bad here, as usual
no, don't do setlocale please. you don't need that
Hello people
Wes
Wes
@JohnMax then have another run with preg_replace that removes anything non-ascii
10:59
@wes that gave me the following Th"are! wouldn't %b'e#"any a's'cl'oz'z'n. OEss L''el`eve % 'a`a^a~aa"a que voici est all'e voir ca. Ils ont d'ecouvert o`u elles avaient cach'ees la Sainte Bible ?!
@wes Ok thanks i will try that
@JohnMax if you have to support a dead PHP version you are probably fucked :)
@PeeHaa Lol
is it just me, or does anyone else thinks her does this just for the sake of publicity: pbs.twimg.com/media/Cz_EVKhVQAAshus.jpg:large
Wes
Wes
*non-letter
Anonymous
@tereško I'm fed up with films portraying aliens as having long necks. It's sexist towards people with long necks
11:05
wanna bet someone somewhere has said that seriously ...
Y'all need to catch up with advent of code
what is the best way to increase 1 in one value in database? in the query is posible?
UPDATE Bar SET foo = foo + 1;
Anonymous
mornin dave
11:12
mornig random
11:23
the problem is a loop and is all the time at 1
is a loop
need to increment 1
all the time is in that page
user7172542
Has anyone got a clue as to why I am getting a 404 error on Chrome saying that the page I am currently on is Not Found lol?
Anonymous
@Dan how would anyone here know (with that information) why you're getting that error :P ?
Anonymous
if it's your own page, check your error logs
user7172542
@JayIsTooCommon I was wondering if it was a Chrome error lol, it's obviously a page that is found as I'm browsing it... :p
Anonymous
So if you're browsing the page, where is it telling you that it's not found ?
user7172542
11:28
Yep... Lol.
http://stackoverflow.com/questions/41220926/want-to-convert-a-string‌​-into-array
user7172542
Prevents the page from passing HTML validation because apparently it has HTTP resources which are not retrievable. Apparently. Lol.
Anonymous
@PeeHaa hats come with rep ?
nope
@JayIsTooCommon No, but it makes people repwhore to get hats
Anonymous
11:32
oic
instagram.fbom2-1.fna.fbcdn.net/t51.2885-15/e15/… me as Santa... ready for chrismtas
4
@Linus lol! You are one shady santa :P
:-P
@Wes there's also code together :D
Wes
Wes
11:46
:D
youtube.com/watch?v=vYL2grv_muU also call me sysadmin
@WyriHaximus These days are log gone for me :-)
@bwoebi O(log n)?
@PeeHaa O(log typo)
11:56
anyone convert from live video URL to m3u8 format?
#9 is pretty disturbing :P
12:12
@bwoebi I'm not supposed to have this issue with the DIC in this project :X
@WyriHaximus Optional dependencies defaulting to a factory?
@kelunik yes, but the factory is called twice for some reason, digging into the reason why that happens
@WyriHaximus Did you set it up to share the loop?
@kelunik yes, even better, that is the default behavior for this container. Heck this has been running for months so not entirely sure why it is failing now
@WyriHaximus Do you have it online somewhere?
12:28
Nope sorry, I'll go and have lunch first before continuing :)
Anonymous
!!wotd
cordate: heart-shaped.
13:11
@Wes maybe you know: does that private packagist is available in a self-hosed version too?
@tereško I highly doubt it
You are probably stuck with that satis thing
14:01
@tereško Not yet, but in the future.
Anyone familiar with Homestead/Laravel?
enough to know that avoiding it is the best option
Enough to answer some questions?
Anonymous
@JamesSnowy If you can generalise your issue to PHP, someone may be able to help you but you won't get much help here with a Laravel-specific question
@JayIsTooCommon Alright. I just have a question about the Homestead.yaml directory function, how it works.
14:06
-_- msginit says "A translation team for your language does not exist yet." ...but it does. I already hate i18n
Like, I have generated a VM up and running that generated a Homestead.yaml file per automatic, which makes this whole thing work.
However, I'm not sure how the directories work, as they link to somewhere the input file isn't.
Yet, it somehow works.
Hi all :-)
Ok, I have one English question, which one is correct?
- Hi to all
- Hi all
Evenings
\o/ my hat!
Anonymous
@Shafizadeh Both are 'correct' however "Hi all" is what you would put in writing. In conversation, you wouldn't say either.
@JayIsTooCommon I see, thx :-)
R.P
R.P
14:21
Hi guys, there was an article or newsletter about PHP 7 coming as default version from package management (like Ubuntu has now). Does anyone know what article I am referring to and can give link? :)
@JayIsTooCommon And can you please tell me what should I say (in conversation) when I join to a couple of people?
"Hello everybody" is fine?
!!? nick riviera
Search for "nick riviera" (https://www.google.com/search?q=nick+riviera&lr=lang_en)
• Dr. Nick - Wikipedia - Dr. Nicholas Riviera is a recurring fictional character in the American animated sitcom The Simpson… (https://en.wikipedia.org/wiki/Dr._Nick)
• Nick Riviera | Simpsons Wiki | Fandom powered by… - Dr. Nicholas Riviera M.D. is a quack physician who studied at dubious medical schools, although… (http://simpsons.wikia.com/wiki/Nick_Riviera)
• The Simpsons - Dr. Nick - YouTube - The Simpsons - Dr. Nick. Мария Зайцева. SubscribeSubscribed … The Simspons-Hi Dr.Nick! / Neglected… (https://ww
Anonymous
@Shafizadeh "Hello everybody" is ok but isn't very natural. "Hi guys" "Morning/Afternoon/Evening" or just "hello" will do (you don't always have to give a target to your greeting) :)
Anonymous
oh and if you're really cool "wassup home dogs"
14:25
@JayIsTooCommon ah ok :-)
wait wut... msginit now works okay o.O
@Ekin what's "msginit"
?
it's a gettext utility
Oh .. I've searched about it .. got it anyway :-)
Wes
Wes
what's "gettext"?
One English question. Which one is more older?
- I searched
- I've searched
Wes
Wes
:B
@Aladdin damn you look ugly
so this hats thing is happening again. okay
@Wes oh... okay ....
huh. How come I see hats? I told them I hate hats
ah refreshing helps
@Danack how's the new project?
You got a better job yet?
@PeeHaa I think "hating hats" doesn't stop showing hats to you, it just makes you unable to choose one :-)
Anonymous
14:37
@Shafizadeh Both the same in terms of tense. "I've searched" just means "I have searched"
@Shafizadeh No. It removes them
@JayIsTooCommon Ah I see ..
@PeeHaa Really?! Sounds cool. Also I believe SO has been implemented by a great ACL ..! I'm actually impressed
I don't think access control lists write actual code
Anonymous
@PeeHaa I'm crippled atm so i'll do Jeevesy stuff - You around all week or running away somewhere?
@PeeHaa anyway it is good .. I like SO's policies :-)
14:42
All week? Dunno. Ping me :P I don't plan things
Anonymous
I'm gonna push it Christmas Day so that people feel sorry for me
@JayIsTooCommon Are you actually crippled?
@JayIsTooCommon lol
Anonymous
yes, it feels like my back is in two separate pieces currently
Your back? You're only 14... Didn't realize kids that young als have back problems
Anonymous
I did it while playing football if that makes me sound cooler ?
14:44
Not really. Sounds pretty lame. Now if it was rugby...
Nobody craps up their back with football
yeah… you only crack your back if you're too nerdy
Anonymous
@PeeHaa Wrestling in the mud with muscular men in tight shorts, hmm sounds like your kinda thing
I am more a turkish wrestling kind of guy
Anonymous
lol
lol
14:46
Nothing like oiled up men cuddling each other
Anonymous
They have to oil each other up in that, right ?
yall suck
@JayIsTooCommon :D
Anonymous
@littlepootis rude.
what hats?
oh, fuck, not that bullshit again
6
14:49
Hats? We don't need no stinkin' hats
Anonymous
Looks like the serializer rfc is a no go
those SO hats were cut the first time ... for about 2 hours ... and then the chat got filled with "give me stars plz"
5 hours ago, by PeeHaa
> starred chat, ±12h from Jan 1, 0:00 UTC
@JayIsTooCommon seems like it got r11jected
@Linus were you going for Grinch cosplay there?
you look green-ish
14:54
:P it's photoshoped
I noticed ... more like "paintshopped" though
Anonymous
@Linus what!?
Anonymous
@Ekin You know they don't care when the likes of Pieter get voting privileges
heh
Anonymous
14:58
I know, I was being sarcastic :)
:P i am to dumb to understand

« first day (2256 days earlier)      last day (2920 days later) »