« first day (2138 days earlier)      last day (2814 days later) » 

9:00 AM
@brzuchal Docs are not inconsistent. return types are ;-)
 
@SergeyTelshevsky on the command line you can use ibm.com/developerworks/library/x-starlet/index.html
 
@PeeHaa Yes, I agree, but is it possible to fix it?
 
!!wotd
 
venial: able to be forgiven or pardoned; not seriously wrong, as a sin.
 
@brzuchal Dunno. I don't see what needs to be fixed tbh
 
9:02 AM
That's a crap wotd @Jeeves, we can't put it in a sentence easily with @PeeHaa's mom
 
@SergeyTelshevsky do you know xslt? if so then use saxon
 
@Jimbo :P
 
I do not understand text encoding, like, at all
 
It's not you
 
@DaveRandom it's a bunch of random-ass bytes that may or may not mean anything at all - what's not to understand?
 
9:04 AM
@PeeHaa I mean moving return types in the docs after function declaration.
 
Why?
There is nothing to gain there imo
 
So it could be in the same position as in language syntax
 
Why?
 
The data from that query contains standalone 0xB7 bytes. That is not a valid UTF-8 sequence. Yet the page has <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> in it, and a browser understands it, and my text editor understands it
 
well, ok I give up
 
9:05 AM
and Jeeves mangles one of them but not the other
 
Thanks! Responsed, let's see.
 
srsly, how are mere mortals supposed to deal with this crap?
 
@DaveRandom Since you asked
:P
@kelunik BTW does the client really need stdout?
 
I suspect libxml is doing something funky actually, since that's what see's the data first
 
@DaveRandom Just parse it with regex like a man...
 
9:09 AM
@PeeHaa /me readies atomic bomb
 
It genuinely might be a better option here :-(
 
BTW opening issues on the blog instead of github is kinda annoying so you may want to direct OP @kelunik
 
@DaveRandom what does it look like before you feed it to libxml?
 
It's so much easier to follow up on there
 
7 mins ago, by DaveRandom
The data from that query contains standalone 0xB7 bytes. That is not a valid UTF-8 sequence. Yet the page has <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> in it, and a browser understands it, and my text editor understands it
i.e. broken
 
9:13 AM
so why do you think libxml is doing something funky?
 
it's really, really weird and I don't understand how it works in a browser
8 mins ago, by DaveRandom
and Jeeves mangles one of them but not the other
I don't get why that is
they are the exact same byte sequence, and a browser and my editor display them as the same code point (as if it were actually a 0xC2 0xB7 sequence)
but the 0xC2 is not there in the binary data we recieve
 
if you can give me a mcve inc. data I'll have a look.. I have no bot account, no way to deal with jeeves
 
Mornen
 
$data = file_get_contents('https://www.google.com/search?q=cydia+protocol&lr=lang_en');
for ($i = 0, $l = strlen($data); $i < $l; $i++) {
  if (ord($data[$i]) > 127) {
    echo dechex(ord($data[$i])) . "\n";
  }
}
@PaulCrovella ^ reproduces essentially what @Jeeves is doing
The loop I did just to sanity check to myself the tha 0xC2 is really not there
 
You're doing a lot of Jeeves work this week :P
 
9:20 AM
happy Birthday @Ocramius
 
@Fabor I have a lot of real work that I am avoiding
 
heh
 
:P
 
Thanks for the birthday wishes, you band of terrible people!
8
 
@Ocramius you are welcome
 
9:26 AM
lol
 
@Ocramius Morning. And happy birthday!
Have some cake.
 
I well want that cake
 
As a birthday present, I wish that you delete at least one `else` statement, replacing it with a private function/method or early return.
 
happy birthday @Ocramius :)
 
morning everyones
and my condolences to @Ocramius
 
9:30 AM
@tereško He's had multiple condolences this morning, poor lad
 
@tereško no worries, I still got enough years to cut myself
(hopefully)
 
mornin tereško
 
hello ppl
 
@tereško morgen
 
1

codeignitor (topic request)

requested by user853278 34
waaaaaaaaaah
 
