« first day (505 days earlier)      last day (4439 days later) » 

12:03 AM
# sapi/cli/php -r 'function f((int) &$i) {$i++;} $a = 2.5; f($a); var_dump($a);'

Fatal error: Parameters with integer cast type hint cannot be passed by reference in Command line code on line 1
 
 
1 hour later…
1:31 AM
Just submitted two RFC's for #php https://wiki.php.net/rfc/object_cast_to_types and https://wiki.php.net/rfc/parameter_type_casting_hints (two sides to the same coin). Feedback welcome!!!
 
Taking a look :)
 
:-)
 
I have to say, you're very busy trying to add things to PHP, I wish I had the conviction you have to do this kind of stuff
 
I'm doing it because I'm looking for a new challenge. Programming things in PHP has lost its thrill (in terms of doing stuff on the side, not in terms of professional work)
 
I have a question, about __toArray, what if the object already implements ArrayAccess?
What happens in this case, should they be mutually exclusive, does one take precedence?
 
1:45 AM
they never overlap
__toArray happens on cast to array only. (array) $obj, or passing to an internal function that looks for an array explicitly (like array_keys())
 
I've never tried passing an ArrayAccess object to array_keys I guess, does it fail?
 
yup
 
Ok, fair enough :)
 
# php -r '$a = new arrayobject(array(1, 2, 3)); var_dump(array_keys($a));'

Warning: array_keys() expects parameter 1 to be array, object given in Command line code on line 1
NULL
with this patch, as long as it implemented __toArray(), it would work...
 
And the other RFC, it actually casts the parameter, not just type hints, I'm not sure if I like the casting
 
1:50 AM
correct, it casts to the destination parameter
 
I think I'd like the option for it to be a hint only, and generate a recoverable fatal error like it does currently. Perhaps an ini option?
 
NO!
 
:p
 
No ini settings
that'd be evil
I want strict hints. But there are a lot of opponents to that idea
so this implements the cast, while deliberately leaving the possibility of doing foo (int $bar) which would be a strict non-casting implementation
 
Still, I really dislike the idea of parameters being cast if they are actually of the wrong type. If I mess up my code and I pass the wrong type of parameter, I want to know about it, not have the code just accept it
 
1:55 AM
@Leigh PHP just accepts it today...
 
I thought it was just objects + arrays
*classes
 
it is right now
 
Ok I think I confused issues. Yes today it just accepts whatever you give it, with type hinting it would not, with casting it would still just accept it but it would change the type where appropriate. I'd like the situation where it would not just accept it
 
Night everyone
Have a small question regarding PhpDoc
If I want to place use call or namespace call, where should I do that at the top if I already have class description there?
 
@Leigh there is none currently, unless you did if (!is_int($foo)) die("Not an int!");
 
2:00 AM
answer is - yes , it has not been maintained in ages , and does not support php5.3+
 
@Eugene phpdoc doesn't recognize namespaces. Try doxygen or docx, or one of the newer documentation engines
 
Well, not as much as description, more like author and revision number.
@ircmaxell No no. I meant, that is there some certain style, where those parts are placed? If for example I have now, first few lines phpdoc with author and rev. and later on class A.
 
@Eugene umm...?
 
@ircmaxell , i recall that there recently was a talk by Rasmus , where here explained the reason why there is no strict type hinting for simple types
 
@tereško this is not strict typing
but it leaves the door open to it if the community ever wants to do so later
 
2:03 AM
well ... you are kinda moving in that direction
just saying
 
Actually, I think this proposal is more in the "spirit" of PHP...
 
I think we need to crush it's spirit!
 
I do as well
but whatever...
 
lol , last time i checked up on php's spirit , it read "yes, we have a function for that"
 
2:06 AM
@ircmaxell: Sorry, I didn't mean to rubbish your work at all by going off on a tangent saying what I thought would be better. Good job with the proposals. I hope at the very least the extra magic methods make it through
 
@ircmaxell In this context is there some certain place where use must be done? Above phpdoc comment or between it and class definition or elsewhere? Or it doesn't matter?
 
