« first day (1638 days earlier)      last day (3286 days later) » 
00:00 - 14:0014:00 - 00:00

12:02 AM
So, now as you are doing Setting<T> it will require sometype, in order to avoid that warning you need to provide the compiler a proper data type so that it could compile accordingly, and why it's a warning "Raw data type" because it provides no type at all. So, the problem can be: Let's say you have:

List arr = new ArrayList();
arr.add(1);
arr.add("Test"):
This will throw a runtime exception because it has bypassed the compiler so for raw types you need to provide extra security or consistency of the data type you send
So, conclusion of the whole discussion is, in order to avoid that warning, either remove the generics from your Setting class or provide a data type to the list
 
so im solving it with generic data type
i mean thats where generic comes in hand
 
Yes but with proper use
You are leaving the possibility of runtime exception so compiler is warning you to avoid that. It's not still blocking you
 
do i need to take extra caution when warrning appears?
not those warrnings in particular
but all of the warrnings that may exist
 
@somefolk Not really but it's always good to do that
Depends upon the warning
 
good to know, thank you
 
12:08 AM
Like there is a warning like: variable never used you can avoid that as it won't affect
 
 
1 hour later…
1:27 AM
Traveling sucks
gZ @SecondRikudo !!!!
 
:O
 
2nd stage of Community Moderator Selection :D
 
Oh you meant that. Yep, I voted for him too ^^
 
 
1 hour later…
3:06 AM
Gud Mrning
@Gemtastic are you sure you have the proper driver for your phone?
 
3:27 AM
Mrng
The room is silent today
 
3:40 AM
0
Q: Inserting jsoup Elements into Mysql with JDBC

JavaFanI want to extract some Elements from a webpage and insert them into MySQL database using JDBC. The extracted Elements don't be inserted in the DB! Firstly I used this code and tested the output with System.out.println(//Extracted Elements ); no probem in output. try { doc = Jsoup.co...

 
@JavaFan I guess the encoding might matter
 
I don't think that, however I will check
 
 
1 hour later…
4:57 AM
Hey
any java-ers do some networking too? I'm curious if there's a more efficient way to establish network-java communication other than databases
 
 
2 hours later…
6:30 AM
Morning
 
fge
Eek
I'm going to need to parse XML files
 
Can I help?
 
fge
Well, I won't start right now so this leaves some time
 
Okay
@Woodrow Ers?
 
fge
6:52 AM
@Woodrow your question does not really make any sense; what problem are you trying to solve?
 
Is reputation == arrogance on SO (In most cases, excludes @fge)
 
cocks are cocks even without rep :P
 
@Worf That was a serious question :)
 
i was serious too
:D
 
7:12 AM
Mostly seem unrelated to me, but a high reputation gives more boost to be arrogant for those who have tendency be arrogant.
 
True
 
7:37 AM
morning!
 
mrng
 
I am not ready to wake up X_X
 
I am still in my bed xD
 
@deadlydragon00 I'm not sure of anything. It's a really old phone so I'm completely understanding that the phone doesn't work
 
which version of android runs on the phone?
 
7:44 AM
Gingerbread
I'm actually considering buying a new one
I do need one... The one I have isn't exactly functioning properly...
 
@TheLittleNaruto might help you out..
 
@fge I'm making a php program on a web server, where you select a song from a list in a database- the java program is checking the db every 10 seconds for what song it should play, and reacts accordingly. The mission statement being to remotely have control over my speakers over the internet.
 
fge
Uhm, the song to play and speaker control are two separate things; but you probably want a persisten db connection or better yet, use a connection pool implementation (c3p0 for instance)
Also, if you use MySQL, don't -- use PostrgeSQL instead
And then this is Java, we don't do PHP
 
c3p0? xD
 
fge
Yes, that is the actual name of the implementation
 
7:59 AM
@Mr.777 No, and it's also unfair to infer a trait from any arbitrary matrix. For example, just because a user have more helpful flags doesn't mean they spend more time on the site, etc.
 
