« first day (1396 days earlier)      last day (3552 days later) » 

9:00 AM
@HassanAlthaf Was that helpful?
 
brothers in php! who's good at OO or uses classes a lot here? I'm wondering if I can declare a static variable from within a non-static function (I need to count number of recursions, without sending the recursive function a counter var)
 
@pythonian29033 Why don't you make it a class variable instead of static? Why static at all? Do you like global state?
 
try to avoid static whenever possible (which is basically always)
 
@Jimbo Did I wake up in a world where everyone has forgotten how to speak English again?
 
9:02 AM
@DaveRandom Nope, you woke up in stackoverflow indian chat
 
@Jimbo I'd have to reset the variable after each recursion then. . .it's not a train smash, just a thought; nice to have
 
@pythonian29033 FYI, static class members and global state are not considered to be a part of object oriented programming paradigm
 
@Patrick working on next level classes here buddy, the variable has no real relation to the instance or the class really, it is only needed during the time that the function is executed
 
@pythonian29033 How about you tell us what you're doing, and perhaps we can suggest a better way (best way to learn)
 
vs7
I need to integrate Paypal IPN for payment
I look for that but it always say to use <form with some hidden variable
 
9:11 AM
@vs7 I charge £80 p/hour, would you like my paypal e-mail address?
 
vs7
is that the only way ?
 
:D
 
The OO solution would look like:
$counter = new Counter;
$iterator = newIterator($counter);

$iterator->doTheRecursiveThing();
echo $counter->getCurrentValue();

$counter->reset();
$iterator->doAnotherRecursiveThing();
 
vs7
I'm a developer too but never integrate payment getaway so just using my luck ...@Jimbo
 
I'm recurring through a tree, in which I'm only going to go three levels deep, maybe only two levels depending on a field value in the second level
 
vs7
9:13 AM
but i found <form hidden field not secure as some one can see this and send my IPN a complete call back with the same data
 
using the counter inside the recursive function, but ya, I get the picture
 
@pythonian29033 when you pass around objects in PHP, it actually is the same object
 
vs7
So is there any another method which will be secure ?
 
@tereško huh? :/
 
@vs7 Why don't you check at the top of your script that it comes from IP address you expect? A whitelist?
Log / block the rest
 
9:16 AM
@Jimbo , can you explain to @pythonian29033 how object are passed around in PHP ... I have a disaster to avert =/ and have 43 minutes left
 
vs7
No other solution rather than checking whitelist IP ?
 
@vs7 I'd say it'd be the fastest to implement :-) And you can continue following the tutorial you're reading
 
vs7
I'm reading paypal documentation
 
@vs7 paypal.com/cgi-bin/webscr?cmd=xpt/bizui/IntegrationHub-outside xD You should tell them to change that :D
@vs7 btw, don't you have to generate a string, sent it to paypal?
 
vs7
@Naruto No
Do we need to that
You mean a hash ?
 
9:27 AM
Well with paymodules I've worked in the past, they kinda all work the same.. hidden fields, create hash, sent it along and have a response script for when paypal sents you something (like payment complete or payment not complete or something else
 
@JoeWatkins are you around?
 
@vs7 paypal has (or used to have) an example script that checks the IP to make sure the IPN comes from paypal
 
vs7
I think that encrypt hash can make payment secure
@Patrick I think that can resolve my problem thanks , also do you have any sample payment form e.g. like this
?
 
or any C guys who can tell me
why this:
    double r = (b-a)*(rand()/RAND_MAX);
    printf("\nrr is %f\n", r);
 
@vs7 no but I'm sure you can find some if you google it...
 
9:36 AM
always returns 0 ?
 
1
Q: Error in buddypress when using wp_editor

BoopathiSince none of plugin works with new wordpress and buddypress for rich text editor I have started to implement it myself manually directly into the theme. After using wp_editor() I got the editor on my fourms and it is posting forums content well without issue. However when I am trying to edit fo...

 
here b and a are just integers
 
@vs7 i don't know I am not working for paypal support...
 
vs7
9:42 AM
@Patrick anyway thanks
 
