« first day (1634 days earlier)      last day (3319 days later) » 

fge
12:00 AM
Anyway -- try-with-resources has completely eliminated the need for it
 
Unless you're passing natively mapped resources from the java layer to a native method call
and you want the protection of making sure that those resources are cleaned up in the case where a terminate somehow goes wrong
Better Late than Never!
 
This ^^^
 
fge
@Kylar that's the only situation in which it would be reasonable indeed, but then again it's a poor substitute for AutoCloseable and good documentation ;)
 
@fge He meant natively mapped, so I think that's not wrong in anyways or is it?
 
fge
@Mr.777 the only such "natively mapped" resources are resources allocated natively and being made accessible to Java code; the reverse (resources allocated by Java and used by native code) will be taken care of by the GC
 
12:14 AM
Okay
 
 
2 hours later…
2:10 AM
TEST
 
Morning.
Any Eclipse users here?
 
Yep
 
2:28 AM
Sorry - back now.

I've added two images (png) to the correct folder (the same as the java files for the project). How can I get them to show up in the package explorer file list?

Do they need to be imported or something?
I've tried dragging and dropping the files from a windows explorer window to the correct part of Eclipse but they won't move.
 
Have you refreshed the package explorer? Click on the project and hit F5
 
I hadn't. That worked. Thanks
 
No prob
 
 
1 hour later…
3:42 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 2 hours ago, by tchrist
     +------------------------+
     | BEST VOTING GUIDE EVER |
     +------------------------+