@Leigh No, I didn't take it like that
I built something that I thought would be implemented...
@Eugene comments are ignored by the parser. namespace and use must be the first actual code on the page. Other than that, you're free to place comments wherever
 
@ircmaxell I see, so namespace and use keywords must be used immediately after <?php
 
@Eugene you can have comments in between
but they must be the first code...
 
@ircmaxell Yes. I understand that. Okey. Thank you very much.
 
 
2 hours later…
user895378
3:52 AM
If anyone passes by and has opinions on the indentation of case statements inside a switch block, please share.
 
user895378
I don't really like the way it looks to have the case indented at the same level as the switch. It seems like it's more difficult to read, but lately I feel like this is becoming more popular?
 
4:57 AM
@rdlowrey I do it normally
switch ($foo) {
    case 1:
        //code
        break;
    case 2:
        //code
        break;
    default:
        //code
}
 
user895378
5:44 AM
@ircmaxell Yeah that's my preference as well (visually, anway). However the PEAR coding standard disagrees as does some recent discussion by the PHP standards working group people. I'm trying to decide if I should change my allegiance even though I hate the way an un-indented case statement looks.
 
user895378
Also: Chat Message Formatting 2 :: Me 0
 
user895378
I can't for the life of me figure out how to get an indented block of code in a message like the above. If you had visited the chat sandbox room a bit ago you would've seen my comical attempts (now deleted) to format a block of code with indentation.
 
Hello
@rdlowrey HEY DUDE I WANT TO DO FACEBOOK INTEGRATION IN MY SITE TO PROVIDE LOGIN SUPPORT
 
user895378
5:59 AM
@Rstar Sounds cool.
 
@rdlowrey hey have u ever done this ?
 
user895378
@Rstar Sorry, I have zero experience with facebook's API. Facebook and most of the other major players use an OAuth (open authorization) implementation for this sort of thing, though. I expect you'll have to interface with that.
 
user895378
Here's a link on the topic (I can't vouch for it, but it looks legit just scanning it): 9lessons.info/2011/02/login-with-facebook-and-twitter.html
 
@rdlowrey thanks dude so ur from US right ?
 
user895378
@Rstar yes
 
6:11 AM
@rdlowrey good so buddy doing job ?
@rdlowrey do u have any project buddy ?
 
user895378
@Rstar Well that varies from time to time, though I'm not sure the application process is open on that front. Not to mention, for all you know my code is an incomprehensible spaghetti mess :)
 
@rdlowrey what i want to say dude if u have any extra project we can earn money
 
user895378
@Rstar Well, thanks for the offer, but I don't have enough time for my existing projects (which is why I'm working [kind of] at 1am on a Saturday ... or Sunday now, whatever).
 
user895378
I would say the best way to find people to collaborate with is to work on open source projects. It's a great way to show what you can do. You just need to get involved with the community of programmers in whatever area you're interested, and the appropriate relationships will come about on their own.
 
7:57 AM
Greetings gang. Now broadcasting from my new location in India (Kolkatta)
The driving in India is certainly more chaotic than in Sri Lanka. I pity the pedestrians.
 
 
2 hours later…
9:34 AM
Anyone using Symfony here?
I have a question
0
Q: How to setup a many to many form in Symfony2

imikayI have three entities, ChannelEntity -> MatchChannelEntity <- MatchEntity, the MatchChannelEntity saves the many to many relations between the other two tables, I want a form to list all the channels using checkboxes, and if a match has one the of channels, the checkbox of that channel is sele...

I will appreciate you kind help
 
Bob
10:14 AM
I have made a web service (JSON) and I have a client. I know I can use HTTPS to encrypt the data being sent from the client to the server....but is it possible to also ensure that the URL I connect to access the data is not being used by other clients?
 
@Bob your URL will be visible. If you want to block other clients from connecting to it, you'll need to use some kind of auth check
 
Bob
yeah, that is what I need
But couldn't a "pirate" just use this key as well?
 
