« first day (712 days earlier)      last day (4236 days later) » 

12:10 AM
@DaveRandom yup
 
@PeeHaa Thoughts on a feature where oneboxes are removed after the question is closed and strike through the post text?
 
@DaveRandom Sounds exactly like I planned. So yep go for it :D
 
May have sorted out the avatar notifications handling when posts fall off screen, it's a little hard to know since there's nothing going on in here at the moment so none of them are dropping off. Will leave my laptop on over night in the hope that enough will happen to remove some boxes
@PeeHaa Took me a while to figure out why some of what appear to be perfectly valid cv requests don't get one boxed, and I just figured out it's because they've been deleted
(I think)
 
@DaveRandom Yup that can indeed be the case. Once deleted there is no way of getting the question. Not with that API, but I saw there is v2.1 now. Haven't really looked at the new stuff yet though
 
Ta very much :-)
 
12:16 AM
Back to where I was, is there a way to center text in display:block?
 
Only if you give it width
 
Was flicking through the 2.1 docs yesterday, so far as I can tell the only differences are the write methods
 
@user1079641 You mean... text-align: center?
 
@tereško was talking about it but my internet went off and couldn't connect.
 
@DaveRandom Is it implemented that you can close vote through the API that you know of?
 
12:16 AM
vertically center
right now
 
@user1079641 is the height fixed ?
 
Don't think it is but it would be freaking great @DaveRandom
 
@PeeHaa Doubt it, seems like it would be too open to abuse. Will have a look though.
 
I tried to hack into it, but failed :P
 
12:18 AM
it looks like its on the top left instead of being center vevrtically
 
is .. the height .. of that block ... pre-defined .. in CSS ?
if you still cannot understand the question , you should try some forum in your native langauge , because english is not working out for you
 
<span style="display:block;height:10px;width:100%">Link1</span>
so yes it is
 
what's the font-size ?
 
i didn't put any extra font, its whatever the default is, 12?
 
inspect the element and check it .. i hope you know how to inspect elements in your browser
 
12:20 AM
one min
25px
but that is because of this:
	a.link1:link {
		color:#000000;
		height:25px;
		background:transparent;
		text-decoration:none;
	}
 
@PeeHaa There is a comment post method, that seems to be the only write method related to posts. I guess it would be theoretically possible to effectively spoof the close vote UI-generated requests, but I doubt SE would take too kindly to that, and it's probably best to play within the rules since the whole is already a bit of a bone of contention amongst the wider community
 
@user1079641 , you seem unable to use inspect functionality in your browser
you should hire a web developer
 
1
Q: Reusable Field Groups for Forms

I'll-Be-BackI will need to create a few forms and what is a good solution to reuse same field group on to other forms? DRY principle. I have came up with this solution, for example: Consumer Broadband Form contain 4 group of fields: PersonalDetails, Address, ConsumerBroadbandSelect, PaymentMethod. Each g...

 
@DaveRandom > spoof the close vote UI-generated requests That's what I tried to hack, but for some reason it didn't work. Also didn't really bother to go any deeper in it
 
I did inspect it and it showed "span 47px x 19px"
 
12:26 AM
would that mean that you are using firefox ?
 
I pressed "Inspect Element" in Google Chrome
 
then you have no excuse
 
I went on one of the span elements that displays the link
upon highlighting it, it said span 47px by 19px
meaning 19px is the height
 
i asked for font-size
it would most likely be in computed style section
 
@PeeHaa Meh, will maybe take a look at it at some point, tbh I'm not sure how good an idea it is to make it that easy. I suspect if you put a close link direct into chat people wouldn't properly review questions before casting a vote, and questions may end getting unfairly closed.
 
12:31 AM
font-size: 16px;
font-style: normal;
font-variant: normal;
font-weight: normal;
 
in that case you height for that span is too small
 
Yes it was computed style section and annoying because i had to click "show inherited" and didn't know
 
also , why the hell you need a span there to begin with ?
why ain't you setting style directly for the <a> tag ?
 
