« first day (1203 days earlier)      last day (3970 days later) » 

How do I go about setting the "upload_dir" and "upload_url" in Blueimp jQuery-File_Uploader for wordpress ... want to use the default "uploads" directory.
 
2 hours later…
02:02
goog morning
is there a function/code for php that sets time in a page regardless of the system time?
 
1 hour later…
03:03
good morning
 
1 hour later…
04:19
Woah, sup guys. Party needs to start in here it's pretty quiet.
Anyone work with Cryptsy APIs?
Word
I need to learn this stuff..
 
2 hours later…
Kdp
Kdp
06:28
Hello guys , can anyone help me out on this one
0
Q: Getting a user to enter numbers and format the output

KdpThe user has to enter 10 numbers and they will be displayed like 1 2 3 4 5 6 7 8 9 inside of boxes like this Following is my code display.html <html> <head> <link href="display.css" rel="stylesheet"> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min...

06:42
trigger_error( 'Error in creating Vp Document.' );
what will be the error_type by default
will it be NOTICE
or error/warning/notice message
Jes
Jes
Hello guys
@ScoRpion E_USER_NOTICE see manual bool trigger_error ( string $error_msg [, int $error_type = E_USER_NOTICE ] )
Jes
Jes
i m generating random salt in cake
$salt = base64_encode(mcrypt_create_iv(24, MCRYPT_DEV_URANDOM));
how to restrict the length of the salt
@crypticツ thanks, just recalled it
@Jes what have you tried?
Jes
Jes
06:50
substr('abcdef', 0, 8);
to make it 8 character length
is that correct ?
@crypticツ
@Jes what would be the last 2 chars?
Jes
Jes
@zerkms 00
@Jes why not zz?
Jes
Jes
@zerkms thanks
but how would i restrict it in cake
$salt = mcrypt_create_iv(22, MCRYPT_DEV_URANDOM);
this returns
KxKkgW+WAbidgw4GDiy+Y/a4SX9ak0r8
how to restrict it to 8 chars
because my string length in db is varchar(8)
@Jes why not char(8) if you are always going to be inserting a length of 8?
Also I don't know what CakePHP has to do with any of this. You're using Vanilla PHP.
07:22
It's friday, it's friday...
07:34
Good morning! Guess what ... @JoeWatkins
rain coming ...
Can anybody help in resolving the issue of codeigniter???
there??
@AjayKumar and your question being?
07:49
morning
morning
when ever i load a model in controller class the 500 error is thrown on browser
Aya
@AjayKumar Can you please provide us some code/
yes, i have added on the stackover flow. Here is the link: stackoverflow.com/questions/21474559/…
@AjayKumar a side note, don't hash your passwords using sha1 and also do not store the raw password in the session. It means the plain-text password will be either stored in session table in database or serialized in session file on filesystem.
Have you checked your error logs?
@Gordon would this be spam? stackoverflow.com/a/2371655/1592648 it links to the user's own website.
all their answers they post link to that site.
08:05
morning room
@crypticツ I'll send out a message
@crypticツ that question is crap. It should be just deleted, I think - because it doesn't belongs to SO..
@AlmaDo it already is ;)
I was just testing out this data.stackexchange.com/stackoverflow/query/41689/… and it was the top one, but there are a ton more. Some are legitimate as they link to blog posts on the topic, but there are some just trying to sell products.
@Gordon good
08:08
@crypticツ if they send links to their page and their page only then yes, spam.
@crytic let me check the log file and then i will let you know
user924016
08:40
@AjayKumar do you file look like the question?
user924016
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    public $tbl_user = 'users';

    class Merchant_model extends MY_Model {
user924016
?
user924016
If so, you should see that it has obvious errors.
how to set custom url using .htaccess
@Ronni Skansing sorry that was my mistake while coping the code
user924016
08:43
no problem
user924016
=]
but i did got the error why its throwing the 500 error. As on the local server its working fine
morning
@AjayKumar if you're using .htaccess, it might be cause by the webserver not having the module you're using or might have restricted the user of .htaccess
@nkuldip is that suppose to be a question?
user924016
08:46
@AjayKumar ia god thing would be to try and see if you just die or return at the first line if it ever gets inside the controller. Then you atleast know if the 500 is created before or after you enter the controller.
user924016
check your logs
@andho repo uploaded, also changed to 2.0.0 to follow semantic versioning.
@crypticツ (Y)
@RonniSkansing the controller works fine and it throw 500 error only when i load the model. I have tested it many time
Morning
user924016
@AjayKumar which line exactly
user924016
the ->load in construct or when you use it?
user924016
happy fridays everyone
@AjayKumar, have you checked your error logs???????
08:57
@RonniSkansing exactly on this line $this->load->model("merchant_model", "model", TRUE);
morning
Dear Santa, I haven't asked anything for NY, so as my only wish for 2013 being a good boy - please move all codeigniter developers to a separate SE site and please deny them on SO
thank you
dev-frameworks.se.com
not all frameworks though
user924016
@AjayKumar make sure the config is correct. Make sure to learn how to check the error log. That way you would be able to read a better error then 500
09:00
but codeigniter and may be wordpress altogether
user924016
Arya ftw
ok and thank you very much @RonniSkansing. I will check the log file but right now i didn't have the access to check the log
1383
Q: Why does HTML think “chucknorris” is a color?