Well, if you're going with a server to server setup, then you can have a key for each client (like google or FB does). If you want it in the front end (like JS), you'll need to use a combination of the IP and host URL.
 
Bob
The client would be a iOS app
What I want to "stop" is to prevent anyone to open the app source, find the URL and use it.
 
10:32 AM
Is the app source visible for iphone apps? Would anyone be able to decompile like that?
 
Bob
If they jailbraked the phone they have access to decompile the source
 
 
2 hours later…
12:10 PM
posted on March 04, 2012 by Mark van der Velden

Introduction This document explains some best practices for application error/debug logging. Application logging is an important "tool" to help identifying problems. If done correctly, and if an infrastructure is in place that allows events to be put into context, it's easier to debug situations and thus makes it easier to solve problems sooner. While out of scope for this document, I'd

 
morning
@ircmaxell We should disallow (unset) ^^ Generally it should be removed ^^
 
(unset) is kind of useless...
 
Exactly
 
All (unset) does is returning NULL... It reminds me void from JavaScript for some reason...
Except the void 0 has some kind of usage. undefined may be overwritten (language problem), but void 0 always refers to undefined even if it was changed...
 
@GlitchMr In PHP null can also be overwritten (kinda)
 
12:19 PM
... that's something interesting...
I never knew that you could change NULL...
 
@GlitchMr In a namespace you can ;)
 
I do know that you can use null as a variable name, with ${null} = .... Pretty pointless :P
 
Variable variables are bad idea...
Binary number format has been added, e.g. 0b001001101.
:)))
 
1:05 PM
@rdlowrey I don't think either carries much weight. The first is a relic of PHP4 that was never re-thought, and the second really doesn't carry any weight at all...
@NikiC as a type hint, it is
 
@ircmaxell heh, I must have misread something, but I'm not sure what ^^
 
I think because I added the IS_NULL_CAST constant for consistency
 
maybe ^^
 
@NikiC: suggestion: update wiki.php.net/rfc/remove_preg_replace_eval_modifier to indicate the status is in voting phase instead of draft
 
@rdlowrey: Funny stuff, that guy is in here for 2 days spamming he "wants to do facebook integration", then decides to use the words "dude and buddy" when he thinks you're american, so you can "earn money together" :D
 
1:17 PM
@rdlowrey hit the "Fixed Font" button when you are ready to submit it...
 
@ircmaxell I'll apply the change in a minutes and move it to implemented then ;)
 
:-P
 
@ircmaxell I'll happily apply the last one ^^
 
Well, then go for it! Either that, or petition that I should be granted karma (either way is fine by me)
 
Right after I'm done with the deprecation ;)
want to be sure that I don't break tests ^^
 
Oh ofcourse
 
1:59 PM
hi! Does someone know a good tool to design php classes visually?
 
there are no such tools
 
not at all? Even not for other languages?
 
oh well .. i guess you can do something like that in VisualParadigm
but the whole notion is stupid
 
Why is that?
 
Thanks @NikiC
 
2:06 PM
is anyone here know how to use yii php framework? because i need some help...stackoverflow.com/users/1150473/chuck-prog?tab=questions
0
Q: displaying Cgridview in yii

ChUck_PrOghow can i display a record in Cgridview? tbl_book: id title author tbl_in_out: id book_id date_out date_in I have created a relationship that the book_id in tbl_in_out belongs to id in tbl_book. what i want to do is to query a record in the tbl_in_out with the corresponding data in tbl_book ...

i really need some help
 
2:21 PM
lxr.php.net/opengrok/… ... ... ... ... ...
 
hello.. any idea how to update libxml 2.7.3 to 2.7.7 in xampp mac?
 
@NikiC Huh?
 
@ircmaxell I mean the ELEMETS ;)
 
LOL, I missed that
 
2:38 PM
Hey guys I'm trying to make a list of useful websites for various tasks we sometimes run into, such as, something for string manipulation/encoding, colour pickers, etc... Anything I should add to this (quite short) list?
 