@DaveRandom Yeah. Probably right
 
I took out span tags all together
but i have no clue how the font-fize changed
programming ticking me off right now
 
12:50 AM
@user1079641 the font size did not change
the 16px is default value for browsers
since the span's are gone , have you set the height or your <a> tags ?
or do you expect the text in them to be multi-lined ( which would mean that setting height would be counter-productive )
 
I got it to work
Had to use line-height but, well, it worked.
 
Has anyone here seen SomeKittens lately?
 
Was in Javascript earlier today
 
@DaveRandom Thanks
 
1:48 AM
time to get some sleep
 
Quick question, why are msql_* functions out of data now?
 
@user1079641 Out of data? What?
 
sorry i meant out of date
 
@user1079641 if you mean "out of date" , then it is because noone has maintained them for 5+ years
 
2:01 AM
I don't want to move to PDO because its too confusing as I have no clue about it and will have to restructure all the code according to it, but I guess I will have to do it.
 
2:11 AM
@user1079641 That is a very good idea.
Simple example:
<?php
$db = new PDO('mysql:host=127.0.0.1;dbname=db_name_here', 'username', 'password');
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$query = $db->prepare('SELECT * FROM foo WHERE id = ?');
$query->execute(array($_GET['id']));
$result = $query->fetchAll();
print_r($result);
?>
 
I hope you are not being sarcastic
 
@user1079641 Does it look too complicated?
 
Its not complicated, its just extremely new to me. Its like learning a whole new language all over again, and so its kind of weird and scary, but i will get used to it if I keep doing it.
 
