« first day (878 days earlier)      last day (4284 days later) » 

12:01 AM
@igorw That's kind of a semantic argument, but what I'm talking about I personally wouldn't regard as tunnelling because it wouldn't really share anything with HTTP other than a port number. But I do see where you are coming from with that point of view.
with just enough alcohol, comes the ability to refactor a convoluted 2k line script into 40 with a neat loop
which is why i have such a difficult time understanding things like versioning and naming conventions. too much liberal arts in my background
@dyelawn OK well I don't really follow that but no worries :-) If I were going to call it one or the other I would call it server-side, but it doesn't need to be limited to that classification.
kudos @Hiroto
Right, damn you people, I am going to do some god damn work this evening. I am. Honest.
12:05 AM
@Hiroto how much is just enough?
as much as you have access to
@Hiroto see, for me, that more often results in "shameful behavior, and perhaps urination on one's self" than "drastically more efficient code"
preferably much more than that, so you can get over the horror of looking at said code in the first place
libxml is cool: parsing a 90 MB xml file takes only 29 MB of memory
@DaveRandom are you suggesting giving nginx a protocol detection engine and proxying non-HTTP protocols to other daemons?
I mean in theory you could do this without tunnelling through HTTP at all.
12:07 AM
nginx is ivan the holyshitomgwtfbbqthatwasafastdelivery pizza guy
nginx is just sad for not following the HTTP specs.
the chef is still fat and sluggish, though
(whatever you run as a cgi ;_;)
@igorw That's what I'm saying. I admit the use cases aren't immediately apparent off the top of my head, but it would be a great toy and it could really open up the possibilities for a sane way to run userland socket-based server applications in real-world hosting environments.
@DaveRandom just read that again, doesn't really make any sense in context. trying to say that my background and academic experience in english and anthropology makes pragmatic classification of a language based on its present purpose very difficult. bc it's what i read first and foremost, javascript is intrinsically "client side" to me.
> Dear Mr Mackie, sometimes my parents hit me, and you are gay
12:10 AM
wait what
student of yours?
additionally, now have four empty beers, so that likely made even less sense
> © Intarmationel petants pandieg All imitetians will be prasecutad
oh jesus @DaveRandom I want to slap you for that. ;_;
MY OCD.
@dyelawn It is intrinsically client side to most people I think, and it will probably remain so forever. It doesn't have to be though, just try and abstract the language from the from the application ;-)
so... my imitations are good, then?
that looks google translated from russian, to chinese, to welsh, to french, back to welsh, and then into english
12:13 AM
@Hiroto i was trying to figure out how it could have happened
maybe a pixelly image of a copyright statement?
Holy crap @Shog9 is here, quick everyone, look busy
2
is that an important person?
Hide the booze
PHP always looks busy. It's all those dollar signs.
6
@dyelawn of course not, that diamond is just your imagination
12:15 AM
because his avatar kind of looks like vanilla ice
print $money;
set-smashing vanilla ice, not "T-U-R-T-L-E power" vanilla ice.
Nothing to see here, please disperse, nothing to see here...
ok, another real question/topic. do you write your interface classes before or after your "used" classes?
@webarto You've been quiet over the last week or two, don't tell me some bugger's given you work to do again...
12:19 AM
@DaveRandom I'm fucking productive.
4
@webarto LIAR!
...and what does productive think about this?
6
Chasing contractors for apartment remodeling.
Nah, I'm useless.
You heard it here first folks, useless is fucking productive.
2
12:21 AM
peace be upon you
This was the biggest dilemma I had this month, lighter tiles or darker.
am i understanding incorrectly, or is an "interface" kind of like an outline for a thing to do something else
@webarto Why do your tiles have error messages on?
@dyelawn Interface is like, you better f* implement it or I'll throw fatal errors.
@DaveRandom E_TOO_EXPENSIVE
12:23 AM
tiles are a f* ripoff
interfaces? pfft, throwing stuff at a wall is more relaxing
I work entire day for 1m^2 of tiles...
I know, and way too easy to break as well
Especially if you throw things at wall...
so if i have a model that i want to use a bunch of providers for, how should i go about doing that?
12:24 AM
how to make this replace more than 2 to 2 ?
$txt = preg_replace("/[\r\n]+/", "\n", $txt);
i thought an interface might be a good idea
Better than throwing stuff inter faces
2
ba dum tsch
ladies and gentlemen, @daverandom is on fire
@AhmedSabry That should work
12:25 AM
$txt = preg_replace("/[\r\n]{2,}/is", "\n\n", $txt);
sorry meant replace ( more than 2 br ) to 2 br
@AhmedSabry
@webarto lol
@AhmedSabry You mean <br> HTML tags or actual line breaks
Wait, what...
\n !== <br>
@AhmedSabry: /(\r?\n){2,}/
12:27 AM
php -r "echo levenshtein('new line', 'break row');"
8
not even close
@kaᵠ ahh that, I totally misread the question :S
this what i mean

