« first day (880 days earlier)      last day (4051 days later) » 

9:00 PM
@NathanDaly why does it have to use anything of what you've mentioned?
 
@webarto Well those are framworks I have coding experience in, I am open to other suggestions though
it's just research atm
 
wtf is "yeppers"? :P
 
@PeeHaa, yeah I know, prepared statements, cache and all those fancy things. But I would still be able to create a perfectly safe query with mysql_ aswell.
 
@PeeHaa noppers
 
9:01 PM
@Jueecy doesn't mean you have to =_= it's gonna be unmaintained, and you should feel bad for not willing to migrate (if it is the case)
 
Silex is crap. YOLO ftw.
@igor :P :P
 
@Jueecy I never said you couldn't. But it is pointless in maintaining an ancient extension when there are better alternatives
^ that was no Enlgish I wroot theer
 
PHP is still the best micro-framework
 
@NathanDaly it's all PHP, you can use whatever suits you, I'd choose ZF2.
 
@Ocramius, I'm with you guys. I'm just saying that out of the PHP core, an E_DEPRECATED doesn't make any sense. Let's say a masochist wants to use it, it import it and install it. Why would he want deprecated errors all over the place?
 
9:03 PM
@igorw funneeeh :P
 
@Hiroto dude, there was a reason for it
 
@PeeHaa. I'm on your side there.
 
@webarto Yeah think I am leaning towards that
 
@ircmaxell i saw
 
@ircmaxell No worries. Stay cool. I got your back ;)
 
9:03 PM
@Jueecy because the world is full of idiots, and that's why we place big alert signs to tell people not to get injuried in doing stupid things. That's up on the taxes of us all.
 
Does anyone recommend any solution for somehow "tracking" the path of a cURL request or something. I know that sounds stupid but I can't tell where the error is coming from when i cURL an API. Sometimes, data doesn't get returned.
 
@NathanDaly You can probably combine/extract libraries, so you are not limited.
 
@KevinMurphy Did you enable verbose shit?
 
@webarto I wonder if I can user composer with ZF2?
 
@PeeHaa negative, sir
 
9:05 PM
CURLOPT_VERBOSE .. or just try with command line...
 
@NathanDaly if you start using composer, you'll see that grabbing multiple libs is really easy :)
@NathanDaly sure
 
@Ocramius Yeah I really wanna have a go, I know with ZF2 Source Packages you can
 
@webarto this is on shared hosting so I think i'm a bit limited.
 
never used composer before so exciting stuff :)
 
@Ocramius, stupid people should learn the lesson by getting hurt. That's the only thing that would slow their idiocy down.
 
9:06 PM
@NathanDaly I don't know anything about that, @igorw is composer guy.
 
@Jueecy the world is full of smokers :P (just to deny what you just said)
 
@Ocramius does composer still try to install all of zf2 when trying to use a single package? or was that fixed now?
 
@igorw it was fixed, but @mwop is having troubles with the subtree split. He runs out of inodes...
 
ouch, this subtree crap sucks
 
Lithium is sort of slow on dev :(
 
9:08 PM
heh. Maybe bsiemensen has some ideas
 
@Ocramius Did you mean: businessman :P
 
@webarto is there something more static? :) I refused a job offering because of that
 
@Ocramius Yii
 
@Ocramius third-party repo aggregation on packagist would be the best solution. then we could do away with all of those subtrees and build proper zips. you know, it's like google reader for PHP packages.
 
@PeeHaa Yii is generated-generated-generated-autogenerated :D
 
9:09 PM
@Ocramius Lithium vs Kohana, not sure which one has more static :D
 
@igorw yeah, but can packagist host that stuff?
 
@Ocramius hehe
 
Yo dawg, I heard you like evenings, so good evening.
 
@Ocramius currently no, and I'm not sure jordi wants to go there. it's costly.
 
@igorw yeah, I'd discourage that too :\
 
9:10 PM
@DaveRandom Good evenings
 
@NikiC do you think the suggestion at bugs.php.net/bug.php?id=63463 makes any sense?
(last reply)
@webarto ah, btw, it's "Beau Simensen" - zis guy: plus.google.com/114524966156217554571/posts
 
Cheers guys
 
@DaveRandom Evening dawg
 
@Ocramius no, it's not solving the discussion, it's just adding an option.
 
@NikiC BNF for a spec? are you crazy?
 
9:18 PM
BTW, I think you are right.
 