By speaker control, I simply mean playing a .wav file - and I'm just starting with php networking, I'm not worrying about learning a new db for now, perhaps down the road though. And thanks for the suggestion about a persistant db connection/pool implementation, I'll check it out.
I guess the question was half java half php lol.
 
@Unihedro That's not some arbitrary matrix. That's what I saw most of the times
 
@Mr.777 I'm going to finish off my point with a question - is your experience statistically significant or are you in confirmation bias?
(Hint: 2nd)
In statistics, statistical significance (or a statistically significant result) is attained when a p-value is less than the significance level. The p-value is the probability of observing an effect given that the null hypothesis is true whereas the significance or alpha (α) level is the probability of rejecting the null hypothesis given that it is true. As a matter of good scientific practice, a significance level is chosen before data collection and is usually set to 0.05 (5%). Other significance levels (e.g., 0.01) may be used, depending on the field of study. Statistical significance is ...
Confirmation bias, also called myside bias, is the tendency to search for, interpret, or recall information in a way that confirms one's beliefs or hypotheses. It is a type of cognitive bias and a systematic error of inductive reasoning. People display this bias when they gather or remember information selectively, or when they interpret it in a biased way. The effect is stronger for emotionally charged issues and for deeply entrenched beliefs. People also tend to interpret ambiguous evidence as supporting their existing position. Biased search, interpretation and memory have been invoked to explain...
 
Yes, it's B
 
Higher reputation users has been helpful for me most of the time. They use their expertise and keep the flaming done only when it's needed. They induce a need and demand to help under the simple logic of being on here to help. Not sure where you're getting at.
 
8:13 AM
@Gemtastic Hi Gemmy
 
But my point is, suppose a very naive user approaches a highly reputed user, (s)he most of the times will treat him(her) like shit
 
@TheLittleNaruto hi ^^
 
@Mr.777 That's the opposite of what I see.
 
There are two ways to make a point, 1. Harsh 2. Normal and easy way. Highly reputed users mostly go with 1. Don't know why
 
@Gemtastic Yes tell me ?
 
8:14 AM
@TheLittleNaruto Can you test your app on a gingerbread running phone?
 
When a user who delivers clear context not to be helped such as "gimme the codes" "please write my code for me" "I have no idea how to", then no matter of whether the other user is high reputated, they'd likely flame them either way. This is especially clear on the 2k - 5k range.
 
I don't have gingerbread running phone, Sorry. But you can create an emulator, can't you ? @Gemtastic
 
That's pretty much my question unless you have some recommendations for a fairly new smartphone that runs kitkat but isn't super expensive
@TheLittleNaruto The emulator won't run for some reason :/
 
@Unihedro But telling the user in a normal way isn't a correct way?
 
@Mr.777 How is that relevant? It's not like they don't.
 
8:16 AM
@Gemtastic Din't get ? What's happening when you create one ?
 
@Unihedro Most of the times (as per my experience) they don't
 
