« first day (524 days earlier)      last day (4406 days later) » 

1:02 PM
@@PeeHaa: Not really.
 
1:13 PM
Hi! I have a question regarding the existence of a git equivalent for svn export.
The first thing that came to my mind was clone and then remove .git/
 
@ALL: hi
 
but learning git, I took a more holistic approach to this investigation
 
411
Q: How to do a "git export" (like "svn export")

Greg HewgillI've been wondering whether there is a good "git export" solution that creates a copy of a tree without the .git repository directory. There are at least three methods I know of: git clone followed by removing the .git repository directory. git checkout-index alludes to this functionality but s...

 
thanks gordon, this is the basis for my question
 
@Gordon:,@Яaffael1984: i want to ask somthing here..
about php..
 
1:15 PM
@pratik impossible
 
I mean Charles seems to now a lot
 
heyy guys need some help with php audio upload
how do i upload audio
 
@Gordon: why?
 
so there is a reason why he didn't recommend clone + rm .git/
why?
 
@Gordon: i m android dev. but i dont know anything about php but i have to work with it thats why i m asking..??
 
1:16 PM
are there downsides to this seemingly simple solution?
 
@pratik im just kidding you. see chatroom description please.
@Яaffael1984 I dont know. Maybe ask the OP in a comment
 
@Gordon: ok good...
i am sending some data from android application to a .php script..
i want a simple script that can print that received data into a browser page..
 
@pratik how are you sending the data? http get? http post? something else?
 
@hakre I want to refactor the cv-pls extension this weekend, because it realy realy needs it. :P Can I just do it or are you working on it atm?
 
@Gordon: http post
 
1:20 PM
Anybody has a nice string with lots of utf-8 characters at hand by any chance?
I need to test some stuff
 
@AlexMan i like zombieipsum.com better
 
@Gordon heheheh
 
@Gordon: thanks buddy for the help
 
guys need help with audio uploading
i have my form here
<form action="upload.php" method="post" enctype="multipart/form-data">
File :
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="button" value="Submit" />
</form>
and my php file here :
<?php


$file = $_FILES['file']['tmp_name'];
$filename = $_FILES['file']['name'];
$type = $_FILES['file']['type'];

if(move_uploaded_file($file,"audio/" . $_FILES["file"]["name"]))
{
echo "DONE !";

}
else
{
echo "NOT DONE";
}



?>
its not uploading my file
 
1:30 PM
use a var_dump($FILES) to check if a file was actually uploaded;
 
do i echo var_dump($files); ?
 
yeah
 
var_dump($FILES);
you don't need to echo it
var_dump will echo it for you
 
im getting this
string '' (length=0)
 
1:34 PM
then, the file wasn't uploaded
the html file and the php code, are they on the same file?
 
no
 
ok.....you might wanna wrap the PHP code around
if isset($FILES)
and put a test code in it
 
ok '
 
that way, if the file was actually uploaded, that code would run
 
nope it isnt uploading
what may be the problm ?
 
1:39 PM
did you URL of the form 'action' correct?
 
yea
i tested it with images
it working fine with images
 
it works with images, but not with audio files?
what's the size of the file?
might be bigger than the max_post_size
allowed
 
oh is it? il try with a smaller wait
 
just answered a question about that: stackoverflow.com/questions/2457173/…
 
that might be your problem
 
1:45 PM
yea got it :D
i ws actually tryin to upload large latest songs mp3 files :P
 
good
 
but if we were to upload large mp3 files
how do we achieve that ?
 
@PeeHaa You can do it every-time, I'm ill ATM so not much coding. I'm happy to see the refactoring comming. Anyway we got it under git, so what can go wrong?
 
@CarrieKendall - ok thanx :)
 
1:48 PM
 
