« first day (1530 days earlier)      last day (3411 days later) » 

12:00 AM
$0.innerHTML = '<div>'
"<div>"
$0.innerHTML
"<div></div>"
innerHTML is a handy shortcut around DOM manipulation that Microsoft added.
But it's still the DOM underneath. There's no actual HTML source anywhere.
If you modify innerHTML from a script, it'll replace the content with new DOM elements, yes, and you lose your event bindings. I assume that's probably because there's no practical way to tell how to change existing ones.
 
^^ I guess that's what it boils down to -- it was my understanding that the innerHTML property was a weird thing that held on to the actual, literal plaintext that was used to generate a given element (if there was any plaintext source). That underpins all the arguments, as I've understood them, against using innerHTML to modify the dom after the page is loaded. AND, it is apparently the behavior this plugin author was relying on, and his plugin worked for years and years on every browser.
 
Every browser?
 
As far back as I've cared to test.
No need for pedantry, I didn't test AOL Browser 0.2alpha :p
 
Also, er, all the modern fast stuff uses innerHTML for its DOM modification, since it turns out HTML parsing done by the browser is faster than manipulating the DOM directly.
 
Yes, though that's not really germane here. We're actually debating nothing -- obviously, the stuff used to behave one way, and now it behaves another way. It is how it is, and now my javascript is broken. Lucky for me, this plugin is only used on 75% of our mission-critical code, so there's a good quarter of the backend that works correctly. Lucky me.
The staff can just use the stuff that works until the holidays are over :p
 
12:07 AM
Which browsers had you tested on, by the way?
 
FF > 4.0, Chrome all, IE > 7.0, Safari (?? I didn't do this, not sure how far back)
I didn't personally test Opera either, so not sure which versions, but the tester did check it.
Bah. My 12 day paid holiday officially started 1.17 hours ago, so.... have a good holiday guys! I'll try to tackle this annoying problem tonight or tomorrow after some beers.
Good night :)
 
12:21 AM
@LeviMorrison because type is required and must be exactly one of the options. Flags are optional and a bitwise combination...
 
12:32 AM
shopping mostly done one more thing to pick up :-D
AHHHH, that's why compiles are so slow in this VM... It's a mounted volume from the host (basically NFS)...
 
@PeeHaa Can we follow igorwhiletrue's yolo?
@LeviMorrison As silly as it sounds, why don't we just allow default return values instead of adding the ? for nullables? Adding new syntax that does the same thing as existing syntax seems like a strange choice.
On the other hand, default return values? Ick.
But it at least creates symmetry: function foo(array $bar = NULL): array = NULL {}
 
12:49 AM
eiw
 
That might be better than the inevitable confusion that function foo(array $bar = NULL, ?array $baz) will cause...
 
nullable and not-required are two different things, and should be separated
 
@ircmaxell but we're not separating them, we're adding an extra nullable syntax, while all existing code will use the existing syntax
:-/
It's not like we could ever remove support for function foo(Foo $foo = NULL, $bar)
So we'd be stuck with allowing both. Forever.
 
yes, we can, and should
add an RFC to E_DEPRECATE it in 7
 
man it'd be peachy if var_export could be convinced to use short array syntax
 
12:56 AM
@ircmaxell We'd only be introducing the alternative in 7, rather harsh.
@PaulCrovella preg_replace :p (don't do this)
 
don't tempt me.
 
1:14 AM
@AndreaFaulds @ircmaxell This is one reason I am not prioritizing nullable types right now ^^
 
@AndreaFaulds not at all
optional arguments can be put at the end of the function list
 
@ircmaxell What makes you think nobody has nullable non-optional arguments?
 
I actually want to make optional arguments that aren't at the end have some kind of warning/strict/deprecated notice in PHP 7.
 
@LeviMorrison that's what I was saying
 
@ircmaxell Bleh, yet another test that does WAY too much.
I can't stand tests like this. Do they not ever have to run through debuggers?
(Admittedly there are far worse tests in php-src)
 
1:21 AM
yup, any test failure should immediately tell you what's wrong
if it doesn't, the test is bad
YAY to syntax errors in header files generating literally 2mb of gcc errors
I forget one semi-colon, and I get syntax errors in main.c
You corrupt a hashtable and nobody cares. But you leave one semicolon out of a header file and the compiler loses its mind!
woot, that's yet another test passing :-D
 
1:44 AM
ugh
I'm trying to figure out how to represent a text adventure with a set of objects
 
do you think there's a need to have a function to list registered callbacks?
like spl_autoload_functions() ?
 
@ircmaxell No, there's no use for it.
 
except for testing :-)
 