@AlmaDo Whats the result of (b-a) and rand()/RAND_MAX ?
 
@AlmaDo I guess that (rand()/RAND_MAX) is always 0
since rand() <= RAND_MAX
it gets rounded to 0 (int)
or rand() < rand_max (not sure)
Try ( (double) rand()/RAND_MAX)
 
well, actually that was not the issue (conversion I mean)
it's just a bit complicated..
 
haha
 
thanks guys
 
9:49 AM
I've written emulator in C for mouse driver for this:
15
Q: Simulating tremor (from e.g. Parkinson's Disease) with the mouse on a webpage?

Joshua MuheimI'm working for a foundation which raises awareness for accessibility in the internet. For a presentation, we want to offer a small workshop which simulates different disabilities/impairments to "normal" people. This is done via a website created especially for this presentation. One of the demo...

:D
 
@Jimbo I am not actually coding a logger. I was just doing that to learn Interfaces..
 
@AlmaDo what was it then?
 
@HassanAlthaf Ah, well you've learned a new pattern then ;)
 
@FlorianMargaine overflow
 
@AlmaDo you overflowed double?
 
9:52 AM
hehehe
 
@Jimbo yeah, thanks for your effort though.
 
i have database in access and in that myTable has date column it store date and time both now i want to select record date wise but it check date and time. how to compare only date in that?
plese help me
Created
6/10/2014 10:50:42 AM
6/10/2014 2:41:19 PM
7/25/2014 1:50:34 PM
7/25/2014 1:50:34 PM
7/28/2014 4:34:42 PM
8/4/2014 3:49:51 PM
8/4/2014 3:52:02 PM
8/4/2014 3:52:02 PM
8/4/2014 3:52:02 PM
8/4/2014 3:52:02 PM
i want to get records of 7/25/2014 only like this:
7/25/2014 1:50:34 PM
7/25/2014 1:50:34 PM
 
@Jimbo you pay for E-Books? Pirate it m8
 
how to this ?
 
9:54 AM
@HassanAlthaf No, I mean I want the paperback. I find reading software books better when they're actually solid books. Also, I have a job now, I don't pirate anything anymore ;-) I don't need to
 
@AlmaDo rand()/RAND_MAX
 
@HamZa For that I need to set up a blog first :)
 
SQL Query. I have Table A. Site_ID | Path | Site_ID2 | Path 2 ( 1 | /hello-world | 2 | /foo-bar ). Table B. Site_ID | Site ( 1 / foo.com). So table A has two site_ids that relate to table B. So a regular join wouldn't work
 
@SecondRikudo wordpress!
 
9:59 AM
@Fabien normalize your tables?
 
That said, I just might.
 
@FlorianMargaine They are normalised.
 
@SecondRikudo jekyll.
 
I need to pull a row from table A and switch both site IDs
 
@FlorianMargaine I need to learn how to use it
 
10:00 AM
@SecondRikudo hehe, I was also thinking about that. But I find it a bit hypocritical to do that
 
@Fabien not really if you can't use a join :P
@SecondRikudo just reuse a template and write your markdown posts
then push to github, and voila, everything is done. Including hosting.
I just forked an existing template and changed a bit there and there
 
only really horrible people use wordpress ... probably ...
I heard hitler used it ...
 
let me guess: Benjamin Franklin told you that, didn't he?
 
@FlorianMargaine Eh, I prefer HTML over Markdown, since it allows you to do so much more.
 
@SecondRikudo to write articles?
 
10:03 AM
Yeah
 
just in case... markdown supports inline HTML when needed
 
Basically like

SELECT (SELECT site from B WHERE site_id = A.site_id), A.site_path FROM ....
 
Also true
 
but I've barely used it.
 
Anyone got any contacts at rackspace?
 
10:10 AM
no .... why ?
there is someone hanging around from rackspace, but dunno who it is ...
I'm pretty sure anyway ... maybe I seen signature on internals list or something ...
 
Where @AlmaDo when you need him :p
 
?
I'm trying to launch my emulator on Mac :D
 
@AlmaDo I need your SQL brain.
 
what it this? post here, I'll check it
 
