« first day (771 days earlier)      last day (4195 days later) » 

8:01 PM
nope @ShaquinTrifonoff its not seeing my style sheet for my blog or my templeisrael site but if i just link to my main site it works
@ShaquinTrifonoff wait now its showing the styles
 
Hey guys, i know what im going to ask may sound a bit kludgey but im in a serious hurry right now: how can i make it so "echo $x" won't wrap $x in <html><body>....
In other words, make echo "just" echo $x's content and nothing else
 
well ... that IS the default behavior
you need to look for what is writing the HTML tags
 
@tereško Weird, both firefox and chrome will wrap it in html
im echo'ing fail and im getting <html><body>fail</body></html>
 
@Machinarius ...in the developer tools. Put header('Content-Type: text/plain'); at the top of the script.
 
@Machinarius codepad.viper-7.com/xGbmZB/54dev is this wrapped in tags too?
 
8:14 PM
@Machinarius If you look at the source, it doesn't have that.
 
... since i use Opera , i cannot actually test it (without additional effort, that is)
 
@ShaquinTrifonoff Please explain more, where exactly in the dev tools? as in F12?
 
@Machinarius Yes. F12 for Chrome, Firebug for Firefox.
 
just left-click right-click and "view source"
you should have such an option
 
8:16 PM
@tereško Right-click...
:P
 
hands .. they always get me confused
especially since i am ambidextrous
 
@ShaquinTrifonoff That seems to have done the trick
Thanks, now my quick-and-dirty webservice will work
 
we need to find a better canonical answer for "Fatal error: Call to a member function ... on a non-object" .. or maybe make one .. the current recommended one is crap :
11
A: Reference - What does this error mean in PHP?

hakreFatal error: Call to a member function ... on a non-object Happens with code similar to xyz->method() where xyz is not an object and therefore that method can not be called. This is a fatal error which will stop the script. Most often a sign that the code has missing checks for error condit...

oh wait ... @hakre is already on it
 
now im just ready to have my site working for me with out the work around
 
@tereško I edited the answer a bit. If you find the reference answer on the reference error question crap, feel free to improve.
 
8:26 PM
i am kinda looking
i want to close this one : stackoverflow.com/questions/13553052/… ( it was initially tagges as )
 
user1125394
@tereško session is one
 
wat
 
@tereško let me take a look.
 
user1125394
I was thinking of cookie sessions, but I misread
 
user1125394
In the design of database management systems, the identity map pattern is a database access design pattern used to improve performance by providing a context-specific, in-memory cache to prevent duplicate retrieval of the same object data from the database. If the requested data has already been loaded from the database, the identity map returns the same instance of the already instantiated object, but if it has not been loaded yet, it loads it and stores the new object in the map. In this way, it follows a similar principle to lazy loading. There are four types of Identity Map * Explic...
 
user1125394
8:30 PM
4 types: Explicit, Session ...
 
that wiki article is a sad joke
 
@tereško > This computer science article is a stub. You can help Wikipedia by expanding it.
 
i do not understand it enough to expand it .. i try to avoid making claims of authority where i have none
 
Jay
Anyone have any ideas in relation to stackoverflow.com/questions/13550145/…
 
user1125394
anyway this seems a useless or plain pattern
 
Jay
8:40 PM
I am trying to build a regex to take care of all occurances of that within an almost json
 
Jay
So I can build an associative array
 
user1125394
@Jay a json string?
 
Jay
Close to
I need to turn it into a json string
 
user1125394
you need to first loop the array, and apply the regex to keys
 
Jay
8:44 PM
{
29646191: [bunchofjson]
}
Its not json yet
its near json
this keeps it from becoming json
{
29646191: [bunchofjson]
}
 
@Jay What is the source / where is it coming from?
 
Jay
That needs to be something like {
"29646191": [bunchofjson]
}
 
@PeeHaa It's coming from an Erlang powered data-driven intergalactic server. And this needz moar buzzwords.
 
Jay
A Hidden api behind a social network that I cannot change
@lui that was pretty close
 
@Jay And what is a "hidden api"?
 
8:46 PM
@PeeHaa Yeah I was wondering the same lol
By definition it's not hidden
 
Jay
@PeeHaa they use it to poser their mobile app, it allows you to pull profiles with no limits
 
user1125394
@Jay json_decode words on it? did you try to validate jsons jslint.com
 
Jay
i DID
 
._.
 
user1125394
if yes use json_decode and loop into the array
 
Jay
8:47 PM
@cyril thats how I know its failing with {
29646191: [bunchofjson]
}
 
@Jay I find it strange that they have an API with invalid json
 
Jay
it wont json_decode because of that
 
user1125394
@Jay yes json keys must be strings
 
Jay
and its valid on js, just not php
 
It's either valid JSON or it's not
 