Was wondering that myself, actually.
 
twitter-poll!
 
1:50 AM
@ircmaxell could be useful for testing, any reason against it? I don't think so.
 
@kelunik it's more code to implement, and potentially fragile code...
 
@ircmaxell Would it just print {Closure} for anonymous functions?
 
no
somthing like this:
object(Closure)#1 (1) {
  ["parameter"]=>
  array(1) {
    ["$name"]=>
    string(10) "<required>"
  }
}
 
Questionable how useful that output would be.
 
Screw it
Instead of doing it the proper way, I'll use a single object to represent game state
 
2:19 AM
God, I am awful at naming things
GameState, Game and State
:/
class Game
{
    public /* array<Room> */ $rooms = [];
    public /* string */ $startingRoomName;

    public function addRooms(array/*<string, Room>*/ $rooms) {
        $this->rooms = $rooms;
    }

    public function setStartingRoomName(/* string */ $roomName) {
        $this->startingRoomName = $roomName;
    }

    public function getRoom(/* string */ $roomName) /* : Room */ {
        return $this->rooms[$roomName];
    }

    public function getStartingRoomName() /* : string */ {
        return $this->startingRoomName;
one day ;_;
This is still less awful than docblocks imo
 
2:38 AM
well ... it's not only the names
 
@tereško ?
 
@AndreaFaulds is there any case when you will NOT use result of getStartingRoomName() as parameter for getRoom() ?
 
@tereško Yes. If it's any other room.
 
a ?
 
Game is just a container of Rooms + the name of the starting room
 
2:40 AM
basically, you are using for something that should be $room->isStarting() ?
 
@tereško So then I have to iterate over every single room to find the first one.
 
.. or you could return the starting room when calling getRoom() with no parameter
basically retrieving the root node
 
Ooh, that's a good idea :)
 
(assuming your rooms actually form a tree-like structure)
 
@tereško More like a markov chain
 
2:43 AM
ok, I should used "directional graph" instead
it's almost 5AM, gimme a break
 
The idea is to represent an adventure game. There's a starting room for the game, and each room has connections to other rooms.
 
/me was thinking of a rogue-like thing
< gamer
 
I might work for that as well
 
/me was thinking of going outside
 
be careful
 
2:45 AM
I'm not actually gonna do it. Are you crazy?
 
am I only one who from time to time goes out and realizes "hell, I havent been outside my appartment for 5 days"
/me experiences periods of "hibernation", when burned out
 
I'm bad at keeping track of days, so yeah.
 
anyway
@AndreaFaulds , you might find it actually better to ditche the "Game" class instead of object-tree
*object-graph
 
@tereško Oh, good point.
You could just have the starting room === the game
Wait, no, that wouldn't work
 
I kinda have this stupid habbitof trying to represent graphs as arrays
 
2:51 AM
@tereško I have to represent this graph as an array for serialisation
 
which results in days of wasted time while I figure an algorythm for representing and transversing a graph in array form
 
In order to store the current room for a serialised game state, I need some means of referring to said room
 
.. and then I give up and rewrite the same thing with objects in about an hour
 
The easiest way is just to put all rooms in an array and give them keys
 
I know the concept
=P
it tends to backfire
then again, it might be because I am not really a math major
 
2:54 AM
I'm not either
my major is technically "arts and social sciences" at my Uni
 
3:09 AM
Fatal error: Class 'ajf\AdventureShawl\Game' not found in /Users/ajf/Projects/2014/Adventure Shawl/Adventure-Shawl/gameData/gameData.php on line 5
what
;_;
Oh wait I forgot to regen the autoloader
yay, it works again ^^
The best thing about PHP is case-insensitivity
FUNCTION REALLY_IMPORTANT_CODE(ARRAY $CODES) {
    RETURN ARRAY_UNIQUE($CODES); // THIS IS VERY IMPORTANT WHICH IS WHY I AM SHOUTING
}
 
3:25 AM
If caps-lock is cruise-control for cool, then PHP is the fast lane.
3
 
@AndreaFaulds The drugs aren't good for you, you know
 
@copy I'm not serious :D
 
Good
Thank god
 
3:48 AM
Hello
Is there any one who use

https://github.com/etrepat/baum this package in laravel
Here is my stackoverflow question

http://stackoverflow.com/questions/27626639/how-to-display-nested-categories-pattern-in-laravel
May be some people submit the down vote
Instead of help
 
4:04 AM
Hello guys. Is there a way in OpenCart to export a table that's formatted in my View to an Excel file?
 
@AhmadSharif Honestly, I don't even understand the question. Can you try to exert a little more time and effort in formulating a good question? If you expect people to go out of their way and provide quality help you should equally expect to go out of your way to formulate quality questions.
 
5:10 AM
Hello guys - I am interested in exporting a Smarty table to an Excel file, and I have asked the question here: stackoverflow.com/questions/27631667/… Feel free to check it out, and let me know if I am missing any information =).
 
@theGreenCabbage It's a big red flag when a posted question is lacking a question mark. I recommend rewriting it with a mcve version of the code you tried that failed, along with a clear problem statement of what you were expecting and what the result was instead.
 
@PaulCrovella Ok - thank you
 
@theGreenCabbage actually, I just realized - you linked to another question that's essentially exactly the same as yours. Unless you can distinguish how your problem is different it's likely to be closed as a duplicate.
 
5:32 AM
any one there?
 
5:52 AM
@user2736704 Just ask your question.
 
how to make a route in laravel when user request any page that should straight go to login page first If he is not logged in and then he can go onwards......??
I have something like this
Route::group(array('before'=>'auth|auth.admin'),function(){
Route::get('/',function(){
return View::make('services.inbox');
});
Route::Resource('log','Logging');
Route::get('logout','Logging@destroy');
});
Route::get('log','Logging@index');
but It always go the same index method even submitting the form because there's no way to go on other page how can I access Route::resource(Log,Logging) when user request via login form..??
 
Why define that as a route?
Why not just let the controller check for authentication?
The controller has better understanding in that regard since it can specify the callback URI before it redirects.
 
well am just new to laravel and trying my best.....!! So sorry if it's dumb question
Oh thanks @Sherif
 
No one suggested that the question was dumb. I'm just posing your question back to you in a different light so that you can rethink the problem.
 
6:09 AM
so If I have 14 method inside a controller then I would have to specify for each which is something bed..??
 
@user2736704 If you know all the methods in that controller require authentication then you could simply add the auth call in your constructor.
 
6:38 AM
@AndreaFaulds You are right; it does sound silly.
 
moinz
 
Route::get('logout','mycontroller@destroy');
Can't get the second controller method as it always output refelction exception something like Class mycontroller does not exist
 
6:57 AM
thanks done
 
Don't star random messages, please.
Morning
 
@Leri mrning
 
@Leri It's from the hats
And for the hats
 
Hey
I am using ffmpeg
in php
my query -acodec libvo_aacenc -ac 2 -ab 128 -ar 22050 -s 1024x768 -vcodec libx264 -fpre "C:\wamp\www\phpffmpeg\ffmpeg\presets\libx264-ipod640.ffpreset" -b 1200k -f mp4 -threads 0
produces output file size of 0
give me solution
 
@Sandesh no
 
7:12 AM
heh
 
lol
help me please
lol
 
1) that's nothing to do with php
2) we are not here to do your work
3) don't tell people to "give you solution", it's extremely rude
 