@hakre sorry you are ill :(
 
Word
 
thank you for your support.
 
can i call global on a variable holding a class?
in a function inside a class?
 
@boruch As global is not a function you can not call it.
 
1:51 PM
i meant define the variable as global
i get errors on that...
 
Yes, that's possible nearly everywhere.
 
posted on March 23, 2012 by blog.phpdeveloper.org » PHP

In a previous post I showed you how to use HTTP Auth with the Goutte driver in Behat testing. I want to take a step back and show you how I even got to that point with a simple guide to installing the tool and creating your first tests. In a future post, I’ll show the (super simple) integration you can do with Jenkins to execute the tests and plug in the results. First off, a definition for

 
@hakre something like class bla(){ $processor = new moelbla();
function bla(){ global $processor; }
}
 
anyone here familiar with fuelphp
 
1:53 PM
@boruch , you can , but you should not
 
why not?
 
@boruch Because it's not clear for what this stands for. Global normally never belongs into a class.
 
@Mike , yes , it is a horrible for of even worse framework
 
why do you say that
coming from a CI world
 
because thats what i think
 
1:54 PM
@hakre why is it bad?
@h
 
final class Nbcudps_View_Helper_MakeStringURLFriendly extends Views
{
    final public function makeStringURLFriendly($string,$lookup='')
        {
                if($string!='')
                {
                        return OtherClass::makeStringURLFriendly($string,$lookup);
                }
                else
                {
                        return '';
                }
        }
}
 
@boruch Edited.
 
@boruch , because global variables make your code hard to test and maintain
 
indeed entitled to your own opinion. however, im checkin it out and im a lazy person ill be honest. need to know if anyones stumbled across a pre-compiled admin package for it.
 
1:55 PM
if you are learning to use OOP , you should avoid any form of global state , @boruch
 
i cant find anything in googles
 
@hakre so make separate classes to populate all the locals and then call process to send to other class?
 
@Mike You might need night-vision-googles.
 
nice one
 
Seems like a lot of work for something simple....
 
1:55 PM
what you did there, i see it.
 
@ircmaxell ewwww. have fun mocking and testing that
 
@boruch , how about you explain the problem you are trying to solve .. maybe we can suggest a better way for you
 
what in the holy uncode is that irc
 
Yes, the application is 42,000 lines of code. And all it does is register and login users. Literally, that's all it does
 
wtf?
 
1:57 PM
hah
 
@Gordon I'm honestly thinking about simply throwing it away
 
hey all
 
do it
 
@ircmaxell +1
 
Hey there @NikiC
 
1:57 PM
print out all 42k lines douse with lighter fluid
 
Hi @NikiC
 
Hey all
 
douse wtf?
 
@hakre get all user parameters from view controller and send to creditcard processing model
 
Can someone yell at this OP please... stackoverflow.com/a/9840242/561731
 
1:57 PM
CODE
yeah i saw that one @Neal
 
@boruch where exactly the need for global variable comes in ?
 
@Mike ....
 
@boruch Use dependency injection. The moelbla can still be "global", but it's not important for the class to know:
 
@Gordon Yeah, it's fubar
 
class bla
{
    /**
     * @var moelbla
     */
    private $processor;

    /**
     * @param moelbla $processor
     */
    public function __construct(moelbla $processor)
    {
        $this->processor = $processor;
    }

    function bla()
    {
        $this->processor;
    }
}
 
1:58 PM
@neal down vote it :)
 
Just had some fun with my liquid nitrogen :)
 
it's like someone came in half knowing Java, and decided to build out a monolith. Literally 100 controllers. And 50 views. For a login and registration system. That's not even configurable...
 
@hakre forgot about $this
so stupid of me
 
@Neal Hi
 
2:00 PM
@Donut This OP is making me cookoo
 
@Neal lol "learn some php first"
 
Making what?
 
@Neal that's why i don't answer crap like that.. he obviously doesnt know what he is doing in the first place.. giving him code that will solve a problem he doesnt understand is a waste of time.
 
@boruch . you are making something that might take my credit card , and you forgot about $this ?!? thats extremely scary
2
 
@CarrieKendall I tried... :-\
 