3:40 PM
if somebody knows about tcpdf .... if i want custom header and footer i have an example here but trying to write HTML in it ... not working .. is it possible? here the custom header footer example ... tcpdf.org/examples/example_003.phps
 
user895378
@Leigh Hehe I know right. I think he asked if I was American to deduce my timezone. He must've reasoned that any American in SO chat at 2am local time on the weekend must be pretty hardcore.
 
user895378
@ircmaxell In that case thanks for justifying my aesthetic preferences :)
 
user895378
@ircmaxell And for mitigating my chat formatting ineptitude
 
4:04 PM
Hi Sea Spray
 
^^
@ircmaxell The fix for the call_user_func_array megaleak turned out to be surprisingly simple ^^
 
user895378
4:46 PM
Is destroying a variable by $var = NULL any different performance-wise under the hood than calling unset($var)?
 
no
 
user895378
@NikiC Thanks, was hoping it might be a new micro-optimization I could add to my obsessive-compulsive disorder to-do list :)
 
omg , i have cleaned up my tabs
 
@tereško Now only 73 are open instead of 156?
 
kinda
only ( counting ) 9 instead of something like 40
my main machine is laptop , i cannot open 150+ tabs
 
4:55 PM
I'm bountying:
4
A: Converting indentation with preg_replace (no callback)

QtaxYou can use \G: preg_replace('/(?:^|\G) /m', "\t", $string);

Liked that answer ;)
 
5:12 PM
Oh, that's nice indeed. Putting that one in the favourites.
(mainly because I didn't know about the existence of \G)
 
5:52 PM
@ircmaxell Tried to clean up the immense code duplication in your zend_compile.c patch, but didn't succeed: gist.github.com/cf229eb87b3b393137e3 Still so much strange code :(
 
 
1 hour later…
7:19 PM
posted on March 04, 2012 by Chris Shiflett

Thanks to reader Steve Gricci, I have learned that BackTweets no longer exists, presumably because BackType was acquired by Twitter. (Regardless, why let the domain expire?) I used BackTweets for the "tweets" link at the top of each post, so anyone who clicked it would be greeted by a parked Go Daddy page instead of seeing all tweets related to a particular post. Yikes! (I've shared my thoughts

 
8:02 PM
Hi anyone there?
 
hey
hey folks, are there anybody who could suggest me a good drupal 6 tutorial or a book for a PHP developer?
 
No, but I bet google could.
 
hey
there are tons of books on drupal
not sure which one to pick.
 
8:24 PM
Ok guys, teresko basically told me off for breaking Liskov substitution (I think) for accessing child constants from the parent using static::CONST. Whats the better way of giving the parent access to this data, injecting via the constructor? (The application is a basic ActiveRecord class for MongoDB, and I need to tell it which database collection it is working with)
 
user895378
@Leigh I'm not entirely sure that's something that should be defined as a CONSTANT if it changes from class to class. My first inclination is that the information you're accessing is a dependency and should therefore be injected. You probably won't ever want to instantiate the parent anyway, so why not make it abstract and require that information in an abstract __construct method?
 
Current implementation is like:

abstract class MongoActiveRecord {
	const COLLECTION = 'undefined';

	protected $collection = null

	public function __construct(MongoDB $db) {
		$this->collection = $db->{static::COLLECTION};
	}
}

class AnotherClass extends MongoActiveRecord {
	const COLLECTION = 'realCollection'
}
 
user895378
Ah, you're ahead of me on the abstract ...
 
@rdlowrey: Its constant for the child, there is a lot more functionality in the abstract, all basic CRUD operations
+ __set/__get magic for determining which fields have been updated for more efficient update operations, making the most of Mongos features
Obviously it's very easy to inject the name of the collection, I am just curious why this is apparently so wrong :P
 
user895378
Well, I can give you my explanation with what I understand Liskov to mean in that scenario and if anyone cares to amend or contradict they're welcome to ...
 
8:35 PM
I missed out on all this fancy principle crap by not going to university :P I'm 28, been programming for 17 years, and have more bad habits than most people have had hot dinners.. I'm all for correcting them, I just want to understand what I'm doing wrong rather than being "told" it's "just like this because it is"
 
user895378
Basically, I understand Liskov to say that if the child is a subtype of the parent, then you should be able to replace an object of the parent type with an object of the child type without altering any of the desirable properties of the parent. So in your case you're replacing the desired COLLECTION property even if in PHP parlance it's a constant.
 
user895378
And I wouldn't say that it's wrong ... I mean, your program will still work. It's just that from a design perspective, it will be easier to understand what's happening, easier to debug and easier to change behavior going forward if you adhere to the principle.
 
Thats basically what I read on wikipedia, however, because it is defined in the abstract class, the child would have it whether I overrode it or not
although it would be putting data in the wrong place if I didn't override it, maybe that's the catch with Liskov, because it really is a dependency.
 
user895378
It sounds like you already knew the answer to me :)
 
I just needed to be helped along, I didn't really consider that fact until just now :)
so cheers, dude buddy!
 
user895378
8:42 PM
Say, you looking for project buddy?
 
user895378
You know, cause we could make some money
 
user895378
Oh wait, you aren't from the US, so you don't meet my qualifications :)
 