Ekn
9:37 AM
lol
 
they cant even spell it. imbeciles
 
@Gordon quick, dismiss before it catches fire!
 
I am tempted to accept it and put an example on how to spell it properly
 
@Gordon lol
 
i was surfing on the internet, trying to find the best way of sanitize data , and i came across few awesome answers,but i've seen they are a bit old and there are so many opinions about it and i'm somehow confused .... if you can enlight me,would be great
 
9:38 AM
Burn it
 
@Gordon cakeignitor.js
 
@Gordon must be someone trolling
 
@Ocramius $ocramius->yearsToLive--;
 
@Gordon there is also
3

MVC (topic request)

How to implement MVC in PHP
requested by Mehdi Bagheri 31
 
@tereško dismissed
anyone remember that lame MTV show… Dismissed.
 
9:40 AM
is it enough to use filter var with the proper flags so i can sanitize the user input or should i add some other build-in func ? like trim and so on?
 
@PetruLebada how much you sanitize user input depends on how it is used afterwards
 
@Ocramius Now you're looking like this: i.imgur.com/OVZhiWj.png … right? [straight off reddits front page, I'm guilty :-P]
 
most of what you would refer to as "sanitizing" is actually part of domain logic
 
More like:
 
Hi All
i'm new to PHP
 
9:42 AM
@tereško well , let's say i'll store it in a database
 
@PetruLebada are you using prepared statements?
 
@GurumoorthyArumugam our condolences
 
C'mon people delv it already... stackoverflow.com/q/39019412/508666
 
Anonymous
@PeeHaa upvoted.
 
@tereško should i even use filter var? or is it better to create my own function to clear the unwanted special chars ?
 
9:43 AM
@Ocramius LOL
 
@Gordon LOL
 
@tereško yes,i'm using pdo prepare-bind-exec
 
may i know how get the textview text in button click
 
@JayIsTooCommon durrrrrr
 
@PetruLebada You might as well add it as a basic check to make sure the input is at least an attempt at the correct type, then add on your own validation later. You might catch something early with filter_var but it is by no means a comprehensive validation check
 
9:44 AM
here is my code
how i created textview
 
@Ocramius start here :P
 
Anonymous
@Jimbo He's talking about sanitizing
 
@PetruLebada in that case there is nothing you need to add. All other manipulations are purely domain logic.
 
@Jimbo alright so the best way to do this is to create my own sanitize function and include every security logic i know rather than using filter var plus some other built in func ?
 
@Ocramius any idea on my question ?
 
9:47 AM
@PetruLebada that totally depends on what you are sanitizing
 
@GurumoorthyArumugam I don't see a question
 
China VISA sorted :). That's the last official thing done. Everything else is a non-necessity.
 
3 mins ago, by Gurumoorthy Arumugam
may i know how get the textview text in button click
 
@Gordon speaking in general terms , but at moment i'm trying to secure some storing procedures
 
@Gordon good point, but I'm busy with scratching my belly and playing Zelda on the DS
send a pr?
:D
@GurumoorthyArumugam can you rephrase?
 
9:50 AM
@Ocramius pastie.org/10939068 here my code i want to get a text of those fields when click button
 
A stored procedure (also termed proc, storp, sproc, StoPro, StoredProc, StoreProc, sp, or SP) is a subroutine available to applications that access a relational database management system (RDMS). Such procedures are stored in the database data dictionary. Typical uses for stored procedures include data-validation (integrated into the database) or access-control mechanisms. Furthermore, stored procedures can consolidate and centralize logic that was originally implemented in applications. Extensive or complex processing that requires execution of several SQL statements is moved into stored procedures...
I am 90% sure this is not what you meant to say
 
@tereško I raise you with another 9%
 
it's early .. I have a lot of "benefit of doubt" to go around
 
@PetruLebada if you want to sanitize input for database params, you want to use prepared statements instead
@Ocramius a working one?
 
@tereško alright,alright i expressed myself wrong , i was talking about storing data
 
9:53 AM
@Gordon dunno, try your worst
 
@Ocramius I am in the office. cannot try my wurst right now
 