@hakre that thing is causing huge overhead in my code :(
 
However you could check with isset first.
 
@igorw Then we're down to settling on a name.
 
@hakre no, I cannot. if the user defines __isset, you cannot be sure of the results
@hakre actually, I'm already doing it, see github.com/doctrine/common/blob/master/lib/Doctrine/Common/… (wrong link)
 
And / or the PropertyReflection should be able to report if it is defined or invokes __get
@Ocramius nbow it works
lol COPYRIGHT HOLDERS AND CONTRIBUTORS - you need to name them. which ones?
I'm a copyright holder, too.
 
9:21 PM
@Pawnguy7, really? a good community? there are a lot of frameworks, pre made scripts and libraries. But that's just it. Most of the "programmers" coding in PHP (please don't kill me) are just a bunch of self taught morons believing they are God because they made a query working. Just like me.
 
@hakre I hold a copy with my right hand, does it count? :)
 
1 message moved from Lounge<C++>
 
@igorw not what I mean. it's just imprecise. Using terms like "whitespace" or "newline" rather loosely ;)
 
@Ocramius yes, exactly ;)
 
Much potential for ambiguity
 
9:22 PM
Never been in here before. HI all.
 
yes, read HTML 5 parser instructions instead :)
@bryanlewis a very fine good evening / morning / day / night that is
 
Nothing comes up in verbose output :/
 
:) thanks its 2:22 here.
 
@R.MartinhoFernandes Not sure why you moved this here...
 
Can I ask php questions in here or post to a forum I've been having problems with?
 
9:23 PM
@bryanlewis then that is afternoon, right?
 
Yes! @hakre
 
@bryanlewis this is a PHP channel, try asking
 
thanks!
 
@NikiC Ah, don't mind it. I was pulling a prank on the author :)
 
Its a wordpress problem with the loop. Here is my original post.
0
Q: Wordpress Wrap Every 2 Post in a div

bryanlewisI'm trying to wrap every 2 post in a div "row-fluid" Right now my HTML looks like the following... <div class="row-fluid"> <div class="odd-post span6"></div> <div class="even-post span6"></div> <div class="odd-post span6"></div> <div cla...

woah, crazy
 
9:24 PM
@R.MartinhoFernandes ah, okay :)
 
@R.MartinhoFernandes success :P
 
this is awesome!
 
nn all, head exploding @_@
 
I love how "The Loop ™" is coming up once again
 
@NikiC He just hates me.
 
9:26 PM
sorry @PeeHaa
 
No worries
 
@bryanlewis see $current_post property of a WP Query - you can work with modulo.
 
modulo?
never heard of that
I'll check that link out
 
LOL
 
What are some of your latest PHP projects?
 
9:30 PM
lohl - just got popular question badge for programmers.stackexchange.com/questions/99202/…
(and it's not friday yet)
 
@hakre congrats :D
 
yess .. got 200 on my "what is model" answer
evening, btw
 
In computing, the modulo (sometimes called modulus) operation finds the remainder of division of one number by another. Given two positive numbers, (the dividend) and (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n. For instance, the expression "5 mod 2" would evaluate to 1 because 5 divided by 2 leaves a quotient of 2 and a remainder of 1, while "9 mod 3" would evaluate to 0 because the division of 9 by 3 has a quotient of 3 and leaves a remainder of 0; there is nothing to subtract from 9 after multiplying 3 times 3. (Notice that ...
 
Evening
 
@PeeHaa heja PeeHaa!
@tereško link pls - and evening btw ;)
 
9:32 PM
@hakre heja Hakre! :-)
it is almost friday
 
unit-tests is the way to go writing software when you're drunken
 
this will be a long night =/
 
@NikiC I think I found an issue in the regex. it lexes /foo as two symbols / and foo
 
@igorw depends on flavor
 
@igorw isn't that right?
 
9:33 PM
does largest match wins (as in flex)?
does it not?
does first symbol wins?
I prefer win of largest match but it's more work.
 
@igorw I mean /foo isn't a valid symbol so I guess lexing it as two symbols is right
 
@NikiC it must be separated by whitespace to produce two symbols
 
Though I find it a bit hard to say as the specification is (as already mentioned) not very specific ^^
 
> Microsoft has pushed IE 10 out as an "important" update this week. I've installed it on 4 different computers and am now beginning the uninstall :( It failed completely on a 32-bit Windows 7 Lenovo laptop. It crashed 3 times today running on my 64-bit Windows 7 desktop while navigating a Microsoft website. ~ A BYU CSR, emphasis mine
 
@LeviMorrison Reminds me when I installed Microsoft Office in the past. Computer fully crashed and was booting in 320x200 display resolution afterwards. I then started to use Open Office and I don't regret it.
 
9:37 PM
well, this will take awhile to figure out. Thanks guys!
for the help!
 
@bryanlewis you can continue to ask, this is chat
so a bit more interactive.
 
okay! Thanks!
I feel a bit unqualified to be in here haha
I'm no php pro
 
@bryanlewis you know about the wordpress chat?
 
No I didn't I was just looking but couldn't find anything.
 
^|^ wow that looks ugly ^|^
 
9:40 PM
Yeah bit like UX
 
@hakre From here, that doesn't look at all.
 

 The Loop

Where humor doesn’t work.
 
Hello Guys I have a problem wordpress problem, I am trying to make 2 columns of category list plus posts under the category. I am thinking on to solve it with an if statement where I check how many categorys it have printed and then every secound category printed. Print it something like 2 categorys close the row then new row and 2 new categorys close row etc here is my code
0
Q: Wordpress Category List 2 Columns

FrankI am trying to display my categorys and posts under that category in 2 columns. I have did try to solve it with CSS, but that did not turn out very well. Here is my code: <?php $cat_id = get_query_var('cat'); $catlist = get_categories('hide_empty=0&child_of=' . $cat_id); fo...

 
Well done user experience ...
 
9:41 PM
Any ideas?
Maybe some hint, Sorry :)
 
