« first day (28 days earlier)      last day (865 days later) » 

01:54
0
Q: Javascript singleon patter

Elaine KDoes anyone see any problem with the following code block for creating a singleton? Singleton = { getInstance : function() { if (Singleton._instance) return Singleton._instance; Singleton._instance = new function() { //create object here }; return Singlet...

02:15
0
Q: How to do Singleton in Android

jantoxI tried from this example http://stackoverflow.com/a/9472019/485978 I have a service, this service just connects to the database directly and I put all data in a bean which is located inside this class. public class ServiceApplication extends Application { private static ServiceApplication mIn...

 
7 hours later…
09:36
1
Q: Encapsulate PHP memcache set and get function

LeoHave this class: class Cacher { private static $memcacheObj = NULL; public static function GetInstance() { if (self::$memcacheObj === NULL) { self::$memcacheObj = new Memcache; self::$memcacheObj->addServer(Configs::memcache_addr); ...

10:35
@Zoidberg And now there are 35 :) Registration ends in 12 hours, let's see how many more will join.
user142019
Join yourself.
Students can sign up for multiple seminars with different priorities. I wouldn't be surprised if less than 10 really end up in my seminar :)
user142019
I need to think of a good way to abstract 3D APIs like OpenGL and DirectX under a uniform API.
You must be the first one to think of that!
user142019
lol
10:38
Why do you want to support both? Just pick OpenGL.
user142019
DirectX > OpenGL. :P
Then pick DirectX and fuck Linux users :)
user142019
OS X! xD
They are probably used to being fucked all the time.
user142019
lol
user142019
10:43
Fuck I created a CLR project.
user142019
int main(array<System::String ^> ^args) hurray.
11:20
@Zoidberg Is that in Zoidlang?
I prefer trailing return types :)
user142019
11:59
@FredOverflow no that is C++/CLI.
user142019
In Zoidlang it would be:
user142019
public fn main(Array[String] args)
hi any one know how to parse geocode response from google map api?
user142019
Yes, use a JSON parser.
user142019
Or XML parser or whatever the API returns.
user142019
12:03
Probably JSON.
@zoidberg it possible to get street address city, country and pin code seprately
user142019
Do I know, read the documentation.
@Zoidberg Where is the return type?
user142019
@FredOverflow inferred.
I am Using Gson api with relevant been what ever results return from queery string
12:05
@Zoidberg How would I specify it if I wanted to?
user142019
You can make it explicit if you want: public fn Unit main(Array[String] args).
@Kobranag Gson has queery strings and straighty strings?
user142019
1 message moved to Java
Lol :( I was being sarcastic
It's a horrible language
user142019
2 messages moved to Java
user142019
12:06
:P
Why would anyone like it?
Because you don't have to be a genius to learn it or something.
user142019
BECAUSE THEY TAUGHT IT AT SCHOOL IT'S THE ONLY LANGUAGE I KNOW AND THEY TAUGHT IT AT SCHOOL IT MUST BE SUCH A GREAT LANGUAGE.
user142019
@FredOverflow Haskell is much easier to learn. :)
when i am try to get "types" it return [a,b] but exactly how to find types array
user142019
12:07
(Sure, maybe the library isn't but whatever. :P)
Yeah, that language makes me write a lot of code that's redundant, everything is an object except stuff that isn't like functions or primitives that's not biased or stupid at all. I have to explicitly type everything, I'm going to use that
@Zoidberg Come on, you cannot even write a main function in Haskell without Monads.
user142019
@FredOverflow who needs main in Haskell when you have the FFI!
user142019
user142019
(FYI, this is not a Java room, this is a room to make fun of Java.)
user142019
12:10
@FredOverflow main = pure () I'm using the I/O applicative, not the I/O monad! :D
Java makes fun of itself, it's a joke
user142019
Java is worse than PHP!
@FredOverflow Is It any answer relating Google reverse GeoCode api
Someone was so pissed and decided he's going to make something so redundant people will see how stupid they're being
user142019
(Hey, at least PHP is expressive, to some extent.)
12:12
People stared using it :/
user142019
(And it has no manifest typing. \o/)
@BenjaminGruenbaum Do you want me star each and every one of your messages? :)
user142019
lol
user142019
@BenjaminGruenbaum this may help: stackoverflow.com/questions/ask.
user142019
@FredOverflow s/star/bin/
12:15
@Kobranag Do you speak German?
user142019
@FredOverflow That wasn't German? All those random capital letters!
user142019
room topic changed to Java Sucks: Is It any answer relating Google reverse GeoCode api [java] [singletonfactorymanager] [uml]
12:46
0
Q: Shutdown timeout for JBoss?

Martin MetzI use JBoss 7.1.1.Final. Here I have a startup singleton. At startup I initialize something, at shutdown I terminate/cleanup my stuff. But now I found out, that the termination I can do whatever I want for 1 second! After one second the application is just away, and sometimes 1 second is not enou...

13:14
This should probably be starred here steve-yegge.blogspot.co.il/2006/03/…
user142019
room topic changed to Java Sucks: Drowning in singletons. [java] [singletonfactorymanager] [uml]
13:39
@Zoidberg You should get this tatoo
 
1 hour later…
15:01
0
Q: using CDI in a singleton pattern

fabpiccaI'm trying to inject a logger object in a class that is implemented following a singleton approach. The code almost looks like this: Logger class: public class LoggerFactory { @Produces public Logger getLogger(InjectionPoint caller){ return Logger.getLogger(caller.getMember()....

15:19
1
Q: Do we need to have persistant object to acheive singleton pattern in php

Sathish KumarI am having singleton Database class in classes/database.php as mentioned in Singleton pattern in php and I am creating the database object in users.php using Database::getInstance() method then I am calling the same static method in accounts.php (Database::getInstance()), here I am getting new i...

 
5 hours later…
20:43
-2
Q: Why creating an object in Java using Singleton is so slow?

Michał KaszaRecently I made a class Singleton, where was a method returning the object myInstance of class Singleton. it was smth like: private final static Singleton myInstance = new Singleton(); After that i coded entire constructor, which was private, lets say: private Singleton(){ doStuff() } Ho...


« first day (28 days earlier)      last day (865 days later) »