« first day (2586 days earlier)      last day (2358 days later) » 

12:38 AM
morn
 
Welcome back!
 
thanks
 
 
1 hour later…
2:01 AM
o/
 
\o
 
hey @Michael
it's been a while
 
 
2 hours later…
3:43 AM
/cat
 
Don't expect it to make any sense
 
 
1 hour later…
5:00 AM
"The best way to predict the future is to create it." -Abraham Lincoln (source)
 
5:19 AM
I'm worried of writing a program that becomes sentient.
 
6:15 AM
clears throat
 
 
1 hour later…
7:34 AM
Welcome back @OakBot
 
@Julo0sS Type /help to see all my commands.
 
/react stare
 
Zoe
@JennaSloan cool, didn't know there were more
 
what about the dog thing and pseudohuman?
 
Zoe
7:49 AM
DoggyBot is technically Oak
PseudoHuman is the last one Jenna linked
 
morning
 
Zoe
morning
 
So @Zoe, my app is almost finished atm so I am trying to make my code clean and follow some of Javas best practices. However I am slightly confused on the the way I can use bits of code between classes. For instance, how would I want to do if I got a container, an arrayList that should be accessed from multiplie classes?
 
Zoe
8:05 AM
depends. Is the data instance-specific?
 
It's not depended on dependency injection. That is the container is not depended on the constructor. Once the class is instatiatied the container is filled within an onCreateView method.
 
Zoe
You could probably use a static field
 
on the container and then just add the Class variable as a private variable in the desired class?
 
Zoe
yeah. though this is if you can't pass instances of the class with the list. That would be better to avoid memory leaks
 
What do you mean?
 
Zoe
8:16 AM
if you want to access a given list, it's usually better to pass an instance of it or the class with the list in it. IF you cna't pass instances, use the static keyword
 
8:54 AM
@Zoe of course I can pass the instance (at least I think) but it seems easier with static container
 
Zoe
It is in most cases, though it depends on usage
 
In my case it's a list with expressions (Strings) that I need in several classes.
 
finding a free parking in europe like you find a bug in the JVM wtf
 
especially in the big cities
 
yep
 
9:02 AM
@Zoe I think it's good to have a static container. One guy said this on Stack:
"One rule-of-thumb: ask yourself "does it make sense to call this method, even if no Obj has been constructed yet?" If so, it should definitely be static."
 
Morn::new
 
@Zoe So in my case I should have this one in each class that I am using?
private AddRegexFragment addRegexFragment;

morning!
 
Zoe
If you want an instance, yes
 
What does that exactly mean? xD Each class is referencing the same instance aight?
it's an instance that it's not instantiated
but in fact the class itself is it is instantiated when my program started
 
Zoe
You have to pass an instnace of the fragment to the classes either with a setter or a constructor (or just assigning the value directly)
 
9:21 AM
aah that why it isn't working now probably bc I got 3 instances of the class which isn't the same
 
Zoe
yup
 
@Zoe so in my scenario. (Talking android here). When my users come from mainActivity to SignedInAcitivty I have 4 different fragments that are instantiated. In my scenario I would like to have the container in my SignInActivity right? and then hand the container to the classes that need it right? Because Right now the container resides in one of the fragment classes :p
 
is it time to go home already?
 
Zoe
I am home :D
 
half an hour to go \o/
 
Zoe
9:32 AM
@sockevalley you have to pass the instance to the fragments, probably through the constructor (or a newInstance method, or setters or manually setting it) from the activity
@Tavo I had today and yesterday off \o/
 
and two and a half weeks left in this shithole
@Zoe sweet
 
@Zoe and that ought to be a static container?
 
Zoe
if it is static you don't need an instance
 
What do you mean I don't need an instance?
If I send in a static container to 2 classes and change it it one of the classes, that should effect the container in the other class right?
According to android studios I should have parameters in my fragment constructor because it needs an empty constructor so it can be instanstiated when restoring its activity's state.
 
Zoe
if class A has a static variable X, class B can access that variable using A.X. If it isn't static, it needs an instance and a.X
 
9:57 AM
I see, so what does A.X mean in this scenario? Should B have the static variable in its constructor?
 
