« first day (1055 days earlier)      last day (3909 days later) » 

8:01 PM
i mean there's more trolling in that ML than most multiplayer games
 
@Danack A bird in the hand is worth catching flies with honey, mustard gas and picket fences and all that.
 
Hi there, this is my first time in Chat Room and wondering if I could ask some question and discuss it here?
 
> Discussion for all things PHP - Don't ask whether someone is here to help you. If someone is around and wants to help they will.
@B.Mr.W. ^^^
 
@Orangepill Its too bad we can't set up a modal window that says "I agree to not ask whether someone is here to help me, and understand that if someone is around and wants to help they will "
;-)
 
8:15 PM
Hey everyone
what is the best way to create a wordpress theme from scratch
 
Start by reading the wp codex..
 
@Bracketworks thanks
 
@B.Mr.W. What's your question?
 
8:32 PM
hi can anybody fix correct me i am trying to check if username is $realusername == "fmpreuss" or "malik786"
how it will be to check multiple username
$realusername == "fmpreuss" && "malik786"
or
$realusername == "fmpreuss" || "malik786"
 
($value == 'foo') || ($value == 'bar')
 
WTF
 
Bah shit
 
Awesome @Bracketworks thanks actually i am very new So i am just trying to learn :D
thanks
 
@NikiC Wait, that was fine, no?
 
8:35 PM
@Bracketworks sorry, that was my fault, revert those ()
 
@ircmaxell wth :D
 
not you
 
@Bracketworks My mind was elsewhere right now :P
 
I'll leave em for clarity ;-)
 
8:35 PM
parentheses do not improve clarity
 
Bitwise operators; yea, you're right. $value == 1 | $value == 2
 
the less parens the more clear the code ;)
 
if($realusername == "fmpreuss" || $realusername == "malik786")
 
(((((((((((((((((Sorry what?)))))))))))))))))))))
 
at least that's how I usually see it. Minus some cases where the precedence is too unintuitive.
 
8:36 PM
 
@Bracketworks is this correct
if($realusername == "fmpreuss" || $realusername == "malik786")
 
@MalikUsman Yes, that is correct, however, by the looks of what you're doing, there's a good chance you don't want to be doing that anyway.
 
well let me try :D thanks :D
 
/^\S*(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])(?=\S*[\W_])(?=\S{8,})\S*$/
Can that be improved?
 
yes, do this.. !@$#%$^&*(_()(*&^%@#$$^%&^(*&^@#$%&^*&(
hehe jk
 
8:43 PM
@reikyoushin Why didn't I think of that? :o
:D
 
@SweetieBelle Depends, what are you trying to match?
 
@Bracketworks Password, min 8 chars, at least 1 lowercase, 1 uppercase, 1 special and 1 number. No whitespace.
 
@SweetieBelle Blah, just enforce length.
 
@Bracketworks Not my constraints
 
@SweetieBelle why no whitespace?
 
8:45 PM
@ircmaxell Again :P Not my constraints.
 
@SweetieBelle Whose constraints? I'd like to punch them in the ear.
 
I'd just enforce a certain level of entropy
6
A: What is wrong with this PHP regex to do password validation?

Sweetie BelleUse preg_* instead, and a better validation string There are (at least) 3 issues with the regex you're using: You're currently needlessly checking for (?=.*[^a-zA-Z0-9]) when there is a better option to do this - \W_. You're checking for at least 7 characters and no more than 19, rather than a...

function validatePassword($password) {
    $rules = array(
        'no_whitespace' => '/^\S*$/',
        'match_upper'   => '/[A-Z]/',
        'match_lower'   => '/[a-z]/',
        'match_number'  => '/\d/',
        'match_special' => '/[\W_]/',
        'length_abv_8'  => '/\S{8,}/'
    );

    $valid = true;
    foreach($rules as $rule) {
        $valid = $valid && preg_match($rule, $password);
        if(!$valid) break;
    }

    return (bool) $valid;
}
I ran that up as a readable version
 
you'd think this chat was a thread for all your answers @SweetieBelle :P
 
@CarrieKendall I'm not the only one posting answers. I just want advice on how to improve them.
@CarrieKendall I don't presume my answers are optimal, most of them probably aren't.
 
8:50 PM
you just post a lot of them is all
 
@CarrieKendall I post them when I think they can be improved. I'm aware there's better programmers than me in here.
 
@ircmaxell yes. And then it becomes a proposal, within min. 2-3 weeks (not less.). May I suggest you to cool down a bit pls? Thx.
 
^ it's the same post from a few hours ago :)
 
cool down a bit? I thought I was being cool and reasonable. Am I being fubar with my last reply?
@PierreJoye "RFC" is a request for comment. A request for discussion. Not a request for vote. Especially when there are open q's @nikita_ppv
 
@ircmaxell why dont you use adsense :v for your blog :D
 