^ for a moment I thought @NikiC asked a WP question :D
 
@PeeHaa r-oh-fl
@bryanlewis come join over here: chat.stackexchange.com/rooms/6/stoppress
 
Stoppress thats why I couldn't find it
wow thanks @hakre
 
i need a name
i have a structure that accumulates values, and then, when a specific method is called, sends them all to the server
 
> I have also tested IPTV with IE 10 and I have not been able to get it to work.
 
9:52 PM
@tereško ValueBag
 
@frank what is your problem? is that query not working or you got post by query but cant display in 2 column?
 
@itskawsar I am trying to display it in 2 columns :)
 
@NikiC I tried to fix it with assertions, apparently regex doesn't like me very much right now.
return "(?<!$part)/(?!$part)|$part(?:/$part)?(?!$part)";
 
@hakre it's a JS thing for fetching multiple data items in single request and to distribute he response to handlers
 
Failed asserting that exception of type "PHPUnit_Framework_Error_Warning" matches expected exception "Phlexy\LexingException". Message was: "preg_replace_callback(): Compilation failed: lookbehind assertion is not fixed length at offset 227".
 
9:56 PM
@igorw yeah, you need that, I hate that error.
 
@itskawsar One solution is: When it have printed 2 categorys it chould wrap it in a <div class="row"> then print the next 2 aswell
 
@igorw remove the lookbehind assertion ;)
do just return "(?:/|$part(?:/$part)?)(?!$part)"; for example
 
@NikiC that still lexes foo/ as two symbols though
 
10:00 PM
@frank that means, you wanted your posts of first cat will be in 1st column and another will be in 2nd column?
 
@itskawsar Yes exactly!
 
@frank it should be done by css. can you show me how much you have done by css?
 
@itskawsar are you thinking on useing css3 columns? becuse i need the site to work on all platforms?
 
@frank it can be done by float property
 
@igorw maybe return "/|(?<!/)$part(?:/$part)?)(?!/)";?
 
10:05 PM
@igorw go for largest match.
 
@igorw: any thoughts running silex on the command line (not for routing, but for dependency management and unification of configuration with web service)?
 
@NikiC there was one extra closing paren in there, that indeed fixed it
now I need to study this solution
@hakre do you have an example of what you mean b largest match?
@NikiC many thanks for the help :)
 
33 mins ago, by hakre
https://github.com/hakre/XDOM/blob/master/src/XDOM/Tokenizer.php#L208
 
missed that, will check it out
 
@itskawsar Every category have the class half, and half have float left and width 400px, but when there is more post in on category then the other, it messes up like this: puu.sh/2hLtV
 
10:11 PM
@ircmaxell sounds like you just want to use the pimple portion of silex. that's fine, but then you might as well just use pimple directly.
 
@igorw Well, basically, I'm creating a config file that I'm including after declaring $app. Yeah, pimple would prob suffice, but no real need to separate either if I know it works this way, whatever, going quick and dirty...
 
