« first day (812 days earlier)      last day (4127 days later) » 

user652649
9:00 AM
wait please my english isn't that good... commit message of what?
 
@wes Commit message when adding the library to the source repo at work.
 
0
A: Pagination: How to display a long text as book pages?

MuquaddimTo layout a long string in a beautiful book page format. You need to get the exact string portion. You can use this function. function get_page($text, $page_index, $line_length=76, $page_length=40){ $lines = explode("\n", wordwrap($texxt, $line_length, "\n")); $page_lines = array_slice(...

 
user652649
ok... lol
 
ideone.com/gslOod shows the demo
 
user652649
btw the payflow pro is a special api not public, i guess
 
user652649
9:03 AM
just for partners
 
@wes Yeah, it's special. Not too horrible, just special.
 
user652649
ahah
 
user652649
special needs api
 
user652649
asdfgf
 
Oh, here we go. From my wrapper code.
 
9:05 AM
How to get more votes on an answer? none of my answer got votes. All 0!
 
$result = $pfp->authorization(
    $card_num,
    sprintf('%02d%02d', $this->card->expires_month, substr($this->card->expires_year, -2, 2)),
    $this->amount + 0,
    'USD', // WHY IS THIS AN OPTIONAL FU[REDACTED] ARUGMENT IN THE MIDDLE OF THE FU[REDACTED] PARAMATER LIST YOU MORON
    array(
        'comment1' => $this->order_type . $this->order_id,
        'firstname' => $first_name,
        'lastname' => $last_name,
Pardon my french, but allcaps profanity is the best way I could express my feelings about that at the time.
 
user652649
ahahahahahaha
 
user652649
and maybe NULL will not be properly handled, as always
 
Oh, no, their code doesn't even handle null. It just passes nothing through at all and then whines about bad currencies.
No way to set a default. SO WHY IS IT AN OPTIONAL PARAMETER!? ARGH!
 
user652649
geniuses
 
9:09 AM
No, my favorite part of that code is the error messages I got to write.
> The credit card processing service did not respond in a way I am programmed to handle.
 
user652649
lol
 
With matching assert so we get a big fat WTF email if it ever happens.
 
user652649
my code is even better
 
user652649
it is a WIZARD!
 
user652649
and it doesn't ********* work in any ******** way
 
user652649
9:11 AM
but it is a wizard!
 
Heh.
 
user652649
someone has think to be smart because he made a wizard!
 
oh my goodness, was all of that PFP stuff that long ago?
 
> Re #2041, merges [7596], [7597] from trunk to stable. pconnect, see ticket.
That's the commit that eventually lead to this answer
60
A: What are the disadvantages of using persistent connection in PDO

CharlesThe same drawbacks exist using PDO as with any other PHP database interface that does persistent connections: if your script terminates unexpectedly in the middle of database operations, the next request that gets the left over connection will pick up where the dead script left off. The connecti...

okay, enough nostalgia.
it's past my bedtime, and I'm coming down with a cold.
 
9:18 AM
Happy New Year
@NullPointer ping
@PeeHaa ping
 
@Baba yo... same to you ..
 
user652649
i'm sorry charles but if you are talking with me i'm not actually getting the point of what youre saying... as i said my english is not good! :(
 
@NullPointer how are you doing ?
 
@Baba aewsome .... how you ?
 
@NullPointer not bad .. getting ready for 2013 task at hand
 
user652649
9:21 AM
@Charles nopaste.me/paste/200048891550e7f06d75ca2 there's also this in the paypal's "library"... why they didn't use parse_str? why?
 
Do you have any idea where to get bad ass PHP Interview question
all the ones i see seem too easy
@webarto ping
 
user652649
@Baba i'm pretty sure that there is something on zend.com
 
@wes you mean Zend Certification questions ?
 
user652649
@Baba maybe yes
 
@wes anyone with good knowledge of documentation can easily answer that
it does not make the person a good developer
 
user652649
9:26 AM
maybe you are looking for something about programming theory, not just php?
 
but i want them to be able to solve it with PHP
 
Warning: session_start() [FUNCTION.SESSION-START]: Cannot send session cache limiter - headers already sent
 
user652649
@javawarrior use session_start at the top of your page
 
@wes the issue i have is .. i don't want to use my own level of understand to set the question ... not sure if it too easy or too complex at the end of the day
 
@wes You da man.
 
user652649
9:28 AM
@javawarrior lol
 
i'm making a login form
 
morning
 
user652649
@Baba you can publish questions on web and ask to "average" programmers (like me for example) if they are complex or not. because any interview you can find on the internet may have the same issue
 
how to hide the url address... while moving from 1page to another page
 
9:32 AM
@wes Interesting
 
header:
 
9:54 AM
Yo
 
@premkumareverestindia Redirect to the same page and use conditional processing
 
@premkumareverestindia Why would you want to hide the URL? I hate sites/apps that do that!
 
@MadaraUchiha Yes, it makes bookmarking difficult
 
@Nitin It makes browsing difficult
 
@MadaraUchiha Remember when browsers enabled websites to set the window.status?
@MadaraUchiha Google still uses some weird URL in their search results rather than the actual URL
 
10:01 AM
@Nitin Grandpa pepperidge remembers
@Nitin Did you ever hear me say I like Google?
 
user652649
@Nitin <a href="//fakeurl.com" onmousedown="this.href='//actualurl.com';"> xD
 
Then again, they don't really need to score high on Google, don't they? :P
 
user652649
yup :D
 
user652649
 
@wes I'm not sure Google sets a HREF on clicking. Whatever VooDoo they have in there is probably for tracking.
 
10:09 AM
@cryptic: Hello
 
user652649
@Nitin yes they set href onmousedown, and yes, they use the "big" url for tracking
 
@wes Oh, wait... you're right!
@wes Yes, I just had another peek... as soon as I click, the URL changes.... even a right-click does it. Sneaky little bugger!
 
user652649
:D lot of sites do the same
 
user652649
it is also used as a SEO trick
 
@wes How's it used for SEO?
 
user652649
10:14 AM
<a href="http://sitethatgainspagerank.com" onmousedown='this.href="actual page you will see
 
@wes Supporting multiple URLs but providing a single consistent URL to search engines? Re-directing search bots from pages they shouldn't see?
@wes Do you mean blackhat SEO for 'hijacking' CMS themes?
 
user652649
yes, also for not "clean" practices
 
user652649
the worst site for navigation is yahoo, i hate how they manipulate their links
 
user652649
middle mouse button doesn't work
 
user652649
sometimes doesn't work even the context menu
 
10:18 AM
@wes What do you mean? A Google-like URL switching technique?
 
user1125394
 
user652649
yes @Nitin
 
@MadaraUchiha hi
@wes are you still there
 
user652649
yes @Baba
 
What do you think is the most efficient way of generating all possible combination of an array set with recursion
 
user652649
10:28 AM
it is a good question but it is not totally clear for me. "combination" is ambiguous
 
user652649
@Baba
 
@wes Imagine this code eval.in/5987
 
user652649
but maybe looking at the array set it will be clear for me
 
@wes array set is $d1, $d2 , $d3
@wes Unique means if A1 is in the list then 1A is removed
 
user1125394
@Baba horrible
 
10:31 AM
but the code would start becoming a mess when you need to add $d4
@cyril exactly ... but do you know why its like that ?
 
user1125394
no
 
user1125394
you easily do it with recursion
 
user1125394
the recurse method call itself twice one without adding elts, one adding next elt
 
@cyril it would be nice to see your recursion solution
 
user1125394
what is your input format, and output?
 
user652649
10:35 AM
@Baba i like how it is made right now... i'm assuming you are a teacher... right? maybe it is better a clear way than a clean one for a student
 
$d1 = range("A", "C");
$d2 = range("1", "3");
$d3 = range("X", "Y");
that is the input format .. array
 
user1125394
array_merge($d1,array_merge($d2,$d3))?
 
user1125394
merge*
 
@cyril it would not work
A
1
A1
X
AX
1X
A1X
Y
AY
1Y
A1Y
2
A2
2X
A2X
2Y
A2Y
3
A3
3X
A3X
3Y
A3Y
B
B1
BX
B1X
BY
B1Y
B2
B2X
B2Y
B3
B3X
B3Y
C
C1
CX
C1X
CY
C1Y
C2
C2X
C2Y
C3
C3X
C3Y
That is the desired output
 
user1125394
ok
 
10:39 AM
@cyril the issue is that permutation can be used
 
user652649
whats wrong with nested foreachs
 
but it would take so long
 
user1125394
@Baba I have a recursive class for this
 
@wes image instead of 3 you now have 5 sets
 
user1125394
but have to adapt it
 
10:40 AM
@cyril .. let me see how it looks
 
user652649
oooh ok, yes, you need a recursive function
 
user652649
...... i'm writin'
 
user1125394
give me 20 mn
 
Ok Cool
 
user652649
@Baba you will not believe me but some time ago i had to write something like that... i had a dejavu right now... lol i think that i've resolved this with eval()!!! but i was a noob programmer... i'm tryin!
 
10:45 AM
@wes lol ... it actually very complex when you trying to avoid all possible combination
@cyril BRB
 
good mornings!
 
user652649
@cyril quite difficult eh?
 
@hakre Mornin'
 
@hakre mornings!..............:)
 
cv-pls: Backlog (mirror) | Meaning | Chrome/Firefox Addon | Cat Content | Snippets: MySQL | Reference: Errors | Operators
10
 
10:55 AM
@MadaraUchiha again ?
 
@NullPointer Pinning expires every 2 weeks
So in order to not lose it, I cancel it manually and repost is every now and then.
 
@MadaraUchiha ohhh ... i did knot knew that
 
@NullPointer knaw yu doo.
 
user1125394
@Baba there ytou go
 
user1125394
 
user1125394
10:59 AM
with an exact script count
 
user1125394
hehe eval.in resets script each 10k i guess
 
user1125394
@Baba I had it already in java and python for making all nested sets
 
More wasted time...
0
A: How to make an image fade transition?

AlexanderI will provide you with an example using CSS3 transitions. You can adapt and improve it for your specific case. My specific example works only with Webkit as it is written since the implementation of the transcription end callback is vendor dependent. You can fix this by using the correct vendor...

 
user652649
@cyril nice code ;)
 
user1125394
eval.in/6001 but it works with single chars also
 
user1125394
I use it more like that, you don't need wrapped arrays in this case
 
Fellas, I'm looking for a good, easy to template, easy to manage CMS, is there anything which resembles it?
 
@MadaraUchiha haha, hahaha, haaaaaaaaaa
that was a good one ;D
 
@Gordon =(
 
user1125394
11:07 AM
@MadaraUchiha like a blog?
 
@MadaraUchiha modx is supposedly easy and nice for developers. not sure on the user site
 
user1125394
for blogs jekyllbootstrap is cool
 
@cyril I was (forced to) working with wordpress up until now, but it's so freaking horrible templating-wise
I'm looking for something a little bit better
 
I doubt he is looking for jekyll
unless he wants a twist
 
user1125394
11:12 AM
hehe, nikic.github.com uses it, with very raw functionnalities
 
user1125394
but you need a host with ruby jekyll stuff, must be rare
 
@cyril, what you mean?
 
user1125394
@Alexander this blog system is built with ruby jekyll framework
 
11:19 AM
@cyril, then I understand you right
No, you don't need nothing at hosting
Usually you recreate at your machine and upload differences
You only need stuff on your own machine
 
user1125394
yes if it's your own machine that serves it
 
if working machine and hosting one are the same one then nothing to do
 
Quick question about XML
What effect do namespaces and DTDs have over XML?
I mean, isn't it the point that you can use any tag name and any attribute name you'd like?
 
user652649
DTDs and XML schemas define what tag or what attribute you can use in some tag scope
 
11:27 AM
@wes Again, isn't it the point of XML that you can use whatever tag or attribute you want?
 
user652649
yes, but schemas define what you are using
 
user1125394
dtd makes parsing easier I guess
 
user652649
what tags are you using and in what way
 
i'd go more for validation than parsing
unless you mix them both in the same boat
 
user1125394
with dtd even orders of tags matter
 
user652649
yes also count of tags
 
@MadaraUchiha XML is merely the syntactic and grammatical basis for XML Applications. But it has no semantics. XML allows you to define your own markup language on top of XML. So XHTML is an HTML in XML. If you want to use XHTML and let's say SVG together you need to namespace them, so it's clear which tags belong to which XML Application.
 
@Gordon Ah, I see
 
user652649
@MadaraUchiha if you ask me schemas doesn't help me, or the parser in nothing
 
@Gordon Grrrr stop editing your post! :D
 
11:34 AM
@MadaraUchiha done :)
 
I was caught up in the update of jsFiddle
Now, I see why nothing was working
 
11:55 AM
Good morning
I was browsing recently some php sources and realised a lot of people use something like 'a' . DS . 'b'.DS.'c.txt' to create paths. So I though of making build_path function for PHP core, is this a good idea?
 
@Robik huh?
 
@Gordon Something like build_path('a', 'b', 'c', 'd') or build_path(['a', 'b', 'c', 'd'])
Where directory separator would be set to current OS Directory separator or could be specified in parameter. :)
 
12:11 PM
@Robik implode(DIRECTORY_SEPARATOR, ['a', 'b', 'c', 'd']);
 
Yeah, I know this, that's why I asked if it's good idea.
 
@Robik sounds superfluous to me
 
It could skip ./ or ../ and such.
 
@Robik realpath(implode(DIRECTORY_SEPARATOR, ['a', 'b', 'c', '..', 'd']));
 
Does it look clean to you? :P
 
12:16 PM
@Robik yes
 
Okay then :D
 
looks ok to me, I've been doing that for years
 
@Robik not wanting to discourage you. I just dont think it's worth the effort :)
 
@Gordon, Too late
 
@Robik how about making gist.github.com/1358174 into a native function? That I would like ;)
 
12:17 PM
Effort? It's only wraper function :)
 
@Gordon
http://stackoverflow.com/questions/14171280/do-i-have-to-install-aptana-studio-plugin-for-eclipse-pdt#comment19635950_14171323
Them's harsh words :)
 
@vascowhite yeah, I wasted 3 years here apparently :D
 
@Gordon There's one problem with realpath solution by the way, it returns false if path does not exist.
 
@Robik and what would your build_path return?
 
Just path. No existence checking.
And it would not return absolute path :P
 
12:25 PM
@Robik well, do it if you want :) but dont be disappointed if it wont get into the core.
 
