« first day (1471 days earlier)      last day (3457 days later) » 
00:00 - 18:0018:00 - 00:00

12:01 AM
Sup @Joe.
 
Not much...
Searching for code to work off of
 
12:34 AM
Exciting.
 
Actually, it is! I think I found code that will help me build my code!
I made a MAJOR leap forward on my code!
 
12:57 AM
Nice!
 
1:16 AM
If I had a machine I could run Android Studio on, I'd be coding right now.
 
 
3 hours later…
4:22 AM
asdfj Hello Robots!
 
What is JSP Container?
 
It's exactly what you think it is.
 
@Unihedron goodmorning sir!
oh, its past noon.
 
What is right definition of JSP Container?
 
xD
IT IS a Container... basically a template where you place your data. both static and dynamic (java generated)
^ idk if this is the best definition. xD based from experience and some reads
 
4:36 AM
It's a Java servlet, which is a Java program that runs as part of a network service, typically an HTTP server and responds to requests from clients.

The most common use for a servlet is to extend a web server by generating web content dynamically. For example, a client may need information from a database; a servlet can be written that receives the request, gets and processes the data as needed by the client and then returns the result to the client.

Applets are also written in Java but run inside the JVM of a HTML browser on the client. Servlets and applets allow the server and client t
Source: foldoc.org
 
5:10 AM
hey @Unihedron
 
5:26 AM
@Unihedron what room are there experts in DB?
 
 
1 hour later…
6:43 AM
@LeeJeong None. Maybe you could try Java, since Uni is there.
 
yeah, i only found MySQL chat room.
posted this one:
 
7:37 AM
1
A: ERROR 1451: 1451: Cannot delete or update a parent row: a foreign key constraint fails

wolfgangwaltherSince you didn't show the table definition for product_audit, the following is guessing in that regard. (At the time of writing, that is. But my guess was correct!) Before deleting the product your trigger will insert into product_audit. If the product_id column in product_audit is a foreign key...

Is there a way to stop the delete action using triggers?
 
8:27 AM
Morning
 
Morning!
 
What's up?
 
fge
Morning
Rewriting JSON Diff implementation
 
I think I'm active in too many chats :')
I opened up my browser to see code looking funny, and I'm all "That's not how you format ternary operators!" before I realize they're talking a whole 'nother language XD
 
8:32 AM
Not everyone is as pro as you @Uni the first thing in the morning XD
 
Every day I wake up I come to see at least three inbox messages for Stack Exchange :)
I should really take a break.
 
Well, we love you so it's not that strange
Our little regex ninja
 
If you bother to care why my chat status on MSE is like that, you can read here.
 
You know, I was looking at a tutorial you linked, and RegEx actually looks pretty simple, if I only learn what all the letters mean
 
@Gemtastic Yeah good luck, the constructs means different in every implementation or flavour.
 
fge
8:36 AM
What constructs? Some of them are pretty standard
 
@fge \K ruby pcre, (?<name> .net
 
@Unihedron I know that! Sheesh! What kinda dumbass do you take me for? ;P
 
fge
Anyway, regexes are not that hard; you have atoms, quantifiers and groups
 
Some implementations aren't even based on ECMA.
 
fge
Which is fortunate enough
ECMA didn't invent regexes after all ;)
 
8:37 AM
Actually, there's no "standard re".
 
fge
(oh yeah, you also have anchors)
 
(\A, \Z!)
and \a and \z
sweet
 
fge
Yeah, and \Q, \E
 
literal signatures
 
@Unihedron Still looks like simple logic to me. So all you gotta do is remember the exceptions. I like remembering things :P
 
8:38 AM
in pcre and vanilla php you can also do (?# )
@Gemtastic :)
 
@Unihedron That's what I meant with the letters :P
403
 
Aww.
Oh, dropboxs' fault.
1 message moved to Trash
 
I should install it on this computer but I kinda don't wanna
 
fge
@Gemtastic maybe you want to implement a FileSystem for dropbox ;) It is in my future plans
 
@fge :D
Ah, I get a 403 when I use the link as well.
 
fge
8:51 AM
THis and Google Drive, Amazon S3 etc
 
Implement it where?
I pretty much only have DB for one reason
 
It seems that Dropbox no longer supports direct link to elements. It's always a temporary stream within a download link!
 
And I don't really do that thing any more
@Unihedron WHAT?
 
fge
@Gemtastic: by factorizing the common parts away from java7-fs-ftp
It would allow you to Files.copy() an entire local directory from your hard drive, say, to your dropbox account
 
8:55 AM
@fge Sounds kinda useless to me
But probably great for other people!
 