2:00 PM
hahaha
cant wakeup
 
@tereško
he'll deploy, itll take a CC, get hacked get a violation for non PCI compliance and then get sued :)
 
thats my surname .. you have a problem with it ?
hell != he'll
 
lol
 
The worst thing about those questions is that they get mad if copy-pasta does not work. Often they even don't include what they want with code but spam in your answer comment that he want's something other. Also if you link to PHP reference they ask obvious things like Does this function need x and y as parameter?
 
happy?
so right @donut
 
2:02 PM
@Neal well i would suggest not posting answers on questions where OP needs to RTFM and understand what a code does
:P
 
> "Hell, deplot it!! Take a CC, get (..)"
thats how i read it , @Mike
 
we were once all that way though.. @tereško both sound great. lol.
 
@Neal , sometimes i wish that "OP is to stupid" was a valid reason to close a topic
 
@tereško i wonder what would happen if you did that..
 
2:05 PM
naaa h .. we have "too localized" as a replacements
 
clicks flag, "OP is stoo stupid".. time to leave an answer
 
it does not specify WHAT is too localized
 
i think that is a valid cv request. OP is basically asking what happens when i type this code in?!1/!.. that's not a valid question
 
0
A: php explode: when the part after delimiter is not there

MikeOP is too stupid, learn the fundamentals of conditionals, and arrays prior to asking a question. It'd also be beneficial if you tested this yourself and came back with any problems you have.

cough
yeah ill probably get flagged for that one lol
 
2:07 PM
that's not an answer 0.o aren't you defeating the purpose?
 
meh
lets see how many downvotes i get!
 
@Mike , anyway , about CI and Fuel : the main issues with them is that large part of the code is written in procedural manner and is using global state all over the codebase
.. and there is an achievm .. pfuu ... badge for deleting a severely downvoted answer
 
cool take advantage of that @tereško
LOL A communication error occurred: ""

http://stackoverflow.com/questions/9840212/php-explode-when-the-part-after-delimiter-is-not-there/9840600
pissed off our proxy at work by F5ing too much... @tereško ill look at the code, ive never considered the part about globals all over the place. Im intermediate level with OOP and ill admit, im self taught and never really learned the downsides to defining global everywhere. Care to enlighten my lack of knowledge?
 
@Mike , global state is not restricted to just global keyword : youtube.com/watch?v=-FRm3VPhseI
 
@Mike OP is too stupid, learn the fundamentals of OOP :P
 
2:12 PM
if you are interested in learning OOP , then i would suggest for you to watch the rest of videos from that series too
(didn't come out in english)
 
@PeeHaa the difference is i admit my stupidity.
 
thanks @tereško ill definitely do that, its friday and i dont feel like doing work. So my excuse has been furthering my "education" by watching instructional videos.
 
@Mike :-)
 
company pays for my subscription to lynda.com and tutsplus.com :)
 
2:18 PM
my condolences
 
did you get the achieve for the delete?
 
There is anybody who know how to work with flowplayer?
 
anyway .. got to start packing
 
anyone*
hi tersko, you sill here :D
thanks alot for helping with sqlite :D
 
2:22 PM
@NikiC DONE
 
still*
 
Can question be delv voted only after closing?
 
@Donut yep
And answers when it is less than -2
 
damnit @neal i thought it was an achieve for someone else todelete it..
 
2:25 PM
@Mike No. only to delete it urself.
in JavaScript, 31 secs ago, by Neal
can someone explain to this OP what a recursive function is? http://stackoverflow.com/questions/9840639/how-can-i-get-rid-of-this-self-calling-function/9840692#comment12540647_9840692
 
@Gordon this whole "xml to array" question is far too common, maybe we need a toArray() method added to xml-related classes.
 
any ideas why this doesnt work in chrome? ps td{display:block;} is not a solution
 
@CarrieKendall what doesnt work about it?
 
the box-shadow, sorry thought it was noticeable.. mostly because i have been staring at it for nearly 30 minutes :P
 