ok @JoeWatkins
it showing following error: Error while opening encoder for output stream #0:0
Suggest me what should I do I have googled but not found anythind help
 
i want to store rss feed in db from news sites. Are there any free free rss feeds for commercial use?
 
7:33 AM
posted on December 24, 2014 by kbironneau

/* by Divadam */

 
7:52 AM
i need to abort an ajax request once the server execute the php code, somehow return does not do the job
 
@OussamaELGOUMRI php.net/return
I don't think you need return here...
What happens if you open the url in your browser?
 
8:08 AM
 
moin
 
How it could be possible that one simple insert without transactions cause deadlock for mysql?
 
^ A really good post
 
It's very old post.
 
It's still relevant.
 
8:23 AM
Someone here used wordpress? I need to make some changes for a page with a shortcode like: [login_form][/login_form] But I have no clue how to "hook" into that. ( not doing that much WP dev )
 
morning
 
I read wordpress.... lock 'n load!
 
Noooo :D I was thinking... how long would it take before some angry comment will be there.
 
<insert extremely rude and absolutely unusefull rant here>
 
BTW: Good morning @DamienOvereem ;)
 
8:32 AM
'moin
Did you attend php.frl meetup in Leeuwarden yesterday ? :)
 
Oohh no :s didn't know it
 