Jay
8:47 PM
its not valid json
but js can handle so they dont care
 
What site/can I see the API you are talking about?
 
Jay
I will share the code with you if you wish
 
> Uncaught ReferenceError: bunchofjson is not defined
 
Jay
through pm
 
There aren't any PM's on so... :P
Everything's public
 
user1125394
8:49 PM
var j = {234: [1,2]}
JSON.stringify(j)
"{"234":[1,2]}"
 
Jay
@cyril, I need it to be importable into php
 
I just put my email address publicly on github
 
user1125394
@Jay because js does it automatically
 
inb4 spam
 
lol
 
8:49 PM
i still hate these profile pages
 
Glad I'm not alone on that
 
Is that what you want?
 
user1125394
+1 @ShaquinTrifonoff
 
user1125394
except codepad.org/ZfbwZZks it can fail
 
8:56 PM
@Jay I got your email. If you used their public API, you wouldn't have this problem
 
user1125394
regexing a json string is almost as bad as regexing html
 
It's not JSON that they're giving you
It's their own format of some sort, and making sense of it isn't worth it since they give you a public API
 
Jay
@Lusitanian I realize this, but I have 37m profiles I need to pull for a project, and have their permission to do so
 
@Jay If you have their permission to do so you wouldn't be doing it like this, ask them for an API key with no limits and you'll be on your way :)
 
Jay
@Lusitanian api does not give all that I need
 
8:58 PM
meh...what does it not give you that you need?
 
user1125394
you would need a json parser
 
Jay
check for yourself
 
@cyril It's not JSON.
 
user1125394
ah ok, :)
 
yeah :p
Basically, if you want to use it, you'll need to write your own parser for it.
@PeeHaa Go do all of your work and win the lottery so you can sit at home and write Yadeo and PHPoAuthLib :)
 
9:04 PM
@Lusitanian That would be just perfect
 
hello!
 
No bicthing around only working on cool stuff
@jan267 Hiya
 
hi :)
what do you think about the deprecation of e modifier in PCRE functions ?
(in PHP 5.5)
 
@jan267 Thank god
 
:D
I was wondering if there was some convenient way to do something easy like a strtoupper or something without write a (lambda) function
 
9:09 PM
@jan267 BTW I meant thank @NikiC
@jan267 use case?
 
what do you mean?
 
What do I mean with what?
 
"use case?"
 
user1125394
= example
 
I mean, in this case that modifier is very useful preg_replace('#_([a-z]{1})#ie', 'strtoupper("\1")', $string);
Now I have to define a lambda function that returns that dumb line of code!
 
9:15 PM
@jan267 So basically you are trying to make the first character of a string uppercase?
I.e.: $string[0] = strtoupper($string[0]);
?
 
I need to transform a_word_like_this in AWordLikeThis.
 
user1125394
split then ucwords then join
 
isn't it slower?
 
user1125394
way faster, nah don't know, but who cares
 
However, I'm not searching for a solution, it was just for saying... in a dumb case, that modifier was convenient!
 
9:19 PM
@jan267 Yes. Magic quotes is also very convenient. And register globals even more so
:P
 
@jan267 The reason it was deprecated (although @NikiC would be able to tell you more about it) is that for all cases there is a good solution and it is a security issue
Hence aaaaaaand it;s gone
 
@NikiC ... hello
 
@NikiC :D ahah, c'mon! those are not :P
 
@jan267 If you are interested about the exact details of the deprecation, you can have a look at the RFC: wiki.php.net/rfc/remove_preg_replace_eval_modifier
 
@PeeHaa hi
 
9:21 PM
@Baba hi
 
jo @Baba
 
@NikiC Yes, yes, I've read that document, and I totally agree with it... I was just saying that now we'll have to change every code that uses that modifier even with dumb code :)
that's it!
 
@NikiC good to see you .... i think i drank too much today can you look at 3v4l.org/O6Z6u and tell me why i got AABC instead of ABC ?
@PeeHaa how have you been ???
@PeeHaa what did you have today ?
 
@jan267 Code shouldn't had that in the first place
Or is your code also full of eval()? ;)
 
no, sure...
 
9:23 PM
@NikiC or is that a PHP Bug ?
 
it's a bit different...
 
@Baba You are missing a $iterator->rewind() call
 
@Baba Woke up pretty late today. And working on a website for a friend
You?
 
@PeeHaa working on a transaction system ... stressed me out
@NikiC i noticed it worked with $iterator->rewind(); what i did not understand is why its need for fresh loop ??? and why extra A not C ???
 
however, thanks for you opinion :)
 
9:31 PM
@Baba that's a rather tricky question
@Baba I know that there is a reason for it (I've seen the bug report for this once or twice)
 
@NikiC then i guess am not drunk
YET
 
@NikiC nice one .. thanks
@NikiC its so hidden ... i guess i should add it as a question so that you can answer it ... am sure this is a very useful information
 
9:46 PM
@NikiC your blog it's very interesting! do you work on php core?
 
@jan267 yup
 
:) cool!
'night
 