@salathe but what should go into the array? given than an xml element has text and attributes
 
2:33 PM
@Gordon don't worry over such minor details :D
 
@salathe i think cv'ing them is easier ;)
 
@Gordon Absolutely! Most times there's no real need to use an array, it's only because the OP doesn't know how to traverse the XML properly.
 
@salathe who's an OP?
 
@Neal this works but, it isnt a solution either. i need it on tr
 
2:37 PM
@salathe thanks
 
@user705339 on SO, it means "person who asked the question".
 
@salathe despite the examples in the manual :(
 
I assumed it means someone's level in programming
 
@Gordon no-one reads the manual
 
2:41 PM
@salathe maybe we should make it into an audiobook then
 
@Gordon No-one listens the manual...
Ah no-one watches it either :D
 
@NikiC movie?
damn
 
Jon
hey all
earlier today I had to do some array manipulation, and I came up with something that I liked (short) -- but it can be argued that it looks like abuse
can I have your thoughts?
 
@PeeHaa: Any concrete ideas for the refactoring?
 
2:52 PM
ah, its a dup. so forget the
@Jon // this would normally be a lambda, but PHP < 5.3 here => create_function?
 
Jon
would just make it uglier, and how exactly the filter is specified is not really relevant to the matter
"here" = the online codepad
in my code it's a lambda
 
@Jon then the comment is superfluous ;)
 
@hakre Lots of ideas. I'm going to make the settings way more flexible. It started out quick and dirty, but now it has become just dirty :)
@hakre A total rewrite of script.js is really needed, because it became a unmaintainable beast
 
@hakre not an answer
 
Jon
@Gordon: somehow I 'm sure that if I had create_functioned it someone would have said "omg how can you call that short, its an abomination" and started recommending writing that with loops etc
so I wanted to keep it looking short but avoid comments about how the filter is written
evidently I failed ;)
 
2:59 PM
@Gordon creative dance?
 
@PeeHaa I thought about having a service class in background js, e.g. for the values stored in the manifest to only retrieve once per extension life-time.
Probably the same place can be used to sync settings
 
@salathe not sure. do a proof of concept and show me :)
 
@Gordon haha... so long as it doesn't find its way onto YouTube ;)
 
@salathe would i ever do that? you know you can trust me.
 
Jon
so... praise or criticism for codepad.org/GjzpT6MS anyone? ;)
 
3:06 PM
@hakre Sounds like a plan
 
3:48 PM
> You need regular expressions for handling html like a fish needs a vacation home in the Sahara.
It's funny to scan the closevote backlog.
 
user895378
I wish the SO main site had an option to filter all questions from users with <= 500 rep.
 
user895378
Or perhaps implement a .js check to force people to visit whathaveyoutried.com prior to posting a question.
 
What I've been told is that new users need to accept that now.
But it does not look like it helps much ^^
The pressure is to great to be in a need of an answer that each question get's messed up.
 
@hakre afaik they are forced to accept stackoverflow.com/questions/ask-advice
 
