« first day (1648 days earlier)      last day (3292 days later) » 

1:32 AM
@Mr.777 When people refer to "raw" JDBC, it means that they are directly using the JDBC API, without the help of additional database frameworks.
 
@Michael Thanks. Also, I read about that and found that yes, using plain jdbc with no frameworks means raw jdbc :)
By the way, does raw jdbc has advantages over using frameworks (except the overhead of configuration)?
 
It gives you more control over your database code.
Using JDBC is as low-level as you can get.
 
@Michael But this is more error-prone?
 
If you don't know what you're doing, sure. ;)
 
@Michael hahaha yes :D
 
1:35 AM
hellow all
 
@deadlydragon00 Hello
 
howdy @Mr.777
 
!!urban howdy
 
@Mr.777 howdy a greeting used primarily in the southern part of the U.S. Short for "How do you do?"
 
@deadlydragon00 I am doing great. How about you?
 
1:37 AM
still the same as normal farmer :D
 
1:57 AM
How can I refactor this? I know there's a better way to do this:
List<Path> jars = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dependencyDir, new Filter<Path>() {
	@Override
	public boolean accept(Path entry) throws IOException {
		String filename = entry.getFileName().toString();
		return filename.endsWith(".jar");
	}
})) {
	for (Path path : stream) {
		jars.add(path);
	}
}
 
@Michael May be lambda?
I am not good with lambdas but I can tell a lambda can simplify this, correct me if I am wrong please.
 
I feel like there's a way to say: "Put all of the Path objects into this List, using this Filter"
I feel like the foreach loop is not necessary.
@Mr.777 I think you're right.
List<Path> jars = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dependencyDir, entry -> {
	String filename = entry.getFileName().toString();
	return filename.endsWith(".jar");
})) {
	for (Path path : stream) {
		jars.add(path);
	}
}
return jars;
 
stream.foreach((path) -> jars.add(path));
List<Path> jars = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dependencyDir, entry -> {
    entry.getFileName().toString().endsWith(".jar");
})) {
	stream.foreach((path) -> jars.add(path));
}
 
@Mr.777 Thanks!
 
2:19 AM
Hi
Is there any way that I can allow for duplicate objects in a TreeSet?
 
@cp101020304 Hello
 
@cp101020304 That would kinda be defeating the entire purpose of using a Set.
 
Hi guys
 
@Michael is there any other data structure that I can use which can be initialised with a comparator like the treeset, but also allows for duplicate objects?
 
@user3855005 Hello
 
2:23 AM
 
@deadlydragon00 lol
 
19
Q: Java List Sorting: Is there a way to keep a list permantly sorted automatically like TreeMap?

davidIn Java you can build up an ArrayList with items and then call: Collections.sort(list, comparator); Is there anyway to pass in the Comparator at the time of List creation like you can do with TreeMap? The goal is to be able add an element to the list and instead of having it automatically appen...

 
2:37 AM
@Michael they suggest a priority queue. However, for my specific purpose I need to be able to iterate through the data structure and print the top "x" objects in the data structure
Is that possible with a priority queue?
 
Not sure.
 
I'm pretty sure that the iterator in priority queue does not go in any particular order
 
3:21 AM
Morning all. I have made a browser (don't want to boast, but feeling very proud lol).

How can I have the text in the JTextField highlighted by default instead of the user needing to highlight it themselves and then begin typing. I've googled but no success.

Thanks
 
@mikeeustace focus something constant may be?
 
I guess the code that needs to be adapted is
....
addressBar = new JTextField("Hey dude, enter a URL!");
...
 
Something like this:
addressBar= new JTextField("WHATEVER");
frame.addWindowListener( new WindowAdapter() {
    public void windowOpened( WindowEvent e ){
        addressBar.requestFocus();
    }
});
 
Thanks
^^ did you write that code that quickly?
 
No, I copied it from here:
13
Q: How to Set Focus on JTextField?

KenjiroI make my game run without mouse so using pointer is not a choice. High Score menu will show when player lose. this is my code highScore=new MyTextField("Your Name"); highScore.addKeyListener(this); highScore.setFont(font); highScore.requestFocusInWindow(); I have tried ...

 
3:25 AM
Ah :)

Searching's hard when you don't know the keywords (like 'Focus').
 
By the way, congrats and good luck with your browser
 
Thanks. About 2 months ago, I came here asking the problem with