sure, using $app as a service container in a CLI app is an ok approach if you don't care about making it clean
 
yeah, just wanting to get a "done" state right now
basically, the CLI app is just a cron job...
 
@hakre side note, missing second arg for print_r? github.com/hakre/XDOM/blob/master/src/XDOM/Tokenizer.php#L154
 
@frank sorry, i cant see your image on windows. your link just let me download a 0kb png file
 
10:17 PM
@hakre I think largest match wins is impractical from a performance point of view
but I guess it's nice if you don't know regular expressions very well
 
@igorw yeah and replacement with var_export maybe.
@NikiC I'm not so sure. And also this has nothing to do with regular expressions. It's just about what you define.
But it's true that you can not do that strategy with pcre regex alone well.
With regex only I would do something like first match wins.
 
Am i logged in twice now?
 
@hakre yeah, that's what I mean ;)
 
@Gordon how should we be able to say?
@NikiC yeah, but that's incompatible with flex. ;)
 
people still using flex?
:P
 
10:21 PM
Is my Avatar showing twice?
 
@Gordon I don't see it twice.
 
My desktop should be logged in. And im writing this Form my nexus
smart chat
 
@itskawsar screenr.com/3SE7 try that ;P
 
// Oh PHP, my love, how I hatest thee!
// aka: why can't I have non-scalar keys in foreach?
function insertAll(\Traversable $traversable) {
    if ($traversable instanceof \Iterator) {
        for ($traversable->rewind(); $traversable->valid();$traversable->next()) {
            $this->insert($traversable->key(), $traversable->current());
        }
    } else {
        foreach ($traversable as $key => $value) {
            $this->insert($key, $value);
        }
    }
}
 
10:27 PM
@Alexander You should check the 'Authors' portion of the RFC :]
 
@LeviMorrison I did :)
 
@NikiC ok, next problem :D foo/bar/baz is lexed as two symbols foo/ba and r/baz
 
@frank thanks. i got your problem :) giving answer within a min
 
(My freaking chat went crazy there)
 
@itskawsar Wow, Thanks!
 
10:30 PM
@Alexander I think I'll go with this:
function insertAll(\Traversable $traversable) {
    if (version_compare(PHP_VERSION, '5.5.0', '<') && $traversable instanceof \Iterator) {
        for ($traversable->rewind(); $traversable->valid();$traversable->next()) {
            $this->insert($traversable->key(), $traversable->current());
        }
    } else {
        foreach ($traversable as $key => $value) {
            $this->insert($key, $value);
        }
    }
}
 
@NikiC fixed it with an assertion
 
@LeviMorrison By the way, those guys are very boring. No one is against! :(
Just kidding :)
 
I honestly don't see why the pre-5.5 behavior was implemented in the first place.
 
@igorw i haz a trashbin
also why does that store in redis by default? (used files instead)
 
10:39 PM
why did you put so much nsfw on my server
 
@Lusitanian whoa, I never expected anyone to actually use that. feel free to send PRs.
 
@igorw meh, it was the only non-crappy pastebin i could find without writing one myself
@igorw i'll clean up what i just wrote in nano on the server for filestorage and send it as a pr tonight
 
@Lusitanian writing code on server using nano. You filthy kid
 
@PeeHaa felt...so...dirty
don't shame me
 
:-)
 
10:41 PM
@PeeHaa . . . no vim love?
 
@LeviMorrison don't look at me I <3 vim. @Lusitanian is the infidel here :D
 
hides
 
@frank please check
 
i just use emacs and butterflies
 
@itskawsar It was so simple right there. But many thanks too you!
 
10:45 PM
@NikiC another thing that is not specified in edn is escaping of \ in strings
or escaping of quotes for that matter
 
@frank welcome :)
 
omg this is cool. why didn't I ever tried that? 3v4l.org/27XVt
 
@Gordon Congratulations
 
@MarkBaker thank you :)
thank you for supporting me
 
10:51 PM
No probs, hopefully you got a few more votes from it, but you had enough margin that you didn't really need my support
 
oh look, the guy who's made my life somewhat less painful (if that's possible) whilst working with excel files ^^
 
@MarkBaker i needed everyone's support. otherwise no one would have voted for me ;)
 
Thanks Lusitanian - I try to make it less painful
 
@MarkBaker :)
 
@Lusitanian you know I can still read that, do you? :P
 
