« first day (1459 days earlier)      last day (3493 days later) » 

12:00 PM
Lol
 
Well, it is kinda like your baby. Since you're both guys I thought just Junior was nice.
 
Hello guys
@Unihedron Need your help
I am creating {"type":"userListToken", "data":"{"uid": "abcd", "uid2":"m"}"}
this type of format
JSONObject jo = new JSONObject();
try {
jo.put("type", "userListToken");

jo.put("data",new String("{\"uid\": \"abcd\", \"uid2\":\"m\"}"));
i dont want backslash
 
Why not create an object to serialize into JSON, rather than trying to create it by hand?
 
did you mean like this JSONObject jo2 = new JSONObject();
jo2.put("uid", "1");
jo2.put("uid2", "m");
how to add jo2 in jo object
 
Create another object
 
12:07 PM
how
 
class SomeObject { string type; DataObject data }
class DataObject { string uid; string uid2; }

jo.put(someObject)
 
this easy looking problem took me 1 hour
i didnt understand .
jo.put("data",new JSONObject());
cant i add like this
jo.put("data",new JSONObject(jo2);
 
Sure.
 
no , it is giving error
 
Lol
 
12:14 PM
i am asking
 
I don't know how else to help without writing the code for you
 
give me link , i will read out
 
You want me to google for you?
 
nope
 
You got this.
 
12:17 PM
i cant find the link of same problem
{"type":"userListToken", "data":"[{"uid": "abcd", "uid2":"m"}]"}
everyone is using jsonarray
 
There's 100 ways to do it
I dunno what you're trying to do.
 
all i need to do is insert jsonobject in another jsonobject
 
Good morning, Java!
 
Afternoon
 
good evening
 
12:21 PM
jo.put("data", new JSONObject().put("uid", uid).put("uid2", uid2))
 
i didnt know , we could do like that
multiple put
 
put returns an instance of itself, for chaining method calls.
 
thanks for clearing , good concept
 
@Michael I'm working on our bot :o
 
12:25 PM
Lol good morning
 
Afternoon @Joe
 
Hey @Michael! @Gemtastic! @Unihedron
 
Sup @Joe.
@Justin Awesome!
 
He's in the sandbox
He does groovy :o
 
Trying to wakes up still
 
12:40 PM
Gahh! Why is "target" in version control!
 
shrugs I dunno
 
@Michael I've rewritten history to remove it from my branch.
 
It's bad practice to add that folder to version control. It's supposed to be a directory where all the compiled files go.
 
Uni committed it by accident.
 
Ah ok.
 
1:12 PM
Dead chat
 
0_o
 
We're working on having Junior fix that
And by we, I mean Uni and Justin ;P
 
Lol
I'm making the Groovy evals safe.
 
I'm more of moral support willing to help
 
Just submitted a pull request: github.com/Vincentyification/JavaBot/pull/1
 
1:17 PM
You're trying to merge with the wrong branch 0_o
That's old code
 
lol dang it! xD
 
Lol well thanks though :p
I would've accepted it if any of that code was actually still there :p
 
Doh!
I'm getting some compilation errors. Is that normal?
 
Yes
For BotConfig?
 
Yes. And JavaBot. I guess because it's not seeing the groovy file.
 
1:26 PM
BotConfig has passwords and whatnots
You'll have to add those fields yourself
Shouldn't be anything wrong with JavaBot, but it depends on BotConfig
And if you're not using maven you'll have more issues than that.
 
No, I'm using Maven.
It looks like "TRIGGER" is defined twice in BotConfig.
 
that's likely
Do whatever you want with that, just don't commit it to the repo :p
It should really just be in .gitignore for now.
 
Ok.
 
1:54 PM
@Justin Ok, I think I did it right this time xD : github.com/Vincentyification/JavaBot/pull/2
 
woah!
everyone is contributing things to the BOT :')
 
Junior's family is expanding!
 
@Michael Accepted :)
 
Only if I wasn't too busy at home
I will have to find some time at night
Feeling Determined
 
@Justin Thanks! :D
 
1:59 PM
@Michael I'm working on sandboxing the Groovy evals :)
 
@Justin Cool.
 
2:11 PM
@Michael Ever used javas security manager?
 
@Justin No, sorry.
Got to go. Later all. :D
 
Cya!
 
2:38 PM
What have you done @Joe'sMorgue? My internet crashed right after you greeted me..
No, it was @Neil
Maybe both
 
0_o lol
 
Three hours without internet :(( Holy
 
wow that sucks
 
Well at least I got to be productive outside the chat and finished another MineconSE project.
Is JSONChatEvent immutable @Justin?
 
Yes.
 
2:52 PM
Eh... I might be slightly insane right now, but does package com.gmail.inverseconduit in that groovy file need to end with a semicolon ;?
 
No?
It's groovy
 
rgpijeariogjaroigjaoijgp3eigjq
 
@Unihedron Have you ever used Javas Security Manager API?
 
@Justin reflect.SecurityManager?
Also, since we probably won't be needed a MySQL server, I might use the other gear to set up a Hastebin instead.
 
I want to create a custom policy without loading it from a file.
But it doesn't seem to work probably
 
3:02 PM
It's hard to do it with a single class.
 
I thought all I really needed to do was override getPermissions in the Policy and then do setPolicy
 
That's not going to get you very far though.
Must... resist... using reply feature in a direct 1 to 1 convo
 
Okay, do you know what else I need to do?
I returned an empty Permissions object from getPermissions based on the URL, which in this case will be file:/sandboxScript
I can see that the Policy is being used.
@Unihedron I'm fixing the master branch. It is detached and pointless atm
 
@Justin Ok. Feel free to merge everything into master, considering we seem to never experience conflicts and are push/pulling on a regular basis.
Did you overwrite checkPermission?
 
Hi
 
3:10 PM
Hello
 
I have a very basic java question that I'd like to clarify
 
Please ask
 
@Unihedron For what? the policy is set with the AccessController already.
 
@Justin Oh.
 
3:11 PM
Is it really that simple though? I once did that, I don't recall it working properly.
 
this is probably java 101 lol
but it says, the method invocation may produce nullpointerexception
my question is why?
 
You didn't show enough code to diagnose the problem. What's that field?
collectionInterval
 
@Unihedron It should be. The standard Policy loads the permissions from a file. All I did was override it to return what I wanted and set it. I dunno how much more complicated it would be.
 
ok first I set this: String collectionInterval = null;
Then I am going through an array
 
ok
 
3:13 PM
and then I'm setting it to collectionInterval = collection.getCollectionInterval();
 
I hope it works
 
inside the array
 
... what??
 
JavaBot incoming!
 
please
 
3:14 PM
!!eval:"Im here!"
 
Im here!
 
@Unihedron, collectionInterval grabs a value from the database
 
!!eval:"I'm here!".replaceAll("\S([a-z])", "$1$1$1")
 
nooo regex :/
lol
 
Oops, there was a syntax error (on purpose). Did the bot crash?
:P
 
3:15 PM
Nope, he's fine. Lol
 
4:12 PM
How do I simplify this? sb.append(new String(subarray(
sb.toString().getBytes("UTF-8"), sb.toString().getBytes("UTF-8").length - distance,
1), "utf-8"));
where sb is StringBuffer
 
What you mean simplify?
 
isn't that redundant? array to string to array to string etc.
and its so comlex to comprehend. even i can barely understand
i just want to copy some bytes from stringBuffer and append them to it again
 
Dear IDE, sometimes I hate you.
 
4:34 PM
 
5:05 PM
:)
I gotta sleep soon. School tomorrow ;)
1
2
3
4
end
Good night!
 
@Unihedron Goodnight :)
 