Well, so you are for or against?
 
@Robik neither, nor. I just think it's superfluous
 
Okay then, thanks.
 
@vascowhite : I also suspect, that he has a broken keyboard
 
@vascowhite lol....
 
@Gordon that image is awesome ..where did you get that ?
 
@NullPointer xkcd.com/378
 
@Gordon thankyou ...
 
@NullPointer, you just discovered xkcd? Then, have fun
 
as fun as this is , i think need to do some shoplifting ... or i will be stuck eating spaghetti with olives, or rice with soy-butter sauce .. again
 
12:37 PM
@Alexander yo .. and its cool.. gonna see atleast 50 of them
 
@tereško, gotta do that too
but, in my case, i will wait a couple of hours more
 
@NullPointer sometimes read Dilbert too
@tereško how did you find Gordon is 3rd in top PHP answerers league? how to find such tag based ranking?
 
he's stalking him xD
 
@shiplu.mokadd.im click on tag > choose INFO tab > on the right side there will be "Top Answerers" widget , click "more" there
it's somewhat hidden
 
@tereško great. Didn't know this hidden gem stackoverflow.com/tags/php/topusers
 
12:44 PM
@tereško, not necessarily. There's a "top users" link below the description also
 
what description , where
 
@shiplu.mokadd.im yo its awesome ...too bookmarked
 