user456584How come certain random strings produce various colors when entered as background colors in HTML? For example: <body bgcolor="chucknorris"> test </body> ...produces a document with a red background across all browsers and platforms. Interestingly, while chucknorri produces a red background as...

2
lol
@zerkms I sure as hell don't want to answer "pls help me with using FOSUserBundle"
@andho thankfully sf2 is complicated enough :-)
09:26
Which method names do you prefer for a request class?
$this->request->post('bla');
$this->request->getPost('bla');
$this->request->getPostItem('bla');
anyone know their way around the Stack Exchange Data Explorer?
@Patrick personally I prefer ->getPost
@andho what about ->getGet?
->getPost() and ->getPosts() for multiple
Item feels a little redundant
Unless there's another type of post?
->getGet() and ->getGets() just seems weird though
09:41
What's Gets?
GET data
->fetchGet() ?
->fetchRequest($method); ?
mornings
m43m543jh53
moin @DaveRandom
09:49
@DaveRandom yay, you got my email :)
@salathe Yep, eventually, got a whole bunch of internals emails as well, they must have been sitting in a queue somewhere. Quite strange because it was specifically my @php.net that was doing it and not @daverandom.com (where they are forwarded to) but I'm going take an approach of ain't broke don't fix it I think
@Fabien The more I think about this I wonder if it even makes sense to make a distinction between get and post data. Apart from not being able to use the same key in post and get I don't really see a disadvantage and it would give a nicer API
Hey @PeeHaa, @DaveRandom, and @Jimbo
09:52
heya fabien
Did Rails have a security vulnerability today? Yeap! http://is.gd/PJAnWi
2
@Patrick As long as there's no security concerns...
or future extension issues
Damnit stupid twitter resolving links :(
How to prevent it?
When quickly glancing over your profile I thought that was natalee holloway @JoranDenHouting ;-)
@Patrick Yes it does. It doesn't make sense to allow the same key in GET and POST (or cookies, really) but there is an important distinction between the two collections of data, namely the idempotence of GET vs. the implied server-side state change that comes with POST
09:57
Had to look up idempotence :)
@Patrick U needz moar RFC 2616 ;-)
@PeeHaa Cunning. I bet you can get @Madara with that one and he won't even see it coming...
@DaveRandom could make sense to read that before writing a request class... even though it's a wall of text :)
@Patrick It's an epic wall of text. The main thing you should be looking at is the method definitions and header definitions (if you want to include headers) if you're building a request class
@JoranDenHouting Is Inspirad your own company or just your employer?
10:06
Mine :) But it's aside of my fulltime job.
@Patrick I've been round this particular exercise a good few times now, and I have concluded that actually it's best to just loosely wrap the superglobals (I usually inject them into the constructor). The whole idea of $_REQUEST is actually pretty sucky, and while I don't use the same key for G/P/C that's only a soft rule I have personally, I don't enforce it in code and I don't try and create some amalgamated collection, because you are just asking for trouble.
Morning
@PeeHaa, just to run private or small projects
@JoranDenHouting What city are you in?
@JoranDenHouting I checked your website, I can barely read the text. Also, I'm wondering if there is any valid reason to base64 encode the background and implementing it inline
@PeeHaa Deventer! And @HamZa if you look at the source code you'll see I don't. It's the blur.js plugin which generates a blurred background image.
cc @bjori
And I'm aware of the font being too thin, it's much better in FF than chrome/IE
user924016
@JoranDenHouting you can blur images with css
@JoranDenHouting ooooh I see, I blame firebug :P
10:11
@RonniSkansing Cool! Will take a look soon.
user924016
@JoranDenHouting when you get to it, google css filter, gaussion blur and it could also be done with a svg layer
user924016
i used the svg solution a couple of times
Thanks for the tip!
user924016
last (any maybe most fun choise) is to use canvas element
Also I'm having some trouble with GetText in php.. -.- It just won't work in any way. I got an app, generated .po and .mo file and stored them in locale/nl_NL/LC_MESSAGES/messages.mo and .po but it just won't read the file in any way.
10:13
@PeeHaa Seems a little uncalled for...
That's what I thought
What's a day without drama right?
true story
Although I did think it was kinda funny that Pierre, of all people, sent news.php.net/php.internals/71826, he is probably one of the worst offenders for that
:P Well entire internals is that in waves so meh
@Dave huh?
10:48
@DaveRandom can never understand him ... he asked me for a phpdbg image that he could use on a "deck" with an "hd beamer" ... which as far as we can work out means a projector ...
good mornings
@MadaraUchiha You followed the link?
@JoeWatkins #iCommitsWhatILikes #englishIsNotMyFirstLanguage
he seems to talk the same english that google translates too ... spooky ...
11:11
Can someone point out why my regex isn't returning the text I ask for, yet within the callback I'm returning what I want?
Actually, thinking about it, might as well use DOM
I'll use DOMDocument. Still, interested in why it wasn't doing what I expected
@Dave no, what link
@Jimbo Wait, what? You're just trying to extract the text, and yet doing it with prc????
You just want match I think...
Or you could do 3v4l.org/FFsR7 but that's just stupid
1 hour ago, by PeeHaa
Did Rails have a security vulnerability today? Yeap! http://is.gd/PJAnWi
11:32
@PeeHaa lmfao
@DaveRandom Is all good, I'm using DOMDocument now.. but I see how to use match now, thanks :-)
I find preg_replace_callback() is good if you want to iteratively match and replace with empty; reducing the string to nothing.
@DanLugg I think the e flag is awesome.
@BenjaminGruenbaum I think you're trawlin' but whatev's ;-)
In preg_replace , it's great and well thought out and does all things :D
11:42
@DanLugg How is that useful? Sounds like a hack to avoid writing preg_match_all($expr, $str, $matches); $str = ''; - sounds like it will end up less readable for no reason :-S
@DaveRandom Nah, it works rather well; I don't have an example off hand, but I've done it before.
@DanLugg Oh I'm sure it works, I'm just struggling to think of a case where it would be useful (and not just $readability--;) given that you can't modify the behaviour of the expr while it's running. I'd be interested to see a good use case if you think there is one though :-)
It was for a parser of some description...
Lemme see if I can find.
I dunno, it was something like this:
$state   = START_STATE;
$matches = [];
while (!empty($string))
{
    $pattern = $patterns[$state];
    $string  = preg_replace_callback($pattern, function ($match) use (&$matches, &$state) {
        // dump stuff into $matches
        // modify $state
    }, $string);
}
After the match I'd have post-conditions to bail-out of the loop if there wasn't any way to proceed.
@DanLugg Well that sounds expensive, somewhat putting up a picture hook with a sledge hammer, but I suppose it's OK for quick and dirty
Yea, that's the gist of it. It was an off-line process, something CLI... can't recall what though.
11:53
Lester is a f*cking idiot.
@PeeHaa *slow clap* Well done sir, well done.
12:27
@peehaa hey...I have changed profession (but you know i amm addicted to chat (ohhh you awesome guys) )...so now i am not developer anymore .... so cant get time to come here :(
@NullPoiиteя What are you doing now?
I am now Police officer
@DaveRandom under training
12:51
Coming@Dave, very cunning
But since I'm from mobile it asked me if I wanted to open it from YouTube, and I knew.
13:08
@DanLugg yey! fuuhrrrraaaaiiiidaaayyy
Hey guys
Any php core function that acts like array_replace_recursive but instead of replacings adds the value ?
Already wrote a custom function for it but trying to abstract it a bit
^ i think you have to array_walk() there.. but im not as good as the others, so there might be a better way..
guess i have to stick with the custom function, cheers a/w :D
13:25
Hey @DanLugg, @NullPoiиteяl and @reikyoushin
13:48
apparently, finally isn't always final codepad.viper-7.com/vY18dl/55dev
I'm playing Rebecca Black - Friday over the office sonos ATM :P
And so begins my last day as an employee of NBCUniversal...
4
user895378
Reading internals, a friday afternoon, http://31.media.tumblr.com/5bcad75f0a7291e16bb2fd83a98a041f/tumblr_mym8o9rorL1sk2x32o1_500.gif - http://d24w6bsrhbeh9d.cloudfront.net/photo/4790844_700b.jpg
@ircmaxell congrats!
user895378
14:01
@ircmaxell woooo!'
@ircmaxell so what are you doing next?
hack chrome hopefully
can't say publicly yet...
Oooh
Congrats then
14:05
@ircmaxell That sounds promising then.
I'm happy with it
but it'll be curious what people will say
It'd make me laugh oh so very much if it's Microsoft.
I hear MS is awesome
We should start a pool
$10 on NSA
Well, I can't say it's not Microsoft...
Is it in PHP?
14:11
Well, I can say it won't be Microsoft, but you won't know whether or not that's truth yet :-P
(As in, is php development at least like ~20% part of the job)
@BenjaminGruenbaum no. There may be some PHP parts, but the majority of it likely won't be
Good for you :D
and development isn't even 20% of the job, yet alone a single language
14:26
@Fabien I'm going with SE
healthcare.gov is my guess, they need all the help they can get and the government taypayers have been spending a lot to get it fixed.
Anyone know if there are any circumstances under which ReflectionFunctionAbstract::getParameters() will return the array of ReflectionParameter objects in an order different than they appear in the function's signature?
@DanLugg when the hand written documentation deviates from the implementation
Sorry, wasn't referring to documentation though; just at runtime.
@DanLugg that should never happen
14:35
@ircmaxell have you heard of COCOMO? I'm looking into it (they teach about it in a development methodologies course I'm taking) and it looks really stupid (measures cost in thousands of lines of code).
user895378
@DanLugg You could prevent any issue if you're worried about it by implementing a usort with ReflectionParameter::getPosition()
@Gordon I wouldn't think so either, but hence the question ;-)
@BenjaminGruenbaum outdated iirc
@rdlowrey That's what I will do, use ::getPosition(), but I'm wondering if it's truly pointless.
function foo($a, $b, $c) { }
(new ReflectionFunction('foo'))->getParameters(); // possible different order than a, b, c?
^^ for clarity to anyone haphazardly reading
user895378
Probably ... I'll look at the source code
14:37
@Gordon COCOMO2
@BenjaminGruenbaum yeah, maybe people still use that. it was invented by Boehm right? So it's probably still useful for people doing Spiral
@Gordon people still doing spiral?
(as in, are there any)
I never really got risk driven.
user895378
@DanLugg Yeah, those will always be in order.
> PHP 5.7 BC Break: ReflectionFunction::getParameters() now returns parameters bogosorted.
user895378
14:41
hehehe
@BenjaminGruenbaum i think the military does
Thanks @rdlowrey
@Gordon Integersting.
Interesting -> Integerstring
@rdlowrey *of the arginfo declaration, obviously, although it's not like you could expect it to magically pull the data out of it's ass from somewhere else anyway
But there are still cases (IIRC, can't find an example though) where the arginfo is wrong
user895378
14:43
pfft ... then that's a bug that's as yet unknown. You can't program to accommodate a bug that you don't know exists yet.
5.7? Whoa :|
Talk about pace :o
@BenjaminGruenbaum go through crosstalkonline.org/back-issues for some more information
@Gordon any specific issue?
@rdlowrey Well everything will need to (or at least should) be touched if named params gets in eventually so it won't last
14:45
Speaking of argument inconsistencies, I love this one; the docs and consequently every IDE that uses them as reference, has trim() listed as follows:
> string trim ( string $str [, string $charlist = " \t\n\r\0\x0B" ] )
However: 3v4l.org/YHfTo
@BenjaminGruenbaum they are all quite interesting but I remember there was one with Spiral in it. I just dont know which one it was. Actually, I think it was even written by Boehm.
That could be very interesting to read. To be fair I don't really get spiral or COCOMO at all. Then again they're probably better suit for projects much bigger than the ones I've worked on. Or for army projects where risk is a leading factor.
@MackieeE hey dude, it's been a while. :P
@BenjaminGruenbaum definitely
@Gordon I'm not very good at formal methodology talk. I know some of the basic but I've never considered applying something like that in my workplace. Stuff just works pretty well in practice.
14:52
@reikyoushin Sure has! Hello =)!
@BenjaminGruenbaum my impression is that the "usual" web development projects are quite different from software engineering project
@Gordon web development projects, both frontend and backend are maybe 30-50% of my work. If that.
@reikyoushin Been PHPing' alot lately? x)
@DanLugg That's not inconsistent, that's normal
The hard part is finding a case where docs and arginfo do match ;)
lol good ole consistent inconsistencies.
user895378
15:00
@DanLugg Looks like a good candidate for a PR ;)
@rdlowrey Heavens no! We can't change that! It might cause a break, y'know, somewhere!
^^ obligatory.
@DaveRandom Awesome possum.
@MackieeE well, more CSS stuff. making this site responsive. pffft.
@DaveRandom Boooooooooooo
@salathe Y U NO LIKE CONSISTENCY?!?!?!?!?
15:07
überresponsiveness: motherfuckingwebsite.com
@DaveRandom See my mail to the list
@reikyoushin Did ya decide to go with a CSS Framework (i.e. Bootstrap) or go from ground up? :o
@salathe Damnit, one sec
@salathe assuming I want too pen voting on wiki.php.net/rfc/automatic_property_initialization, how do I go forward with that?
@reikyoushin Ahh nvm, making this site, changing an existing :P
15:08
@DaveRandom Yay, let's make the arginfo and docs consistent for trim()... but don't do the same for ltrim() and rtrim()... dummy :P
@MackieeE nah.. the designers gave me one with bootstrap already >.<
well, I like Bootstrap so :P
I don't feel sorry kekek ;)
@Gordon add in the doodle plugin, see the edit history of rfcs that have had votes.
@MackieeE i dont like the old bootstrap, using hard coded px values instead of % for each grid >.<
@salathe is there any formal process that i need to follow after I did that?
15:10
Doesn't the -fluid make it %?
on 2.3.2
@Gordon mail the list with a [VOTE] topic, as per wiki.php.net/rfc/howto
@MackieeE hmm.. didn't see that. lol. will check it out wahah
@salathe At least they all actually have the same name in the arginfo, one sec I'll fix the others as well
@salathe thanks
user895378
@DaveRandom general progress update: the flag-based crypto method migration is coming along nicely and I should have the final implementation finished today or tomorrow pending the addition of the new .phpt tests
15:12
@DaveRandom you could also "fix" the arginfo/docs for addcslashes() and str_word_count() if you're feeling the urge.
user895378
I'm pretty excited about this as it's a significant improvement over the existing paradigm for SSL/TLS interaction. It will have a measurable positive impact for my own PHP things.
@Gordon no problemo, good luck :)
@salathe I feel a script coming on (to find them, not going to try and auto-fix them, that can only end badly)
@DaveRandom Also, see @NikiC's reply on the list
@salathe Too late (unless you want to go revert them), but I'll put my over-eagerness away now.
It's Friday, Friday pay day, pay day, gotta get down absolutely hammered on pay day
15:25
Well, by the end of it you'll be down.
@BenjaminGruenbaum nope, never heard of it
@salathe What's wrong with addcslashes()?
@DanLugg it's using the same type of argument (being fed to php_charmask()) as the *trim() functions but is still referred to as "charlist".
@ircmaxell ok thanks, @Gordon helped
if we're trying to be consistent ;)
15:33
:-)
@salathe Gotcha :-)
Why every one consider PHP as bad language, I daily come across multiple articles say "PHP worst language ever"
This really generate negative feelings inside me about PHP
^ then why use it if you feel that way? then you'd answer your own question =P
it's just the same as "windows sucks" and yet so many people use it..
@BasicBridge PHP was originally developed to allow little bits of script within HTML; the language still makes it extremely easy to drop in and out of HTML. As a result, new programmers (and experienced programmers who are feeling lazy) often produce "spaghetti code" that is hard to read, hard to test, and harder still to debug, because PHP and HTML are freely mixed. It doesn't have to be like that. But the fact that it can be like that (and sometimes is) makes some people hate the language.
@BasicBridge It's a "don't hate the player; hate the game" problem.
@reikyoushin I love it, but articles like that
15:40
@BasicBridge Every language can be misused to produce terrible code, but that doesn't mean the language is bad. It means the programmer sucks.
@EdCottrell Agreed but seriously why they blame PHP for that, there are many testing tools for PHP
@BasicBridge people hate it because it's so easy to use and abuse..
@BasicBridge I agree. PHPUnit is solid, and there are plenty of decent static analyzers out there.
some things being said to be bad about PHP are also the things that are good about it, it just depends on how you use it.
15:42
@reikyoushin Agreed, and because it's a lot easier to hate what exists now than to come up with a good alternative. PHP is still one of the most portable, most flexible, most powerful languages out there. Not the fastest or "prettiest" maybe, but one of the most widely supported. Python, Perl, Ruby, Nodejs, and whatever may be great, but they have nowhere near the support that PHP does.
What i'm thinking that people must also educate or generate tutorial on design patterns. That at lest help newbies to know more about language
Newbies rarely learn about design patterns
Understanding the benefits reasons wouldn't work
@BasicBridge Agreed 100%. I was programming for a long time before I heard of patterns. Granted, I started programming when I was 6 years old, but that gave me a lot of time to learn terrible habits. I'm still cleaning up bad code I wrote years and years ago.
Who the fuck is starring everything?
8
My money is somewhere between @web2students.com, @BasicBridge, and @EdCottrell.
Sorry, that last one was me, couldn't resist
15:48
@DanLugg I star judiciously.
Maybe a star should cost some rep :P
@DanLugg Also, this one just begged for stars (but I didn't do it).
18
Q: Chat stars on trivial messages

rdlowreyLet me paint a picture ... I've just returned from a solid two or three hour coding binge. Very productive. I feel good about myself and the universe, but mostly I feel good about all the awesome concepts I've perfected with the aid of the smart people in the Stack Overflow chat rooms. ...

and
35
Q: Chat room stars, personal vs. room

Dan LuggUpdate This just happened. I waltzed into the PHP room, and sure enough: If this isn't evidence that we need a room star creation reputation minimum, I don't know what is. Alternative While I believe functionality in this proposal would be optimal, it is perfectly understandable that such a...

user895378
@Fabien I've always advocated that. +1 rep to the person who posted the message and -1 rep to the person who gave the star. But I think that's a little too capitalist for SO.
@DanLugg I am busy asking question at stack
15:50
Does any room really use stars correctly?
No, because everyone's definition of "correctly" differs.
@rdlowrey Would be way too open for gamification of the site rep system as well I think
user895378
True ...
Just cost then, no +1s
Nah, max 10 rep from chat stars per day.
user895378
15:53
^^ that
user895378
Though the importance of the "issue" is probably far too low to warrant the effort involved to make that work.
Regardless, there needs to be some mechanism to reduce the fodder.
Yea, unfortunately so.
THere's a few other improvements I would like to see first. Such as PMs
I still love that image in my Q on meta though. The last message in it...
Not unlike >>
lol, was about to tell em starry starry night.. :P
user895378
15:54
lol
Starry Night 30,000 × 23,756 pixels.
@Fabien getting 0x194
@Fabien 404

« first day (1203 days earlier)      last day (3970 days later) »