« first day (1271 days earlier)      last day (3677 days later) » 

Jon
9:04 AM
@Jack cheers
 
sometimes it's best to just scrap the old code and just redo the whole thing
 
'morning
 
stackoverflow.com/a/22956487/1283847 Edit part especially. /me looks @HamZa, @Jack
 
@Fabien what's your github un?
 
9:21 AM
 
OK cool, just bringing the room-11 membership up to date with the recent room owner additions :-)
 
:) Danka
 
@HamZa I just added you to the Github org so you can commit directly now instead of having to PR
 
@DaveRandom thanks
@Leri isn't \0 and \x0 the same ?
 
@HamZa They both mean "null byte", but one is interpreted at the language level, the other is interpreted by the regex engine
 
9:34 AM
oh missed that ...
 
@AlmaDo: Oi
 
@RajeshVishnani hi
 
1
Q: Fetching data from a MySQL table and inserting into another table

Rajesh VishnaniI am fetching the data from the MySQL table in a while loop, and inserting the form data into another MySQL table in action page in foreach, but I do not get the correct value of the radio button, I am attaching my code, please help. <?php $i = 1; $j = 1; while ($row = mysqli_fetch_array($quest...

can you answer this question?
 
@RajeshVishnani it's answered and accepted
 
9:43 AM
@RajeshVishnani: Looks like it's already answered and you even accepted an answer?
 
i edited the question
 
@RajeshVishnani: No, don't edit the question after it's been answered and accepted. Post a new question instead. You can reference this one if you want.
 
oh i am new to stackoverfow
i edited the question and marked the answer unaccpted
 
@AmalMurali I'm testing. It seems, I'll give an update
 
ok thanks
 
9:45 AM
@AlmaDo: How about we clean up the comments? :P
 
commented where?
 
I think I'll delete my last comment there, yes
 
@RajeshVishnani Read about chameleon questions, it's a pain to deal with as an answerer
 
i dont understand what you say
 
9:47 AM
@RajeshVishnani "tl;dr: I call them "chameleon questions" because they change every time you submit or edit an answer."
 
Hey @HamZa!
 
oh okay
 
@AmalMurali Heya !
 
@AmalMurali Gotta catch 'em all!
 
hehe
 
9:47 AM
@AmalMurali ahahaha
 
@HamZa Great reference question. /me bows down to all the hardwork behind it
 
@AmalMurali thanks, and thanks to all those who helped !
 
@AmalMurali caught it. You've used wrong way :p
 
What? :P
 
hey did someone got a chance to look at my question?
 
9:49 AM
I know it's not the best approach, but it seems to work :P
 
@AmalMurali btw I think you should retract your vote and just edit the title. It's clear ...
 
@HamZa: And why are you assuming I'm the one who downvoted? (I'm not)
 
@AmalMurali I meant retract vote = remove your close vote
 
Ah, done. :)
@HamZa: Please have a look at this answer. Do you think it's flawed in some way?
 
1
Q: Fetching data from a MySQL table and inserting into another table

Rajesh VishnaniI am fetching the data from the MySQL table in a while loop, and inserting the form data into another MySQL table in action page in foreach, but I do not get the correct value of the radio button, I am attaching my code, please help. <?php $i = 1; $j = 1; while ($row = mysqli_fetch_array($quest...

 
9:53 AM
@AmalMurali this:
Using substr_count() for this isn't a good idea. It will produce O(n) complexity while strlen() is always O(1). Sample comparative tests code is here - I've used benchmarking tool to measure time usage. Results are here. And it's obvious - the longer the string - the worse are results with substr_count()Alma Do 10 secs ago
 
@RajeshVishnani: Again, please don't edit questions after it's been answered. That's kind of rude. :)
 
in Ask Ubuntu General Room on The Stack Exchange Network Chat, 1 min ago, by Aditya
Okay, now I would go through http://stackoverflow.com/questions/22937618/reference-what-does-this-regex-mean
 
i know, i wont do it again, for now, i changed to its original status
 
I'd say your reference is a complete success :D
 
@amal
@AmalMurali can you please look into it?
 
9:56 AM
@RajeshVishnani: What do you mean original status?
 
as it was
the question i asked, i removed the edits
 
Okay, good. Now post a new question if you want. Reference the previous one if required. Explain everything in detail. The better you describe the problem, more accurate the answers will be.
 
I like the technique, just two comments:
- You might use the "s" modifier, who knows there is a newline. But maybe that's off-topic
- Instead of using (\[.*?])+ you might use (\[[^]]*\])+ or (\[[^]]*])+
@SecondRikudo You don't know how happy I am right now :D
 