@NullPointer , so you had never seen this one ?
user image
3
 
@tereško noop not yet .... :(
 
emm ... welcome to internet
 
12:48 PM
@tereško
@NullPointer, I love this one
 
@Alexander lol
 
1:05 PM
 
jquery new website rocks api.jquery.com
 
Oh God! I started laughing again!!
839
Q: What's your favorite "programmer" cartoon?

Dan WilliamsPersonally I like this one: P.S. Do not hotlink the cartoon without the site's permission please.

 
@NullPointer Well, I don't know how much you reviewed it, but I suggest you try the search first by entering something in there and then pressing enter. :)
 
@hakre this is really good .... and its responsive website too
 
@NullPointer it gives different results ... however I like quicksearch.
 
1:13 PM
they really upgrade .. far more better than php manual in sort time
 
yes, it's fine. but also they don't have that much to document. but anyway, it's nice to have the revisions that well documented with added and removed and such.
I wonder if they offer the information as well in XML form.
 
yupp... and footer is really rocking with jquery link
 
http://stackoverflow.com/questions/14171714/php-runtime-or-logic-exception

\DomainException or \UnexpectedValueException?
 
@RolandFranssen really. the one you feel more appropriate in this case. It doesnt matter :)
 
1:19 PM
@RolandFranssen Unless someone catches Logic and Runtime seperately, e.g. try { code } catch (LogicException) { foo } catch ( RuntimeException) { bar } finally { baz } it wont matter if you extend from Logic or Runtime anyway.
 