1 hour ago, by Carrie Kendall
any ideas why this doesnt work in chrome? ps td{display:block;} is not a solution
sooo, no one? :[
 
3:56 PM
<!---------------------------------------------->
 
user895378
I love when people get defensive about their poor question:
 
@CarrieKendall what's your issue?
 
@rdlowrey LOL
 
@hakre notice how box-shadow doesn't work.
 
user895378
4:03 PM
@Neal I probably should've been more helpful and provided a specific helpful link like Gordon, but it's Friday ...
 
@rdlowrey i really wonder what they searched for when they claim they couldnt google it. usually i just type in the exact words in their question titles and get a result among the first ten serps.
 
@rdlowrey hehe
 
the only partial solution: tr{display:block} but you will lose all of the formatting of a table. so it is a pointless solution
 
user895378
@Gordon Funny, I've had the same experience.
 
user895378
4:06 PM
I've never heard of someone asking for a downvote before :)
 
i need 3
 
user895378
Ah
 
@CarrieKendall Box-shadow does only work on something that displays as a box. A table-cell is not a box. Maybe you want to try to convert it into inline-box.
 
get a badge
 
user895378
peer pressure badge fishing I see
 
4:06 PM
mhm
 
@hakre it works fine in firefox
 
user895378
That kind of goes against the spirit of the badge, though.
 
okay, then ill just post grossly rude answers
 
Upvote please:
1 min ago, by Mike
http://stackoverflow.com/questions/9840229/php-variables-and-query/9840256#comment12541473_9840256
 
@Gordon the problem is they are impatient and want the answer to be within the first 3-5 results. its absurd to even think about page ... 2!
 
4:06 PM
lol
 
@CarrieKendall Define "works fine". As long as box-shadow should only be applied to display:box elements, it's actually broken in firefox.
 
@CarrieKendall tbh, i think they just always type in "boobs" into google. they see a regex like (.) and think its ascii pr0n
 
probably because of the OO analogy.
 
@hakre definition: jsfiddle.net/FnVhX/1 in firefox :P
 
user895378
@Mike I think humor is the best way to go for that badge. Although, if your answer is really funny it can sometimes have the opposite effect and people will actually upvote your purposefully bad answer :)
 
4:09 PM
lol @ the people upvoting it bahaha
 
@CarrieKendall Okay, let's look into that ;)
 
user895378
@Gordon lol
 
although that doesnt explain it in the cases where the q is not about regex
 
@Mike I downvoted a bunch of your answers :)
 
1
Q: Flaw in the the Peer Pressure badge

amanaP lanaC A nalP A naM AThere is a user who thinks it is allowed to post cruddy answers just to get that badge? Should this be allowed? Example: http://chat.stackoverflow.com/transcript/message/3047677#3047677 Can we please either remove this badge (which promotes cruddy posts) or change it so that it does not promot...

 
4:11 PM
way to go @neal
proving my point that the badge is useless.
 
@Neal You really are a troll.
 
@NikiC I tried to fix my hair, but it always comes out the same...
 
user895378
Is there a badge for exhausting all your downvotes in a day? Or is the satisfaction of being smarter than all the people who ask poor questions supposed to be enough incentive?
 
I find that when i tell people to try researching, apparently every softy on SO comes after me telling me that OP is too stupid to search with the right keywords and that we should write out everything he will/could need in a copyable answer instead of constructively criticizing his method of problem solving.
 
4:37 PM
Boo
 
@Chacha102 ?
 
@Neal I'm a scary ghost...
 
@Chacha102 o0o0o0o0o0o0o0o0o0oooooo
 
@CarrieKendall It's a reported bug in chromium: code.google.com/p/chromium/issues/detail?id=62445
 
@hakre you sir are awesome. i have been looking for it in chronium to no avail. :]
 
4:50 PM
From what i can say, it should be applicable to any CSS box in the box-model, so not only display: block.
The spec is clear that it should apply to everything, even lines in a text: w3.org/TR/css3-background
 
@hakre agreed
 
You might want to switch away from tables to layouts but they are less common in CSS.
I think Firefox does not support them at all.
 
my work around it just to change the background-color for chrome.. it is not what i WANT but seeing that it is a bug, i will wait it out >.<
 
eh @gordon, didn't know you're so fluent with leetspeak. Impressive ;)
 
4:56 PM
hey guys
 
@hakre thanks :)
 
@rdlowrey aw why'd you remove your comment? we are sacrificing this new user for the betterment of SO
 
user895378
@CarrieKendall Hehe, I decided there was no point since it could just be pushed onto the duplicate :)
 
user895378
Why would you post a question like "if I get an array here, will that evaluate to TRUE in php? Is if(array()) equal to true in php?"
 
user895378
How hard is it to do var_dump((bool) array());
 

« first day (524 days earlier)      last day (4406 days later) »