I understand. As I mentioned before it is recommended that fragments have empty constructors. So in my scenario I would pass the static variable in a setArguments(Bundle) if I understand correct according to android studios recommendations.
 
Zoe
you don't need to pass static variables
 
No I know, I would pass "this" however this would be an issue if I Would pass "this":
https://stackoverflow.com/questions/12062946/why-do-i-want-to-avoid-non-default-constructors-in-fragments
 
Zoe
10:13 AM
you don't need to pass an instance either when you have a static variable
 
Okay but I thought I was suppose to to as in the paste ofCode?
 
o/
 
\o
 
user1731387
Hi lovely peoples !!!
 
10:27 AM
@Vijay Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
user1731387
okay @OakBot
 
@Vijay Type /help to see all my commands.
 
user1731387
/help
 
Commands=====================
/8ball     Simulates a magic 8-ball.
/about     Displays information about this bot.
/afk       Allows users to mark themselves as "away".
/cat       Displays a random cat picture. :3
/define    Displays word definitions from the dictionary.
/fatcat    Displays a random fat cat.
/groot     I am Groot.
/help      Displays this help message.
/http      Displays information about HTTP status codes and methods.
/javadoc   Displays class documentation from the Javadocs.
 
/fatcat
 
user1731387
@OakBot thats nice
 
user1731387
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzdyu;
 
user1731387
how to clear this issue
 
user1731387
@Sayros
 
coughs
 
10:30 AM
@Vijay Please don't randomly ping people for help :)
 
@Vijay you know why OakBot coughs :p ?
 
user1731387
@Sayros nope
 
user1731387
why
 
because you asked an android question :D
 
EEEEEEEEEEEEEEEEEK android
 
user1731387
10:32 AM
the robot know its comedy question
 
user1731387
very funny
 
I think you can ask in Android's room or maybe ask in the forum
 
user1731387
yeah asked
 
user1731387
just now
 
good
 
user1731387
10:34 AM
i am working on react native
 
\o
 
ssup?
 
react? is there a react for Java also?
 
user1731387
10:35 AM
:P
 
@Zoe lol for bothering you but you said:
you don't need to pass an instance either when you have a static variable. So how should I access the static if I don't pass the class instance A to class instance B's constructor?
 
You can't
 
user1731387
@Neoares
 
user1731387
nooo
 
I have no idea, long time no see Java xD
but AFAIK, static methods belong to the class itself, not to the instance
 
10:44 AM
Hi
 
yeah exactly, and if you want to access this variable from multiple classes?
 
I have a simple problem connecting my Java Application to the SQL database
 
Hi crash
 
I'm getting this error:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 'hostname', port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
 
have you tried some of those?
> Verify the connection properties.
> Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port.
> Make sure that TCP connections to the port are not blocked by a firewall
 
10:47 AM
I've checked the last one
Not sure how to do the others
 
11:24 AM
@CrashBandicoot Is your host really called "hostname"?
I seriously doubt that :D
 
I changed it
It's not actually hostname
 
Zoe
@sockevalley when you have static variables, you don't need instances at all
Neither for the variable nor the class
@Neoares Long time no see
Nov 9 at 14:30, by Neoares
Hello, my more than a friend!
 
indeed
I was AFSO
 
Zoe
AFSO?
 
Away from SO
 
Zoe
11:31 AM
oh
 
Away fro SO but not necessarily away from keyboard :O
 
Zoe
lol
 
@eFox indeed
 
12:01 PM
How do you initialize this?
List<List<Feed>> chunks;
 
Zoe
new ArrayList
 
private List<List<Feed>> chunks = new ArrayList<>()?
ty
afk
 
Zoe
If you're using Java 6 you need the List<Feed> in the diamond operator when you initialize it too. Java 7+ and you don't need that
 
 
2 hours later…
1:52 PM
/funnyowl
 
AWWWWWWWWWWWWWWWWWWWWW
 
hellooooowwwwwwww
 
hellowl
 
Has anyone had this error?:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''.
 
2:04 PM
guess it's syntax error in your code, user seems to be : ".
/crashbandicoot
 
Makes Sense!
 
2:39 PM
xD
My SQL Server Username has a \ in it
And I can't do String userName = "user\name";
because it says 'invalid escape sequence'.
 