Good morning
 
@ircmaxell morning :)
 
hi.
can anyone help me with this
{"call":{"message":"Test!","number":"202-123-1234"}}
i have to send this type of payload in post request..
i tried sending it through
i set the content-type to be application/x-www-form-urlencoded
it didn't find the message and number field. the response showed it as null..
anyone know what must be wrong ?
 
@Gordon I'd like to follow semantics here.. i'll go with domain for this one as the data-set is static and therefor checked in setFoo()... i would go with unexpectedvalue if the data-set is dynamic and therefor checked in doSomethingWithFoo()
 
@RolandFranssen then do so :) like I said, the semantics of the SPL Exceptions are broken anyway, so it doesnt matter what you use there. If you feel better with extending from Logic, then by all means, do so.
I think it was @LeviMorrison and @NikiC who tried to clean up the Exception mess. Dont know what came out of it.
 
1:33 PM
Man, how did I ever live without console2 for windows
 
@Gordon Thanks, haven't read that one. Still.. I like the idea of an invisible line beween logic and runtime code... imho programming vs. execution errors.
 
@RolandFranssen yes, we all do. Just not pretty with the given Spl Exceptions.
 
1:51 PM
hi all :)
I know that this question is kind a confusing but interested which php framework is better between YII and CodeIgniter for starter ?
I've searched at lot and can't find any important drawbacks , but just interested in your opinions too guys , thanks beforehand
 