I have a sites column with site_id and site_url. Another table has a row correlating to this but more than 1 site_id in a row.
I need alike a JOIN on two of the same thing.,
 
10:14 AM
wait
 
ON a.referrer = als.site_id AND a.file_host = als.site_id
 
"I have a sites column with site_id and site_url" what this should mean?
 
SELECT (SELECT looks pretty horrific :P
 
@PeeHaa I assumed it wasn't possible
@AlmaDo 1 | www.foo.com
And so on.
 
@Fabien no. no.
stop further discussion
 
10:15 AM
Table B: 1 | /hello-world | 2 | /foo-bar
 
@Fabien Set up a sql fiddle please :)
 
just stop. You have your pitfall
 
I need to replace 1 and 2 with their counterparts from sites table
 
No. Blasted. Jaywalker
 
lol the table is already built and I can't change it.
 
10:16 AM
you're storing two things in one column. fix that first
 
@Fabien why not? go yell at whoever is responsible :P
 
Not an option right now due to time constraints.
 
"time constraints" are?
 
@Fabien "programmers don't ship shit"
 
you know, I actually may help (so, continue listening your issue) - but that will hurt your project in future
 
10:17 AM
@AlmaDo They need an export ASAP.
 
okay, create the fiddle
 
I will explain that they need to change it but I can't tell that to them atm
 
and what do you want from that table
 
@rdlowrey The more I think about it, the more I think that final class just shouldn't even exist. It's an implicit open/closed principle violation, and the only thing it will ever accomplish is that the guy who has that use-case for extending the class that you didn't think of has to result to a bunch of ridiculous hacks to make it work.
2
 
@DaveRandom Completely agree
 
10:23 AM
@DaveRandom Let's look at it from the other direction. What's the reason for having final classes to begin with?
What are the use cases?
 
@SecondRikudo When someone wants to enforce complete control over a system they're building to disallow it from being used a certain away
 
In the Java programming language, the final keyword is used in several different contexts to define an entity which cannot later be changed. == Final classes == A final class cannot be subclassed. Doing this can confer security and efficiency benefits, so many of the Java standard library classes are final, such as java.lang.System and java.lang.String. All methods in a final class are implicitly final. Example: Restricted subclasses are often referred to as "soft final" classes. == Final methods == A final method cannot be overridden or hidden by subclasses. This is used to prevent unexpected...
 
@Jimbo That's why the public/private thing exists.
 
@JoeWatkins Transferring a domain, the current NS is rackspace, need a copy of the zone file. Company who set up the account with rackspace in the first place have gone into administration...
 
@SecondRikudo Yep, but some people don't want you to inherit from an object. It's basically the wordpress way of thinking
 
10:25 AM
@SecondRikudo "What are the use cases?" You hate the people who use your code.
 
@Danack So don't publish your code.
@Jimbo Why wouldn't you want me to inherit from your object?
 
@SecondRikudo Well that's it, I simply cannot think of any. I thought that I have some once for some VOs, but eventually I think I realised the restriction was pointless
 
@SecondRikudo Because I'm a dick and I want tot force you to use my object and that's it.
That's not me personally btw, I never do that
 
35 secs ago, by Second Rikudo
@Danack So don't publish your code.
 
18 secs ago, by Jimbo
That's not me personally btw, I never do that
 
10:26 AM
 
@Jimbo I know
 
> i want a phper
 
@vs7 there??
 
^ awesome VCS account request right there
 