@AmalMurali it is same as the new questions i guess
 
@SecondRikudo: But it needs MOAR upvotes!
 
9:58 AM
I already did my part
Don't worry, it'll gather them.
 
How about a bounty?
 
I won't be surprised if @HamZa will nick all 3 gold badges on it eventually
 
gold badges ?
 
Badges? We don't no stinkin' badges!
 
@HamZa Great Question (100 votes), Staller Question (100 favs) and Famous Question (10k views)
I got them all on my mysql question.
 
9:59 AM
@HamZa Yes, but in lua 5.1 \xhh is not supported.
 
@SecondRikudo Oh that would be awesome !
 
Plus one for a great answer (Which you should have gotten too! Had you initially posted the list as an answer!)
 
@SecondRikudo: If I award a bounty on the question, @HamZa will get that reputation right?
 
@AmalMurali Nop.
 
@SecondRikudo Yeah, true. Maybe next reference. That's the only thing I regret xD
 
10:00 AM
A bounty is awarded on the answer, not the question.
So Robert Harvey will get the points.
 
Err. Yeah.
@HamZa: You should have done that D:
@AlmaDo: Why do you think performance matters in this case?
 
@AmalMurali: did you saw>?
 
@SecondRikudo nah, "A literal mind" is the one who posted the "original" answer
 
@AmalMurali just noticing - and, btw, since it's regex issue - it matters. Oh, you can also notice nickname of OP (:
 
@RajeshVishnani: room-11.github.io/#dont_2 (and 1)
@AlmaDo: It doesn't IMHO, but anyway...
 
10:03 AM
@AmalMurali well, it's good to know what's behind built-in functions in any case
 
@AlmaDo: Deleted the comments on the answer, btw.
 
@SecondRikudo And a bronze badge "self-learner" :P
 
@HamZa Heh, not to mention "Nice Answer" and "Good Answer" bronze and silver badges.
 
Lousy internet
 
So if we needed another reference, what should be the topic ?
 
10:07 AM
@AmalMurali so did I
 
@Fabien quite far from it
 
Anyone have a good Heartbleed test?
I've patched everything, regen'd all SSL certs, all SSH keys
 
yet again...
 
I've got to fix it on my RBPI, too lazy to do it ...
 
10:23 AM
@AlulaErrorpone: ssllabs.com
@AlulaErrorpone: Or, more specific: ssllabs.com/ssltest
 
mronriongingn
> 503 Service Unvailable
@NiekBergman :)
 
I broke it.
D:
@PeeHaa: well, go grab a cup of coffee then and wait :D
@PeeHaa: very strange though, it was working right before I linked it here.
I can't help but feel somewhat responsible, heh.
Seems they're back!
But still going slow.
I think they restarted their server, looks like any recent best/worst data got reset.
@AlulaErrorpone: Please note that their test for Heartbleed is experimental, though.
@AlulaErrorpone: also, I do not think OpenSSH is vulnerable.
 
Meh I used a python script to get my cert :)
 
@tereško That's a shame. Then again, who has time these days.
 
Don't quote me on the OpenSSH not being vulnerable thing though.
 
10:36 AM
Quick quote him!
 
@NiekBergman It's an OpenSSL-specific bug, it doesn't affect anything else in any other crypto software (at least, not known at the moment)
 
@SecondRikudo Ugh! Manga... too.. short...
 
@HamZa: How come you aren't the answerer for that reference? o.O
 
Does anyone use Phpcbf github.com/squizlabs/PHP_CodeSniffer/wiki/…? I have a quick question. I don't know how to make the application align assignments automatically. I know there is an option for that, but I don't know how to find it.
 