@Shubhank maybe the Content-Type needs to be application/json?
 
@Gordon MIT would be good, I'll look to putting something on the wiki regarding licensing.
 
@Shubhank hard to tell if a "null" response is a success or an error. depends on the API that you are using. inspecting the response headers may tell you more as well.
 
@hakre hello :)
 
2:03 PM
Good morning @ircmaxell. ;)
 
what's the good word?
 
@DaHaKa you should learn about object-oriented design, design patterns, SOLID principles. that will allow you to judge the quality of frameworks yourself and decide which one (if any) to use.
 
@igorw How I think it seems to be depended on project (what kind it is ) and taste of coding :)
@igorw I've already studied basics of OOP and how I can guess choosing one of them depends on syntax and styling of framework , thanks
 
how expert, I need your help does any one know about wpmu
 
@DaHaKa If you want to go for starters, I would take something that is of help to you. That would be either what @igorw outlined - which means you need to take care - or alternatively, you give your soul into the hands of the frameworks, than I would choose the one with the true free-software license, so the vendor-lock-in is not that harsh. In that case, Codeigniter fails and you take Yii.
 
2:14 PM
@salathe I left you a message (here and on irc)
 
moar iterators: gist.github.com/4447499 <- my last two ones ;)
 
@Gordon Yep, I saw. He came to me first, and I forwarded him to you since you were the original author of the code he is interested in.
 