user895378
Dude. Buddy.
 
Sorry, already making money, I'm trying to knock up a good POC for some use cases for Mongo, I get paid overtime for this
 
user895378
nice
 
8:43 PM
It is nice, since I clearly have no idea what I'm doing, lol
 
user895378
Well, overtime pay is particularly sweet if half your time is spent researching how best to accomplish something!
 
user895378
And I wouldn't be too concerned about missing the technicals in university ... the way you're doing it you get paid to learn the useful details, which is better than university for some very obvious financial reasons.
 
Ah but the worst part is, I'll have to do a 30+ minute presentation on NoSQL, pros, cons, use cases, demo, etc
 
user895378
Eh, so you learn it. Then you got a lot smarter and got paid to do so.
 
Actually looking do start a part time Masters this year. I applied last year, but they said I don't have enough "relevant work experience". Without a bachelors degree they're demanding 10 years "clearly progressive experience"
A little bit bullshit, since I had 9 years and pretty awesome CV
 
user895378
8:51 PM
10 years seems like a lot ... and I'd say the "clearly progressive experience" bit is an extra defense so they can say, "No" to people even if they meet the stated criteria
 
They want you to have been working up the ranks throughout your career, not taking on stuff you can't do then having to go back down to IT support or something
 
user895378
I have to wonder, though, what you're going to learn from a masters program that you can't teach yourself? I mean you can access syllabi online from lots of programs and teach yourself. Sure the piece of paper is a nice third-party verification of your skills, but programming is a pretty solid meritocracy I'd say.
 
user895378
Start working on some open source projects (or start some) with all your sweet skills. It's hard to say no to people when they can point to specific, worthwhile projects they've contributed to ...
 
Although, if I'm honest, coding in PHP does feel like a bit of a step down from my last job. It's certainly not as challenging as debugging mainframe code for legacy systems in a dead language :P
Well, it's not so much about what I'd learn, as making up for something I feel I'm missing. I want to do it because I'd like to say I was able to
Anyway, wench cooked, I gotta go eat and watch TV with her. Thanks for the chat and your input, it was helpful.
 
user895378
No problem. Enjoy the fish and chips ;)
 
Wil
9:46 PM
Is there anyone here that understands preg_match / regex well? I got a little error that I don't understand :( If you would rather a post on the main site, just say
 
user895378
Possibly ... just ask your question and if anyone can and wants to help they will.
 
Wil
I'm getting "unexpected T_ECHO" and I am not sure how to fix it :/ (I am no PHP expert... this is one of my first scripts)...
preg_match("#/cpe(.*)\.conf#",$_SERVER['REQUEST_URI'],$matches2)

echo $matches2[0];
and the echo line is causing the error
 