42    Martijn Pieters      python python-2.7 list python-3.x dictionary plone string regex json django unicode flask
31    deceze               php cakephp javascript mysql arrays html
32    meager               php javascript ruby-on-rails ruby
23    Second Rikudo        php css javascript html
24    Matt                 jquery javascript
35    codeMagic            android
28    Paresh Mayan         android
 
 
1 hour later…
5:01 AM
where is Unihedro??? ohh mn :( i'm on my knees
 
5:37 AM
Hi Good Morning all.
Can anyone please look into this ?
Caused by: java.lang.NoSuchMethodError: org.apache.commons.pool2.impl.GenericObjectPool.setTestOnCreate(Z)V
I am try connecting Mysql database server by using this connection pool
 
Can you explain more?
 
Sure Mr.777. Thanks
I am doing a small sample application called Spring with Hibernate integration. For data base connection I am using these jar
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
		<property name="url" value="jdbc:mysql://localhost:3306/usersdb" />
		<property name="username" value="root" />
		<property name="password" value="2208" />
	</bean>
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="configLocation" value="classpath:hibernate.cfg.xml" />
 
What version of commons-pool are you using?
 
commons-dbcp2-2.0.jar, commons-pool2-2.0.jar
But I am facing this issue
 
What about hibernate and spring versions?
Are you using any build tool?
 
5:44 AM
spring-core-4.0.3.RELEASE.jar, hibernate-core-4.3.8.Final.jar
No I am not using any build tool
I am doing googling but still no luck Mr.777
 
What's your mysql driver's jar version?
 
mysql-connector-java-5.1.30.jar
Any compatibility issue Mr.777 ?
 
Apparently not
Can you try removing commons-pool from classpath and keep only commons-dbcp jar?
 
Let me try Mr.777
Do I need to be remove from lib also ?
 
I hope if it's not in classpath, it won't deploy that
You can see the contents of your war file when deploy to container|server
 
5:52 AM
I hope if it's not in classpath, it won't deploy that - Means where I can see
I can see here
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7">
		<attributes>
			<attribute name="owner.project.facets" value="java"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
		<attributes>
			<attribute name="owner.project.facets" value="jst.web"/>
actually its my project .calsspath file
All jars are added automatically but I have added commons-pool2-2.0.jar manually
 
....
Well, remove it from lib folder as well and then Clean->Build->Deploy please
 
I haven't use any build tool Mr.777
So just I am cleaning project & tomcat directory
Manually
 
Yes, that's what I meant
So, simply clean and run as -> run on server if you are using eclipse
 
Still facing same issue
After removing that jar from classpath & lib
 
Can you go to your workspace, then .metadata/.plugins/.somethinglike .wst.server.core/tmp0 OR tmp1 and then wptwebapps
You will find your exploded war in there
Can you see if there is commons-pool lib in lib folder
 
6:01 AM
Ok Mr.777 let me do this
F:\SpringHibernateSampleApps\.metadata\.plugins I can see under this all folder structure Mr.777
Related all eclipse
 
Good Morning World
 
6:20 AM
is an upvote for any candidate , a vote?
that moment when my vote for @SecondRikudo is the 2012 th one
 
6:49 AM
@uni You must make people like you if you want to win in an election. The number of people like you is a good number. But, then the number of people who dislike you are no less :P
 
Good morning, Java!
 
^^ Check the deleted post @uni
 
7:15 AM
Morning
 
Morning
 
7:33 AM
@SecondRikudo You are progressing well :D
 
7:44 AM
Guys Spring question if anyone knows
In a test, if I have the following annotation, does it mean that every test I request an object from a Configuration class, I'll get a new one?
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
 
fge
@SecondRikudo well, the name indicates something like that, now I don't even know what @DirtiesContext does, so...
 
8:42 AM
@ItachiUchiha What? I don't see how that's relevant. I do indeed sustain my goodwill from the public exposure, but many people cast blind votes due to the added "candidate score".
I'll get 20k rep, then I'd do better in the next election.
 
@Unihedro May be, but then there may be people who just might have caste their vote against you because of a past exp of having a chat with you. I am just making my point, may be it is not true at all.
 
@ItachiUchiha I (still) don't get what you're saying.
 
@Unihedro you can sometimes be rather snarky
 
@Vogel612 he needs words thrown straight to his face.
 
@Vogel612 The amount of people who gathers enough rep to participate in a chat room + can't stand my criticism are exactly the kind of people I'm moderating against. My election strategies excludes them.
 
8:47 AM
> can't stand my criticism
 
okay who removed the star on that:....
 
I did, I liked it in the first place and then I read ^^
 
At least I'm out of the negative score club. :p
 
A moderator can't talk about his likes and dislikes. He needs to check what is right and wrong for the community
 
Again - I'll do better in the next election.
@ItachiUchiha I'm not a moderator. I'm a candidate.
 
8:49 AM
@Unihedro ...Who is standing for the post of a moderator
 
@ItachiUchiha All can play in the politician game.
 
Did anyone have experience with ProGuard/yGuard?
 
Being direct is easily interpreted as being blunt. While programmers are more used to it than most people, it still can hurt popularity.
 
I don't, sorry.
@kiheru True.
 
That is what I am trying to say. @kiheru Thanks for putting it in a way he (@uni) understands :P
 
8:56 AM
Jeremy might make it into the secondaries. :P
 
@Unihedro I'm not familiar enough with either of them to prefer one over the other.
 
I like Jason more.
They dupehammer many posts in helpful manners.
 
@Unihedro where is that from?
 
@Vogel612 Jason C's polling webservice.
 
that doesn't help me all that much...
nvm found it
 
9:21 AM
Hey everyone!
 
Hi there
 
Hiya
 
@Unihedro Howdy! +1 for you. My vote to rekire and you
 
^~^
Thank you!
 
This is the first time for you both
Wish I could do 100000000 ;)
 
9:31 AM
@Appu That's right! It doesn't seem that either of us will make it into secondary, but it's been fun.
~productiveThings
 
Yeah, trying is important than anything else even including winning
 
Morning
 
Good morning!
 
Morning!
 
fge
    final Runnable runnable = Throwing.runnable(this::pollStatus)
        .orDoNothing();
Hehe
throwing-lambdas rocks
 
9:45 AM
@fge That's so elegant. xD
 
fge
Yeah, I quite like the API myself
Hmm, do you happen to know of a library which computes ETAs for you?
Well, that would rather be ETC(ompletion), but you get the picture
(right?)
 
@fge Like Atlassian's JIRA?
 
fge
No, not that
Basically, progress and completion time estimate
 
time tracker?
 
Some kind of Project management tool?
 
9:51 AM
^
 
fge
No
OK, for instance when you upload a file to a server or something; very often you get a time estimate until completion
 
I think I'm starting to understand why people hate vegans >_>
 
@fge Aaah more like a progress bar?
@Gem vegans??
 
fge
And while this looks like a basic thing to do, calculating that time estimate can be quite tricky
 
@Mr.777 Vegetarians.
 
fge
9:54 AM
@Mr.777 I don't really care about the progress bar actually, this I can do
 
@Unihedro oh :P
 
fge
(and I already do)
 
There's also a creature called Vegan, but I doubt that's relevant.
 
@Gemtastic Why?
 