nite @jan267
 
@NikiC arre you still there
1
Q: RecursiveIteratorIterator returns extra elements

BabaRecursiveIteratorIterator returns extra result if rewind() is not called before while loop Example $array = array("A","B","C"); $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($array)); //$iterator->rewind() ; this would fix it while ( $iterator->valid() ) { prin...

I hope you can answer it properly here ... it would be useful for others
 
user1125394
this is scary how short you can build app in python github.com/jkbr/chat/blob/master/app.py
 
9:55 PM
@PeeHaa any beer today ?
 
hello
 
@cyril :o
 
@Baba Nopez. Only whisky today
 
@PeeHaa have been taking vodka all day
1
Q: Is a PHP SplHeap really a Heap?

Kim PrinceIs the PHP implementation of a Heap really a full implementation? When I read this article, http://en.wikipedia.org/wiki/Heap_%28data_structure%29, I get the idea that a child node has a specific parent, and that a parent has specific children. When I look at the example in the PHP documentatio...

 
10:35 PM
@Baba I edited my answer
Though I'm not entirely sure what's going on. This looks like a bug to me and maybe I'll look at it a bit more tomorrow
 
@NikiC let me take a look at it
one moment
@NikiC you are just too smart
Nice update
i think i have an idea .. i moment
@NikiC the issue has nothing to do with RecursiveArrayIterator
thanks to your code i was able to find out
 
@ShaquinTrifonoff Hello :-]
 
Hi @MirwaisMaarij!
 
@NikiC RecursiveDirectoryIterator also returns same duplicate
 
@ShaquinTrifonoff How you doing mate:D
 
10:48 PM
@NikiC RecursiveIteratorIterator looks like the main culprit See eval.in/3917
 
@MirwaisMaarij Good, media can be commented on now :)
 
@ShaquinTrifonoff Awesome! Could I see it?
 
@Baba yeah, sure
 
@NikiC in the first loop
 
This is a pure RII issue
 
10:49 PM
RII::DebugRII::rewind
RAI::DebugRAI::rewind
RAI::DebugRAI::valid
RII::DebugRII::valid
RAI::DebugRAI::valid
 
@MirwaisMaarij Yep, same URL as before: 125.238.109.80
 
@NikiC was called 3 times rewind 2 times
1
Q: Why must I rewind IteratorIterator

rambo coder$arrayIter = new ArrayIterator( array(1, 2) ); $iterIter = new IteratorIterator($arrayIter); var_dump($iterIter->valid()); //false var_dump($arrayIter->valid()); //true If I first call $iterIter->rewind(), then $iterIter->valid() is true. I'm curious why it requires that rewind() be call...

 
@ShaquinTrifonoff Its perfect man, nice work!
@ShaquinTrifonoff Could I join your teamviewer?
@ShaquinTrifonoff I would like to see the MySQL side of this
 
@MirwaisMaarij Sure...
 
@NikiC did you see that
 
10:53 PM
@ShaquinTrifonoff yes ^^
 
@MirwaisMaarij Have you got TeamViewer open?
 
@ShaquinTrifonoff No sorry, hold on
@ShaquinTrifonoff Could you give me the link for teamviewer v8?
 
@MirwaisMaarij Have you not got it installed?
I thought you installed it last time..
 
@ShaquinTrifonoff I did, but I got a new windows
@ShaquinTrifonoff So I have to install it again
 
10:56 PM
@ShaquinTrifonoff Yep
what was yoru ID
Erm
It was me, it told me I connected
but I didn't see anything
 
Oh
You didn't have your computer name set
 
its Damage
my tv name
and I lost your ID
:S
 
> Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan
 
user1125394
that's why debugger programmers, code analysts are better paid
 
There are debugger programmers now? Where can I get one?
 
user1125394
 
@DaveRandom what is that beast?!
 
11:35 PM
@NikiC @hakre wrote it in response to a question I asked yesterday, hang on I'll find the post
yesterday, by DaveRandom
Problem: array of 8 integers known to be in the range of an unsigned short. Collapse them to the most efficient possible human readable string representation of an IPv6 address (by reducing the longest contiguous set of zero-blocks to ::, if that is at the end or the start then omit the leading/trailing 0 ref). Thoughts?
@NikiC ^^ that
 
Ah right, I forgot that you were the IP-address-guy ^^
 
:-P
Just drove 300 miles, am now officially dead
 
time to spend votes
 
user1125394
11:56 PM
are there proxies that work wioth another port than 80
 
yes , there are
 
I just learned a new acronym...every day something new :-D
 

« first day (771 days earlier)      last day (4195 days later) »