user895378
You're missing a semi-colon at the end of the preg_match line
 
@Wil is that your exact code?
 
Wil
@PeeHaa yeah
ok... trying now
 
9:54 PM
:-)
 
Wil
@rdlowrey Thanks... I feel like an idiot
it works now
 
not even a double facepalm ? ;)
 
user895378
Haha I understand. I feel that way more often than I care to admit :)
 
Wil
yeah... that as well!
 
anyone with good css knowledge pls visit css room chat.stackoverflow.com/rooms/…
 
Wil
9:55 PM
the thing was, I copied this out of the if loop above, and, I just didn't think about it... I haven't done much work with PHP at all and it was telling me the error was with a different line, so, I completely missed it
 
@TuralTeyyuboglu why not ask your question here?
 
@PeeHaa this is PHP chatroom, not CSS
 
user895378
@Wil Yeah, the echo was unexpected on that line because PHP was expecting a semi-colon it never found ...
 
user895378
I can understand the confusion
 
Wil
Visual studio can let you know things like that quite easily in the editor... At the moment, I am just using Notepad++ as this is a simple script, but are there any editors that can spot things like this, or, with PHP, does it just come with experience?
 
9:56 PM
@TuralTeyyuboglu it is. But we won't find out where you live and come after you if you politely ask a css question in here :-)
 
user895378
@Wil I believe eclipse will validate your code inline as you type, though I prefer plain text editors personally ...
 
Wil
Ok... I'll stick with notepad++, thanks
 
@Wil a simple text editors with syntax highlighting should be ok
it's experience to spot the error when you got that message
 
Wil
this is being deployed on a *nix server, but, I just wanted something quick here, so, I am using WAMPserver... Is this error stuff a normal part of PHP as I haven't seen it before or did it install something funky:
 
user895378
notepad++ is awesome ... I miss it a little working primarily on linux these days, though I'm mostly happy with gedit
 
Wil
9:58 PM
it puts that in the place of the error but continues processing the page
 
@Wil you used a non existant array element
$thearray = array('first item');
echo $thearray[1];
would result in that
 
Wil
@PeeHaa Yeah, that's fine/I understand that error... I just never seen errors that come up like that
 
user895378
That looks like xdebug output to me ...
 
Wil
sorry... in more detail... as that picture sucks... there is text before and after that... it just put that in the place where I had an echo on an array
@PeeHaa (sub-question) processing an array without an identifier always does item 0?
 
@PeeHaa ok. please take a look at this screen shot. screencast.com/t/kO2i7QRFH and here is live webpage pikproduction.az/index2.php Can u please take a look at css?
 
10:03 PM
@TuralTeyyuboglu 1 sec lemme check it out
@Wil what do you mean? Something like: echo $thearray[]; ??
@TuralTeyyuboglu looks fine to me. what browsers are you using?
 
Wil
@PeeHaa sorry, I didn't get your line - $thearray = array('first item'); or are you saying $thearray = array('first item'); automatically = echo $thearray[1];
 
@PeeHaa 3 divs must stay side by side
@PeeHaa last one stands UNDER second
 
@TuralTeyyuboglu k lemme check
 