@Gordon pffffft. You "employed" people
 
@Gordon i know,i'm already using that , but is that enough?
 
be professionally unemployed, like me.
 
@PetruLebada yes
 
TRS
9:54 AM
in mag , any way to create a page and upload images?
 
@Ocramius cannot afford it yet
 
@Gordon uhmm,alright i'll go on then , thank you @tereško,@Jimbo
 
@Gordon you can live at conferences like I do. Just tell your family that you are going to buy cigarettes.
 
@TRS "mining advisory group" ?
 
@Ocramius I've paused smoking 16 years ago
 
9:57 AM
@Gordon great, thanks, taking a look. yeah, I need some bash utility, not PHP, but currently thinking it's easier to do in PHP in this case
 
@Ocramius Know what's happening with BRNO PHP Conf? No response, haven't heard anything
Is it a real conference?
 
@Gordon why are you so German?!
 
@Ocramius you mean sane?
 
@bwoebi no, I mean German
 
@Ocramius no idea ?
 
9:58 AM
@PaulCrovella that'll be quite a read, thanks
 
@Ocramius that's equivalent -.-
 
@Jimbo Jakub, the organizer, is a bit busy. Try pinging him privately, maybe? The conference is quite good, but they are usually very late
@bwoebi only according to German logic
 
@Ocramius I'm from Luxembourg, fyi…
 
@GurumoorthyArumugam pastie is offline from here
Yeh, you need to be a bit more Italian to get these jokes, I suppose.
 
@Ocramius i'm a indian
 
10:00 AM
want:
 
@SergeyTelshevsky an alternative would be to use XMLReader and (maybe)XMLWriter, but I don't know what all your constraints are
 
can i post those codes here
 
/cc @Gordon
 
@Jimbo you finally got one?
 
FINALLY
It's only been what, 3 years?
 
Ekn
10:02 AM
heh congratz
 
@Jimbo yeah, about right
 
@Jimbo How did you earn that? Isn't that for like 100k+ users or something?
 
Ekn
the fact that I got one disproves that hypothesis I guess.
 
@Oldskool Magic. I went through a few moderators and then director of StackOverflow, mentioned conf speaking etc, so it's publicity for them
@Ekn STORY TOPPER.
 
there is php file which returns json data while eg ex.php which return json data when i type www.domain.com/ex.php json does not appear but when i remove www json data appears on page [firefox]
 
Ekn
10:05 AM
:-P
 
being here is waste of time :P
 
@GurumoorthyArumugam Yep, we don't gain anything from it either
 
TRS
@tereško Magento
 
@Jimbo i can see that
 
10:07 AM
@Jimbo Ah, OK. I figured you hadn't yet passed this limit yet, so that's why I was baffled a little :-)
 
@Oldskool that's the british way of saying he begged and bugged me until someone finally had mercy on him
 
@Gordon Or maybe his mom helped a little here and there, who knows? ;-)
 
366
Q: Jon Skeet Facts

Bill the LizardI'm looking for Chuck Norris Facts style answers. In case anyone is curious, this question was inspired by Jon's own comment to this question. EDIT: If you're into cryptography, you may enjoy these facts. Now with official sanction from the powers that be!

 
@Oldskool you can find the details on my twitter ;)
 
@Gordon LOL
 
10:14 AM
@Gordon :D
Pretty much!
Bloody worked though
 
Hm... didn't libev come with a libevent compatibility wrapper in the past?
 
@m6w6 Thought it was up to the lib to transparently choose either libevent or libev or libuv depending on whats available? Didn't know they interacted...
 
Gordon with the twitter plug
 
I'm so conflicted with questions / posts like these stackoverflow.com/questions/39098399/… - The OP seems to have put some serious effort into the answer but the question is just bad.
 
10:24 AM
Does it keep you up at night? :)
 
And with OP's reply my conflict went straight away, weee.
 
heh
 
Sometimes things just resolve themselves.
 
Like crippling debt.
 
... What?
 
10:26 AM
Jesting
 
Jes
what does this mean when query returns Resource id #4
how to check if the result is empty or now
 