How would I put variables?
$query = $db->prepare('SELECT * FROM list1 WHERE name='" . $name . "'); ??
I know thats wrong.
 
2:24 AM
@user1079641 $query = $db->prepare('SELECT * FROM list1 WHERE name=?'); $db->execute(array($name));
 
hi guys
 
:D
i have a problem
 
see now here is the problem:
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$id=$row['id'];
converting that to pdo.
 
i call this functions
<?php
if( !defined('FormmailMakerFormLoader') ){
require_once( dirname(__FILE__).'/form.lib.php' );
phpfmg_display_form();
};
function phpfmg_form( $sErr = false ){
$style=" class='form_text' ";
?>
 
2:27 AM
$query = $db->prepare('SELECT * FROM list1 WHERE name=?');
$db->execute(array($name));
???
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$id=$row['id'];
 
after I call it, I cannot call values from this function
require_once("models/config.php");
securePage($_SERVER['PHP_SELF']);
 
$query = $db->prepare('SELECT * FROM list1 WHERE name=?');
$db->execute(array($name));
$row = $db->fetch();
$id = $row['id'];
@user1079641 That would be the equivalent.
 
hello?
 
@Sidath So securePage is a function in models/config.php?
 
ya
 
2:38 AM
@Sidath What does securePage do?
 
check weather the page uses https
 
@Sidath Does it use the header function?
 
I don't need that function at the moment
 
@Sidath What exactly isn't working then?
 
I can't get it done even without that function
okay
 
2:42 AM
Have you got errors turned on?
 
I use require_once("models/config.php"); to call loggedinuser info
 
<?php
error_reporting(E_ALL);
// Put that at the top of your script
 
but in a contact form <?php
if( !defined('FormmailMakerFormLoader') ){
require_once( dirname(__FILE__).'/form.lib.php' );
phpfmg_display_form();
};
function phpfmg_form( $sErr = false ){
$style=" class='form_text' ";
?> is there
i cannot call logged in user functions after calling the above
:(
 
@Sidath You can find if an error is occurring by putting error_reporting(E_ALL); at the top of your script.
 
ya I did
no error
 
2:46 AM
<?php
if( !defined('FormmailMakerFormLoader') ){
require_once( dirname(__FILE__).'/form.lib.php' );
phpfmg_display_form();
}
echo 'After if statement';
If you see After if statement, that code worked fine.
 
ya
the thing is that I cant echo user details
 
@Sidath Are the details echoed by phpfmg_display_form();?
 
yup
 
@Sidath What is if( !defined('FormmailMakerFormLoader') ){ for? If it is simply to check if a file has been included already, you can remove that part and just have require_once dirname(__FILE__) . '/form.lib.php';.
 
ya
the script works except the fact that i cannot call user functions yet
 
2:55 AM
<?php
require_once dirname(__FILE__) . '/form.lib.php';
phpfmg_display_form();
 
require_once( dirname(__FILE__).'/form.lib.php' );
phpfmg_display_form();
function phpfmg_form( $sErr = false ){
$style=" class='form_text' ";
then there is the contact form
 
 
2 hours later…
4:35 AM
Help Vampires: goo.gl/yctGc
 
 
1 hour later…
5:46 AM
Hey All! Thinking about getting my Zend PHP Certificate, but was wondering if the Test Prep set is worth the investment, or if there are better and cheaper sources to study for the certification.
 
6:15 AM
@Borniet Zend certification is definitely worthy... as far as career is concerned. Agree that the Test prep. set is a bit costly.
 
Good Morning
 
@dskanth Yes indeed, I'm working freelance, and the Zend certificate is often asked. As for the cost of the test prep set, it is indeed costly, but I can deduct the cost in my business :-) Yes, I know ;-) But I was wondering if the prep set is worth the money, or if it is better to buy some other books. Or both of course...
Good Morning Robik
 
6:37 AM
@Borniet I can't say whether the Zend Test prep set is the best for scoring well in the certification exam, as i have not seen it nor purchased it myself. But i can say that it would be definitely a good asset for the exam, as the exam creators might be preparing the set.
 
@dskanth You have a very valid point there :-)
 
6:57 AM
Good Morning
 
(cakephp probelm )I moved a website from a test server ( PHP verson 5.3.10 ) to the live server (PHP verson 5.3.17).
In the new situate all my code started to complaine about undefined
indexes. When debugging an array I see that the array indexes became
numbers instead of the Model names!? What can be the problem of that I
use the exact same installation of cakephp?


Below the 2 examples of arrays.

this is how the array should be.
---------------------------------------------
Array
(
[0] => Array
plz help in cakepho problem :
http://stackoverflow.com/questions/12615839/using-model-findall-returns-an-array-with-the-following-structure
 
Well, if you don't care to make the question looking nice, no one will read this.
 
You know after a year of working with .NET nothing would make me happier to go back to working full time with PHP
 
u have any answer ???
http://stackoverflow.com/questions/12615839/using-model-findall-returns-an-array-with-the-following-structure
 
@YogeshSaroya You've give us next to nothing to go off other than your presumption that is the PHP version that might be the problem. Have you looked at where the array is generated.
 
7:10 AM
@James my project is already live in other server .. there is no coding problem ....
 
@YogeshSaroya That doesn't automatically mean its not a coding problem. You could have different settings in your other servers that are masking or resolving an issue.
@YogeshSaroya Plus you still haven't give much to go off
 
Question: Setting values in $_COOKIE doesn't actually send cookies to the client, right?
Also, using setcookie doesn't do anything after the session has started?
(that is, it doesn't try to send the cookies at a later session start?)
So in other words, if I want to send a cookie after headers have been sent (session started), I need to push it into a database table and pop it out before the next session_start call on a subsequent page load, right?
 
@Hamster I'm happy for anyone to jump in on this but as far as I am aware headers are only sent either once you start echoing out content or you end script execution. So you can start a session and then set a cookie or set a cookie and start a session in any order as long as you haven't output any content
 
@James Oh? That's good to hear.
I suppose I was told wrong then.
 
@Hamster Calling setcookie doest actually send a cookie to the client it just adds a cookie header to the headers list which as I said is only sent when you start to output content. You can test if hearders have been sent at any point by calling headers_sent()
@Hamster If you try to add a new header after content is outputted you will cause an error
 
7:26 AM
mornings
 
@tereško Hi
 
8:23 AM
Morning all
 
Hi @DaveRandom
 
Plenty going on in here this morning I see :-)
 
morning
 
Morning
I must say there is nothing worst then two developers arguing about each other naming convention.
 
8:44 AM
If they work for the same company, what's to argue about, the naming convention has been set in the coding style guidelines, right?
 
@Eugene , try "junior dev trying to explain to the lead developer why globals ans mysql_* should not be used"
and why addslashes() is not a proper way for securing queries
 
@tereško is that some serious company or just a two person firm/team?
 
of course i am talking about "serious company" scenario
 
Does it still exist or is it just some abstract situation?
 
Oh it still exists :)
We have at least a couple of customers who still rely on register_globals
But telling people refactoring needs to be done, often falls on deaf ears
 
8:57 AM
it needs to?
 
@hakra Of course, it relies on register_globals, it needs to be refactored.
 
well, I did convert one app from register globals to without by first whitelisting all allowed input variables and their HTTP method (get, post) and if decimal or string, and then registering those "my own".
That reduced the requirements to refactor inside the transaction scripts.
and removed general register globals.
this worked quite well for really old software maintaining backwards compat of larger parts of the code.
 
Hmm still no answer in my question from yesterday stackoverflow.com/questions/12610776/…
 
9:15 AM
Has somebody experience with what this guy suggests?
1
A: How does PHP's crypt function work internally?

PolynomialIf you're looking for a strong password hashing algorithm to implement across different languages, use bcrypt. There are libs for Java, C#, JavaScript, PHP, obj-C, Python, Perl, etc. If this is for a login form, a good idea is to use a JavaScript bcrypt lib, and have the hash transmitted to the ...

Basically doing bcrypt hashes client side and then use a higher-performance hash server-side in storage for user passwords.
 
So what if javascript is disabled?
 
One of my monitors has died :-(
:'( in fact
 
9:32 AM
@DaveRandom You don't mind having a look at my question?
 
0
Q: Overflow Hidden/Visible in Banner plugin

SharmajiI am using a wordpress plugin for sliding images and text. This banner has a content area (as all do) where the images which slides are displayed. text and images can be added from back end. Text is allowed to display over the image. I mean the text will show over the image. What I am trying to...

@DaveRandom Please have a look at my question.
 
Chrome just updated itself.
 
@hakra @Hamster Please have a look at my question.
 
@Eugene Please have a look at my question.
 
9:35 AM
and .... shrunken.
 
@Sharmaji we all seen, that you've been asking. There is no point to ask each one of us here.
If there is someone who wants to help you, he will.
 
@Eugene oh..I am sorry
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
RTFD (Read The F****g Description)
 
@Sharmaji otherwise, just google your problem. By looking at your tags, I see that this is neather mysql nor php distinctly. There is a separate site for wordpress developers.
@DaveRandom easy dude. :)
 
@Eugene ok..thanks
@DaveRandom sorry I did not know..
 
9:50 AM
1
Q: Reusable Field Groups for Forms

I'll-Be-BackI will need to create a few forms and what is a good solution to reuse same field group on to other forms? DRY principle. I have came up with this solution, for example: Consumer Broadband Form contain 4 group of fields: PersonalDetails, Address, ConsumerBroadbandSelect, PaymentMethod. Each g...

 
10:07 AM
Wasn't there a speed comparison test somewhere on the vanilla-js site? Can't find it...
 
How to add some custom content boxes on the frontpage with WP?
Is custom post formats the best way? So i query a specific format out eg. "frontpage-box"
But then, how can i remove URL for these posts?
 

 The Loop

Where humor doesn’t work.
we do not support wordpress here
 
really oh
 
may i ask an example on how to use insert statements for mysql in php?
 
10:28 AM
@PatrickNarcelles Here is an example: php.net/manual/en/pdo.prepared-statements.php
 
11:04 AM
thanks for the answer, and i solved it... ^_^
 
11:15 AM
There is nothing bad doing this: $_SESSION['POST_DATA'] = $_POST;
Just repopulating the fields
 
hi guys :D
bye guys :D
 
11:37 AM
since i just collected them I can just as well share them with you:
Kent Beck http://www.threeriversinstitute.org
Mike Beedle http://www.enterprisescrum.com
Arie van Bennekum http://agileinthecore.com
Alistair Cockburn http://alistair.cockburn.us
Ward Cunningham http://c2.com
Martin Fowler http://martinfowler.com
James Grenning http://www.renaissancesoftware.net
Jim Highsmith http://jimhighsmith.com
Andrew Hunt http://toolshed.com
Ron Jeffries http://xprogramming.com
Jon Kern http://technicaldebt.com
Brian Marick http://www.exampler.com
Robert C. Martin http://cleancoder.com
the websites of all original signers of the agile manifesto
 
Hi all.
 
@Gordon: Linked InterfaceDistiller here stackoverflow.com/questions/12604884/… Phpstorm still does not have it in 5.0.
 
@hakra cool. but the q is a dupe ;)
 
@alll hi I have one problem
 
11:40 AM
@Gordon To which one? I could only found the older one which didn't link it.
 
4
Q: Generate PHP Interfaces

orourkeddIs there a tool the generate php interface from existing classes? It would be nice to have a tool like Netbeans automatic getter/setter creation but for interfaces.

 
I have opened the feed dialogue box of facebook through Java script and it will not shown in iPhone/iPad safari instead it will worked on all mobile platform
any one has idea about that really appriciate the help
 
@Gordon i am new to php,and i am working on shopping cart.i am facing the problem with data base connection.
can u give any idea.
 
@srinu yesm use an existing shop system
 
yes.
@Gordon i am using phpwebcommerce.com.
 
11:44 AM
@srinu interesting
 
i am facing problem "Cannot select database. Unknown database 'plaincart' "
 
@srinu create the database in the database system then
 
@all any one their to help me out it is really PIA :)
 
@Gordon but i am trying like that also then it showing Table 'plaincart.tbl_shop_config' doesn't exist.
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
11:51 AM
@srinu well, apparently the database needs some setup.
> When you install the shopping cart script you will need to modify library/config.php. You need to change the database connection info ( database host, username, password and name ) according to your own configurations.
and phpwebcommerce.com/shopping-cart-database-design.php shows you the database design and includes a SQL file you can run to set it up like this
 
@Gordon already i am giving (database host,username,password and database name) according my own configuration.
 
@srinu thats not enough. did you create the database schema?
execute the SQL file given at phpwebcommerce.com/shopping-cart-database-design.php to create the database schema
 
hello everyone
 
in an ajax request I want to return the an object with a property "success" with a value of "1" or "0".
How do I create an object with an attribute in PHP and is "echo" the right function to use to return the value?
 
@Gordon Ok.
 
12:15 PM
@AskeB. echo json_encode((object) array('success' => "1"))
which is equivalent to $obj = new StdClass; $obj->success = "1"; echo json_encode($obj);
 
@Gordon .. emm ... it's pointless
 
@Gordon Thanks!
 
@Gordon (object) cast is superfluous, associative arrays are automatically treated as objects.
 
@Gordon , you do not need to cast it as object , because javascript cannot have custom array keys
 
12:25 PM
lol
 
@tereško hmm, now that you say it … :D
 
... developers
 
user1125394
why php don't merge the syntaxes -> and [
 
gordon can only write that test driven ;)
 
user1125394
so that when you call $obj->name or $obj['name'] it will always work
 
@cyril ask on internals
 
...and see the link I just posted. It does work if you implement ArrayAccess
 
user1125394
@DaveRandom you implement that for your class object? should be by default
 
@cyril That would take weakly type for arrays to the next level. ^^
 
12:30 PM
@cyril Yes. If you just want a standard implementation that always allows read/write access to all properties, you could just write a trait for it. However I think it's better this way, because you have the opportunity to control what is accessible.
 
In the foreach loop, does beginTransaction() need to be in the loop?
Or no needed
 
@DaveRandom arrays don't have traits.
 
@hakra We're talking about accessing object properties with ['key'], not accessing array members with ->key (aren't we?)
 
user1125394
@DaveRandom you're right, that's the fact to cast that is bad programming then
 
@cyril It's simply that json_encode() will treat any array with an associative key as an object, because JS arrays are basically just stacks. PHP's array type is a completely different beast to JS's.
 
12:36 PM
@DaveRandom Well I thought both directions, and more use might be with array as objects have ArrayAccess already (however not stdClass).
This does not work in PHP 5.4: ((object)['key' => 'value'])->key;
 
@hakra thanks for the edit
 
@MikeB now let's search for the duplicate :)
 
ah crap - lol
 
I can't find one :)
 
Anyone else find it more difficult to think about how to not violate the law of demeter when you're working with someone else's code? I find myself writing a load of abstraction classes that arguably don't need to be there.
 
12:48 PM
close enough? nevermind
 
@DaveRandom honestly , most of the time i spend on 3rd party code is in 'ed position
it's much less about "how not to violate LoD" and more about "let's just hope that this does not blow up, when pushed to production"
 
@tereško Honestly the thing I'm working on at the moment basically needs rewriting from scratch. There's this really bizarre DI loop in the bootstrap where about 20 objects all have references to each other, and it's melting my brain trying to work out which ones can be rearranged so the structure is less ball-like
 
if you have time , you could make a class diagram , in something like Visual Paradigm (community edition is free)
 
@tereško I plan to do exactly that when I've finished adding the small feature I'm currently working on. I'm just trying to avoid making the problem worse while I do it.
 
1:06 PM
@MikeB I now voted for dupe, I searched with CLI and that one is the only one naming it.
 
anyone friendly with Adblockplus filters ?
 
1:31 PM
Hey hey
@Olli What do you mean?
 
@PeeHaa , you are talking with little people again
 
posted on September 27, 2012 by Ilia Alshanetsky

My slides introducing PHP 5.4.7 from the talk at Guelph PHP user meetup are now available online and can be downloaded at: http://ilia.ws/files/nena_php54.pdf

 
@tereško morning
I am? Hmmm Often we are pretty much in sync with the little people, but I don't think @Olli has done anything on my watch to deserve it :)
@Gordon hehe
 
Is this good function name? getNetworkFromAffiliate('CompanyName')
Basically show a list of network from CompanyName Affiliate
 
1:39 PM
@I'll-Be-Back good enough, though i would expect affiliate name instead of company name
 
@I'll-Be-Back Looks right to me
 
if its a db query id probably call it findNetworkByAffiliateName
 
Yep db query
 
@I'll-Be-Back if it returns an instance of Network , then no , it is not a good name
 
@I'll-Be-Back I'd call it Bernard personally. Or Gerald maybe.
 
1:41 PM
That is good name
Maybe I should call it Retailer
findNetworkByRetailerName
 
$network = new Network;
$network->setRetailerName( $foobar )
$mapper = new NetworkMapper( $connection );

$mapper->fetch( $network );
 
@tereško Can't you use debuggeras variable / class name in Javascript? I get an error yesterday on it I think.
 
it should be permitted , i have never encountered such an issue though
 
@tereško What that OOP design called?
 
Hmmm tnx
 
1:47 PM
@I'll-Be-Back , it's not a design, but a pattern
 
@I'll-Be-Back nothing wrong with not using it though
 
Cool
 
@tereško damn it is an invalid variable name :(
Damn you global scope
 
morning @hakra :)
 
1:56 PM
@PeeHaa good morning :)
oh man, these things are entertaining the masses: stackoverflow.com/q/12623038/367456
 
Grrr I hate the /g modifier! I forget about it every time!
 
2:11 PM
Greetings everyone..!!
 
2:54 PM
Hello PHP chat mates
 
@Robik Hello
 

« first day (712 days earlier)      last day (4236 days later) »