I had to cancel .. was planning to go but personal matters prevented me. Some ex-collegues of mine went though
Might attend next month
 
@AndreaFaulds Yeah sure np. However igor doesn't really make releases :(
 
Dammit, I too regularly read something on StackOverflow, then click on a link on the right that takes me to fantasy.stackexchange and before I know it I've switched from reading about Doctrine to why was Galadriel so powerful in Lord of the Rings!
 
Oh :)
 
8:34 AM
Morning all
 
lolz @ jimbo
 
What power does Galadriel had
Galadriel was the greatest of the Noldor, except Fëanor maybe, though she was wiser than he, and her wisdom increased with the long years.
 
@Jimbo so... why was she?
 
25
A: Why is Galadriel so awesome?

Darth SatanThe degree of power shown by Galadriel in the movie is far in excess of the book: although in the book she was capable of destroying Dol Guldur (and the suggestion is that she did so single-handed), taking on Sauron one-to-one would have been beyond her capabilities. Tolkien's Letter 246 states ...

 
mornings
 
8:36 AM
coughgeekscough
 
'nin
got a yukka plant, settle a dispute in my house: is the yukka plant a tree ?
 
Yucca is a genus of perennial shrubs and trees in the family Asparagaceae, subfamily Agavoideae. Its 40-50 species are notable for their rosettes of evergreen, tough, sword-shaped leaves and large terminal panicles of white or whitish flowers. They are native to the hot and dry (arid) parts of North America, Central America, South America, and the Caribbean. Early reports of the species were confused with the cassava (Manihot esculenta). Consequently, Linnaeus mistakenly derived the generic name from the Taíno word for the latter, yuca (spelt with a single "c"). It is also colloquially known in...
Says tree!
(what's the opposing view?)
 
the misses thinks it's a plant because it said yukka plant on the label ...
 
trees are plants
 
Well
 
8:39 AM
yucca elephantipe ... I think we can all see why I bought one of those ...
 
Isn't there a height requirement to be classified as a 'tree'?
 
I'm using a cookie-less session to authenticate user.. it's going to be over ssl and I am hashing password etc...
and captcha
what else can go wrong?
 
why are you using cookieless sessions ?
 
@Jimbo not sure ... dunno anything about plants ... it's got bark though, which my simple head thinks makes it a tree ... is that wrong ?
 
@JoeWatkins I would compromise and both agree to just call it a "Yucca". It doesn't need treelplant appending :P
 
8:43 AM
@Jimbo I think it's more related to the trunk
 
posted on December 11, 2014 by cboden

The one where we remember to tag the change were the master repo pulls in all the split components.

 
Anyone used Doctrine to create a constraint on a join table (alternative to enum) by any chance?
 
Is it possible that the elephpant grows on a tree ? #php #getOneOfTheseInYourOffice http://t.co/Je3DAhyliM
hehe ...
 
@tereško I don't have to... I guess cookieless sessions are more insecure...
maybe I should implement cookie-based session
 
since when can we use coroutines in php?
 
8:56 AM
yield
 
@user3692125 why? wat?
wut?
 
@Jimbo in case of many-to-many? Probably you need to enforce on the code level
 
@PeeHaa Because it embeds sessionid in url? I don't know...
 
@nikita2206 Tbh I have actually only used enums before :P If I have a user table and a countries table, there needs to be a constraint on a user having a specific country from the join table, not the enum
 
And that is more secure because? The sessionid is clearly visible by anybody who walks by? The session id is cached in browser history?
Just use cookies. That is what they are for
 
9:01 AM
@Jimbo I really don't understand what you are trying to say
 
I said using cookieless session is more insecure... not more secure...
re-read what I wrote, lol
 
@nikita2206 Okay, I was going to create an ENUM in one of my tables for platform. It'd be ENUM('WINDOWS', 'LINUX'); this may change in the future. Then I read how ENUMs are bad 'mmkay. So I need to replicate this with a join table in Doctrine, somehow... you're saying that's a manytomany..
 
I mean, for that case there is a foreign key constraints which is under SQL standard afaik
 
oooooooooh :)
Sorry about that ;)
I will shut up now :D
 