In other news, Genie passed away :(
Oh, I see I was ninja'd by @JoeWatkins by about 4 hours
 
vs7
10:27 AM
@Boopathi yes
but we cant talk here for WordPress
 
@SecondRikudo Alcohol / substance abuse moved to depression apparently, so he ended it :(
 
yes you were ... also :( @SecondRikudo
 
I guess now's not to best time, but I'm going to go ahead and say it anyway. I'm probably going to leave room 11 for a while soon
 
IDF calling?
 
No, nothing like that.
 
10:29 AM
OK, good.
 
I don't feel as welcomed here as I used to anymore.
 
don't be wet
 
By whom?
 
I know of at least 2 regulars who are actively ignoring me (as in, tiny avatar ignore), one without a reason I know, the second with a reason I can think of.
 
who ?
 
10:30 AM
Neither had the decency to tell me the problem to the face (or even mention that they ignore me).
@JoeWatkins Those who can't read this right now
I won't name any names.
 
@SecondRikudo but but named is how you identify people ... so I dunno who you're talking about ... which was the point of my question ?? :D
 
Overall, I feel less involved in the conversation around here, and I just don't feel as comfortable here anymore.
 
@SecondRikudo If you don't like Rebecca day, you will be shunned! Such is natural selection.
 
srsly tho, I dunno why you care about that ...
 
:D
 
10:32 AM
Even if I don't end up leaving, or even if I do, I think it's important to tell how I feel, instead of doing things silently and behind the scenes.
@JoeWatkins Because I expected those specific users to be better than that.
 
@AlmaDo So basically the report needs both this IDs switched out with those from sites table. Hope that makes sense? SQL Fiddle
 
@Fabien ok, I see. and what do you want from them?
 
do you ignore people ?
 
I'm not a help vampire that's been here for 10 minutes.
@JoeWatkins Of course. Not any regulars though. And even if I would, I'd at least have the half-decency to talk to them about it, or at least tell them "You are ignored".
 
@SecondRikudo I know what you are talking about, but really the internet is not the place to be butthurt, we're all (mostly) friends here, you don't need to change your ways because of 1-2 people, whoever they are.
 
10:33 AM
oh I see, let me do that..
 
@webarto Well, that last one was the one who broke me. It's not only because of that, but also because of it.
 
well I don't ignore anyone, because rude, I wouldn't ignore someone talking to me in real life, so don't do it on the interweb ... whatever about it, I don't see that them ignoring you is making you less involved in the conversation ... also the butthurt and friends thing that Dejan said ...
 
No one likes me too, but I probably deserved it :P
 
@tereško used to ignore me, not bothered, don't see why you would be ...
 
@SecondRikudo Don't be sad, I mean... @webarto hasn't once responded to my webfarto comments
 
10:35 AM
@Jimbo I wept silently.
No, I was busy tweaking the templates, sorry :P
 
@webarto Responses like that make everyone turn and look at me as I'm the only one laughing to myself
 
we all love everyone and everything, now can we stop talking about feelings ... it's extremely wet ...
 
Eh, just wanted to get this out.
 
@Fabien well, at first glance, it's like this, but that may cause NULL's for non-existent id's
 
@AlmaDo To SELECT A row from the report table switching the IDs 'foo.com, bar.com'.
 
10:37 AM
I was contemplating whether I should just silently leave and see when someone even mentions me, but I figured you guys deserve more than that.
 
@AlmaDo Perfect thanks :)
 
I wasn't saying "shut up", I'm just saying ... there's no sense to this ... if someone ignores you in the street, you don't care, same ;)
 
@SecondRikudo Don't leave it in like Genie did...
 
@JoeWatkins I don't consider any of you people on the street. I consider you friends.
 
you shouldn't miss out because of one or two people ... maybe if you said who it was you thought were ignoring you and they were involved in this conversation the problem would go away and we can go back to talking about kittens and whatever ...
 
10:38 AM
<3 (no homo, except maybe Dave)
 
And when someone I consider a friend ignores me without half a mention, it does hurt, yes.
 
I would go all Mossad on them.
 
*ignores room 11*
 
we are friends, of course we are ... we're friends because we're involved in the conversation everyday, and we don't ignore each other, if someone chooses to not be involved in that then it's not different to passing a stranger in the street is it ?
 
@webarto not funny...
 
10:39 AM
 
I need help.
A class is not loading.
 
@HassanAlthaf Use composer :-P
 
@JoeWatkins Like I said, it's not only that. It's also that.
 
	function autoload($class_name)
	{
		$path = 'classes/class.' . $class_name . '.php';
		if(file_exists($path)) {
			require_once('classes/class.' . $class_name . '.php');
		} else {
			echo $path;
		}
	}
	spl_autoload_register('autoload');
Thats my autoload function
 
@webarto and @rdlowrey ... I think we all fancy him a little ... we all talk about it so much that I worry we are sexually harassing him without knowing it ...
 
10:41 AM
$user = new User();
That is the instance below
and the path is right.
 
@JoeWatkins oh, we know it :)
 