Like me~
(I uploaded the sound file to Google and casually fetched the meta url from their servers. It might or might not work.)
 
fge
@Gemtastic yeah well, the thing is that it is very little known what the new Java file API can do for you
For instance you are capable to use zip files (and therefore jars, too) as filesystems directly
 
Wait... Seriously?
 
fge
Creating a zip file is now as easy as creating a FileSystem for it, alterint its contents and closing it
@Unihedron seriously
 
:OOO
 
fge
9:02 AM
I did say "little known" :p
 
fge
To my knowledge, only two other FileSystem implementations exist nowadays: Google has an in memory filesystem and I have done FTP
(and of course, the native JVM implementations as well)
 
@fge I actually knew that :O
 
fge
The Paths class in the JDK is actually a shortcut to FileSystems.getDefault() operations
Well, anyway -- this is yet another of my projects
I like a challenge!
 
Yay for challenges!
 
9:12 AM
Yaay! Challenges!
 
 
1 hour later…
10:29 AM
Hi
how to stop readinh lines from the System.in using IOUtils of apache ?
while (true) {
			try {
				command = IOUtils.readLines(System.in);
                           ....
here when I complete enter the lines I want to pass the next instructions
when I hit on the enter key just pass the next line
and I want stop reading lines
do you have Idea ?
 
You have a while loop that will keep re-doing the try-block
Until you set it to false
 
It's an infinite loop.
Just saying.
 
Like
boolean readLines = true;
while(readLines){
    try{
        command = IOUtils.readLines(System.in);
        readLines = false;
    }
}
(Of course you need the catch too, but I just didn't feel like typing it)
 
and readLines = false obviously should be in some same condition, otherwise there's no point in having a loop
 
Or, you know, use a break...
 
10:43 AM
Yeah, I question the use of a loop at all there
 
break works too. I usually prefer a named condition though; it tends to make the reason to break out more obvious
 
But I was just answering the question, figuring there probably was more code in that while loop
I can't formulate sentences today I notice >_>
 
@Gemtastic @Unihedron I know it's infinite loop I want after :
  command = IOUtils.readLines(System.in);
  System.out.println("after reading lines");
the second instruction doesn't execute never
I want stop reading lines
you understand my problem?
not break the loop
the programm give me always the cursor to enter a line when it read " command = IOUtils.readLines(System.in);"
 
Then you can't have it in the loop, unless you have a condidion for it, like
if (condistion when you want it to read lines is true){
    // Do the readline command.
}
 
oh, it's readLines. You'll need to read line by line. An utility method like readLines has no way to know when you want to break out
 
10:52 AM
ok not problem
I will check
 
I give up on helping this person throws in the rag and starts planning the trip to the store
 
thank you :)
I found the problem
 
great!
 
I used powerCMD instead cmd
this make a problem and then I transfer to cmd and it works well
I think it's bug on powerCMD haha
 
11:43 AM
People, I have a question. Has anyone been able to compile and run JavaBot properly?
 
 
1 hour later…
fge
12:49 PM
@Unihedron never tried; want me to give it a shot?
 
@fge I think Vog and Michael gave it a shot, but never saw it working since Justin left.
 
fge
Well, I can at least test that it compiles
Running it is probably another matter
 
Ok, sure. Thanks.
 
fge
Aah, there we go
Maven downloads the world
Well, mvn test works
So, all sources and test sources compile
I can also open the project with IDEA and run tests, so everything is OK
 
\o/
Sorry for having maven download the world.
 
1:42 PM
When IllegalArgumentException("message") is thrown, does it have to be caught first to be printed on console?
 
fge
@LifeH2O no; by default, when an exception is not handled, it will get printed to stderr
 
@LifeH2O If you're running it as a java application, and it's not caught, it goes to err
 
@fge This exception is being thrown in a thread and it is not inside a try catch block.
I do not get any error message at all
Sorry, this is not the issue. Something else is happening
 
hey there! can anyone tell me what's the real use of 'this' keyword in java other than refer to the current object.
 
@user2849331 whaa?
 
1:50 PM
would i be kicked from profanity. *prays not. T.T
 
Profanities would not be looked at kindly in here. We have kids here ;P
 
hello all you good sir! xD
 
Tsk tsk tsk. :P
Hello!
 
Greetings
 
i asked just a question u need not to over react on it
whts the use of this keyword
 
1:53 PM
It refers to the object. Not sure what you mean by "other than referring to the current object".
 
Good morning, Java!
 
morning
 
i am just a beginner in java, so i havnt use this keyword yet. What i read is that it refers to the current object i dont understand how can i use it in program
 
@user2849331 Looks:
class AnObject {
  {
    this.aMethod(); // <--
  }
  void aMethod() {
    // implementation here.
  }
}
 
and this thing can be written as

Anobject a=new Anobject();
a.aMethod();

am i right?
 
1:59 PM
Yep.
Note that within the same object, aMethod() where the method invocation is not qualified with this. will also work.
 
thank you! you explain nicely ! and excuse my English it is not my native language.
 
No worries. :)
 
@Unihedron hey sir, do you happen to experience mapping record of users to the type of account being logged on DB? say for example, my app created user1 should be mapped with admin user on DB, which would enable it to insert, modify and delete records..
 
@LeeJeong You can either use a new column in your table. Or store the records in a new table to use JOIN later.
 
@Unihedron im sorry, on what table?
here's my setup right now...
 
2:11 PM
Good morning @Michael! Didn't see you earlier :)
 
i have a user table, consisting of username and password columns.. then i also have right now a db_user and db_password where i maintain the DB user and password that would be used for creating connection...
is that a sound design?
 
Sup @Uni
 
Are db_user and db_password tables?
 
Traced each step until throw new IllegalArgumentException("port with same name already exists"); and further. No output on console. Using Netbeans
 
@LifeH2O Sorry, I don't know how Netbeans works :( Does it print syserr?
 
2:16 PM
@LifeH2O It sounds like the port you are using is already in use by another program.
 
It has only printed my previous System.out.println messages, only until I am throwing the exception
@Michael this is not a communication port, I am using the word port for key in a HashMap
 
@LeeJeong The authentication credentials you use to create the database connection is completely different from the credentials of your app's users.
 
Greetings
 
Hey @Joe.
 
@Michael so what do you think i can do sir?
 
2:19 PM
I don't understand your problem. :(
 
Hey @Joe!
 
I want the authenticated app user to be mapped on a specific user on my DB that has a specific type of privileges..
 
@LeeJeong Can't you use a new column then? Look:
 
@Unihedron i cant understand your first answer. T.T im so noob...
 
2:21 PM
username password priv
Unihedron 3333    *
Nordehinu 2222    vi
Javabot   1111    vi
 
so i have this user table... containing usernames and password... and then i add another column
how does that priv column work?
 
Yeah, when you do so, the corresponding column for the records IS NULL.
 
so once i authenticated the user... whats next, how do i log the DB user?
 
I don't know, what "specific type of privileges" do you mean? What do you mean by logging? Which method are you going to use for authentication? How much do you want hardcoded?
 
So, you would need a way to encode each user's privileges into a database column.
 
2:22 PM
Or you can use a new table.
username password
Unihedron 3333
Nordehinu 2222
Javabot   1111

username priv
Unihedron *
Nordehinu v
Nordehinu i
Javabot   v
Javabot   i
Then: SELECT p.priv FROM Credientials c INNER JOIN Privs p ON c.username LIKE p.username
Or something
I have no clue what you're trying to do, so.
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected B
EGIN_OBJECT but was STRING at line 1 column 1 path $
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.re
ad(ReflectiveTypeAdapterFactory.java:187)
        at com.google.gson.Gson.fromJson(Gson.java:805)
        at com.google.gson.Gson.fromJson(Gson.java:770)
        at com.google.gson.Gson.fromJson(Gson.java:719)
        at com.google.gson.Gson.fromJson(Gson.java:691)
Any clue?
Thrown on this line: JSONChatEvents events = gson.fromJson(rString, JSONChatEvents.class);
 
So...what's the value of "rString"?
It looks like there's a syntax error in the JSON.
 
It's agent.post(String.format(EVENT_URL_FORMAT, site.getDomain(), chatId), params).asString().
 
The functions which is thrown the exception has no `throws IllegalArgumentException` identifier with its name.

void foo(String arg){
if(arg == null){ throw new IllegalArgumentException("arg is null");
}

but if i add `throws IllegalArgumentException` I have to call this function in `try` block
Even adding throws IllegalArgumentException does print stacktrace (still not calling inside try-catch)
 
If an exception isn't caught by any "catch" block, the default behavior is to print the stack trace to stderr.
 
2:38 PM
@Michael, i dont want to bother @Unihedron anymore, im felling anytime his patience thread would break with my ignorance..

so here's my problem. I want to establish DB connection using a user credential in DB. username and passwords you use to make a connection to database..

I want first to authenticate the username password that is just for the app alone. Once authenticated, i need a way to have it a matching credential to access the DB. Of course different users, different types of credentials.. One user could be able to do it all, and some would be limited
 
I don't think Netbeans is logging syserr. Have you looked into that?
 
@Michael Can threads (SwingWorker) cause this issue?
 
Ok, fixed the JSON. I had to erase some garbage header.
 
@Unihedron How do I check that?
 
@LifeH2O Netbeans should have some options pane for console logging... Right?
 
2:40 PM
Yup
There is console output view. Let me check for the options
@Unihedron Using ex.printStacktrace() to catch this exception in try-catch prints it fine.
 
@LifeH2O But ex.printStackTrace() prints it in System.out stream.
Wait, no.
Actually, ex.printStackTrace() prints it in new WrapperPrintStream(System.err).
 
@LeeJeong You will have to program into your app what each user can do.
The app will use the same username and password to connect to the database, no matter what user is logged in.
 
This is not happening for the first time. Previously it was not printing any stack trace for Regex Matcher e.g. matcher.group(""). I had to try-catch all of them.
 
@LifeH2O It's possible there is a thread-related issue which is causing the error.
 
@Michael i figured, yes... what suggestions do you have for me if i want restrictions to put restrictions on functionalities of each user..
 
2:49 PM
@LeeJeong First, you need to figure out what kind of restrictions you need.
 
Well, for example. In my project app, i want cashiers to only be able to access classes that adds entry to the database.
 
Then, you must figure out how to put that information into the database, so that, when a user logs in, the app will know what permissions he/she has.
 
admin users would be the only ones to be able to modify and delete entries..
 
So it sounds like you need two roles: "cashier" and "admin".
 
can i create many-to-many table that connects users and classes they can access?
yep.
 
2:52 PM
 
@Unihedron xD
 
T.T
maybe i need some more sleep.. cant even construct a proper question. T.T or i'm just on full pressure
 
Quick! Keep asking to learn of the specifications, @Michael!
:D
 
Tried System.setErr(System.out); still nothing
 
T.T
 
3:00 PM
tried the other way System.setOut(System.err); no change
throw new IllegalArgumentException("testing throw in main thread"); worked fine in main thread
 
Is this for a class, @Lee?
 
I think im dropping the whole idea. T.T
 
:(
 
What i just want to accomplish now is, in the future, how would i be able to customize what classes/GUI are available for a specific user.
Im dropping the idea of logging a specific-privileged user for DB Connection. I wanted the RDBMS to handle the restriction, say even if the cashier user can access modifying products, it would fail to do so, because the logged user in DB is only read-only.
@Michael thank you for the sympathy
 
Handling permissions isn't easy.
Start with something simple, then work your way up from there.
 
3:11 PM
I am seeing that now. T.T
 
@LeeJeong PHP
For user authentication, request cookie, and use the fkey and lookup your table for the user, then lookup the perm for the user
 
Not using PHP on this one, im using Java... did i get the context of your message? T.T now i fear @Unihedron
 
and corresponding to which perms there are, handle and show correspondingly
oh
jsp?
 
SWING good sir
 
It's nothing to do with web?
 
3:13 PM
nothing sir..
 
Cool!
 
@Michael say sir, this needs a complex design right?
 
@Michael It was SwingWorker ignoring exceptions
 
@LifeH2O Ah.
@LeeJeong Sounds like it.
 
3:20 PM
@Michael i guess i can still proceed with my dev without it... kinda OC when what i wanted to do is not yet set on my mind. I dont feel at ease.
 
3:30 PM
@LeeJeong Write down what roles you want your app to have. Then, write down what permissions you want each role to have.
 
@LeeJeong Don't code without specs. You're not doing dynamic programming. Think up how you want everything to work.
 
Can you not run the bot, @Uni?
 
@Michael It keeps getting redirected to this weird page where it says "Oops, something went wrong! It's not your fault, it's ours (blah blah blah)".
 
@Unihedron Maybe there is something wrong with SO?
 
I think there's something wrong with using the domain for a post request from agent.
I'm working on that.
 
3:42 PM
Ok.
 
Help...
I'm having issues with my Winders machine...
 
Name it?
 
Well, A] XP
I can't launch Android Studio
It's complaining about not finding files, and then about my JAVA_HOME variable.
I checked, it's set, I even rebooted.
 
@Michael If you're interested: hastebin.com/enuwoginog.xml
 
I went to my Java jdk folder, copied the path, and used that to set the variable...
What is going on?
 
3:50 PM
@Unihedron SO might be down in some way, shape, or form.
 
4:04 PM
I wish there was a library out there that could parse Javadoc HTML files.
 
Any ideas?
 
Ok, how do I setup eclipse Remote Java Application to run a remote java application?
 
No idea. Sorry, @Joe.
 
It doesn't let me specify the main class. Or the execution environment directory. Or anything.
 
What are you trying to run, @Uni?
 
4:06 PM
@Michael A jar file in a different directory, as an eclipse run configuration.
 
@Unihedron I think you can do that with a "Java Application".
 
Oh, really?
 
Just add the JAR file to the build settings.
 
4:23 PM
How do I find out if I'm using the 32, or 64 bit ver of Java? [Winders, if that makes a diff]
Is there a command that will tell me?
 
Does anyone have any idea about, what's the best site to find IT Consultants in London, UK?
 
Schedule Runnable for being run after X seconds?
 
Hi guys. Anybody here?
Any familiar guy with Spring Data Mongo here?
0
Q: MongoDB and Spring Data. Get size of array in entity

Ilya ShatravkaI have such entity. @Document public class Entity{ @Id private String id; private Set<Integer> ids; } I need to get size of array ids How it can be done using Spring Data aggregation framework? I'm trying something like this : AggregationOperation match = Aggregation.match(where...

 
4:38 PM
Is Executors.newSingleThreadScheduledExecutor().schedule(new ExpiraryTask(bot, this), time, TimeUnit.SECONDS); correct?
 
4:50 PM
Looks fine to me
(assuming ExpiraryTask is a Runnable)
 
Yeah it is :)
I'm going to sleep, school tomorrow; Night!
By the way @Michael I pulled your changes and pushed mine, so you might wanna pull the commits
 
@Unihedron Ok
 
Night @Uni
 
5:05 PM
I'm back again...
@kiheru Alive?
 
hi @Joe'sMorgue. Alive, but cooking so I'm not at the keyboard all the time
 
You should try my AFK (away from kitchen) cooking, it's awesome! more screen time! :D
 
@Gemtastic :P
 
It's probably apreciated by anyone who doesn't wanna slave in the kitchen
 
I wanna slave in the kitchen!
Blonde....Female...20ish...
 
5:12 PM
no that's "want a" I mean "want to"
Also, a slave in the kitchen is gonna make you someone's bitch in prison :P
 
If I had the "want a", I'd "want to"
:P
Not if she's willing....
 
user image
2
No slave is willing
That's the whole point of slavery.
 
Uhhh....yeah...
 
Someone who wants to cook is not slaving in the kitchen, that one's making a masterpiece!
 
Subs are "willing slaves" for the right person...
 
5:14 PM
No, sorry
No room for personal porn tags here.
 
:P
How are you today? @Gemtastic
 
.
lol...
 
I'm very vocal and language nazi today :P
 
:D
I see that
 
Words have meanings, if you want to have your own definitions for stuff, you gotta go shakespear on it and make up new ones
;P
Hilarious typo was hilarious
He should be called shakespeak
Without him, there's be no elbow
 
5:19 PM
He invented TONS of words
 
Yup
Bro, do you even shakespeak?
 
2b or !2b, that is the Q
 
Off to lunch. Later all.
 
Laters
 
5:43 PM
Dead chat
Any1 alive?
 
I didn't really come in to chat, I came in to bump my question haha
0
Q: Why this doesn't appear to be initialized

BiblyDooI have a typical NullPointerException: Exception in thread "Thread-0" java.lang.NullPointerException at com.game.main.SpriteSheet.grabImage(SpriteSheet.java:17) at com.game.main.Textures.getTextures(Textures.java:30) at com.game.main.Textures.<init>(Textures.java:21) at com.game.main.Game.init(...

As no one has answered :(
 
How do you call the SpriteSheet constructor? Apparently the parameter there is null.
 
How different are the many versions of Oracle's Java?
 
Hmm, answering myself: game.getSpriteSheet() returns null. Check why
 
Umm, wait a sec I'll check
AHo k
Ah *
I will do now, thanks alot :)
 
5:56 PM
Did you declare image anywhere?
 
yw
 
Image is not in the parametres of the method, and it's not declared in the method so it has to be dclared somewhere else, it's gonna be null
 
Ah, only in SpriteSheet.class I have private BufferedImage image;
private BufferedImage image;
I've declared it I think
Then initiated it with this.image = image;
 
Not by the code you've shown.
 
@Gemtastic it's a private field, and set in the constructor. (That much is shown in the code in the question)
 
5:59 PM
Show the code of the constructor
 
That's in the question, below the block with only the grabImage()
 
00:00 - 18:0018:00 - 00:00

« first day (1471 days earlier)      last day (3457 days later) »