@Fabor If you know a trick to make a crippling debt resolve itself then do share :P
 
You'll need a dead body, some pliers and gasoline.
 
@DaveRandom from what I can tell, libxml's html parser is swapping to latin1 after it passes the first \xb7 .. you can tell it's done on parse if you run an xpath queries like "//*[contains(., ' \xb7')]" and "//*[contains(., ' \xc2\xb7')]" - on a fake data set with multiple elements containing ' \xb7' the former always returns just the first node and the latter the rest
 
@Jimbo I got the same one :-)
 
10:29 AM
@DaveRandom And now I no longer feel special
 
How do hell do you all get swag? :P
 
@PaulCrovella ugh, wtf
@Jimbo order has been restored
 
@PaulCrovella wat
 
@Fabor nice manga by ONE (the author of OPM)
 
@PaulCrovella given that the data is unquestionably wrong (the <meta> specifically declares the page charset to be UTF-8), any suggestions of stuff that could be done about it?
 
Bookmarked @Saitama Cheers
 
@PeeHaa You have to meet @Gordon at a questionable hour in a back alley and if you do exactly as he says you might get one
 
\o/
it's pretty nice
 
back alley is a euphemism.
 
@Jimbo I have other things on my mind if that's the case
 
10:31 AM
@Fabor Multiple back alleys involved
It's quite a maze!
 
There are also balls involved, and a pair of warm socks
One could say it's totes a maze balls
/runs
 
Soooooo, I have my Client ID, list of rooms with the clients inside of them but both clients are still receiving the payload despite my "if (in_array($clientId, $this->clients[$this->roomId]))" :(
 
@DaveRandom I'm still noodling over that. There are obviously things that could be done about it, but I'm not sure of a principled approach yet.
 
@DaveRandom Nah, @Gordon forgets his socks usually
 
one idea is to simply strip invalid bytes
 
10:36 AM
Would I really send to each client individually?
@bwoebi If I get my room IDs onHandshake and then need to see which room the message is from via onData is that the right place to do it or do I need to step back?
If so, where can I get it from?
 
@Fabor well, you'll have to lookup which client maps to which room id… i.e. you return the room id in onHandshake and add the mapping in onOpen then, where you'll have know room id and client id
 
Yup. I have a list of roomIds and clients in them. List
 
so, where's the issue?
now also add the reverse mapping, from client id to room id and you're fine
 
if someone sends a message on onData don't I need to know which room it was from?
 
4 mins ago, by bwoebi
now also add the reverse mapping, from client id to room id and you're fine
 
10:49 AM
@PaulCrovella further investigation suggests that it actually always returns iso-8859-1. Complex code points are done with HTML entities.
So just running the string through iconv before loading it into libxml would be the simple and probably-good-enough solution
accept-encoding doesn't seem to make any difference
 
@Fabor so are both clients inside the $this->clients[$this->roomId]?
 
@DaveRandom do you mean google responds with a ISO-8859-1 encoded body?
 
Thanks @bwoebi :)
@andho It's okay. Working fine now. Just logic silliness on my part.
 
@Fabor ^_^
 
@nikita2206 yes, but with <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> in the head :-P
 
10:55 AM
@Fabor btw, I was curious why you stored the roomId as a property of the object.
 
it may be like that just to fuck with people trying to scrape google, but still I don't understand how a browser displays it correctly
 
@andho How do you mean?
 
@DaveRandom but it also gives me content-type: text/html; charset=UTF-8 http header (it's on google.ru though and I can't make it not redirect me there from .com)
 
@DaveRandom it doesn't actually return that meta tag to my browser
but does spit it out for file_get_contents
 
ahh right
I did wonder if we should pretend to be Chrome or something, but that's actually pretty hard
 
10:58 AM
and also, aren't <meta ...charset= is absolute bullshit and everyone should just rely on http content-type header?
 
@rdlowrey if you're rewriting Artax, can we have browser emulation modes please? kthxbye
 
@DaveRandom no, it'll just give you javascript - no results
 
yeh I thought that might be the case as well
 

« first day (2138 days earlier)      last day (2814 days later) »