No worries... I worded it weirdly... so I have totally discarded cookie-less session now :)
 
9:03 AM
:P
 
@Jimbo oh, okay. the thing is enum isn't standard sql feature and hence doctrine doesn't cover it. If you really don't want to create a new table for platform (I, for one, would not create it) you can just enforce enumerable in the constructor of the entity
 
@nikita2206 Nah, I would like to create a join table as I haven't done it before instead of enums. I'm not sure the best way of doing it with annotations though
 
@Jimbo is it something more complicated than just many-to-one relationship?
Also, I would advise to move to xml at some point, cause entities can get pretty messy with annotations
 
@nikita2206 Hmm, many servers can have one platform. And as soon as I do that, if I try and create a server with a platform that's not in the platforms table, there'll be a referential integrity violation?
That's what I'm after
 
@Jimbo ah, sure. In doctrine just define an entity of Server with non-nullable property platform, and in constructor you will need to expect platform as one of the arguments. Then you will not be able to craete a new Server entity without passing platform to it. Also, referential integrity is something that your RDBMS should be after, so if you try to create an entity without needed field you should get an error at DB level as well
(but usually you have to protect invariants on object level as well)
 
9:13 AM
Yep, I'll enforce at application level but would like it at db level too. I'll try this ManyToOne first and see if that enforces it
 
@Jimbo ok, what I wanted to say is that doctrine has nothing to do with ensuring integrity in your DB, it's your DBMS' business
 
@nikita2206 Well I'm creating my tables from Entity annotations
So I'd like to be able to specify what is required as an annotation, then when I call schema-tool:update it'll do it for me ;-)
Reason: future users will call one command to have schema set up on their machines
 
@Jimbo ok, then the question was - will Doctrine create foreign constraints when exporting schema to DB and answer is yes :)
 
:P
That's what I'm after
Cheers
 
@Jimbo also consider using migrations for that
I mean at some point you will definitely need them
 
9:35 AM
posted on December 24, 2014 by kbironneau

/* by CJRE */

 
9:55 AM
should we use the word "colleague" or "coworker"?
 
Can @tereško or anybody else who knows how to find shit in yii help me find something?
 
Maaaaaarning
 
How can I find out what class this request thing is an instance of?
		$request=$app->getRequest();
6819			$user=$app->getUser();
6820			$verb=$request->getRequestType();
6821			$ip=$request->getUserHostAddress();
 
@Jimbo why are these methods public?
@PeeHaa var_dump
:P
 
@FlorianMargaine Both are fine. co-worker is someone who you work with that does something similar to what you do.
 

« first day (1530 days earlier)      last day (3411 days later) »