sniffles
 
maybe google "escape backslash in java string"
 
Ah, double backslash
 
3:00 PM
Hello!
Does anybody of you know an example of VertX application in Java available to study on GitHub that goes beyond "hello world"
 
Java goes beyond Hello World???
/wth
 
Zoe
lol
What have you been doing with Java @Julo0sS? Finding fancy ways to write "Hello World"? :P
 
I don't know much about vert.x but Google should...
 
Zoe
vertx just reminds me of vertexes for some reason
Too much openGL xD
 
3:12 PM
Well, I'm still working on my good old app making dynamic charts with external data inputs coming from scientific sensors... But that's pretty specific
 
Zoe
That sounds cool
 
apart from this, I don't really "love" java as much as most people do here
 
@Julo0sS Yes, they have dozens of examples even in their repo, but they are all like "ok, now let's deploy one simple verticle with HTTP router". I just wanted to check out some real-world examples that
 
Well, guess some people here should have some examples for you... but not me... :p
/imout
 
3:44 PM
I'm unable to connect to the SQL Database from my Java Application
Apparently, login failed for user 'sa'
 
 
1 hour later…
5:00 PM
There are approximately 1,500 active volcanoes, not counting undersea volcanoes. Of these, only about 20-30 erupt in any one year. (source)
 
5:12 PM
Hey OakBot, have you reached AGI yet?
 
Just wanted to mention: I really love this random fact feature of OakBot @Michael You learn something new everyday :)
@sockevalley I doubt he will answer you ;)
 
@Michael wheres the sourcode mate? ;)
 
/about
 
OakBot by Michael | source code | JAR built on: Over a month ago. | started up: Today at 9:01 PM | hosted by: The Uni Cloud | responded to 6692 commands since Mar 9, 2017
 
^ there it is ^^
 
5:14 PM
t is named after the first name given to the Java programming language before it became "Java".
SO Java used to be called Oak or what? lol
 
Correct, at least partially. There has been a language called Oak which then later evolved to Java. Read the wikipedia article about it here
 
Cool fun fact
 
Zoe
I'm creating a new chatbot live on Twitch :D I got nothing better to do xD
 
@Zoe Do you need something better to do?
 
Zoe
I found something better to do by doing this so no
 
5:24 PM
anyone here working as a devloper/programmer/whatever that involves coding etc?
 
/8ball
 
@JennaSloan Yes definitely
 
lol
 
Zoe
@sockevalley I don't work as but I spend a lot of time programming :D
 
Alright maybe you should apply then? :D
 
Zoe
5:37 PM
If I only needed a job :>
 
o.O
student or rich indian?
 
Zoe
Student
Not even in a university yet
 
right!
 
5:57 PM
@geisterfurz007 Thanks! :D
 
posted on November 21, 2017 by CommitStrip

3
 
6:58 PM
wheezes
 
Zoe
sneezes
 
7:53 PM
How long do you think it'll take to iterate through 370099 different words and determine the part of speech for each word?
 
42 isn't an amount of time
 
Zoe
42 is the answer to everything
 
42 arbitrary time units
 
8:09 PM
Exactly!
 
Zoe
CORRECT!
 
42
 
Zoe
42?
42, 42!! 42 42
 
 
1 hour later…
9:18 PM
@Feeds Google was (and still is?) a large contributor to the Mozilla Foundation.
 
Zoe
^
 
I think Firefox is the only other cross-platform web browser. Opera recently switched to using Chrome's rendering engine, if I recall correctly.
 
 
2 hours later…
11:12 PM
clears throat
 
11:35 PM
@Pseudohuman temperature Valley City, North Dakota
 
@JennaSloan Failed to parse response
14 °F (wind chill: 1 °F)
(40 minutes ago)
 
@Pseudohuman convert 14 Fahrenheit to Celsius
 
@JennaSloan -10 °C (degrees Celsius)
 
Oh, so that's why my face is freezing off
@Pseudohuman temperature Singapore
 
77 °F
(39 minutes ago)
 
11:42 PM
@Tavo you should visit North Dakota and Canada sometime
Or you could go to the Mall of America instead of Canada
 

« first day (2586 days earlier)      last day (2358 days later) »