Wil
(sorry, I am very new at PHP... coming from C#, I just have to write this one script!!! I don't even know if PHP numbers in arrays start at 0 or 1 which is why I asked that stupid question!)
 
@Wil arrays in php are zero based
So when initializing the array: $thearray = array('first item');
 
10:05 PM
@Wil in every language array starts from 0
 
You can do echo $thearray[0];
@TuralTeyyuboglu I'm pretty sure not in all
 
@PeeHaa afaik
 
user895378
@Tural That's true in C-family languages I believe
 
@PeeHaa have u checked?
 
@TuralTeyyuboglu yup
 
Wil
10:07 PM
@PeeHaa I just don't get what you mean by that line :/ sorry! I am used to creating an array, then, to assign anything you start from array[0] ... I don't get what you are assigning to the main object :(
 
@PeeHaa so?
 
@TuralTeyyuboglu You should drop the margin-right on the last div
@Wil np Let me explain:
This:
 
user895378
@Wil In php you aren't required to declare the array index you're assigning when you assign a value to it. You can simply do $myArr[] = 'next val'; and PHP will automatically append it at the end of the array with the next index value
 
$thearray = array('first item', 'second item');
 
div.f_box:last-child{
margin-right:0px !important;
clear: right
}
 
10:08 PM
is the same as:
 
Wil
ok... I get you already
you can add as many strings, and, it will just add it to the next index of the array?
 
$thearray = array(); $thearray[0] = 'first item' $thearray[1] = 'second item';
 
@PeeHaa I already did it
 
@Wil correct
 
Wil
ok, I get you! Thanks
 
10:10 PM
omg...
 
@TuralTeyyuboglu first: no you didn't (inspect the DOM and you will see)
 
div.f_box:last-child{
margin-right:0px !important;
clear: right
}
 
@TuralTeyyuboglu second: try to prevent doing dtuff using !important
 
@PeeHaa correct me if I'm wrong. I added this to css
@PeeHaa same result
 
@TuralTeyyuboglu have you inspected using firebug for FF or developer tools (f12) for chrome?
 
10:12 PM
div.f_box{
    float:left;
    width:169px;
    margin-right:100px;
    color: #555;
    font-size: 12px;
}
div.f_box:last-child{
     margin-right:0px !important;
     clear: right
}
@PeeHaa here's css
 
@TuralTeyyuboglu you don't need support for IE right?
 
@PeeHaa what's cross-browser compatible way to get same result?
 
@TuralTeyyuboglu simply drop that CSS3 pseudoselector and add a class to the last div. And style that using css
maybe not the cleanest, but it works in all browsers
@rdlowrey you aren't experienced in javascript by any chance?
 
user895378
@PeeHaa Some ... read all the classics and use it for things here and there. I may be able to help
 
I'm working on a Chrome extensions. It should wait untill a chatroom (here on SO) is finished loading. But for some reason it doesn't work.
  // check if room is finished loading
  this.init = function() {
    if ($('#loading').length) {
      console.log('waiting for chatroom to finish loading.');
      setTimeout(this.init, 1000);
    } else {
      console.log('finished loading...');
      $('div.user-container div.messages div.message div.content').each(function() {
        $post = $(this);
        if (that.isCloseRequest($post)) {
          that.formatCloseRequest($post);
        }
      });
    }
  }
  var cvHelper = new CvHelper(stackApi);
  cvHelper.init();
 
10:17 PM
@PeeHaa please refresh the page.
 
@rdlowrey Sometimes it gets to finished loading, but other times it just displays waiting for.. 2 times and then nothing
 
div.f_box{
    float:left;
    width:169px;
    color: #555;
    font-size: 12px;
}

div.f_box .std {
     margin-right:100px;
}

div.f_box .last{
     margin-right:0px;
     clear: right
}
 
@TuralTeyyuboglu you want to create the following selector: div.f_box.last
 
@PeeHaa I want to create .last only for using .f_box divs
 
@TuralTeyyuboglu no you don't. You need it on the f_box because that is where the margin is that you want to reset
@TuralTeyyuboglu you want to create the following selector: div.f_box.last
 
10:21 PM
@PeeHaa take a look at html. I have changed html too
 
@TuralTeyyuboglu I know and what I said still stands.
 
user895378
@PeeHaa It looks okay to me. Have you tried using the more explicit $('#loading').exists() instead of .length()?
 
@PeeHaa so what to do?
 
@TuralTeyyuboglu Change the selector to div.f_box.last without the space
@rdlowrey No I haven't. Shouldn't be the problem, but to be sure... :) Lemme test it
 
thx
@PeeHaa ook.. it worked
 
10:23 PM
@TuralTeyyuboglu great
 
user895378
@PeeHaa Yeah it looks like it should work to me as well, but you never know :)
 
@PeeHaa btw. How do you think about my design. It's low budget website for movie production company. There will be some slideshows on main page
 