@Mr.777 Yes. I never knew why people disliked them so much; veganism is a good thing. But I think I kinda know why now...
@OlegKuznetsov I believe a lot of them are doing it wrong, which affect their cognitive abilities :/
 
9:58 AM
@fge Well, don't know if any such solution in java exists
 
fge
Pity
That would be a really nice thing to have
 
How can you seriously think that the argument "Meat isn't tasty!" will make people stop eating meat?
 
I see this room is full today ^-^
 
@fge But I think that's easy
 
@Appu :)
 
fge
10:00 AM
@Mr.777 well, I'm not that sure
 
Ummm
I am not sure if we can get the bandwidth being used to upload/download a file?
Pardon me, if I don't make sense :P
 
@Gemtastic The word you're looking for is "militant veganism"
these are the reason no1 to hate vegans
the same goes for militant vegetarians
@Mr.777 how would you do that? and how could you be sure that it remains the same?
 
@Vogel612 Yes, but may be we can get this after a specific interval of time?
 
well since you have to tell how much you will be sending beforehand (file.size)
you can give a guesstimate
 
And how would I do that I am not sure about this so that's why I said if we can :P
 
10:07 AM
(which then can be used for prognosis)
well you're uploading this with a html form, right?
 
Ofcourse, a file will be uploading somewhere from client
 
check what stuff gets sent with the request and then modify your accepting servlet accordingly
 
Getting file size is not issue. What is the current bandwidth on which the file is being uploaded is the issue
 
that's impossible
 
Exactly, that's what I think too
 
10:08 AM
you can get a timestamp when you started
 
So @fge you are right, that's not simple at all :P
 
and you can keep track of how much you're done with
and work out the median from there
 
But we can get an average estimate
 
(current - start) / doneBytes = averageBandwidth
 
e.g. File is 1024 bytes. In first second (may be) it's uploaded 24 bytes so we can estimate it that in the next second it will upload 48 total bytes
@Vogel612 where current - start is timestamp or bytes?
 
10:11 AM
timestamp
 
Perfect
 
averageBandwidth should be averageBytesPerMillisecond
 
bandwidthOfArbitraryUnits
 
^ that
the race with jeremy and Jason is getting into the hot phase
 
10:41 AM
Hi guys ...
 
I m trying to add ordinal suffix to numbers...need help what logic would have to apply?
 
switch ? o_0 ....
 
like 1st , 2nd, 3rd and 4th
 
There's a control statement that performs a scope based on what value your parameter has. It's called a switch. Go read a book.
 
10:45 AM
switch (tenRemainder) {
  case 1:
   return "st";
  case 2:
   return "nd";
  case 3:
   return "rd";
  default:
   return "th";
 }
 
12
Q: Is there a library or utility in Java to convert an integer to its ordinal?

lakemalcomI want to take an integer and get its ordinal, i.e.: 1 -> "First" 2 -> "Second" 3 -> "Third" ...

 
Something like this?
 
Yes ...Thanks @ Mr.777 and others
 
fge
@khalidhabib please use a pastebin for such large amounts of outputs
 
You're doing it wrong. You have fall-through statements.
I repeat: Read a book.
 
10:50 AM
hmm
 
Good Ev.
 
Morning!
 
lol
here is noon
 
World Partition C:/ D:/ E:/
 
fge
10:53 AM
@deadlydragon00 this world is then pretty f*ed up
 
@deadlydragon00 DOS? Wow, thank god I don't live in that world
 
:D
This is a unique Error for a website barrelguys.com
 
@deadlydragon00 booo they don't change on reload
 
10:56 AM
^^
 
@Vogel612 Any militant people are bad. But So far, I find it harder and harder to find the non militant vegans :/
 
yes it seems to be normal in these circles
 
If you gotta be militant though, can't you at least use REAL arguments? I mena, it's kinda on the level of "if you don't go vegan to church you'll go to hell"
Animals in the meat industry ARE treated like shit. The slaughter process is TERRIBLE, it's worse than any splatter horror movie. And these are very gentle being bred for their gentleness because back when we lived with the animals we bred, they had to be kind and loving so we could be with them.

Aren't those facts good enough?
 
Thanks @Jude Niroshan
 
And then the lovely idea of just letting the domesticated animals out into the wild... It might work in some countries... It doesn't work here. We don't have issues with strays here because domesticated animals DIE in winter.
 
11:03 AM
your post helps me ...I have done
 
@Gemtastic That's so true.
 