<?php
class User
{
	public $userDetails;

	public function set($key, $value)
	{
		$this->userDetails[$key] = $value;
	}

	public function get($data)
	{
		return $this->userDetails[$data];
	}
}
 
@SecondRikudo is this about that room owner thing?
 
whats wrong guys?
 
@salathe hahahaha
yeah, we do ...
 
10:41 AM
@HamZa Sorta
It's more about basic human communication and less about any specific issue.
 
what room owner thing ?
 
@SecondRikudo I was just made room owner for the first time, I was like finally. Then one person came in and was like, nope. Removed everyone, including me who'd got it for 2 minutes. I was miffed at first then, got on with my life....
 
@AlmaDo This is the jaywalker antipattern then?
 
you have accessors, make the field private or protected, not public.
Also it would probably be better if you create a setter/getter for each variable instead of using one method each and an array
 
@Jimbo I honestly don't give a rat's ass about me being a room owner or not.
 
10:43 AM
@SecondRikudo I guess I know who you're talking about. Let me give you just a hint: I think he keeps silent whenever he thinks it's appropriate. We talked about this several times and I guess he doesn't want to get into that discussion again
 
@Patrick I know, I made it public because I was not able to access it, but now to see the class is not loading. :L
 
@Fabien no, I misread you
 
@HamZa Okay now I really want to know who this is. Just write it in reverse
 
@HamZa Well, I know with absolute certainty that those specific people are actively ignoring me.
 
or we could be growed ups ...
 
10:44 AM
Not "keeping silent" when I talk, but "tiny avatar ignore".
 
@HassanAlthaf use namespaces and proper autoloading
 
@SecondRikudo I don't know who this second user might be...
 
@Fabien but that's still not good. If you'll "add" columns. you'll add joins. And - it may cause repetitions since there may be multiple values
 
What would a better solution have been? To not normalise it?
 
@HamZa yeah
 
10:45 AM
@Jimbo that's the hint actually :)
 
@Patrick lol. namespaces r a pain.. man
 
@Patrick I would go all Balkans, what's not funny there?
 
@HamZa I know, you can delete it now :)
 
well it's just a guess. And I think my guess was right...
 
@HassanAlthaf Seriously, use composer. Once you've used it, you will never have to worry about autoloading again. All it does is generate an autoload file for you that you include at the top of your script / bootstrap / front controller, whatever.
 
10:45 AM
@SecondRikudo maybe because you're Jew?
/me runs
 
lolwut
 
@webarto You better run
 
LOL
 
@webarto just considering the current political situation over there I don't feel it's appropriate...
 
10:46 AM
@Jimbo cba.
lol
 
@HassanAlthaf no. not using namespaces is stupid
 
@HassanAlthaf I'm not kidding. It's imperative you take a look. Once you do, you will use it for 99% of all your future libraries, projects, whatever.
 
@Patrick OK, I was referencing more to post WW2.
 
Until now, I didn't ignore anyone. I feel like I might learn something from those who I want to ignore
 
10:48 AM
@HamZa I go over my ignore list every once in a while and clear it out
It's just that some users get back in the list very quickly
 
I never did like guessing games ...
 
The only ones I tend to ignore are help vampires
 
@Jimbo I know, but this project is too tiny m8
 
@JoeWatkins Fine, since everyone else seem to already know who I'm talking about, I'm referring to ircmaxell
 
why would he ignore you ?
 
10:49 AM
Hey everyone!
 
My guess, I'm trying to ping him for days to start a discussion about including more room owners into the mix.
 
@Appu hayy
 
@HassanAlthaf Man, once you've got composer installed, you add one file to your project called composer.json. Do composer install in your project directory. It gives you a vendor folder. You require_once __DIR__ . '/vendor/autoload.php'. Bam, no need to write your own autoloader, all classes, namespaces etc work
 
