« first day (3 days earlier)      last day (890 days later) » 

1:35 AM
0
Q: Thread Safe Singleton in iOS6

banditKingIm trying to get an updated version of the Singleton Design Pattern which is thread safe. Here is one version that I know. However, I cannot make it work in iOS6 Here is what Im trying to do: Here is my Class method +(id)getSingleton { static dispatch_once_t pred; static EntryContain...

 
 
1 hour later…
2:50 AM
Can we cut it out with the unnecessary singleton worship?
 
 
7 hours later…
10:17 AM
3
Q: Is there any way to prevent override/overwrite of functions/variables in singleton instance?

pocesarConsider this pseudo code: (function(window){ var options = { /*where everything goes */ }; var instance = (function(options){ for (var i in options){ if (options.hasOwnProperty(i)){ this[i] = options[i]; } } })(options); instance.callbacks = func...

 
 
3 hours later…
1:02 PM
0
Q: How should I call mysql database functions from inside a class in PHP?

user2036972This is something I've struggled with for some time now, and I know I'm not alone. I'm looking for a "best practice" way to be able to use a database connection in my PHP classes. I've just started to read about static functions and singletons. I currently think this is the way to go, but I want ...

 
 
2 hours later…
2:54 PM
@Zoidberg WTF is going on here, are we the Java help desk now? :)
@JohanLarsson The series has been featured multiple times on reddit these days, what's going on? Yes, it's good, but it's also several years old. Why are people suddenly interested in it?
@blackbee You cannot access private variables defined in a base class from within a derived class. Just put the getter in the base class.
And please don't make the fields protected. Protected fields are a maintenance nightmare.
 
@FredOverflow I don't know about people, I just found it on Channel9. I have only visited reddit once.
never done any functional other than linq feel I should start
 
And now you are learning Haskell? You have chosen wisely.
 
I think it is going to be F#
You have an opinion on F#?
 
I cannot comment on that, no experience with F#.
 
 
5 hours later…
7:50 PM
1
Q: Singleton Potential Leak?

iBrad AppsIn one of my third party libraries in my project, the singleton sharedInstance method seems to be throwing up an analyzer warning on the final return_sharedInstance line: + (BlockBackground*)sharedInstance { if (_sharedInstance != nil) { return _sharedInstance; } @synchroniz...

 

« first day (3 days earlier)      last day (890 days later) »