10:49 AM
@Fabien I know :(
 
how to chunk_split() a string at variable intervals ?
is there a function for this?
 
^ elaborate please
 
@CSᵠ No, there isn't.
 
@AlmaDo i have a str 128chars long, and have to split it in pieces at positions 3,9,11,50,88,120,125
 
@AlmaDo Split a string to array in position 5, 23 and 75.
@CSᵠ You'll have to loop and use substr.
 
10:54 AM
and positions might change
@SecondRikudo was looking for something better, i hate substr :P
 
from where your positions are derived? array?
 
@AlmaDo exactly
 
@AmalMurali because I made everything in the question. Aliteralmind added something in the answer section. Robert (mod) came and edited the question and moved the list to Aliteralmind's answer. He then locked the question
 
HI can someone help me the regexp, I am try to select the "space" between words but it should not trailling with hypen or underscore
for example : apple google <= 1 match
apple google -yahoo <= 1 match
 
@gowri [ ](?![_-])
 
11:00 AM
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

Read about lookaround
 
hehe
 
@gowri see stackoverflow.com/questions/22937618/… and look for "Lookaheads"
:D
 
hehe :D
 
oh thanks for reference I will check that
 
@AlmaDo i'll just preg_match it :D
 
11:02 AM
@CSᵠ so my thought is like this
 
preg_match /(\d){3}(\d){8}(\d){50}etc/ :P
 
@CSᵠ Put the quantifier inside the matching group ?
 
@HamZa ofc, didn't write the whole line here..
 
@CSᵠ: your suggestion works great! Thanks for that. Now one more help I also want to ignore the spaces trailing with "AND". help me how to do that
I tried this =>(?![(AND)])[ ](?![-_])
but no luck
 
hello
is there someone who can help me on a little problem?
 
11:10 AM
@RajeshVishnani Hello! Please read room-11.github.io before asking a question!
 
people parsing syntax with regex ...
 
@HamZa for more information please visit the Reference @gowri
@bwoebi needs to be exact, or fail, why the [sigh] ?
 
The day will come when one genius person will create PHP with a single regex pattern..
 
I have a problem, can anyone help?
 
2 mins ago, by Second Rikudo
@RajeshVishnani Hello! Please read http://room-11.github.io/ before asking a question!
 
11:13 AM
what's wrong here in adding php in regex?
$m ="word";
$regex = '/[A-Z][^\.;]*(".$m.")[^\.;]*/';
 
@Programming_crazy What makes you say that something is wrong?
 
@Programming_crazy Read about strings and concatenation
You've got a single quote at the beginning and then you use a double quote ?
Also read about preg_quote()
 
@AlmaDo hmm... good idea :D mwhahahahah
 
@HamZa thanks
 
Random tip of the day: If you ever run out of inodes in a VM, try deleting all old kernel versions. Those ate up 30% of all inodes for me.
 
11:15 AM
I am just expecting one (first space) match. debuggex.com/r/FiYlE9rgPw8q9I4r
how to modify it
 
@gowri it's time to learn regex sir
 
precisely.
 
@HamZa: I try to learn it! (Hard Part)
 
@gowri (?<!AND)[ ](?!-|AND)
 
@gowri awesome, REGEX EVERYTHING !!!
 
11:18 AM
@gowri you have a graphical representation of your regex right above the input field. in this case, you do a negative lookahead, but instead of looking if "AND" follows your current space, you're asking if any of the following characters follow it: - A N D ( )
 
//create line regex
        foreach ($this->details_line['fields'] as $id=>$n) {
            if (isset($this->details_line['type'][$id])) $c=$this->details_line['type'][$id];
            else $c='[0-9]'; //default digit
            $this->details_line_regex.='('.$c.'{'.$n.'})'; //[char class]{quantifier}
        }
ended up looking like that ^ in the constructor
 
@CSᵠ You're doing something wrong if that's your constructor.
You're doing something terribly wrong if that's part of your constructor.
 
120 chars line, about 10 array entries, create regex
wrong, why?
 
@NikiC when you're already doing interesting changes to the HashTable API, might you maybe add a few more TSRMLS parameters in the function args of the callbacks? Or is that a too big BC break?
 
@CSᵠ Constructors should ideally only take arguments from outside and put it inside .
Nothing more, nothing less.
 
11:22 AM
@SecondRikudo ok, why ? :)
 
What does your object do?
 
@bwoebi I'd assume it is too big break
 
parsing
 
@CSᵠ Elaborate please
 
Presumably why they don't have TSRMLS in the first place
 
11:22 AM
parse a large file, each line encoded+encrypted
fixed length, fixed format
 
@CSᵠ That doesn't sound like the responsibility of a single object.
 
i'll generate the regex one time at init, and then use it
 
@NikiC actually in at least half of these callbacks I need a manual TSRMLS_FETCH()… slowing down the whole thing a bit on heavily used callbacks
 
In any case, your constructor should only get the file link/url/object/stream/whatever and put it in an inner variable.
The actual parsing should be in a different method.
 
@SecondRikudo indeed, but regarding parsing now, encode/encrypt go elsewhere
 