@SecondRikudo That is the reason I stopped doing it. Too much confirmation I was right the first time
 
Instead of telling me he isn't interested in having the discussion, he ignored me.
 
10:50 AM
@SecondRikudo Maybe he thinks you're a lost cause?
 
That's my guess anyway.
 
Not everyone who challenges everything they say is interesting to talk to
 
The only thing I know for sure is that he isn't able to read these messages.
 
I got that feeling too :)
 
@Jimbo Like I said, I'm not a help vampire who's been here for 30 minutes.
 
10:51 AM
@HamZa what's up
 
I'm a room regular who's been here for 2 years.
 
@SecondRikudo No I know, but remember that github issue on rebecca? I felt you were very strongly opinioned on that - not a bad thing, that's just you - but to some, they respect that you are you and don't want to talk to you - don't take offence to that
 
@SecondRikudo but then, it would be wrong to leave the room because of 2 people... There are more people that would rather have you.
 
We exchanged info and ideas, I learned a lot from him, and he probably learned very little from me. I gave him the friggin nazi cat riding unicorn burning people with rainbow fire image.
 
@SecondRikudo I don't think it's just you .. he tends to just stop talking when he loses interest, not sure why ...
 
10:52 AM
@Jack That's what I told him
 
@Jack Like I said, I know with 100% certainty that it's tiny avatar ignore, and not "stop talking" ignore
 
It's like <insert popular group with a single ideology here>. I'm sure they're lovely people, but if someone I'm talking to tells me that, I go and talk to someone more interesting. No offence anywhere, but it's the person's choice who they talk to. The other person just gets on with their lives.
 
@SecondRikudo unless you have given him a reason to do that, not sure why that would be the case.
 
@Jimbo That was all half jokingly. I also tell everyone that I'm a ninja god that can split mountains with my eyes, I don't really mean it.
@Jack I know it for sure because a mod told me. Mods can see that.
 
lol okay =/
 
10:54 AM
@SecondRikudo I don't think what he did was very democratic (the owners stuff) and it requires discussion (what you've wanted) but you've been ignored.
 
@webarto If you don't want to talk about it, say so.
"No I don't want to talk about it right now/ever"
At least have the decency to say "go away, I'm ignoring you".
 
well there were too many owners tbh
If we were ever to add owners I would volunteer to exclude myself from the list
 
@SecondRikudo That's borderline not nice of said mod
 
@SecondRikudo Maybe he said it too many times before and it manifested on you. I'm not sure, was absent, the room went too sterile after.
 
@PeeHaa That's a different issue. I'll take the "borderline not nice" on my shoulders.
 
10:56 AM
Was it @Gordon? @bolt @shog? NAMES!!! WE NEED NAMES!!!! :P
 
@PeeHaa hehehe
 
lol
 
@webarto Given that no one raised the subject, I find that unlikely, but whatever.
 
But serious. What are we talking about?
 
@PeeHaa md5
 
10:57 AM
I'm always in for moar #drama :D
 
@PeeHaa TLDR: @SecondRikudo is depressed because 2 (regular) people ignored him
 
@HamZa Sure, of course, I'm not talking about myself or anything, I wouldn't occupy the space for no reason too, I'm just saying that e.g. @SecondRikudo is constantly here and +1 wouldn't hurt the list... anyways, who decides about that, for example, why is @PeeHaa owner, he totally doesn't deserve it...
 
Like I said, the issue isn't the room ownership thing, it's the basic decency to talk things out with a fellow regular who's been in the room for no less than 3 years
 
ah well... story of my life... @HamZa
 
@HamZa Please don't twist my words.
 
10:58 AM
I think he's alcoholic too.
 
@SecondRikudo ok, I might have misunderstood you.
 
@SecondRikudo just needs a good bum and a beer and he'll be back to his old self
 
@webarto :-)
 
@Jimbo I don't drink, but thanks :)
 
@SecondRikudo Love how the alcohol was the only thing you had against that there :D
 
10:59 AM
@webarto Isn't irc the founder of this room?
 
BTW where have you been man? @webarto
 

« first day (1396 days earlier)      last day (3552 days later) »