:P
Hi @Joe'sMorgue, see you later!
 
OK...
No sense of humor
 
5:21 PM
Eh
 
It appears my comments disappeared... I'm guessing edited
@Kylar How are you today?
 
Depressed
 
What's wrong?
 
A good friend of mine passed away on Friday
40 years old, cancer
:(
 
Ewwwwww
 
 
1 hour later…
6:32 PM
that is bad news :(
 
Indeed. My condolences.
 
@gem your song is already famous :P
 
The Poke-at-Java song?
 
yesterday, by Gemtastic
*Sings* I wanna be, the very best (student) like noone ever was!
To code java is my real test, readable and strong..!
Java code~
It's you and me~
I know it's my destiny!
You teach me and I teach you
Java code! ♪
Gotta code it all!
 
that last image... I'm with you Bugs bunny, But I need to go to the store D;
 
6:46 PM
haha
 
I could live with the fact that we have no more food, but we're also running out of TP and that I can't really will my way through...
 
Toilet Paper
 
haha
that is an necessary item for home
 
If we had a bidet I could sit it through though. But this apartment was built in the 50s, not 70s ;P
 
6:59 PM
hehe
 
7:46 PM
So, what are you up to Ita?
 
nm
I had a party with ma school mates
 
user1804599
hola
 
Had loads of fun
@rightføld heya
 
Sounds nice :)
 
yeah it was nice
I was kinda drunk a few minutes ago :P
 
7:51 PM
But now you sobered up?
Super speed metabolism
 
yeah
:P
a few minutes = 20-30 minutes ago
 
8:07 PM
Hey all! I'm a newbie to Java servlets, and I am developing a servlet-based application for my project. I am quite used to django templating, so I found it quite difficult to replicate HTML for different pages. I then came across rythm, a templating library that offers features such at template inheritance which is awesome. I'm having some issues making it work properly. Has anyone here worked with rythm or a similar templating library before. Also, is this the right place to ask this?
 
Not me
 
8:29 PM
@Gemtastic a bidet? Do people still have those ?
 
8:45 PM
hey @Kylar
 
Zzzzzz
 
sleeping? :P
 
@Kylar everyone that haven't renovated the bathroom they built in the 70s
And also, posh families and disabled families
 
hi
 
Not sleeping.. napping.
 
8:47 PM
My uncle has one because his ex-wife needed it. It's handy for any woman, especially those with kids
 
Why if you put Integer into int primitive variable, it works? while Integer is an object and int is primitive?
 
Integer can hold a primitive int
 
@BenBeri Integer and int are inter convertible coz of auto-boxing feature
 
Maybe I shouldn't explain things. :') I'm so bad at it
 