@salathe ah, I see. He didnt tell. So MIT it is then
 
@Gordon sounds good to me :)
 
@nikic FWIW, symbols (e.g. ruby symbols) do not really exist for technical reasons like saving memory. in my understanding the reason is semantical, allowing you to represent identifiers in the language. maybe this description helps: github.com/edn-format/edn#symbols. ruby symbols are more similar to keywords here actually - not only because of the leading colon :).
 
2:20 PM
@Gordon Shouldn't the name be RecursiveDOMChildNodeIterator ?
 
@hakre I'll foresee your advice inevitable , moreover I've already had heard some advantages of YII
 
Because with self first, the node itself is not taken into account on __construct.
 
@hakre it's just an example. It's beyond me why anyone would want to use that thing instead of XPath.
 
@hakre oO
 
@Gordon I used something similar for some XML debug print. It worked well that way, especially together with RecursiveTreeIteratorfor easy output. In xpath you normally don't have the hierarchy information (which one can workaround). But right, just was wondering which node to pass into the constructor.
 
2:36 PM
@hakre debugging DOMNode's is about the only purpose I can see for it and even that is obsolete since you can var_dump DOMNodes, nowadays
 
What I never really understood is, why in FilterIterator should I (as the examples suggest) test against $this->getInnerIterator()->current() instead of $this->current()?
@Gordon You can have? I tried it but does not help much IIRC.
 
8
A: Why doesn't var_dump work with DomDocument objects, while print($dom->saveHTML()) does?

GordonUpdate: As of PHP 5.4.1 you can finally var_dump DOM objects. See https://gist.github.com/2499678 It's a bug: http://bugs.php.net/bug.php?id=48527

 
C:\Programme\PHP-5.4\php.exe -d display_errors=1 "domnode-var_dump.php"
5.4.10
class DOMDocument#1 (0) {
}
class DOMElement#2 (0) {
}
class DOMAttr#3 (0) {
}
class DOMText#4 (0) {
}
^ that is the code from your gist.
 
@hakre it's @salathe's gist
 
@Gordon From the gist you linked ;) Didn't want to rob credits from salathe who does so many fine things.
 
user1125394
2:42 PM
is this a tail recursion eval.in/6000 ?
 
@cyril no, I would not say so because there is no return statement.
 
Maybe this is not with the windows version? My test here is with PHP 5.4 for windows.
But I could hardly reason why this should make a difference.
I probably should report it as a bug first.
 
user1125394
@hakre there must be a return with the call to the recursive call, (thus one recursive call only) ?
 
@cyril As I understand tail recursion the benefit is exiting the current function before recursive calling for the return. That at least implies that you must have a return statement.
PHP does not support tail recursion optimization AFAIK anyway, so it might not be of much substance whether or not that is then anyway.
 
2:58 PM
@hakre well, you just need to make sure that the recursion is the last thing that happens in the function.
a return statement is the most common way to ensure that
but if the last statement of a function body is a recursion, then I guess that is kind of a tail call as well
 

« first day (812 days earlier)      last day (4127 days later) »