System.out.printf("Hello World!");
 
@mikeeustace Ahaan but today you have a browser developed, great
 
This is a great resource!

The exams next Wednesday.
Lunchtime here. Thanks @Mr.777
 
You're welcome
 
4:31 AM
Hello
@min
public static int [][] subMatrix(int[][] m, int row, int col) {
int [][] subMatrix = new int[m.length-1][m[0].length-1];
int a = -1;
int b = 0;

for(int i = 0; i < m.length; i++) {
//bypass excluded row
if(i == row)
continue;
a++;
for(int j = 0; j < m[i].length; j++) {
//bypass excluded column
if(j == col)
continue;
subMatrix[a][b] = m[i][j];
b++;
}
}
 
anyone know "does garbage collector work immediately* after scope is ended?"
hi @wellington
 
any ideas what is wrong with this?
not sure if this will help, but javarevisited.blogspot.com/2011/04/…
It stated that the jvm will determine when to collect...#6
@apathybear do you know why my submatrix method is not working?
@min why do you need to know about garbage collection?
 
my coworker's code is causing OutOfMemory
he had resigned so i'm trying to fix that
@wellington your code is not complete. can u show me yr full code?
 
public void cofactor(int[][] m) {
int[][] cofactor = new int[m.length][m[0].length];

for (int i = 0; i < m.length; i++) {
for (int j = 0; j < m[i].length; j++) {
cofactor[i][j] = (int) (Math.pow(-1, i+j) * determinant(subMatrix(
m, i, j), i, j));

}
}
this is the cofactor method where i try to use the submatrix
public int determinant(int[][] m, int row, int col) {
int sum = 0;
for (int i = 0; i < m.length; i++) {
for (int j = 1; j < m.length; j++) {
sum += m[0][j] * determinant(subMatrix(m, i, j), i, j);
}
}
System.out.println("Determinant: " + sum);
return sum;
}
and then the determinant.
 
 
1 hour later…
6:09 AM
Is 1) considered worse code than 2)? I'd assume so - just because it's unnecessary!

1)
int t;
t = 1543;
System.out.print(t);

2)
int t = 1543;
System.out.print(t);
 
both are technically correct, but everyone will prefer the 2nd option because it is clearer
 
I thought so. Thanks Some of the practice questions in the exam are strange. You question yourself.
 