The term 'method' is not well-defined in C++. Did you mean to imply a function that is a member? Or one that is non-static? Or one that is virtual? Or one that is pure? To avoid misunderstandings, prefer standardized terminology: instead of `method' say 'function' prefixed with those specifiers that are relevant. We're not doing Java here. — Lightning Racis in Obrit 5 hours ago
 
@Gemtastic May I know your budget ?
 
That's why, I concluded (confirmation bias) that reputation == arrogance
 
Is that not the normal way?
 
8:17 AM
@TheLittleNaruto it doesn't start up properly, if it starts, I just get a big black window saying "android" covering the screen vertically
 
That's a one odd example @Uni
 
I hate to bring out the point about experience, but I've visited many questions to burninate tags / look for stuff to answer / kill spam answers, and I've never experienced what you did on >5k users.
 
@TheLittleNaruto well, around €300-400
I've been eyeing the Xperia Z2
 
@Gemtastic It happens, Can you try deleting the emulator and make another one and relaunch again ? Also tel me your PC config ?
 
@Unihedro You know before joining this room, I thought myself as a good developer but after joining this room, I came to know that I know nothing at all (which is really great) but most of the times, I see a newbie joining the room and get hate instead of the answers.
 
8:19 AM
@Gemtastic You can have best one in that range
 
@Mr.777 That is not at all relevant because it doesn't relate to reputation.
 
@TheLittleNaruto Not in my country, the Samsung S6 costs €600
 
I love to be in this room but things like that make me uncomfortable (I know that's none of yours or anyone's concern :P) but for the sake of argument, you know if I feel like this, there will be others too, who feel like this, no?
 
I've yet to see many low reputation users help without failing due to a lack of expertise.
 
@Unihedro And they get hate from the highly reputed users so that totally relevant
 
8:20 AM
@Mr.777 I just proved to you, they don't.
I have 2,472 posts edited, 7,919 helpful flags and 984 comments in good standing, I believe my point about experience makes more sense than your confirmation bias.
 
@Gemtastic A..a..ou! That's too much for S6
 
@Unihedro Well, I will give you the proof, next time I experienced that :)
 
@Mr.777 With confirmation bias? Sure. (See you in three years. :P)
 
@Unihedro I agree. Experience is greater that one's assumption but I will show you
@Unihedro Nah, with proper proof. And you remember our discussion last night, right?
 
no
 
8:21 AM
That is one of the many proofs
 
@Gemtastic Z2 is upgradable to Lollipop. That would be a good choice though!
 
I don't remember things.
Link it please.
 
@Unihedro Scroll up and read if you are really interested :)
 
Not in particular. But if you're citing as evidence, you better link it regardless.
 
@TheLittleNaruto I thought so too, though I'd be fine with "only" kitkat. It seems like it's got a fairly good processor and memory
But on the other hand, it will need it if you're gonna record stuff in 4k :P
 
fge
8:25 AM
=javadoc Range#canonical
 
Did you mean this one? (type the number)
1. com.google.common.collect.Range#canonical(DiscreteDomain)
 
@Gemtastic Honestly, I prefer the Xperia builds over Samsung builds. The Samsung builds aren't particularly more helpful aside from the customer support, and I prefer having a pretty phone in higher resolution than a faster phone which isn't really a necessary trait.
 
fge
1
 
@fge Range canonical(DiscreteDomain domain): Returns the canonical form of this range in the given domain. The canonical form has the following properties: equivalence: a.canonical().contains(v) == a.contains(v) for all v (in other words, ...
ContiguousSet.create(a.canonical(domain), domain).equals( ContiguousSet.create(a, domain)) uniqueness: unless a.isEmpty(), ContiguousSet.create(a, domain).equals(ContiguousSet.create(b, domain)) implies a.canonical(domain).equals(b.canonical(domain)) idempotence: a.canonical(domain).canonical(domain).equals(a.canonical(domain)) (1/2)
 
@Gemtastic motorol turbo and HTC M8 and xpria z3 is good phone
 
8:26 AM
@Unihedro Samsung should be killed.!
The buggiest phone!
 
@Rahul I be they are, but I don't think the difference between z2 and z3 is big enough to pay another €100 :P
 
quietly thinks to self that Rahul looks like a spambot
 
On the other hand, the z3 comes with the wrist band thingy...
 
Just buy Apple Watch.
 
8:27 AM
Do I really need the wrist band thingy?
 
xperia z3 camera is much better than z2
i don't like apple at all i love my moto 360
 
@Unihedro Yeah, cuz I'm so rich
 
@Rahul Thanks for sharing your professional opinion.
@Gemtastic There's a Sports version.
 
@Unihedro Stop selling me shit :P
4
 
Well, you build your own smartwatch then. :P
 
8:31 AM
haha
 
... This will be fun.
 
@Unihedro When did you change your profession? :P
 
I needz badges and points :p
and dupehammers
 
@Gemtastic hehe! So did you try deleting existing emulator and creating new one ? Also you din't tell me your PC config yet ?
 
@TheLittleNaruto Yes I followed the tutorials on how to set the emulator up. What part of my PC config do you want to know? (I have no idea what's relevant)
 
8:38 AM
@Gemtastic RAM and Processor
 
@Unihedro I'll build my own smart watch, with BlackJack and hookers :P
@TheLittleNaruto AMD PhatomII processor and 4GB
(This computer is 4 years old)
 
@Gemtastic Ohh gal! get a replacement!
 
@TheLittleNaruto Gotta have the money first :P
I'm gonna get a new computer for work though :D
 
@Gemtastic Hey! you've started working already ? nice. :)
 
fge
@Gemtastic congratulations!
 
8:48 AM
gZ !!!
 
Ty ^^ I start on monday ^-^
 
@Gemtastic try this genymotion.com it's run on virtual box
 
That escalated fast
I guess you were only through the second round..
 
@ItachiUchiha Well, yes. This is the second job I got interviewed for (the first one were gonna give me an offer but they haven't had the time yet and then this appeared) and they hired me on the spot. It's a time limited thing for now, but my title is "Data Hacker". The title alone kinda makes it worthwhile XD the wage is kinda shitty though, but I can increase it when I've proven myself.
 
@Rahul Why do people feel the need to use buzzwords like "next generation"?
 
8:53 AM
^^
 
@Gemtastic What's the job?
 
@Gemtastic gZ !! :D
 
@MehmoodMemon: don't show us output, show us your attempt. Come on, try to put some effort into solving this rather than asking others to do it for you. — Hovercraft Full Of Eels Apr 7 at 19:48
Example of high rep users playing nice and helping ^ cc @Mr.777
 
@SecondRikudo Create a software for the company's statistics and develop better ways to collect the statistics which are unified with the software I'll be making.
 
Do I have a deja vu? Didn't I read the exact same question earlier today? Oh yes; I did. And I already told you: you will learn nothing when you ask other people to do your homework! On the other hand; maybe it is better for you and the rest of the world if you dont learn; and finally fail your exams where cheating will not work. — Jägermeister Apr 7 at 16:37
Example of low rep user not playing nice ^
 
8:55 AM
@Gemtastic Sounds nice. Stack?
 
Stack?
 
@Gemtastic Sounds like an intern project.
@Gemtastic Technical stack.
 
@Unihedro Well, it kinda is. Based on how I do I'll probably get future employment.
 
@Gemtastic What languages? What servers? What tools?
(Java; Linux; Intellij)?
 
@Unihedro That's nice
 
8:57 AM
@SecondRikudo Well, Java, Scala, PostgreSQL, Tomcat, google cloud services. Don't know about the IDE yet
 
Actually, Stack is a library architecture for compactly spacing bookshelves. Software developers uses this as a metaphor for "the development solution suite"; software implementation and groups of systems involved.
 
Nodejs
 
@Gemtastic Neat
@Gemtastic What what? XD
 
@Gemtastic GCE yay!
 
Java and NodeJS in the same stack?
> gce
Group Chief Executive
Sounds legit
 
8:58 AM
@SecondRikudo No, but I'll have to extract the data from nodejs
 
Google Cloud Engine...
@Gemtastic rest or not rest?
 
@Gemtastic That's like saying "I'll have to extract the data from Java"
It doesn't really make sense :P
 
So I'll be working WITH it, not building it
@SecondRikudo Well, the statistics existing today are among all things on nodejs servers
 
lolwat
 
@Unihedro Lots of REST APIs
 
9:00 AM
@Gemtastic NodeJS is a programming language framework. The data isn't "stored" in NodeJS...
 
@SecondRikudo I thought servers ran it
And then you had db running on the servers...
 
@Gemtastic Just like servers run Java
 
@SecondRikudo Exactly
 
How do you "extract data from Java"?
Which is equivalent to what you've said :P
 
So I'll be working WITH it, but not developing in it
 
9:01 AM
Maybe NodeJS exposes a REST API of some sort that you'll be using?
 
@SecondRikudo Well, it's not news that I suck at explaining things :P
 
@Gemtastic You aren't alone :)
 
I guess she is yet to join the post, so she has minimal knowledge of how it is done.
 
@SecondRikudo Probably. I don't know those kinds of details yet, I just know that handling NodeJS is a part of the "data hacking"
 
@ItachiUchiha to-be developer :)
 
9:02 AM
Alright
 
@ItachiUchiha Exactly. And I've never worked with NodeJS before so I don't really know anything about it
 
I'm having some errors with run configurations in eclipse luna?
 
I always wanted to get my hands dirty with node or iojs
 
can someone help me out
 
@psychoCoder What is the problem?
 
9:04 AM
@psychoCoder What are the errors?
 
I have a project named Project and two files client.java and server.java
server.java has a main method inside it
 
Following you so far.
 
so now I'm trying to run that file
run as - >run configs
now java application
 
Run as -> Java application?
 
now there is no option there
I think i have to create a run configuration first here.
 
9:06 AM
@psychoCoder That indicates you do not have a main method in it
 
let me check then..
no i have a main method
public static void main(String[] args) throws IOException
now there is an option ..
error : Selection does not contain a main type
 
throws IOException <- -_-
 
actually it is a simple socket program
 
@ItachiUchiha It's gonna be fun :)
 
you bet it is
 
9:09 AM
@ItachiUchiha It's a bit tough to adapt the the asynchronous paradigm, especially from a Java perspective
But once you do, you can totally unleash the power of functional on the world.
 
@psychoCoder can you dump the class in hastebin.com and link it here?
 
definately
 
@SecondRikudo This is exceptionally true. Thankfully I didn't start with Java so I still have a decent grasp of it.
~candidateScore++;
 
@Unihedro It's fairly simple when you understand the JavaScript way of "doing things in the background"
 
9:10 AM
this is the server file
 
Java basically uses threads to do that, if you have a heavy job that will take a while, do it in another thread, then the main thread is undisturbed.
Node only has one thread (you can explicitly spawn new threads and fork processes, but it's rare)
Node uses what's called an event loop
 
@ItachiUchiha this is the client file hastebin.com/eguwironen.avrasm
 
Both Java and Javascript are stack-based in execution, but their design is different, so.
 
Events queue up, and with each iteration of the loop, one event is processed.
 
@SecondRikudo I read about that somewhere..
 
9:13 AM
(Of course, if the queue is empty, the event loop keeps running while waiting for an event to arrive, assuming there's something that can still add an event, like a callback not yet called, or an open EventEmitter)
 
I need someone to help me understand the getter/setter immutable evil debate. Anyone willing to help out by looking at my simple example and explaining how I would go about it?
 
@SecondRikudo Doesn't it affect the speed of execution?
 
@ItachiUchiha You found why is it happening?
 
@psychoCoder: It looks fine to me. I haven't used Eclipse in a while though. Try going into Run As, then Configurations, then create a new Java Application. Set it with Main Class as "Server".
 
What is the use of multi-core processors if you can't use them to their full potential?
 
9:14 AM
@ItachiUchiha fancier name, selling for bigger bucks
bragging rights
 
@psychoCoder Nope, server looks good to me
 
@ItachiUchiha Like I said, you can spawn threads, but usually you don't have to.
 
@ItachiUchiha Node implementation handles asynchronous act with only one thread. This does make asynchronous IO pretty active though.
 
@ItachiUchiha @Unihedro now I'm getting the error in the consol Error: Could not find or load main class Server
where do we place the files. inside the project folder right?
 
src/
 
9:16 AM
@psychoCoder lolz
 
Thanks @SecondRikudo for the CV - your generosity helps future generations!
 
<-- Needs to try some other language before it is too late
 
@ItachiUchiha @Unihedro I haven't used eclipse for a while and guess now it's embarrassing
Thanks !!
 
Did you resolve the issue?
 
yes..now I'm getting some java errors..so
 
9:22 AM
cool
 
fge
9:39 AM
<-- waits impatiently the day he has to start parsing that XML stuff -- not
 
@fge What's wrong with parsing XML?
It's a fairly straightforward process
 
fge
@SecondRikudo s,parsing,,
Also, given the size, I have to use streaming parsing
 
9:56 AM
@fge use regex
 
fge
Yeah, right
 
Google gives insights to the four major religions. http://t.co/sYoArWzALh
 
10:20 AM
Four major religions? Unix, Linux, windows and Mac?
 
10:36 AM
@Gemtastic islam, judaism, pdf, catholicism
 
@uni what happened to your sense of humour? :P
 
@ItachiUchiha What's that?
 
@Unihedro pdf??
 
11:19 AM
Phew
<<< 2 PRs merged
 
11:48 AM
I want to make my own messaging app (something like telegram). I want to use JMS for messaging. I've used sockets before for communication between client and server. I don't know if I'm doing right. any suggestion?
 
@sajjadG Go do it! And not waste your time chatting. ;)
 
@Unihedro I will :-) but I want to make sure I'm not doing it SOOO wrong in the first place :-)
 
JMS works.
 
85
A: Real world use of JMS/message queues?

JonJMS (ActiveMQ is a JMS broker implementation) can be used as a mechanism to allow asynchronous request processing. You may wish to do this because the request take a long time to complete or because several parties may be interested in the actual request. Another reason for using it is to allow...

^ this link says so.
 
What about making a chatting app with php websocket with multithreading, is it a good way ? :D
 
11:53 AM
I kinda hate PHP. but sockets works. JMS is easier. but sockets are low level and can do anything.
 
@Goku Don't use PHP unless you're throwing over legacy code. There are many better alternatives.
 
@Unihedro I have a big project wrote in php, previously I used ajax to make chatting for it, yes I know that ajax is a very bad way for chatting, then I used websockets, why websocket ??
Because I see some alternatives like NODE.JS but I cant rewrite my project again in Javascript ( Or convert it with one click!!)
And I used Pthread for multithreading, but really I'm afraid of the results as I'm yet publish my project
sorry for my bad english
 
@Goku "I can't rewrite my project again" <- there's your problem, you're stuck
 
@Unihedro please do you have an idea for this situation ? :(
 
Throw it all out and start over.
... no but seriously.
 
12:32 PM
@Mr.777 yay to PRs..
 
@ItachiUchiha java-fs-more 0.2.0 is about to be release :D
 
Woah, nice work
 
@ItachiUchiha All credit goes to @fge, Honestly
Otherwise, he would have launched it months ago :P
 
lolz
 
fge
There, 0.2.0 released
The next step will be to see whether a FileTypeDetector can be written...
 
1:12 PM
Good Eve all :)
 
hello
 
fge
Hehe
It works
Now, Files.probeContenType(Paths.get("foo.txt")) returns image/png if the file is actually a PNG
 
endsWith("Congrats")
 
WOOT
AWESOME
@deadlydragon00 Also, hi!
 
1:17 PM
hi @Unihedro
 
hi @ItachiUchiha @Gemtastic
 
fge
 
@deadlydragon00 Hello ^^
 
@fge A question to you about JDBC
I have a large query I need to apply about 10,000 times with different parameters
2
 
1:22 PM
very nice paintings boredpanda.com/i-paint-music
 
fge
Uhm
 
Naturally, I want to use prepared statements
 
fge
@SecondRikudo understandably so
 
@SecondRikudo Actually its a nice question , keep it up
 
fge
But then what is the question?
 
1:23 PM
:S
 
However, prepared statements apparently doesn't play nice with multi threading
 
fge
Indeed they don't, but why multithreading?
 
(Calling .setString(1, something) on the same object in multiple threads sucks)
 
fge
Well, you can use a ThreadLocal<PreparedStatement>
 
@fge Because the service that runs the query will be run by multiple threads, out of my control.
@fge What will that do?
 
fge
1:25 PM
A ThreadLocal<> will be per thread; the goal is to override the init method (can't recall the name) so that it return an instance per thread when you .get() from it
The recommended use is to make a private static final ThreadLocal<Foo> class variable in your class
And when you need the Foo you .get() it
 
A ThreadLocal<> is an object that exists only for the thread. Each thread gets a different, thread-local ThreadLocal<> object in the map.
 
@fge The .prepare() call is called from within the service
private final PreparedStatement styleConfStmt = createConfigurationSQL(...)
 
fge
Well, change that into a ThreadLocal then
 
So I need to convert createConfigurationSQL to return ThreadLocal<PreparedStatement>
 
fge
No
 
1:29 PM
@fge do you have a gradle version of your 0.2.0?
 
    private final ThreadLocal<PreparedStatement> styleConfStmt = new ThreadLocal<PreparedStatement>() {
        @Override
        protected PreparedStatement initialValue() {
            return createConfigurationSQL(Arrays.asList(Type.CSS_ATTR, Type.CSS_ATTR_COLOR,
                    Type.CSS_ATTR_SIZE, Type.CSS_CUSTOM));
        }
    };
 
fge
=javadoc ThreadLocal
 
@fge java.lang.ThreadLocal: This class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via its get or set method) has its own, independently initialized copy of the variable. ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread (e.g., a user ID or ...
Transaction ID). (1/7)
 
Like this? ^
 
fge
@SecondRikudo no; read the javadoc, it explains what you need to do
 
1:29 PM
Will do
 
fge
@deadlydragon00 well, it's released on maven central, so you can use gradle, maven, ivy...
Your choice
 
oh sorry I read it late , yeah I see
 
@fge Or even Bintray
 
fge
Actually no, I haven't uploaded it to bintray
 
@fge From what I read, What I posted above is OK
3 mins ago, by Second Rikudo
    private final ThreadLocal<PreparedStatement> styleConfStmt = new ThreadLocal<PreparedStatement>() {
        @Override
        protected PreparedStatement initialValue() {
            return createConfigurationSQL(Arrays.asList(Type.CSS_ATTR, Type.CSS_ATTR_COLOR,
                    Type.CSS_ATTR_SIZE, Type.CSS_CUSTOM));
        }
    };
And convert the usages to styleConfStmt.get()
 
fge
1:33 PM
No, make it static
 
^^
Beat me to saying that :p
 
fge
A non static ThreadLocal is basically useless :p
 
> ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread
 
Think of ThreadLocal<T> as T's mapped from a Thread, like Map<Thread, T> except it's entirely safe
 
So that means that createConfigurationSQL needs to become static as well
What if I needed createConfigurationSQL to use an instance's state?
(I don't in this particular case, so there's no problem, but what do I do if I did?)
 
1:36 PM
Helper object / inject state
 
Is their any API or Feeds for SO chatroom for listening chat's?...cauz I don't want to use PC sometimes ... I would like to be on mobile
 
ChatExchange (Python) https://github.com/Manishearth/ChatExchange
ChatExchange.Net (.NET / C#) https://github.com/ArcticEcho/ChatExchange.Net
JChatExchange (Java) (in development / private beta)
SE-Chatty (Ruby) https://github.com/KeyboardFire/stackexchange-chatty
 
Cool thnx, although Java is still beta
 
Note that all of them are unofficial.
The chat doesn't have an API by itself, and its HTTP interface changes occasionally.
You can subscribe to its RSS feeds I guess.
 
1:52 PM
tnx for the link :)
 
Could someone show me an example of how to use rxjava download a list of files from a list of url strings
 
fge
@user3307102 and what have you tried?
 
20bucks first
 
I've written some of the observable creation method, but I'm confused how to download the file within the observable.create()
Would I download without worrying about threads?
And let the observable take care of that?
I'm on android btw
 
00:00 - 14:0014:00 - 00:00

« first day (1638 days earlier)      last day (3286 days later) »