10:54 PM
@Gordon indeed
"deleted" messages are a farce
 
ha.. 4444 starred messages up to now
 
Does anyone have much experience with tuning SQLite in-memory databases at all?
 
@igorw Pretty much everything is not specified :D
 
I was testing some of the results from stackoverflow.com/questions/15413575/…
Wondered if there were any more tips that would boost performance still further
 
@NikiC clojure itself is the point of reference
 
11:02 PM
@Lusitanian anyway. im off to bed and leave you with …
night night
 
@Gordon nighty
 
@igorw ah, I didn't know it was derived from clojure. then one can probably guess most of the stuff
 
@Gordon good night (and please stop posting that video!)
[!!you are a mod now!!]
 
@NikiC yeah, it's a subset of clojure's syntax. a true subset, at least until it's specified properly. :)
 
Next time you post Rebeccah Black, post Rafael Dohms example of Rebeccah Black code, that'll make us all cringe
It actually came from the real code from a question on SO as well
 
11:08 PM
No surprise there :-P
 
 
@hakre um
 
Hey guys, I just did some stuff, does it look ok?
 
That's the one - the code is actually more readable when correctly broken into lines, indented and syntax highlighted
 
// Hide standard shipping option when free shipping is available
add_filter( 'woocommerce_available_shipping_methods', 'hide_standard_shipping_when_free_is_available' , 10, 1 );

/**
 *  Hide Standard Shipping option when free shipping is available
 *
 * @param array $available_methods
 */
function hide_standard_shipping_when_free_is_available( $available_methods ) {

    if( isset( $available_methods['free_shipping'] ) AND isset( $available_methods['flat_rate'] ) ) {

        // remove standard shipping option
 
11:12 PM
@Lusitanian yeah, this is borderline.
 
Try using constants for things like 'woocommerce_available_shipping_methods' and 'hide_standard_shipping_when_free_is_available'
Type hint your $available_methods argument
 
Use && instead of AND because it's imho the sane thing to do
 
@PeeHaa doesn't matter there though
 
@BrandonGelfand In PHP you can safely unset unset variables, so you can reduce your code:
 
I know
 
11:16 PM
// Hide standard shipping option when free shipping is available
add_filter('woocommerce_available_shipping_methods', 'hide_standard_shipping_when_free_is_available', 10, 1);

/**
 * Hide Standard Shipping option when free shipping is available
 *
 * @param array $available_methods
 * @return array
 */
function hide_standard_shipping_when_free_is_available($available_methods)
{
    if (isset($available_methods['free_shipping'])) {
        // remove standard shipping option
        unset($available_methods['flat_rate']);
 
@PeeHaa just starts a bad habit
 
+ it reminds me of vb
:P
 
we'll be right back to Language Law and Operator after these short messages
 
:D
 
microsoft needs to kill vb .net
there is no excuse for that syntax to exist anymore :(
 
11:17 PM
there is no excuse for vb either way
 
meh, it was the first real RAD tool
in the 90s...
holy crap it came out 4 years before i began existing
 
hehehe
 
._________. look at the comments
typical vb
not to mention byval should have been used, etc, etc
 
:P
 
Is there a way to prevent a DIV from auto-stretching its height based on its content?
 
11:21 PM
@DemCodeLines yes
 
@DemCodeLines yes
 
I have a div in the center of the screen with height 100% that should fill the screen, but instead what is happening is that it is stretching all the way down
Instead of having a scroll bar on the whole web page, I just want a scroll bar on that div
 
then you shouldn't be using height: 100%, most likely
overflow-y: scroll
 
I did that, except you can see the scrollbar on the right side which is disabled cause the div is already stretched enough to fill all the content at once
 
which is why you shouldn't set the height to 100%
 
11:24 PM
then what?
But I need to fill it the entire screen
 
@DemCodeLines Yes
 
@hakre lol
 
hi , can i have the $_POST variable to many php files ? i know i can send post variable from one file to other one , but how is it with many files ?
 
11:29 PM
@echo_me include one file after the other. All will have $_POST.
 
@hakre thx
 
@hakre i especially like how it's written in visual basic
 
noight all
 
night
 
11:58 PM
@hakre include one file after the other. ?? you mean i include one file which contain POST variable to all files OR include the file containing POST variable to second and the second include it to third and so on ?
 
@echo_me depends on which way you prefer / need that.
 

« first day (880 days earlier)      last day (4051 days later) »