6:30 AM
hi. Good Morning!
@ItachiUchiha i'm having small issue when i debug my application through eclipse debugger. I'm also stopping at this below location, even though i have put debug pointers.
/**
* Check if the given index is in range. If not, throw an appropriate
* runtime exception. This method does *not* check if the index is
* negative: It is always used immediately prior to an array access,
* which throws an ArrayIndexOutOfBoundsException if index is negative.
*/
private void RangeCheck(int index) {
if (index >= size)
What is wrong with it?
any help please?
 
what do you mean by debugger is stopping? Does the debugger reach the breakpoint?
 
nope. it doesn't goes to my breakpoints
instead of that i always ending up with that ArrayList class
 
try pressing F8
 
that will by pass my breakpoints and react to the end
 
It suggests that the debugger doesn't reach the method RangeCheck or in order words the method is not called at all
 
7:11 AM
hEllo everyone
 
fge
@JudeNiroshan have you ever considered using Guava and its Range?
 
7:27 AM
good Morning
 
Morning!
 
@fge nope :(
 
@Unihedron To be fair, I'm fairly sure Java caused more deaths than Ebola since 2014 :P
 
bwahahahaa :D
 
7:42 AM
^-^
 
Ok. I have a problem with my Ubuntu.
 
I like how no one is contradicting me.
 
i am getting "cannot serialize" error while passing JSON object to web service
here is my code
String URL = "https://154.148.1.44:4545/dataservice?wsdl";
String SOAP_ACTION = "http://abc.com/method";
String METHOD_NAME = "method";
String NAMESPACE = "http://abc.com";


System.out.println("##### check 111111 ");
SoapObject request1 = new SoapObject(NAMESPACE, METHOD_NAME);
System.out.println("##### check 222222 ");
JSONObject param = new JSONObject();
JSONObject param_request = new JSONObject();
param.put("loginid", email.toString().trim());
param.put("password", password.toString().trim());
 
The hotcorners feature only works on my VGA1, but not on my primary display. No matter which one I set to primary (and I've tried rebooting, even though that doesn't make sense, but no it doesn't help, it's stuck on LVDS1 only. How can I change that?
It worked fine before the reinstallation.
 
5 mins ago, by greenhorn
i am getting "cannot serialize" error while passing JSON object to web service
 
7:50 AM
@greenhorn cool cool
 
@Unihedron cooled and baffled:D
 
@Unihedron Cannot reproduce.
TIL Hot corners are amazing
 
@MadaraUchiha :[
 
Hello any help with google API
 
7:57 AM
@Unihedron You should try the Ubuntu room

 Ask Ubuntu General Room

Normally: General discussion around Ask Ubuntu, Ubuntu & offic...
 
I was going to ask on Ask Ubuntu directly.
 
Also possible
 
But I couldn't record it thru a recording software because well it's across two monitors
and my camera is buried somewhere
could use my phone I guess
btw, look what I took today:
"For security, please close the door." - An open door
 
just great... is there a way to make css give me nice-looking bullet points?
like... these dashes?
- list item
- list item 2
 
li:before {
  content: "- ";
}
 
8:03 AM
hmm... and then style none, eh? that's kinda...
 
well you can also use something fancy
background: #FFCC00 url("bullet.gif") center top no-repeat;
Add list-style-type: none; to clear the existing list style bullets.
 
cool
 
yaaay! thanks
 
A Hexagon clone in < 4kb of Java: sudorossy.itch.io/hex4kgon
 
8:19 AM
oh damn you jacascript what the heck is wrong?
so I got that function with three parameters...
 
and I actually pass in three.
one of them is optional
	if (okHandler) {
		this.okButton.addEventListener(onclick, okHandler);
	}
okHandler: optional function.
 
What's wrong?
 
pass in a falsy value (such as undefined when it's left out), then that shouldn't do anything
instead I get the error "undefined is not a function" marking the line inside the if-block
 
!!>Boolean(undefined)
 
8:22 AM
@Unihedron false
 
@Vogel612 Maybe addEventListener doesn't exist.
 
that's core js api
 
Maybe you need to put quotes around "onclick"?
 
hmm... interesting idea..
nope... doesn't help
 
I don't think race conditions would take place here. The only conditions I can think of is addEventListener being undefined, which would imply that okButton isn't undefined and is likely mocked...
 
8:28 AM
hmm... that might be because okButton is just a GODDAMN STRING
AAARRRRGGGGGGGGGGGGHHHHH
 
well there you go
make it a Function, or a [object HtmlObject]
 
not gonna touch that thing more than necessary, else I'll be sitting there for another day, cleaning up the mess
it's just supposed to "work"
T.T
 
lolololololol
 
8:44 AM
Slack's gr8
 
stop slacking and work on something ;)
 
I'm coding while chatting :p
 
beep beep
 
morning @deadlydragon00
 
gud afternoon @Vogel612
 
8:50 AM
This is what goes in my mind when dragon00 does the beep entrance: youtube.com/watch?v=IgiEbv6lkic
 
squeakers looks inspiring
 
morning
 
gud mrning
 
Morning morning!
 
yehey now OPEN :D
9
Q: How can I get rid of the tiny fish-bone stuck in my throat upon eating fish?

deadlydragon00My dinner is a fried Milkfish. While I am eating a portion of this fish I feel a tiny bone is stuck near my throat. What are some effective ways of removing this?

 
8:59 AM
mod-reopened...
and subsequently answered ;)
ehh?? don't mention it.
 
:p
 
:D :D , now I can eat more fish without worry
 
fge
9:12 AM
Gee, the number of question where the OP says "XXX does not work" without questioning him/herself as to whether he/she is actually the one using XXX incorrectly
 
says the person who answers off-topic questions
 
fge
Eh?
 
String data = "checking values";
unameProp.setValue(data);

when i pass this string value it calls the web service perfectly instead if i pass a JSON object it shows the "cannot serialize" error .
JSON object is
{"login_values":{"loginid":"admin2","password":"admin"}}
 
Yay Java!
 
9:25 AM
Who are you asking to see?
 
i just said for reference whats wrong with you
 
o_O
Wrong with me? What did I do?
 
fge
@greenhorn why don't you ask a question on SO instead?
 
@fge why are you saying so ?
@Appu cool
 
fge
@greenhorn simply because the purpose of this chat is not exclusively to answer questions; also, repeating the same question over and over won't increase your chances of getting an answer
 
9:33 AM
^
 
:(
 
Look at it as something for your own good. If yoiu don't get an answer here it's probably because we can't give you one. All SO java users don't hang here, so a question on SO could be a lot faster for you because I quote "Insanity is doing the same thing over and over and expect a different result".
 

Java, Spring,JPA, PHP, jQuery & Javas

This room is for Java, ,Spring Framework, JPA, Javascript, jQu...
^ You can look for help there. The people there spoonfeed you with solutions, we talk about problems.
 
Lol..
 
Hey guys, I've gone ahead and asked this question yesterday (will most probably place a bounty on it). Could anyone give it a look any time soon? stackoverflow.com/questions/29896724/…
Or I'll just go to that room lmao
 
9:42 AM
@Juxhin There's already an answer. What about it doesn't fit your use case?
 
I've implemented the pseudo code, but the code itself won't remove anything from started Set
 
And the REGEX he provided doesn't exactly work, had to shape it a bit
 
fge
Unit tests for the win
 
I feel as so I'm missing something very obvious here cause the code is quite close to working
 
9:48 AM
Hello everybody!
 
Hey
 
I'm getting a java.lang.IllegalArgumentException: panelEditBoxes on my JSF page
now what i've read is that this is when validating the ID of a component
and panelEditBoxes should be ok.. right?
 
JSF still works?
 
well.. it loads until the id is used
so the page is loaded for 40% or so
It also doesn't give me a line where the error is at
 
3 mins ago, by Unihedron
JSF still works?
I'm sorry, I don't know what you're expecting.
 
9:53 AM
But I'm guessing it's at a update tag on some component
 
continue?
 
That's what the code looks like
so when I press the button, the panel should be updated, and only that panel (because there are other panels on that page)
 
I don't think so.
 
what do you mean, "I don't think so"?
using update=":tabView:customerForm:panelEditBoxes" not a valid update tag?
is*
 
Moment.
 
10:07 AM
ok
 
10:32 AM
morning
 
fge
10:42 AM
@MadaraUchiha I'd have a question for you
 
@fge Fire away
 
fge
@MadaraUchiha would you happen to know of an addon for Chrome, Firefox or both which lets users edit HTML text fields as if you were using vim?
 
Dev tools?
 
fge
I mean in casual use
For instance I've just spent 40 seconds fixing a question text on SO whereas with vim I'd have spent 3 seconds doing that
 
A lot of extensions can inject bindings.
 
10:44 AM
@fge Hmm
 
@Unihedron any update?
 
@Erates Well, the most I can tell you is that the code is broken - as for how, I wouldn't know because it's not documented.
 
@MadaraUchiha That extension doesn't sync your settings.
Oh well, if you like the defaults, that's not a problem.
It also doesn't work with IDEOne, but I doubt that's important. :p
 
fge
@MadaraUchiha thanks!
 
10:55 AM
@Unihedron what code? my code or JSF code?
 
@ItachiUchiha ?
 
Just laugh and continue to work
 
2 days ago, by ItachiUchiha
my sense of humor is dying
old news are always so exciting :D
 
my all time favourite xkcd comic, makes me laugh & cry: xkcd.com/979
 
10:58 AM
@Nisk It's this exact problem that Stack Overflow aims to solve :P
 
Stack Overflow has the same problem...
 
@MadaraUchiha eh no. SO was good when it was less popular, now it's just polluted with idiotic questions about the same basic thing + loser students wanting others to do the work for them.
N00bOverflow, new meta.
 
Lads and gents, we have a Lounge participant here
 
SOUND THE ALARMS
 
@Unihedron clicked link, was not disappointed. Would click again.
 
11:23 AM
Every time I run java in terminal, it prints out "Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar" 3 times, which is very annoying.
 
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
bollox. Well I refuse to delete my FFIV from my phone
 
fge
Heh, this vi plugin works well, but lacks options
 
@fge typical vim user
 
^^^
 
fge
Yeah, sorry :p
You don't erase 15+ years of vim usage like that :p
But it already makes me win HUGE times editing HTML text areas
 
11:32 AM
I can fix a question in under 3 minutes since the Stack Overflow interface already provides its own shortcuts.
ctrl + k, etc.
 
fge
Yeah, but vim can do it faster
Nothing beats vim in text editing speed
 
Skill does.
 
oh...punches thrown
 
fge
No it doesn't
 
@fge That's like saying nothing beats perl in command line applications.
 
11:33 AM
grabs popcorn and sits back
 
@fge This is groundless strawman. Kill yourself. :p
 
@Unihedron that escalated quickly
 
knowing fge, strawman arguments are essentially racing to escalate to the top, effectively ensuring a need to stop so both parties could redeem sanity.
 
@Unihedron what of it. We got time to kill.
 
fge
Well, it is just a matter of me having practiced all Unix editors out there
And vim is just the best at it
 
11:35 AM
@Nisk I don't. Enjoy yourself.
I'm not a clown. :p
 
I don't edit on on command line, but when I do - I use vim.
@Unihedron weren't you a student or something?
 
fge
Delete from cursor until end of paragraph in command mode? d}
That's it
 
Same.
 
fge
Go do as fast as that with any other editor
 
@fge Ctrl, shift, del
 
fge
11:36 AM
That won't do the same, and not as accurately :p
 
deleting multiple lines
 
ctrl shift right right right right right del
 
d n d
beat that
where n is the number of lines
 
:(
 
:D
 
11:37 AM
ctrl shift right*n del.
 
lol not the same
 
Eh, no... ctrl shift del*n.
 
did you google that?
still less characters
 
I don't even use Google.
 
...*gives a funny look to @Unihedron*
 
fge
11:44 AM
@Nisk ndd also does that
 
@fge good to know, but I'll be sticking to dnd :P
I've been meaning to find a way to get vim on my android phone
from terminal
 
Boo... asking questions is not fun :/
 
fge
No, that's not it
 
I know you have... I don't because of the naysayers
 
fge
I have often found that when asking a question I tried to specify it more; and in the process I ended up finding the answer to what I wanted
 
11:50 AM
@Gemtastic nope it ain't
 
fge
In fact, struggling to formulate a question on SO, if you are truthful to the site, is a form of rubber duck debugging
You may find the answer when you try and explain your problem
It has happened to me a lot
In that sense, asking questions on SO and documenting are the same; you struggle to explain the context
 
If I knew the answer I wouldn't have to ask though... I don't even begin to know how to make a query out of a query result...
 
@fge shift + end, del vs. esc, shift + dot, d, altGr + 0
 
Asking on SO: To boldly ask what will remove what little rep you have...
 
@Gemtastic I have 67 questions posted on Stack Overflow.
I have started writing probably about 500 questions on Stack Overflow :P
 
11:54 AM
@Gemtastic Searching without knowing is like bending until you break.
 
@MadaraUchiha Why are you guys suddenly telling me how many answers you've written?
@Unihedron indeed
 
I'm glad chat users helps out soon enough before I have to run into a wall of nails.
 
Superior knowledge in how sucky it is to need to ask questions? :P
 
(Thanks again, everyone!)
@Gemtastic asking is a skill
 
@Gemtastic Nah, but often writing or speaking the problem aloud really helps.
 
11:55 AM
the people are showing you they attained it, and that you can too
 
@Gemtastic meh...
always that negative attitude...
 
Humans don't think in words, forcing you to organize your thoughts into sentences and words makes them clearer
 
fge
@Vogel612 compare that with d} :p
 
I don't think at all.
 
@Vogel612 Well, I'm seriously curious about why they associate that I don't like writing questions with boosting about how many questions they've written :P
 
11:56 AM
@Gemtastic You remind me of my brother sometimes.
 
@MadaraUchiha Am I not human?
 
I'm an advanced chatbot using a version of SoulOS that supports stateless precognition.
 
@fge I just did, fge... did you see the vs.?
 
@MadaraUchiha Halpless?
 
the first is del from cursor to EOL with any text editor.
 
11:57 AM
@Gemtastic He gets hurt when someone says something they'd done better than him
Thinks people are up to constantly degrade him and his achievements.
 
the second is the combination I have to press to get from editing something to deleting until EOL in vi, without counting in I'd need to switch back to insert
 
fge
@Vogel612 I did...
Did I ever say that the paragraph to delete was the last?
No
 
@MadaraUchiha When did I get hurt that others are better than me? I only get bothered by that I suck compared to my own standrards... :P
 
fge
End will go to the end of the text area
Not what I want
Also, I can do, for instance, d2{
Forget it -- vim beats it all :p
 
Skill beats a tool.
 

« first day (1648 days earlier)      last day (3292 days later) »