9:01 PM
I do
you just have adblock turned on
 
@ircmaxell Do you make any significant returns from adsense in your case?
 
nope
 
well you are using other company aswell
 
no, it's all adsense
@TheGuyWhoCouldn'tTalkToTheGirl 80% of visits have no ad served... That many people either use adblock or whatever
and that's the ratio of analytics report vs adsense report
 
Oh ok! well how any views you are getting daily
 
9:03 PM
@ircmaxell Why not just get some companies to pay you to put their customized ads there? Adblock won't work and isn't that how Facebook gets its money?
You have good tutorials, so you must have a big audience.
 
@ircmaxell You swing from trying to respond politely to people who are being dumb, to doing things where you could have cooled down instead. You possibly ought to let off some steam by either just letting certain people know you don't value their opinion, or probably better just block them. If they actually raise an issue that needs addressing, let someone else ping you about it.
 
because I haven't
making money isn't why I do it...
 
@Danack totally agree with this
 
problem with being a writer of programming ... all your visitors use adblock
 
@Danack perhaps, but that's not who I am. I can't ignore or look away from a problem. I think that is part of the problem.
 
9:06 PM
@ircmaxell If you have the opportunity, then you should take advantage of it, given that many people would love to be in a situation like you.
 
@ircmaxell blocking a troll isnt looking away from a problem
 
@CarrieKendall in life, perhaps not. In a project, yes it is
 
but why?
its really not
 
@TheGuyWhoCouldn'tTalkToTheGirl I'm not saying I won't or wouldn't, just hasn't been a priority
 
@ircmaxell Fighting dumbness isn't something that you can effectively do yourself unfortunately. /off to find you a video related to it...
 
9:08 PM
incredibly related:
 
@Danack you are doing same thing!
 
@Danack which is exactly my point. If the project members don't want to do it, then it's not worth the effort. And if it's not worth fixing the project, it's not worth the fight either
 
how can you know until the votes are cast
 
because a healthy project doesn't need to cast votes to understand if a proposal is good or not
 
you're the one talking in circles now :P
 
9:13 PM
Can somebody tell me how you can check if you are in the m.domain.com ?
 
in a subdomain? you could set it up via A records or check $_SERVER for query url (or something else)
 
@CarrieKendall how do you figure?
 
@ircmaxell you've got all of these theoretical guidelines to projects.. get out of your head, block the ML troll, and put it up for a vote after a few days
 
@CarrieKendall put what up for a vote?
especially where there are open issues that needs discussing.
that need input from others
but the troll dominates that discussion, so the others don't even get to read the email asking for input
 
actually you're reply just as much
so you're dominating it as well
does the troll make valid points?
 
9:19 PM
are what valid points?
 
i mean, you're basically feeding him, trying to prove him wrong
 
the problem is, some of what he has to say is actually valid
like 5% of it
and shouldn't be ignored
and it's not just him, although he is the biggest offender
 
so like @Danack said, if he makes a valid point I am sure you wont be the only one that feels that way and it will be discussed
look, you can explain why you let him get under your skin, i am just saying, its a choice
 
for me, it's not
 
guys, why can't i create a default <input type="radio" value="0" checked /> No
should the default always be yes?
 
9:26 PM
@reikyoushin <input type="radio" name="somename">
 
well, i will leave me $0.02 at this: you do great work and I value you and your work but it definitely is a choice to read and reply to a troll, no matter the situation
 
@CarrieKendall defining him as a troll misses the entire point of the situation, and ignores a large part of the problem, which lies in the overall participation in the community and on list
 
@ircmaxell trolls have valid points, but if they're toxic then their points should be missed IMO
look at anon
 
@HamZa i removed the name.. its just the default i'm having problems with..
sorry for not being clear..
 
@reikyoushin <input type="radio">
 
9:28 PM
on first load, i have put checked but still the radio button isn't checked. is it because the value = 0?
 
@reikyoushin you want it to be checked or not ?
 
i want it to be checked
( ) Yes (*) No
 
but my No value is zero, (see the code above)
 
9:30 PM
lolwut
<input type="radio"> Yes<br>
<input type="radio" checked> No
 
it definitely works as you describe it, so there must be something else going on
 
hmm..
 
And to show order doesn't matter: jsfiddle.net/fpDQg/1
 
28
Q: PHP $_SERVER['HTTP_HOST'] vs. $_SERVER['SERVER_NAME'], am I understanding the man pages correctly?

JeffI did a lot of searching and also read the PHP $_SERVER man page. Do I have this right regarding which to use for my PHP scripts for simple link definitions used throughout my site? $_SERVER['SERVER_NAME'] is based on your web servers' config file (Apache2 in my case), and varies depending on a ...

 
@Dave Chen Do you have a example for $_SERVER ?
 
9:33 PM
@ircmaxell something is weird.. i dont see the checked on the source.. <input type="radio" value="0" name="has_logo_font" checked="checked" />
 