@rdlowrey what is exists btw??
@TuralTeyyuboglu I dunno I'm really really bad at design :P
 
@PeeHaa ok. thx
 
user895378
@PeeHaa Doh! sorry, I always extend jquery with this:
 
user895378
10:25 PM
jQuery.fn.exists = function(){return this.length>0;}
 
user895378
I forget it's not a native jquery thing
 
So it's the same :P
 
user895378
Yeah, I'm a dummy
 
hehe np
 
user895378
I don't see any reason why the code you posted doesn't work, though
 
10:26 PM
@rdlowrey :( me neither. Will post a question on SO and find out what's happening
 
user895378
I guess you haven't bothered with testing in other browsers since you wanna use it in chrome specifically
 
@rdlowrey nope :)
 
why would any serious developer choose to use jquery ?!
 
@rdlowrey It's injecting javascript in the SO chatroom so it's pretty hard to test it in other browsers
 
user895378
@tereško I'm not a serious developer with javascript :)
 
user895378
10:28 PM
I know jquery is questionable ... I feel a little dirty using it
 
I don't need to be a serious developer in javascript luckily. That's what the frontend dev team is for ;)
2
 
user895378
And I don't have time to keep up with the different support across browsers for js functionality
 
user895378
Any framework in any language is questionable as far as I'm concerned. We didn't become programmers to copy/paste other people's code :)
 
user895378
And you're trusting that it's actually done correctly, without security holes
 
@rdlowrey btw I think I got my error
 
user895378
10:34 PM
@PeeHaa ?
 
@rdlowrey I had 'this' in the wrong context
doing var that = this; solved it
 
user895378
@PeeHaa I always forget that. Every other month or so I find myself working on a hobby project like yours and fail to do that and google for like an hour before realizing the problem :)
 
user895378
I really need to just block off like 30-45 minutes each day and start hardening my .js skills once and for all.
 
@rdlowrey Well that. And the fact the I am a complete moron since I had it, but pasted it below the function. That's what you get for partying too hard
 
user895378
Then @tereško won't have to berate me for using jQuery
 
user895378
10:40 PM
@PeeHaa +1 for partying too hard I time-warped right past Saturday for the same reason. All I know is it was Friday and then it was Sunday and I needed a shower.
 
It gets the job done doesn't it
@rdlowrey :-)
 
 
@hakre ERROR: Required parameters missing in request!
 
user895378
Same.
 
user895378
I was just flabbergasted to see "aol" in any sort of URI in 2012.
 
02-21 Part 1 - Evren Ulusoy - Kommunity @ Proton Radio Part 1 (21.02.2012) - protonradio.com
It's the stream
Party time ;)
 
@hakre sweet. thanks
 
11:09 PM
I should dump that stream but I don't :/
 
Reminds me of the times I had the time to dj. Good old days :P
 
yeah - and cool voice / lyrics this track ;)
 
user895378
That stream will either put me in the programming zone ... or take me back to the catatonic inebriated state I was in at the end of the night on Friday. It's one of those two, though.
 
lol
 
yeah :)
and a really cool mix btw
 
user895378
11:12 PM
Cool. Time to walk the dog. Then some actual work with that stream in the background and a minimized chat instance so I'm not distracted. Catch you guys later.
 
cya
 
cya later
 
I've been evaluating PHPStorm for the last couple of days, was not able to crash it (even though it had hard times) but not everything is working as announced ;)
But the refactoring tools are really cool.
PHPUnit integration works, too.
Have not tested it on linux yet, I hope it behaves equal if not better.
Let me try the install....
 
11:29 PM
@rdlowrey Yeah I'm somewhat §hocked", too each time.
probably it's something related to content providers.
but providers do not tell much about the content they provide.
what is is the past form of "to poisen" ?
 
11:58 PM
@NikiC I'm going to extract out a few macros for it
 
all those beautiful boys... 2004, youtube, disqocs, wikipedia
 

« first day (505 days earlier)      last day (4439 days later) »