« first day (744 days earlier)      last day (4207 days later) » 

12:00 AM
Have you already seen this message on the review page? "You have no more close votes today; come back momentarily."
2
 
@Jocelyn lol
 
I probably refreshed less than a second before 00:00 UTC
 
@hakre Pretty sure it was an SSL problem, it stops working if I put https:// in the manifest, and for some reason cloud.github.com uses a cert issued to *.cloudfront.net
@hakre Also beware that build is probably unstable, it has undergone a pretty hefty refactoring and some things may be broken. In fact if you find anything please let me know.
 
0
Q: How can you check if a PHP session exists?

AdamWathanJust wondering how to check if a PHP session exists... My understanding is that no matter what, if I am using sessions, I have to start my files with session_start() to even access the session, even if I know it already exists. I've read to user session_id() to find out if a session exists, but ...

@DaveRandom okidoki
 
any Zend guys here?
 
@SomeKittens Zend as in the PHP company, the Framework or Zend.to `?
 
As in the tutorial.
 
which tutorial?
 
I'm having Apache issues
I've configured it as it should be, but I'm still getting the default Apache message
 
12:39 AM
Firefox extensions are so unbelievably, needlessly complicated. The whole thing is going to have to be altered so that document is not used directly, we're going to have to inject a reference to it.
 
wanna make addon for opera too ?
 
Oops, misconfigured something. Fixed, restarted Apache, now 500. Wonderful.
 
ok ... the weather outside is perfect: full moon + thick fog + icy cold
and since i'm currency in my home-town , all the street-lights are off too in the middle of night
 
Weather outside: Pre-hurricane.
You win.
 
@tereško Are it's add-ons JS powered?
 
12:45 AM
yes
 
@tereško Then I'm sure it can be arranged, but one thing at a time.
 
12:59 AM
@tereško Looks like it should be nice and easily doable. I've just spent some considerable effort abstracting the core code from Chrome, now I'm building a FF wrapper for it, as soon as that is working I'll take a look at Opera.
 
1:27 AM
That was irritating. Turns out I didn't have mod_rewrite enabled...
 
Why are we reopening?
 
2:47 AM
because this is not preg regex in PHP but a syntax highlighting regex flavor in sublime2text for PHP source files.
 
3:28 AM
morning ..
is IDs selectors are programmer’s equivalent to singletons.
 
3:42 AM
?
 
4:04 AM
22 mins ago, by NullPointer
?
 
4:44 AM
@ShaquinTrifonoff ?
 
@NullPointer ?
 
@ShaquinTrifonoff ..hehe ...lol.... i want to know thing above the ?(first) by me
 
> is IDs selectors...
What ID selectors are you talking about?
 
 
2 hours later…
6:47 AM
hello
 
Hello
 
7:22 AM
Hi Friends , How can i switch a joomla template using joomla code, I have a vituemart details page in joomla , which requres a diffrent template rather than assigned from template manager, have any idea
Hi r u there
 
Sem
7:50 AM
Goood morning
 
Hi Friends , How can i switch a joomla template using joomla code, I have a vituemart details page in joomla , which requres a diffrent template rather than assigned from template manager, have any idea
 
8:10 AM
any body knowing info. regarding magento ?
 
Hey, so I'm trying to connect a minecraft server plugin to a MySQL database which is hosted by godaddy, so far we've gotten this error: Could not be resolved because of an SQL Exception: Communications link failure
 
8:25 AM
@GeorgeSumpster shared hosting?
 
@ShaquinTrifonoff i am talking about the <div id="some"> this id selector
@hakre did you made this(stackoverflow.com/questions/6724467/…) answer cw or its automatically converted
 
user1125394
8:42 AM
anyone know what is this testflightapp.com?
 
@NullPointer Well, I think that they are supposed to be, but because of misuse, browsers will treat them a bit like classes when there are more than one element with the same ID. Demo
 
@cyril dont know but after checking looks like something useful ....
@ShaquinTrifonoff thankyou ..:)
 
9:03 AM
Morning all
 
Good morning
 
is there anyone to help me for my php site?
 
42
Q: /me command for chat

The Unhandled ExceptionI love the "action" command /me found elsewhere, and think it would be fun to have in the chat. A message like: /me loves the new chat system Would show up as: Josh loves the new chat system Rather than: Josh: loves the new chat system I'm trying to think how it would work with ...

:( 12 hours left, and still nothing
 
@MadaraUchiha I'm guessing by the age of the question that if the SE powers that be had any plans to ever implement /me, they would have done it by now. I think the client-side extension route is a good one for things like that though, it allows us to extend the functionality of the platform but it's still fairly obvious to others what's going on - much like cv-pls.
 
@DaveRandom Guess so...
 
9:14 AM
@MadaraUchiha You could always start an e-petition if you think can drum up enough support - if we can get a decent number of regulars from the busiest rooms to get behind it, they might consider do it - I mean the client side solutions posted demonstrate how easy it would be to do this just by altering the markup/styles by not very much.
 
Yes, but the problem is, most mods (including Jeff) find the chat itself useless
It's been actively discouraged several times
And to add a useless function to a useless part of the site?
That's adding insult to the injury.
But if they don't like it, just give it a and be over with it.
 
user1125394
feels cold
 
user1125394
^ here's your /me
 
Doesn't really matter, it gets used enough that it's here to stay. SE is a business at the end of the day, if their "customers" don't like the product they will adapt. Hell, we've basically provided the dev and test work, all they need to do is put it live.
 
@RamaMoorthy you can ask here if anybody can then they will
 
@tereško There is a major sticking point with an Opera port as it turns out, they currently don't support MutationObservers and it doesn't look like there are any plans to do so in the near future. A backwards-compat module using Mutation Events would have to be written, and these are known to be murder on performance when used on a very active document.
Having said that, the current release of the Chrome extension uses them, and it does seem to be happy enough, because we do minimal processing on elements we are not interested in. I'll do some testing and get back to you.
 
@Christian also
 
9:45 AM
posted on October 29, 2012 by Derick Rethans

Managing Pull Requests for the MongoDB PHP driver London, UK Monday, October 29th 2012, 09:22 GMT The MongoDB PHP Driver is hosted as an Open Source project through GitHub. Everybody can check-out the repository and provide patches to this. In order to make things easier to manage, even Hannes, Jeremy and me, the maintainers of the

 
user1125394
yesterday, by DaveRandom
@Feeds We all already know that MongoDB is web scale, there is nothing more we need to know.
 
0
A: Ask question and account blocked

Madara UchihaI really love it when people can't read a simple line. we are no longer accepting questions from this account. See http://goo.gl/C1Kwu to learn more See http://goo.gl/C1Kwu to learn more See http://goo.gl/C1Kwu to learn more See http://goo.gl/C1Kwu to learn more http://goo...

 
10:06 AM
lol @zerkms
 
@MadaraUchiha: actually made my evening, thanks for that :-)
 
hello all ... need help ... search in cakephp
http://stackoverflow.com/questions/13119465/how-to-search-separated-by-comma-value-in-cakephp
 
@YogeshSaroya: that's a terrible idea
google a bit about "many to many"
 
While I understand and agree with the sentiment here, this is likely to be an unsustainable system since for the foreseeable future we are working with the IPv4 address space and many users will be working on dynamic IP connections. The influx of new accounts appears exponential - by trial and error I have found that the current newest user ID is 1782549 (by the time you read this it will likely be more), meaning that the number of registered accounts has more than doubled since I joined just over a year ago. I would propose that the IP blacklisting be temporary - say for 2 weeks. — DaveRandom 1 min ago
^^ if you agree :-)
 
10:15 AM
posted on October 29, 2012 by Nelmio

A common problem in software development, is that you need data to work with. This is especially true with data-oriented websites. Working with an empty database leads to all sorts of unexpected problems cropping up once the site goes live and receives real world data. Performance issues, visual bugs due to missing fields, too long or too small texts, etc. The best way to address this is to h

 
Heh, when you hate someone, bounty their terrible questions to rake in the downvotes... stackoverflow.com/questions/8203018/…
 
@MadaraUchiha I didn't even think about mobile, it would be far too easy to blacklist entire carrier networks when you take that into account, since many of them use just a handful of IP addresses as a breakout for 10s of thousands of users. It is a little depressing that IPv6 has not progressed further than it has, or this would not be an issue, but I actually got bitten by this over the weekend and had to turn my router off for an hour to force my WAN DHCP lease to expire.
 
10:53 AM
@DaveRandom Instead of gangbanging a new user, leaving constructive comments and encouraging him to read the faq before he gets banned seems like a better alternative. No?
 
@MadaraUchiha Not new, serial terrible
 
@MadaraUchiha It's not a new user, they've been here for 11 months. I'm really surprised some of those questions have survived as long as they have.
 
Hi Guys
 
Yo...
 
11:07 AM
I've got a question about DI, and factories in particular. If you need instances that are shared between all other objects in your app (a db, for example), you need some sort of singleton pattern somewhere in your code, right? Is it OK for this to be in the factory part (all factories grabbing the objects they need to inject from a "global" stack?)
Moving from there: how would you then test the factories?
 
@creativedutchmen You can implement what's called the lazy-load pattern.
 
@NullPointer No idea ;)
 
@MadaraUchiha how would that work?
 
Please hold on while I fetch an example
 
11:09 AM
$dbhProvider = function() {
    $instance = new \PDO('mysql:host=localhost;dbname=lamed;charset=UTF-8',
                         'lamed_user', '1499823');
    $instance->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
    $instance->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
    return $instance;
};
 new DataMapperFactory($dbhProvider),
class DataMapperFactory {

    private $provider;
    private $connection;

    /**
     * @param \Closure $dbhProvider - This database handler provider should be a function that returns a database instance.
     */
    public function __construct(callable $dbhProvider) {
        $this->provider = $dbhProvider;
    }

    /**
     * @param string $name Name of class to be created.
     */
    public function create($name) {
        //If connection isn't cached, make one and cache it.
        if (!isset($this->connection)) {
It acts similar to a singleton in this sense, only you can create multiple instances of the factory to pass around different database objects
 
of course , if you start using mappers for more then just SQL, then this class would have to expand
 
Indeed
 
@MadaraUchiha Y U NO WRITE DOC COMMENTS THAT MATCH YOUR TYPE HINTS??? :-P
 
@DaveRandom I actually changed that very recently (with PHP 5.4 upgrade) and forgot the comment (PhpStorm didn't alert for some reason). Will fix though, thanks.
 
Thanks, give me a few minutes to grasp what you just did
 
11:13 AM
@MadaraUchiha , that code is wrong
 
@tereško You're right
 
result from call_user_func($this->provider); should be assigned to $this->connection
 
morning people
 
mornin'
 
Good catch
 
11:14 AM
@DaveRandom I like it
 
morning
@PeeHaa Upgrade?
 
Corrected
 
@DaveRandom Supr mega turbo auto update
 
lol
 
@PeeHaa Who What Where?
 
11:18 AM
@MadaraUchiha, thanks, I think I get it. The only thing I am wondering about now is the following: when you create the Factory instance, you are basically using another factory.. How bad would it be if the DataMapperFactory creates the database instance directly?
 
If you want to run that build, feel free - it has no new features to speak of, although it does have the middle click fix. It's the result of the FF port refactoring, and it has a little less jQuery/innerHTML, the layout has changed considerably and it's quite possible that something is broken. If you find anything no worky let me know.
 
@creativedutchmen You could implement it without the extra DataMapper as well.
 
@creativedutchmen , are you talking about static calls ?
 
@tereško He wants a factory for the PDO object, without the DataMapper involved.
 
...and it's manifest v2 which seems to be a little more strict on permissions, which again may lead to breakages (although that'll just be manifest fixes rather than problems with the core code)
 
11:19 AM
that's what I am asking, yes: how bad is a global (or singleton) inside a factory?
 
well .. it makes the whole construction pointless and fragile
why would you want a global state inside factory ? what would it accomplish ?
 
@creativedutchmen Globals are never good.
 
Ok, I think I'll have to be more specific then:)
 
50
Q: Why is Global State so Evil?

Madara UchihaBefore we start this, let me say I'm well aware of the concepts of Abstraction and Dependency Injection. I don't need my eyes opened here. Well, most of us say, (too) many times without really understanding, "Don't use global variables", or "Singletons are evil because they are global". But what...

 
11:22 AM
this is part of an platform that has plugins. Since the plugin classes will have dependencies, and because I want to use DI, the plugins will need some sort of factory.
 
and where is the problem ?
 
@MadaraUchiha the soon to be stable version of the plugin finally supports auto update :)
 
@PeeHaa Oooooh fancy
 
Now, because the factory objects need to have access to the database and other objects that should only exist once within the app, they need some way of having them. The problem lies that not every plugin will need all dependencies, so blindly injecting all possible dependencies seems a little harsh. I have thought about reflection, but that would add a lot of extra code, and I am not sure if it would make things cleaner...
 
@creativedutchmen well .. why ain't you plugins implementing the same interface ?
it looks like you argument is based on "but my code is horrible and i like singletons" idea
 
@tereško, let me rephrase, then: from a DI point of view, what is wrong with factory classes asking for things?
 
@PeeHaa morning :) - and I'm a beta-testa :)
 
11:34 AM
@creativedutchmen , what do you mean by "asking for thing"
 
@tereško, sorry, look for things I mean.
/me should stop typing before thinking what he really wants to say
 
do you know what Law of Demeter is ?
 
then what is your problem
you either provide factory with all the dependencies that will be shared between instances , or the factory creates instances locally, if they are not shared
 
@tereško the fact that it's in the factory. For what I understood, the instantiation process is done in the bootstrap, so that's where the factories live, right?
 
factories get initialized at the bootstrap stage, but then they are passed to all the structures that will use them
same object can be shared by multiple constructs .. therefore, factories do not "live" anywhere
 
ok, I think we are on the same page then:)
let me refine my question again: how bad is a singleton pattern in the bootstrap process?
I am passing my factories around, and they all have the proper classes as members
object*
objects*
 
@creativedutchmen Why would you need a singleton in the bootstrap stage?
You instantiate your factories and pass them to the objects which need them
 
@MadaraUchiha, because I want just a single database object (amongst others), and I do not know the dependencies in advance
 
@creativedutchmen How can you not know the dependency in advance?
Either the object needs a database object to be saved, or it does not.
 
11:46 AM
@MadaraUchiha because the factories are provided by plugins
 
@MadaraUchiha, and some plugins might want to access the db, other might not
 
@creativedutchmen The factories are provided by plugins?
That doesn't really make sense
Do you know what is the bootstrap stage?
 
yes
it's where you read your config files, setup the database, fire a controller
 
@MadaraUchiha every plugin will come with different dependencies, some need the database, other might not. All plugins can register functions to be called at specific points in execution (after an entry is saved, for example). Now, I do not like to just pass every possible dependency at every callback, so I want the factory class (that I instantiated earlier) to take care of this. Does that make more sense, or am I tackling this completely wrong?
 
@creativedutchmen You do have some sort of Plugin factory, do you not?
 
@hakre Why off topic? It's NARQ but it does seem to be a coding question...
 
@hakre As I like to say: crash test dummy :) morning
 
@DaveRandom If it's not a real question, it's off-topic, too, right? And @PeeHaa fine here nothing crashed so far ;)
 
12:00 PM
@MadaraUchiha, yes, every plugin provides its own
and they all extend (or implement) the same base factory
 
user1125394
@creativedutchmen why can't your plugin classes be autoloaded like other classes, then they are accessible from bootstrap as well
 
@hakre True, but why not just NARQ it?
 
accessing them is no problem, its the dependencies they have that is..
because if a plugin needs the database, so does the factory
 
12:02 PM
^ just NARQ it.
 
0
A: CSS selected tag higher than class

Madara UchihaThe reason for the problem you're seeing, is that input[type=text] is more specific than .error, so it will override it. Use a more specific selector: input.error Or if you want to really be safe: input[type=text].error Another approach would be to keep the current selector, but add the !...

I downvoted everyone's crappy answer, downvote storm go!
 
user1125394
@creativedutchmen I mean you are able to do new SomePlugin; in bootstrap?, then the paramters depend of the plugin
 
@cyril, yes, I am able to do that, if I knew what parameters the plugin needed.
of course, I could use reflection, but then I would create a monster factory that knows of all classes if they should be shared or not
 
user1125394
they should give some description.. dunno how, reflection yes
 
@Caelea: Your answer raised a possible solution. But you did not state the dangers of it in the long run. You just gave a solution and said "use this" without explaining. i2.kym-cdn.com/photos/images/original/000/420/481/35a.jpgMadara Uchiha 8 secs ago
Epic picture :D
 
user1125394
12:07 PM
@creativedutchmen a plugin can be enabled / disabled
 
user1125394
the factory should be independant of the plugins no?
 
hmm. I thought the factory was to be provided with the plugin
 
@MadaraUchiha I love !important, it looks like it means "not important". It's like saying "do it if you want, I like guessing" - or in other words "behave like IE"
3
 
as the plugin author knows how to instantiate it..;)
 
12:10 PM
@creativedutchmen You would need a PluginFactory, which is given all of the needed factories, along with the plugin's class Name, and have the factory inject all the required dependencies into the Plugin.
Also, all plugins should implement the same interface.
 
yes, I have that, but how would that factory get all the dependencies?
 
hence the question: can the PluginFactory look for the dependencies?
 
@creativedutchmen No, but you can pass them in
 
@MadaraUchiha, how would I know what to pass?
 
12:17 PM
@creativedutchmen Who determines what kinds of dependencies each plugins need?
 
the plugin itself
@MadaraUchiha, so that would be the plugin factory
 
@MadaraUchiha, sorry, my previous post is wrong. It's what I am trying to find out by asking here:)
I don't know how I determine what dependencies a plugin needs without using reflection (and having a very big monolithic class that knows about all dependencies)
 
@creativedutchmen In which case, have your plugins publish its dependencies
 
12:21 PM
getDependencies() ?
 
When someone writes a plugin, have him list the plugin's dependencies, perhaps as a dependencies.json file
The PluginFactory takes that JSON as an argument, and parses the required dependencies.
The PluginFactory would need to have all other possible factories.
 
Ok, makes sense. Then how would I figure out what dependencies are shared and what dependencies can be created on runtime?:)
 
@creativedutchmen You determine that on your own.
 
does that mean I'd have to pass the dependencies that need to be shared to the factory class "just in case"?
 
I like to use "plugins" or "modules" as independent entities.
Meaning each of them is (almost) completely cut off from the rest.
 
12:24 PM
ok, what word would you prefer for this scenario then?
 
They get a new DataMapper instance and everything.
 
they "plug in" to my app, modifying the behaviour
new datamapper = new connection?
 
@creativedutchmen Yes
Note that "DataMapper" isn't limited to "Database Connection"
DataMapper can map to a file, to a database, or anything that's considered "permanent storage"
 
I see. But this would mean that if I had a lot of plugins, I would open and close connections all the time. That's not really ideal
@MadaraUchiha, let alone objects that have to be shared, like the request object
 
12:28 PM
@creativedutchmen For objects which are likely to be shared, you can pass its Factory, and have it lazy-load it.
Like the DataMapper example.
 
ahhh!
now it makes sense
 
Wow, -30. That probably broke some records.
-30
Q: What to do if high reputation users are downvoting/closing your question without actual reasons?

Radiohttp://stackoverflow.com/questions/13100847/transparent-pixel-renders-different-on-pc-and-iphone#comment17806276_13100847 In this clearly stated question I got an absolutely non-sense answer from a high reputation user who offers me a solution that is not related to the question being asked. ...

 
@MadaraUchiha, that's perfect! Pass the Factories "just in case", load the actual class only when you really need it, then pass it again. Now, because these factories are all sharing the same interface, I can also bundle them and pass them all at once - if the class is in $shared, pass that instance, otherwise create it.
 
Then on the bootstrap I created the "shared" factory objects, pass them once, and the rest is magic
@MadaraUchiha I think that answers my question, thank you very much for your time, really appreciated
@tereško, you too, thanks for taking the time to help me out!
 
12:33 PM
@creativedutchmen Sure thing, always happy to help :)
 
hey guys, what is the name of the type of code that stack overflow uses for text formatting, like this: **this will be bold** and this is *italics* this is [url to facebook][1]


[1]: http://www.facebook.com
 
@NicholasWild Markdown
 
i want to say that, [b]bold[/b] would be bbcode and <b>bold</b> would be html
@DaveRandom thanks
 
12:47 PM
and does google also use markdown for sending emails? because once i got a email to my mailbox, webmaster@mydomain.com, which i viewed from a php script which i was practicing to view emails from my script directly, and i got similar to that...
@DaveRandom and what about markdown parser? i mean, i want to convert markdown codes to html codes...
 
English question: is it "can not" or "cannot" or is both okay?
 
@NicholasWild Markdown is a way to express things in a way more simply than they can be expressed in HTML, but you still require a parser and a converter (much like BBCode). The browser does not understand it, your mail client does not understand it. So the short answer to does google also use markdown for sending emails is "no"
4
 
@DaveRandom thanks again
@DaveRandom so, can you also tell me what does google use? please...
 
@hakre Yes, and add can't to that list as well. The three are semantically interchangeable. There are situation where I would always use one, or always use another, but I can't really explain what those are, it's a case-by-case thing. I personally would probably never use can not because it seems clunky - but there's no semantic reason why you couldn't.
 
I did use can not, but will use more cannot now then. Thanks for the feedback ;)
 
12:52 PM
@hakre Are you going on the review page again?
 
@MadaraUchiha I'm on the kill some bogus tags page
 
@NicholasWild You mean Gmail? They will use some custom built system I would imagine. I wonder if you might be looking for a WYSIWYG editor though (google it)
 
@hakre oic
@DaveRandom This question was asked before.
What kind of WYSIWYG does Gmail use
Actually
:)
 
@MadaraUchiha ? (but probably not )
Seems a bit NC or maybe TL
 
thanks
 
12:55 PM
@DaveRandom NC IMHO
Or even OT
@Kev: People repeatedly posting questions containing painfully vulnerable and ancient functions and methods is also tiresome to see over and over again. — Madara Uchiha 6 secs ago
Need some back here please.
If anyone wants to join up
 
user1125394
crap, why there is no longer the search box in the Chrome developper tools (v 23)
 
1:11 PM
@cyril What search box?
 
user1125394
in top right
 
user1125394
there was a little box to search for source/script occurrences
 
user1125394
hmm sry it's ctrl + f
 
user1125394
and the box shows up, at the bottom
 
user1125394
1:13 PM
<Ctrl>+F:Search
<Ctrl>+<Shift>+F:Search across all sources
 
Huh, never even noticed it when it was there - looks useful
 
17 mins ago, by Madara Uchiha
Discussion has begun
 
user1125394
round 1
 
1:41 PM
^ boah, that guy is driving me nuts. :)
just close it against duplicate stackoverflow.com/q/1396848/367456 please
 
so finely the result of your conversation is that should not comment that ( gist.github.com/3941118 ) big mysql_* comment .. isnt it?
1
Q: Any way to remove the need for so many META tags?

KolinkThis is a part of what is in the <head> of every single page, and is therefore downloaded by the user every single time they load a page - most of them don't even affect browsers: <meta name="keywords" content="long list of keywords here" /> <meta name="description" content="Site'...

 

« first day (744 days earlier)      last day (4207 days later) »