$text = "hi \n\n\n every body";

to

$text = "hi \n\n every body";
@webarto you din't need /i or /s mods for that
sorry for my bad english
@AhmedSabry See @kaᵠ's answer, that's what you need
12:28 AM
@kaᵠ I didn't need to answer, either :P
@kaᵠ I assumed that was a troll
for serious, though. say, hypothetically i've been tasked with integrating calendars/events from five different providers into one app; is an interface not the right tool at that point? to establish requirements for things like, getEvents(), createEvent(), etc.
@DaveRandom doesn't work :(
Congratulations, you are the 1.000.000th visitor to say "doesn't work"!
6
12:29 AM
!!!!!!!!!!!!!!!!!!!!!!!!!!! ROFL
Congratulations, you are the 1.000.000th visitor to say ":D"!
congrats
@dyelawn The interface is the thing that the one presents. The five would translate their individual services down to the single interface, so that anything that uses you library doesn't have to care about which one of the five is providing the data
@webarto for a second i thought spam bots have entered this chatroom
any solution, plz ??
12:31 AM
@DaveRandom right. so is that a valid implementation of an interface?
@AhmedSabry Please define "doesn't work"
(as in, what does it do instead)
@dyelawn an interface is a contract, it defines what is to be done. it doesn't define how. if your calendar importer has data multiple data sources, then fetchEvents could be a method on the EventDataSource or EventProvider interface.
@kaᵠ Invasions do happen, it's amazing, influx, suddenly.
@dyelawn Yes, I would say so.
@igorw sweet, i think i got it then
12:32 AM
@AhmedSabry: here are your codez sir: ` $txt = preg_replace("/(\r?\n){2,}/", "\n\n", $txt);`
If I'm sending things through AJAX as POST, how do I view that POST data in PHP? Do I need to simulate a form post?
@kaᵠ you are the sir, thanks alot :)))))
I am a bad programmer :D
@Howdy_McGee what?
:/ im not even sure how to explain
i concur
12:37 AM
Mr Gee
Mc Gee
@Howdy_McGee slow down a minute, and explain what you're trying to accomplish. then give me some of your points
@webarto nsfw plz
I have an object I created in JS (not HTML Form Post) but I'm sending it to my PHP Page as a POST. I'm not sure how to debug it though since I can't see my POSTed data
@Howdy_McGee Is your question "how do I get at the raw body data from an HTTP POST request"? Because if so, the answer is file_get_contents('php://input'); unless the content type of the request is multipart/form-data in which case you have to use $_POST, $_FILES etc
@Howdy_McGee assuming you are using jquery .ajax()?
.post()
12:43 AM
> Heh heh heh. You're probably wondering why your ice cream ran away. Well Susie, the culprit isn't foreigners. It's global warming!
@Howdy_McGee is your .post() firing?
what is the response code from the server?
are you using a callback to handle errors?
well I know my .post() is firing and sending the data, but idk my problem is I want to view the data in PHP - but I need to simulate a POST or something so I can view the data
@Howdy_McGee what do you mean "view" the data in php?
like a var_dump
yes like var_dump
12:45 AM
but the only thing I can think of to simulate a post is to create an html form
@Howdy_McGee what is the response code coming back from your ajax call (or pseudo ajax call)?
actually, before we get there, what are you expecting the server to return?
@Howdy_McGee Just console.log() the response body. Or go get something like Poster, pretty much the only thing I ever use FF for
well I mean I need to do alot of stuff to the object in PHP, but if I can't echo things out or print things or var_dump things then it makes debugging difficult
since I'm not using a form, the POST data is always null, it's all being called from ajax
@Howdy_McGee you can var_dump
unless I need both windows up so the ajax posts to the PHP page or something
12:50 AM
in your php script, var_dump($theThing); and in your .post() success callback, .append() your data to something
@Howdy_McGee whoa whoa whoa
that is not a thing that will ever happen. one step at a time. send the object to the server (the php script). echo it back. use a success callback to put that data in an element somewhere on your page.
see that's what I mean, even though I'm sending the object - I can't debug it in PHP because i"m not sure if I'm manipulating it right or storing it correctly etc because I can't view the data and such. I'm unsure how people debug this kind of stuff when they can't actually view it. Though I guess that's the point of POST is so people can't see it.
@Howdy_McGee wrong guess
@Howdy_McGee you should do what @daverandom said and console.log() some stuff to see what you data looks like at various points in your operation.
12:59 AM
Yay random pings
sorry
I'll never really know what's happening on the PHP side. I'll only know something went wrong on the PHP side :/
@Howdy_McGee hmmm...
@dyelawn :D
@Howdy_McGee how do you not know what's happening on the PHP side? are you POSTing this data to some third-party service?
btw, you have about four minutes for me to help you figure this out, bc i'm out of beer and cigarettes. and you should know that i'm not good at explaining things.
1:03 AM
lol me neither no worries
it's a "simple" problem that I just can't wrap my head around for some reason
so, are you submitting to a php script that you wrote?
yes
and I'm just var_dumping my post
the problem is when I view "page.php" my var_dump is always NULL since I'm posting through JS and not some kind of form
so my JS needs to run in order to POST data
@Howdy_McGee it really helped me to get a piece of paper, then draw boxes for locations (e.g. client browser, server), and then draw arrows for each step in the process between them
from my understanding of it anyway
ok, well if you look here: api.jquery.com/jQuery.post you'll see a success callback
you can use that to see your var_dump
1:07 AM
oh man
you're right that's it, I need to echo out var_dump so that it returns back to my page
@Howdy_McGee no, you don't need to echo
var_dump will put the data in the response
you need to take that response and put it somewhere on your page.
well I mean, by echoing it out it will return back to my success call
or, more crudely, alert() it
yeah
I think maybe the server im on is suppressing php errors
you can google that
user895378
1:11 AM
but regardless of whether or not the server is suppressing php errors, your response object should contain a response code
and if there is an error, it will not be 200
@Howdy_McGee error_reporting(~0); ini_set('display_errors', 1);
for you, i highly recommend the diagramming on paper approach i stated above. draw it up. try to write a named function in js or php for each arrow. put a check mark on each arrow that you've successfully completed. DO NOT touch the code that successfully completes those arrows.
for me, i highly recommend more alcohol and nicotine.
good night phpeople
lol cya
thanks again
2:03 AM
hi, any one feel like helping?
0
Q: Respect validation multiple custom error messages