@Gemtastic wow this seems to have hit some spot on your side...
 
!!define altruism
 
@deadlydragon00 altruism Regard for others, both natural and moral without regard for oneself; devotion to the interests of others; brotherly kindness; selflessness; contrasted with egoism or selfishness.
 
I have to agree that some vegans have no idea what they're doing.
Though, the thing about chicken nuggets - if you know how it's made, you won't want to eat them.
Or porn. Or whatever economic based consumer good.
 
11:04 AM
Basically Chicken Nuggets where just flour deep on Breadcrumbs
 
You must be fun at parties. :)
 
@deadlydragon00 aaaand no....
 
Have you seen the way KFC breeds their chickens?
 
@Unihedro well you certainly aren't ;)
@Unihedro stop
 
HAMMERTIME!
 
11:05 AM
@Vogel612 I don't go to parties.
 
@Vogel612 Well, it bothers me that there are a stackoverflow of REAL valid arguments and they choose to use false ones that are just plain dumb. Your personal opinion on meat's taste is not gonna convince anyone to stop eating meat... >_>;
@Unihedro Why would you eat porn?
 
@Unihedro let me keep my soap-bubble at least for KFC chicken...
 
I'm happy I live in the EU, the stuff americans do to their food is illegal here. Why would you BLEACH your flour?
 
I don't mind if you desillusion deadlydragon about the Mac-chicken, but...
 
Eh, /porn/.test(stmt) ? s/eat/watch/
@Vogel612 kk :)
 
11:07 AM
Consume != eat
 
@Gemtastic Look at forums. The first post OP asks for how to solve a problem, the next 9 posts after they're organizing a bicycle ride.
 
But eat.instanceOf(Consume) could be true...
 
Stack Overflow just has the right model.
 
@Unihedro Well, that how forums usually work... >_>;
 
(Special)chicken.injectCancerousEnzymes()
 
11:09 AM
meh. chicken instanceof Chicken returned false
@Gemtastic instanceof operator doesn't require parens ;)
 
@Vogel612 I know, but it COULD be true
 
@Unihedro well it's bicycle rides ;)
 
eat could both implement and extend Consume too ;P
 
@Gemtastic how would you check a method for being an instance?
 
@deadlydragon00 You know it's more than that, right?
 
11:11 AM
@deadlydragon00 it's more like...
 
I just recently read some article, I'm not sure if its real.. But I guess... I should avoid :P
 
proteines.stream().map(Factory::foam).map(Factory::form).map(Factory::conserve)
    .map(Factory::panade).map(Factory::preGrill).forEach(Vendor::deliver);
 
You know, the way they make chicken nuggets and fast food like that is the reason why we can't have nice things.
 
@Vogel612 You dont
 
=javadoc MethodHandle#matchesSignature
 
11:13 AM
@Vogel612 Sorry, I can't find that method. :(
 
@Unihedro The way we buy cheap shit from china is why we can't have nice things. Children have no sense of quality.
My humor is dark
 
... Don't remind me. xD
 
Since you mention china, I am very disappointed with their tablets
 
Did I actually finish my commentary on South Korean education systems yesterday?
 
=javadoc MethodType
 
11:15 AM
Which one do you mean? (type the number)
1. java.lang.invoke.MethodType
2. javax.swing.text.html.FormSubmitEvent.MethodType
3. javax.validation.metadata.MethodType
 
1
 
@Vogel612 java.lang.invoke.MethodType: A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller. Method types must be properly matched between a method handle and all its callers, and the JVM's operations enforce this matching at, specifically during calls ...
to MethodHandle.invokeExact and MethodHandle.invoke, and during execution of invokedynamic instructions. (1/8)
 
Someone actually answered something similar in an interview in a newspaper;
Question: Would you buy things knowing they were made by child labor?
Answer: No, children have no sense of quality.
 
^ maybe you can compare these @Gem
anyways ~food
 
@Vogel612 Well, I have no interest in it... I was merely pointing out that consuming something doesn't have to mean you eat it. When you consume porn you don't eat it.
 
11:16 AM
@Gemtastic China doesn't employ as many child labour nowadays.
 
@Unihedro No, it's more an African and middle eastern thing nowadays.
 
Oh.
 
fge
wonders whether he's actually in a chat room dedicated to the Java programming language
~interesting
 
@fge Nope.
 
But when they asked that question, there had been a huge child labor scandal where a big swedish clothing brand bought their products from a factory in china using child labor.
 