11:24 AM
@bwoebi Which callbacks in particular are you thinking about?
 
@CSᵠ Who generates the positions you need to split at?
 
@SecondRikudo parsing is split accordingly, that chunk of code pre_makes an regex to be used later
 
Whoever that is, it should pass it into your parsing object as an argument in the constructor.
 
@SecondRikudo they come with the file
 
@CSᵠ Written inside?
 
11:25 AM
@NikiC e.g. HashTable dtor
 
@SecondRikudo another input file
 
@bwoebi That one would be a real PITA to change
Because it would require adding TSRMLS to virtually all HT functions
 
@CSᵠ In that case, that file should be read beforehand, and the positions passed to the object by whomever it is who called it.
Keep one responsibility per object
 
@NikiC and I'd also love the dtor to receive as parameter a pointer to the hashtable on which it was called...
 
Your object should not need to generate regex AND read the file AND parse the file.
Think about what might change tomorrow.
It's possible that tomorrow you'd get your positions from a different source.
It's possible that tomorrow you'd need to parse a live stream rather than an offline file.
Those are the places where your seams should be, that's where polymorphism comes into play.
 
11:27 AM
@NikiC I know it's a PITA, but even impossible for PHP6?
 
In the case you described, I'd have at least 4 objects
Rather, 4 interfaces which are then implemented by objects
 
@HamZa: Thanks that works great! but still don't understand the purpose of this '?<'
 
@bwoebi oh, for 6 sure
 
FileReader, FileDecoder, FileParser and PositionGenerator
 
@SecondRikudo class App { // application logic } has clear one single responsibility. :)
 
11:28 AM
@gowri (?<!) is a negative lookbehind. Check if there is no AND before the space. Please check out the reference !
 
@gowri that's a lookbehind. In this case, it makes sure there's no AND before the space you're matching.
 
@Leri class App { public function magic() { global $app; $app->doApp(); } }
 
@NikiC can you create some common gist where we can note all these minor things we want to change in API?
 
okay Thanks
 
@HamZa Tempted to write a regex to English parser
You put in a regex and it pulls out all of the regex symbols and explains them in English
 
11:29 AM
@AlulaErrorpone I'm pretty sure at least one already exists.
 
Does that already exist?
 
Look it up.
 
@AlulaErrorpone Yes.
 
@AlulaErrorpone yeah
 
I shall, when not at work
I'm so fucking tired :/
 
11:30 AM
and in your favorite language too:perl
http://rick.measham.id.au/paste/explain.pl
 
@AlulaErrorpone Yep
 
<-- 13 hours sleep yesterday. Out of nowhere too. A wild sleep appeared!
 
I got 2
 
sleep(46800); ?
 
11:32 AM
:P
 
$this->wishFor("sleep(46800);");
 
@AlulaErrorpone looser (:
->wishFor(self::sleep);
 
@Fabien The best kind of sleep is the sleep that hits you in the face and knocks you out-cold for >12 hours
 
while($tired) { sleep(3600); }
 
@SecondRikudo speaking from experience o_O ?
 
11:35 AM
@SecondRikudo Indeed!
 
@HamZa I usually am the one doing the "hit you in the face" and "knock you out cold"
 
@Fabien infinite loop if you're tired
 
@SecondRikudo /lolwut
 
/me off to real-world work. /refactoring time
 
@HamZa More like "Shoot a Gudo Dama to your face" and "Turn you into Ash"
 
11:38 AM
hehehe
 
Anyonecan help me for the paypal
 
@SecondRikudo indeed, thank you very much
@RiteshJoshi The PayPal is awesome!
 
@RiteshJoshi you will give us a hacked paypal ?
 
i am using doexpresscheckout and i am getting this kind of error "Error 81115 Missing Parameter PaymentAction Required parameter missing"
 
Moogle err code 81115 for PayGal API
ups.. some typos :P
 
11:41 AM
@ritesh well, it says it right there: Your request is missing a parameter, probably called PaymentAction. Please refer to the paypal API documentation. For the most part, we're PHP devs, not Paypal API experts.
 
@AlmaDo Aye, but no one likes waking up anyway.
 
@TobiasGies thanks for the suggestion.
 
12:06 PM
@CSᵠ GayPal?
 
@tereško But.. but.. He's trying to develop his own MVC pattern!
Woah! What do you want to do with me? — Class 7 hours ago
lol
 
12:53 PM
what does this mean? (just curiosity)
 

« first day (1271 days earlier)      last day (3677 days later) »