PetahHow do I have multiple custom errors messages with Respect Validation. I have some input that I want to validate against multiple validators. And I want a custom error message for each validation. This is what I tried: try { Respect\Validation\Validator::create() ->key('foo', ...

2:16 AM
peace be upon you
is there any problem to store long json into the session? i don't want store it in db as i make slow with storing and reading ?
2:28 AM
@AhmedSabry why do you wanna store it at all?
anyone here work with wordpress mu ??
anyone have an idea how I can use the normal wp admin instead of the wpmu user admin not the network admin but the user. How can I make it so each one makes its own wp-content file?
@andho ??
someone.... help me......
3:09 AM
@DaveRandom I guess that's why it's an interesting problem ;-)
hiya @Jack
3:26 AM
@Lusitanian ola!
@Jack how's it going?
@NickFury interesting --- when it's in public beta i'll have to check it out
it's a very cool subject
I agree
@Lusitanian Not too shabby, spent half an hour having my coffee on a terrace, in the shade =D
4:15 AM
Blah, SQL rooms are always dead.
Anyone have any idea why, in MSSQL, a recursive function would work, but creating a calculated column with implied recursion (same function modified; passes an argument that uses the calculated column of another row) would blow the recursion max?
There isn't any cycle happening; I've checked for that thoroughly; besides, the truly recursive function form would fail in that case anyway.
Anyone got any advice on choosing a PHP framework to learn with a view to regularly using? Laravel v Symfony2 seems my final two. Any advice?
4:51 AM
Hello everyone!
5:08 AM
Guys
wrong room
5:38 AM
@Jack @DaveRandom @all Hey, I get this error --> Fatal error: Cannot redeclare class phpmailerException Have seen 2-3 questions on this, but that answers didn't solve my problem. It is advised to use require_once but no luck in my case. Can some one please help me circumvent this error?
 
1 hour later…
7:00 AM
One of the reasons I have a 3k+ rep is that I do not mark questions as duplicates, nor vote them down @Jack :p — hd1 25 secs ago
what the ...
Hello everyone
@Appu that is not the whole error
@Jack I have a doc file that contains multiple pages and I want to read single page at a time. Any idea how to read single page ??
7:03 AM
you give the whole error and nothing but the error
okay you gave give more than the error, but give the whole error
@Jack you answer your way, I'll answer mine. — hd1 56 secs ago
There's just no reasoning with that lol
@Nutan A single page of a .doc? As in Word format?
@Jack Yes
@tereško Interesting, same fella
7:09 AM
@Jack Pls help me :)
@Nutan Dude, I don't dissect Word documents with PHP :)
Ok, you have any idea of reading single page from .txt file ??
@Nutan .txt file doesn't have pages
7:12 AM
find some library that helps with reading .doc files. Or read documentation on the .doc format and try to figure out how
Im completely new to mysql so be kind =). Do i need to create a admin user or is there a default one?
@Sebastian It should come with a root user.
@Gordon Im bulding a very basic cms for news articles. I already created the database now i need to be able to login (admin) through the website do i use the root user or do i create one with admin rights.
@Sebastian definitely a new one. the mysql default root user should only be used for direct maintenance. you cms root user should only have the privileges required to fulfill the tasks in the cms.
@Gordon thank you
@Gordon In the Add user host field. What value should i put? Anyhost or local
7:38 AM
@Gordon Re stackoverflow.com/a/15355074/1338292, the answer is basically a copy from another ... flag it or ... ?
@Jack i did
@Sebastian the host from which you access the db. that is, if the db is on the host than the application, then its localhost
@Gordon Ok got it. Thanks again
@Sebastian np
@Gordon your welcome. it's like dream I have just voted you 3 days before and now you are talking with me here. amazing profile you have :) — Sumit Bijvani 6 mins ago
@Gordon You have a fan! ^^ :)
@Jack yeah, tbh i find it mildly embarrassing :)
i mean, the way he puts it it sounds like i am some sort of deity that descended from heaven to talk to the mortals.
7:44 AM
@Gordon I'd say, soak it up while you can ... the other comments will be more like "why did Gordon close my question?!?!" lol
Are you saying that you're a mere mortal? gasp
@Jack no, no.. its just embarrassing to have the truth revealed :P
@Gordon Ah, I understand :)
@Jack ;)
that reminds me of Ghostbusters
Hmm, I'd have to admit that my one-liner knowledge of Ghostbusters stops at "there is no dana, only zuul"
7:47 AM
Hmm, who was first with that lightning from the fingers move.
@Jack yeah, she's probably a relative of the Emperor ;)
It all makes sense now.
What's up with the three speeds btw?
Damn that slow-motion speed .. now I'm reading an article in slow-motion :(
hehe, my last tweet made someone unfollow me
anyone know a tool that tells me who unfollows me?
8:02 AM
@Gordon Why? So that you can zap them with lightning from your fingers? ;-)
@Gordon interesting idea
It could be intentionally done, so that the only way to know is by keeping track of who follows you and a periodic check to see who is still on board.
@Jack just out of curiosity. the major part of my followers is developers, but i also got agile coaches and people from other industries in there. and i am trying to deduce what tweets cause who to unfollow
I guess it's an interesting fact to know .. just like knowing who downvotes your answer =D
Interesting, it's a paid service? :)
Oh wait, no, it still fits in free
And it works until you unfollow Arjen haha
i used to keep all the you got a new follower on twitter emails exactly for this purpose but since I never got around to actually using them to track followers i deleted them two weeks ago
8:13 AM
I wonder how long it will take until Twitter is finally not cool anymore. -.-
@TillHelgeHelwig it already is. people are leaving for app.net and pheed.com
@Gordon Really? I see it mentioned everywhere...and everybody has a link to his Twitter page somewhere in his profile/on his page/whatever.
@TillHelgeHelwig yeah, im just stating what the media claims. actually, I dont see it happening either
but if everybody says so it must be true ;D
I never really got the point of Twitter...it's so noisy. And limiting messages to 160 characters or something? What the hell? Is this the 21st century? And the way people have discussions on Twitter...where one side of it is on one page and the other side on a different one...so weird.
I would understand it, if it had replaced RSS, which was never really a good source of information for the majority of people...but most Twitter accounts are way too noisy.
@TillHelgeHelwig twitter killed my rss reading
8:19 AM
@Gordon I haven't been reading RSS feeds either for quite a while now. Problem ist that at some point you will end up having the same information source available on multiple channels (Twitter, Google+, RSS, ...) and it gets very annoying.
@TillHelgeHelwig i didnt understand why people would use twitter before I used it either. i'd tell my friends they are nuts for the same reasons you give. they asked me to try it for one week. i did and was hooked after one day already.
but yes, twitter is extremely noisy if you follow the wrong people
Hi everyone, I just have change "faveicon" for my blog at mostafa.info, this icon is hosted on Blogger witch is filtered in my country, so I can't check weather it is changed or not. Will anybody check that for me? thanks
@TillHelgeHelwig if you use it like a friend network you'll likely end up with a lot of noise. this one of the reasons why i am selective with who i follow. even if they are friends
@Gordon I have a Twitter account...and I used it for a while...but somehow I never got the hang of it. I don't like to wildly throw out messages in the hopes that somebody might want to read them. It's a weird concept somehow.
And the way people start shortening everything because of the limited message length...so odd.
@TillHelgeHelwig it certainly teaches you to write in a very condensed style. my rule of thumb is, if I cannot express it in a tweet its not tweet material
@TillHelgeHelwig i try to limit my tweeting to what might be relevant for my followers though
that is, I try to tweet dev and agile links and information
8:25 AM
i do put any blog post i do on twitter. With appropriate hashtags it's good for reach. And same goes for getting info about other stuff. I get things that i won't get from an RSS feed
@andho definitely
@Gordon I always spend a lot of time thinking about whether something might be interesting to others. Most of the entries I write to be posted on Google+ or formerly my blog tend to get deleted, because I start doubting that anyone would find it useful. ;)
i've never gotten used to "lists" but that would also reduce the noise
@andho So Twitter is basically RSS 2.0. It would be ok if people used it this way. But most don't.
@TillHelgeHelwig don't follow them ;)
don't follow me ;)
8:28 AM
@andho yeah, lists didnt work for me either
It seems so odd to me when you open up a Twitter page and most of what you see are discussions where the comments of the other one are missing...
i think the selling point for twitter was SMS msging
@TillHelgeHelwig since RSS 2.0 is a spec you might want to call it RSS Reloaded ;)
@Gordon I knew something like this would come up the moment I sent the message. :D
you can send 1 sms to twitter, twitter sends the same msg by sms to everyone mentioned in the tweet
8:29 AM
I use Twitter for professional stuff. I use FB for nonsense. And G+ for nothing
I use G+. Period. ;)
I use G+ to follow Linus
@TillHelgeHelwig i find the interface so convoluted. its nice on a tablet but on a desktop it sucks
@Gordon It's simple and effective in my opinion. There are some things that could be done better (like exposing configuration options), but overall it feels very smooth to me. I use mainly the keyboard to browse entries though.
@TillHelgeHelwig i agree. I find the UI very intuitive
8:34 AM
The only issue I have with any of these "social networks" is that they don't really support seperating business from free time activities. Sure...you can limit your posts on G+ to the people relevant to the content.
I wish there where some kind of "subfeeds" or something. So I could sign up for all professional posts of someone, but not his lolcat posts.
And I wish I could categorize my posts the same way. I don't want to bother other programmers with my movie reviews...and I don't want to bother my friends with my programming discoveries either.
morning
Whats the best way to remove all "o" and "0" from a string - i want to remove all of thoose for better readable
@PeeHaa Mornings :)
@Jacta str_replace() probably?
@Jacta What's the best way t remve all "" and "" frm a string - i want t remve all f thse fr better readable?
@andho I don't understand what you're asking ... =p
8:38 AM
I want to remove "o" and "0" from a string?
@andho Don't question the intentions. ;) Assume they are good and move on. Don't risk the ensuing headache. ;)
haha
@TillHelgeHelwig prolly yes - if not regex
@Jacta And what prevents you from doing exactly that by using str_replace()?
@TillHelgeHelwig nothing, I was just asking?
8:40 AM
I see....no I don't, but never mind.
@Jack give the guy a chance :)
@andho imo it's better to start over.
who answers a question with -13?
oh yeah
unless of course you think that you can get 10 upvotes =D
8:47 AM
Check his comment
Thats immature behaviour :p
haha
@TillHelgeHelwig i consequently hide all people posting business relevant stuff on fb. that works for me. my fb is really just fun and nonsense. and im strict about posting non business stuff there myself.
@Gordon Using two different applications just to separate content...I guess that's a solution, but definitely not the best one.
0
A: Struggling with regex PHP?

Farhan Dharsii have Regular Expressions Cheat Sheet EBook so there is a lot of Regular Expressions for every programming languages.so i have selected some Regular Expressions for you. i hope these will solve your problem. Pattern Will Match ([A-Za-z0-9-]+) ...

^^ that's ehm, interesting :)
Google "xpath syntax". First two hits: w3schools, third hit, M$ ...

« first day (878 days earlier)      last day (4284 days later) »