11:17 AM
The room title is a lie.
 
@fge JavaNotFoundException
 
@Unihedro It just was obfuscated!
 
Is obfuscating your bytecode still the way to go nowadays?
 
fge
Gee
 
@Unihedro Tell it to my boss... [I already told him, that it should be our least concern]
 
11:19 AM
Haha.
 
fge
mydailyjava.blogspot.no/2015/03/… <-- back on topic; this link is very interesting
 
@fge Why is there a tiny cross?
clickity click
 
fge
@Unihedro no idea; I did notice it as well, and it doesn't seem to have any effect as far as I can see
 
Well I just wasted several minutes then.
 
@fge Well, it won't work with obfuscator... :P
 
11:25 AM
WOW
> And even though the Java programming language does not allow it, the JVM does in theory allow to overload a method by its return type.
That's NUTS
 
fge
@OlegKuznetsov Obfuscators Are Evil(tm) :p
 
Im not sure How is it possible, A built-in class has a missing Lib
 
hmm
 
@fge For which party? ;)
 
fge
@OlegKuznetsov define "party"
 
11:31 AM
@deadlydragon00 stacktrace??
 
oh, is libcore the problem?
 
yeah, Im just curios it should supposed to be builtin
 
@fge as "a side": developer, support, hacker
 
Are you on Android 2.3 + or -?
The SDK version I mean
 
11:33 AM
meh.. one branch at my work currently says: "NoClassDefFoundError: Could not find class Object", soo...
 
4.0.3
 
I'm not entirely sure, sorry
@Vogel612 >_>;
 
@Unihedro It says "android-21" in the title...
 
I guess this is one of the Weakpoint of backward-comp ....
 
@OlegKuznetsov You know I'm not good with the Windows UI. :P
 
fge
11:34 AM
@OlegKuznetsov I don't see that anyone benefits from obfuscation at all
Security through obscurity has never worked
And it will never work
 
^ trudat
 
fge
@Vogel612 woohoo! Custom ClassLoaders?
 
no idea..
compiles fine with ant...
 
fge
@OlegKuznetsov on the other hand I do see a lot of parties for whom obfuscation is a hindrance -- everyone save for the party(ies) who decided that obfuscation was a good idea in the first place (which it isn't)
 
@fge Right, but at least, obfuscation makes final *.jar smaller [and these Android hipsters really could have benefit from it: don't you like simple mobile apps, which weight >20MB?], which unfortunately isn't my case for now :-/
 
11:39 AM
@deadlydragon00 did you try to update your SDK manager with the relevant packages?
 
@Gemtastic yeah... minSDK 4.0.3 IcecreamSandwch Build: API 21 lollipop
 
I had a similar problem yesterday but it worked when I updated the SDK manager backwards
 
fge
@OlegKuznetsov I don't do mobile so I don't care; and 20 MiB today is a pebble in a moutain, so why bother; The Android runtime stores much more data than that once you have started your application even once (precompiled snippets etc)
--> just don't do it, save yourself the trouble
 
The Mobile today is the Super Computer Standard of 80's
 
@fge >>"why bother" Because, at least Nexus devices, don't have removable storage. So, 16/32/64GB is all you have [which sucks]
 
fge
11:43 AM
Well, what I said
Why bother?
What is 20 MiB compared to 16 GiB?
A thousandth
Your average video weighs more than that
 
Who said that the apps weight exactly 20MBs?
 
@Gemtastic I discover it now, I half to add another dec. to GRADLE
 
fge
Well, you produced that figure, not I; but anyway, obfuscation is not the way to go. It has never been, is not, and never will
 
okay since we all agree on that can we go on with interesting things now??
 
fge
Define "interesting"
:)
 
11:56 AM
something which hasn't been successfully discussed over and over?
 
@Vogel612 Sure. Everything sucks.
Life is insignificant; in the end we all die.
(Nailed it!)
 
fge
Huh, well, I still am looking for someone to fix largetext :p
Or msg-simple
Or pam4j
 
@deadlydragon00 glad you fixed it ^^
 
Happy New Year !!!
 
fge
<-- too stupid to really figure out JSR 292
 
12:08 PM
@fge I'll help with pam4j!
 
@Unihedro You finish JCE and http/2 first
 
Ok.
 
tnx @gem
@JudeNiroshan Happy Newyr
 

« first day (1634 days earlier)      last day (3319 days later) »