you might wanna search about it
 
8:49 PM
And why in C# u can do <int> and in java you have to do <Integer> ?
 
@Gemtastic you were right to the point
@BenBeri No idea about C#
 
@BenBeri Java has two distinct types - int (a primitive, must have an integer value), and Integer - which is an Object reference, the same as other objects. An Integer is an Object that is manufactured to hold an int value as well as do a few other things
 
Sorry chrome crashed
ye my question was basically, is Integer a special object (as in a bit different from another objects in it's behavior) ? since int can hold it?
 
Why do you consider Integer as an special object?
Any object can hold int
 
No i mean an int can hold Integer
 
8:59 PM
int is a primitive type and can't hold any thing other than numbers
primitive types can't hold objects
where as objects can hold primitive types
 
What I mean is, you have a method named method() returns Integer, and then u do int a = method(); I am just failing to understand how int can hold Integer if Integer is an object reference and not primitive int
 
Well, you can assign Integer to int, because of UnBoxing
 
ye ill have a read on that thanks
 
wc :)
 
about my previous question, somehow in C# int is exending Object
maybe thats why it can be passed as generic
 
9:06 PM
hm,
 
BenBeri: the Java Compiler does some tricks under the hood:
 
What's important to know though is that when you write int a = method() and method() returns an Integer is that you can get errors because int = Integer only works if the Integer actually contains an int. Integer can be null. Int as a primitive can not be null. @Ben
 
i see
 
:)
 
Nice Work :)
public class AutoBoxingUnBoxing {
	public static void main(String[] args) {
		int i = getValue();//Unboxing
		System.out.println(i);
	}

	public static Integer getValue() {
		return 5;//AutoBoxing
	}
}
 
9:19 PM
I kinda like using Integer = null for while loops where you return an int. While Integer == null the loop will go on until I get a number to put into the Integer. That doubles as an assurance that the method always will return a number.
 
@Gemtastic ???????
 
Meh.. I can't explain it better without code >_>
 
hehe
 
@Gemtastic that's... horrifying
Unless I'm misunderstanding
 
@Kylar it's bad? D:
 
9:26 PM
Which, to be fair, I often do
 
Why is it bad?
 
I need to read a book
anyone read inferno, by Dan Brown?
 
9:44 PM
No, but I've read others of his
 
10:04 PM
hi, somebody know how I can include a external page in facelet page?
 
10:34 PM
hello
 
hello
 
how's everyone here tonight ? :)
 
A bit stuffed. Had too much to eat :P
 
what a coincidence.. :)
@Gem
same here..
 
Heh, then we can be gluttons together ;P
 
10:44 PM
by the way, it was a Swedish friend who did the cooking...
best Snitzel ever.. :p
schnitzel*
 
Schnitzel isn't a swedish dish though :P
But I'm glad you had a good meal ^^
 
I know.. but the guy is a genius..
He's like 50 years old , and maybe 200 kg :)
 
Obviously he knows good food :P
 
11:20 PM
Things are very silent over here.. :(
 
Indeed
 
is it like "too late" ??
 
I wonder what people are doing..
 
:)
 
preparing to head out for school
 
11:21 PM
Do we even have europeans here?
 
I stay in Ghana... that's for sure :)
 
Apart from me, mini and possible LittleSweden?
 
11:32 PM
Hello @MarshMellow .. I don't think your reputation allows you to talk on chat yet.. :)
 
Is this closeworthy? @mlwn
 
@Unihedron u missed to insert (class link:) to the code at the beginning.. :p
but still, I didn't understand the question.. it's not about formatting..
 

« first day (1459 days earlier)      last day (3493 days later) »