pastebin the entire field (both radio buttons)
 
but on the source it's gone
 
then you have a problem somewhere else
 
oh, found it.. grr. name conflict.
sorry guys
 
0
Q: strpos returning opposite from expected

JakeParisI have had this experience now twice. I have the following code: if(strpos($catResults,'briefCitRow') !== FALSE) { //do something if the string is in the variable } I am 100% certain that the string briefCitRow is in the variable $catResults. I've tested 30 different ways and it's definit...

^- lol, tagged as "headache"
 
9:45 PM
@HamZa Oh no you didn't; I'mma roll that back!
 
@Bracketworks xD
 
The responses are exactly as I expected: Either "I don't know C" or "Too much drama"
 
@NikiC definitely, been watching that
Pierre's replies keep bothering me, but I think I'm just going to ignore him from here out.
 
9:51 PM
@tereško vote in what direction?
 
well ... which direction you would ?
 
voting is "this is useful" not "I agree/disagree"
 
hmm ..
 
@tereško You have to admire his blunt honesty and hustling attitude.
 
@tereško Uh, I don't know. I consider the comment a bit off-topic (as in, not the target I had intended), but I think his position is not unreasonable
 
9:52 PM
+5 (insightful)
 
so it's about +/-0 to me :)
@ircmaxell "this is useful" is on stackoverflow though. not sure it applies to reddit ^^
Also, I find it annoying that reddit interprets "^^" as a superscript "^" ...
 
@NikiC agree
 
well .. you could see it as "useful" in assessing the userbase
though I usually rate the comments as: reasonable person vs ars
 
So, I think I'll write an RFC for named parameters tomorrow
A discussion draft, that is. There are a lot of things I'm not sure how to do best.
 
I still need some help finishing the use-function patch. some cases are still failing.
@NikiC @JoeWatkins ^
 
10:09 PM
Sorry if I'm not in the correct room for this , but my trust go to the php peep.
In fact i was looking for a custom font-awesome font ,( http://stackoverflow.com/questions/11426172/add-custom-icons-to-font-awesome) but my time and experience does not let me make my own.So... Does anyone of you know a site what does the job? And i not mean some freelancers site.But more a direct link to that place?
I will read up later if i am not around. Thanks in advance
Ho , before got strange toughs, the link i posted was just as information.The Q isnt mine.
 
11:04 PM
Does this line-break matter more than my cognitive bias to keep the <div> outside the <?php if tags?
 
I just came here to say. GOOOOOOOOOOOD FRIDAY ROOM!
good noight
 
also good night
 
@DaveRandom Hey, hey...let's leave that until it is actually Friday ok?
 
It is actually Friday. It's not my fault you people don't know what time it is.
3
 
Well, personally I think that whole video thing is an awful "tradition" :P
 
11:09 PM
@cspray You just don't have any taste man
Now I'm really going to take a shower, sleep and get drunk because I'm going to get down on friday friday friday
 
@PeeHaa I have no desire to acquire whatever that taste is
 
Why is it always said that eval()'ing user input is evil?
I do that sometimes… In my daemons I run in /usr/bin/screen
 
Can anyone tell me why I get this back from my DB?
a:7:{s:3:"mon";s:6:"Monday";s:3:"tue";s:7:"Tuesday";
..rather than an array..
 
11:24 PM
@Dan Look up serialize in the manual. And look up broken in the dictionary.
@cspray :D
 
@PeeHaa Yeah, I thought this could be the iisue.
No matter, I'm tired so I'll take the easy route..
Thanks.
 
3v4l.org/JF95K … sometimes I hate PHP's behaviour
$i = 'Z';
var_dump($i++ > 'Z'); // bool(false)
argh…
 
blah
 
:-)
 
11:44 PM
good morning hackers h4x0rZ
 
good night h4x0rZ hackers
 
fun just started
 
@webarto No, I'm really going to bed now.
 
Lucky you.
Have a nice night.
Old sport.
 
Lucky? I'd prefer not needing to go to bed because of being tired…
 
11:52 PM
You need to rest your weary bones.
 
@webarto maybe the bones of my hand… they worked a lot yesterday/today
 
posted on September 05, 2013 by Federico Cargnelutti

Ruby Version Manager (RVM) is a tool that allows you to install multiple versions of Ruby and have multiple versions of the same interpreter. Very handy for those who have to maintain different applications using different versions of Ruby. To start, download RVM and install the latest stable version of Ruby: $ echo insecure >> ~/.curlrc $ curl -L https://get.rvm.io | bash -s stable --ruby $

 
Planet PHP: Installing multiple versions of Ruby using RVM
2
dafuq?
Go home @Feeds, you're drunk.
 
It's Friday! The feeds are drunk! POST CATS!
 

« first day (1055 days earlier)      last day (3909 days later) »