« first day (1639 days earlier)      last day (3288 days later) » 
00:00 - 16:0016:00 - 00:00

12:03 AM
BRB
 
 
1 hour later…
1:26 AM
@Unihedro regarding my post about my school's internet not being able to handle a large load, I know its bandwidth, I had a discussion with my principal when he was visting classes talking about Bring Your Own Device intiative and I specifically asked if they were going to improve bandwidth
regarding my lack of knowledge of networks
I am at a school that has tech employees who know how the network works, they can explain or help me with whatever I need for the program in regard to networks. Thats why I said it isnt imperivative for me to know networks, because I have people that can teach me. So, I can approach the situation without any knowledge
and when you were saying that developed software does not change bandwidth issues, Microsoft Word is installed on all school computers. If all computers were to open Word at or about the same time, would that screw up the bandwidth/internet/computer speed? I actually dont know the answer so feel free to answer. I assume the answer is "No", which is why I thought to develop this hour of code program and install it on all computers, that way speeds and internet would not be affected.
 
1:49 AM
I won't reject what you said in the first and second paragraphs as long as you feel you're doing the right thing, because you're determined and and that's what it takes to learn, by doing.
I'm just going to sum it up with that I'm all for people pushing their limits, but when they have no idea how to go about it or doesn't have the common knowledge in the field to rely on their limited set of common sense, it's lottery.
Though, screwing up is a great way to learn too. Have fun.
^ @JohnnyCoder
 
2:06 AM
Pleh... releasing your app isn't going as smooth as people made it seem :/
 
What's wrong?
 
"This project doesn't contain any App Engine modules"
I have no idea why it's saying that
 
Me neither. Is it with the IDE?
 
yes
Android Studio
 
Try adding the Android module.
 
2:10 AM
How do I do that?
 
I don't have it open, but it might be in File > Project / Structure Settings > Modules
 
well, my app is in there
 
@Mr.777 ... No caption? Can you explain the joke to me? :P
 
Software Engineer and a Beggar :D
 
2:16 AM
The people who leave comments on Facebook must be really stupid.
@Mr.777 Continue?
 
@Unihedro You have the caption now
 
...
That's nowhere near a proper joke, I blocked the page.
 
wait, what?
 
:D
 
It cost $25 to REGISTER on google play
 
2:20 AM
Are you trying to publish an app?
 
Yes
I don't get it
It confirms what I just said
It costs money to publish apps :/
 
Yeah, it does, but actually it takes money to register rather than to publish.
Still better than Apple though, where the fee is recurring.
 
If it costs money to register, it costs money to publish too, because you can't publish without registering :/
Useless
I just bought a frikkin' phone, I don't have another $25 dollars :(
 
inb4 google sucks
 
inb4 sucky education demanding we know how to publish apps to pass the course
 
2:28 AM
@Gemtastic I am also going to open account today in Google play for 25$
 
I'm not opening an account. This will probably be the only app I publish >:C
 
lolz
25$ is one time only
unlike Apsstore 99 dollars a year
 
Try the Amazon Apps Store then, I think they're free.
 
@deadlydragon00 I still don't have that money now
And as I said, I probably won't publish another app
 
2:32 AM
I will try amazon also :)
 
attempting it
 
After my first release, I will do a simple open source that counts how many times my apps is installed, used and uninstall for statistical computation of my CPM CPR etc
 
2:49 AM
That was a nice sleep
After months I have slept for 10 hrs in a stretch
I am so relieved
 
@ItachiUchiha hey itachi
 
Heya
 
2:56 AM
:]
 
3:13 AM
@ItachiUchiha Hey itachi, I'm at the point in my project where I now have to create a set of 15 questions and answers. Do you think a hashmap would a be good idea in that situation? I thinking it's a good idea because each key and value are directly associated with one another and unique and make it easier to delete the contents inside the hashmap once I'm done with a question.
 
It sounds doable. you can also create a List<Myobject> where MyObject has two fields - question & answer.
 
@ItachiUchiha Ok more question(This actually a three part question). How well are you familiar with the show who wants to be a millionaire?
 
I am quite familiar.
 
@ItachiUchiha Then I'm sure you know of the money ladder in the show right?
 
yes I am
It goes from $100 to $1000000
 
3:22 AM
@ItachiUchiha ok know here is the real question
I'm thinking of using a rectangle to highlight each part of the money ladder and putting it in a gridpane.
as the user gets each answer correct, I will increment the column index by 1. Would that be a good way to do it?
Actually I meant to say that I'm going to use only one rectangle to highlight the current position in the money ladder.
 
@LuisAverhoff Why not just chang the color of current money user is playing for?
 
^^ That
 
I'm just trying to keep it similar to the game.
if possible
 
Considering you are looking something similar to this
 
yes
^^
 
3:28 AM
I would advice you to go with a listview, with each of the cell containing an hbox
Inside the hbox you can have the serial no, circle and the price
 
Should I use a borderpane to layout every thing?
The money ladder, lifelines, etc
the money ladder could go on the right side.
the questions and answers could go to the bottom
the lifelines go to the right side
and the logo of the show to the top
 
yes you can
 
Seems simple enough
I meant life side
for the lifelines
^^
But for the money ladder you're saying I should use a listview? I've never heard of that. How does that layout work?
if it's a layout pane at all.
 
=javadoc ListView
 
Which one do you mean? (type the number)
1. javafx.scene.control.ListView
2. javax.swing.text.html.ListView
 
3:35 AM
1
 
@ItachiUchiha javafx.scene.control.ListView: A ListView displays a horizontal or vertical list of items from which the user may select, or with which the user may interact. A ListView is able to have its generic type set to represent the type of data in the backing model. Doing this has the benefit of making various methods in the ListView, as well as the supporting classes ...
(mentioned below), type-safe. In addition, making use of the generic supports substantially simplifies development of applications making use of ListView, as all modern IDEs are able to auto-complete far more successfully with the additional type information. (1/25)
 
alright thanks
Now i think this is the final question
The last thing I want to do is to add the 30 seconds timer.
That shouldn't be hard but what I also want to do is to add the animation of the progress bar going down.
 
That's not a question.
 
I know let me rephrase that.
How would i add a circle progress bar that would go down as the timer counts down?
you know the circle that you see at the center of the four question.
it has a timer with a orange progress bar shrinking as the timer goes down.
 
you need a Progress Indicator
=javadoc ProgressIndicator
 
3:43 AM
@ItachiUchiha javafx.scene.control.ProgressIndicator: A circular control which is used for indicating progress, either infinite (aka indeterminate) or finite. Often used with the Task API for representing progress of background Tasks. (1/7)
 
Ok how do you think I will be able to sync the progress bar with the timer?
 
Define a Task to do it
@deadlydragon00 ??
 
Sleepy afternoon
 
Alright I think that's about enough
 
3:46 AM
@deadlydragon00 wanna dance?
 
I'll see how much I get done tomorrow.
 
plays hip hop music
 
-_- dancing while sleeping
 
@LuisAverhoff In case you get stuck just come back or ask a question on SO :D
 
I know
 
3:47 AM
and 20bucks
 
I'll do with 15.
 
Tomorrow I'm just going to try and finish the design layout and then implement all the logic that is left to implement.
 
lolz
World with competition.He pays me 100 I do everything :P
 
@ItachiUchiha Anything? I'll pay you a hundred bucks if you drink a gallon of bleach.
 
I didn't say anything. I said everything i.e. everything in his project ;)
 
 
1 hour later…
5:08 AM
Goodnight everyone oh and praise the sun \o/
 
5:35 AM
@LuisAverhoff So when the night covered him [with darkness], he saw a star. He said, "This is my lord." But when it set, he said, "I like not those that disappear."
@LuisAverhoff And when he saw the moon rising, he said, "This is my lord." But when it set, he said, "Unless my Lord guides me, I will surely be among the people gone astray
@LuisAverhoff And when he saw the sun rising, he said, "This is my lord; this is greater." But when it set, he said, "O my people, indeed I am free from what you associate with Allah .
 
 
3 hours later…
fge
8:44 AM
Moo
 
Guys
Is it acceptable for ThreadLocal to be not static if I'm guaranteed to only have one instance of the object?
 
Eh, in that case do you really need a threadlocal?
 
@Unihedro Yes, because that same object will be used across threads
 
... With the remark that each thread gets its unique stack
 
I know very little about this subject, can you elaborate some more please?
 
9:03 AM
Moment!
 
@Unihedro I am not sure whether you should put up a 5 months inactive project on your cv ;)
@SecondRikudo if you're guaranteed to have only one instance, what is the problem with making it static?
 
user image
2
Each thread has a thread stack and a call stack. Threads attain values on the call site and can share references to the same object in the heap, as long as the object isn't manipulated with asynchronously.
So if the object is shared across threads anyway, you shouldn't have to worry about attaining ThreadLocal<> references - instead make asynchronously invoked methods in <> synchronized.
For example, StringBuffer has its methods synchronized.
=javadoc StringBuffer#append
 
Which one do you mean? (type the number)
1. java.lang.StringBuffer#append(Object)
2. java.lang.StringBuffer#append(String)
3. java.lang.StringBuffer#append(StringBuffer)
4. java.lang.StringBuffer#append(CharSequence)
5. java.lang.StringBuffer#append(CharSequence, int, int)
6. java.lang.StringBuffer#append(char[])
7. java.lang.StringBuffer#append(char[], int, int)
8. java.lang.StringBuffer#append(boolean)
9. java.lang.StringBuffer#append(char)
10. java.lang.StringBuffer#append(int)
11. java.lang.StringBuffer#append(long)
12. java.lang.StringBuffer#append(float)
13. java.lang.StringBuffer#append(double)
 
1
 
@Unihedro StringBuffer append(Object obj): Appends the string representation of the Object argument. (1/2)
 
fge
9:14 AM
@SecondRikudo but is this object thread safe?
 
Hey guys, can anyone please take a look at my question: stackoverflow.com/questions/29705616/…
Need help with it badly. Thanks!
 
ask several questions: 1. what if port+5 occupied by another application? 2. what if user behind proxy/nat/firewall which does not allow incoming connections? — Lashane yesterday
 
@Unihedro I'm pretty sure it isn't. The other user i tested this with had that port forwarded.
 
9:29 AM
@JoelSeah The question was "what if" as in how your application handles it.
 
So i must check that port before attempting connection with another user?
 
10:06 AM
@fge To be fair, I don't really know what thread safe means. But I'm going to guess "No".
 
fge
10:35 AM
@SecondRikudo basically it means that any thread manipulating the object have a consistent view of its mutable state, if any, and that all critical code sections are protected by some locking mechanism (the most coarse of it being that the method itself is synchronized)
 
@fge I don't think I have that.
I have a styleConfStmt object and this is the method
    private ResultSet getStyleConfiguration(Publisher publisher, ClientPropertiesVersion version) throws SQLException {
        styleConfStmt.setString(1, version.getVersionName());
        styleConfStmt.setString(2, publisher.getName());

        return styleConfStmt.executeQuery();
    }
 
@Unihedro Nice thread illustration
 
thanks :)
I saw it before, so I went to look it up
Whoa, how did that get two stars?
 
fge
@SecondRikudo yup, that's not thread safe
Except if styleConfStmt is an instance variable
 
Really I need to it in next phase of my software
brb
 
10:42 AM
@fge It is
 
chat user contributions are cc-by-sa 3.0 ;)
 
@fge How do I make it thread safe?
I'm going to extract that part out into an interface (so that I can replace it with a better implementation that fits our framework more in the future)
 
@SecondRikudo Make sure asynchronous calls are threadsafe by making invocations synchronous, or all relevant variables atomic.
 
@Unihedro Java has asynchronous calls? :o
 
@SecondRikudo executor.run(() -> a.doNotThreadsafeFunction()); executor.run(() -> a.doNotThreadsafeFunction());
 
10:53 AM
@Unihedro Java 6
 
The tutorial probably says better than I do :p
Use Locks, Concurrent Collections (threadsafe!) and Atomic Variables (minimized synchronization + memory consistency insurance).
 
Hello everyone. I've got a question, is it correct to instantiate mbeanserver on jetty through ServletContextListener and register my mbeans singletons through it? Because I see you can instantiate mbeanserver through the xml but there is no mention how to register custom mbeans.
 
=javadoc ResultSetMetaData#getCatalogName
 
@SecondRikudo String getCatalogName(int column): Gets the designated column's table's catalog name.
 
What's "catalog name"?
 
Anonymous
12:01 PM
anyone ?
 
@Joiner Anyone what?
I'm here!
 
Anonymous
in The SO Tavern (Free Snacks), 19 mins ago, by Joiner
destructive edit by owner http://stackoverflow.com/revisions/29725742/5
 
Kabam.
 
@Unihedro inb4 halp
 
3 messages moved to bin
 
12:04 PM
You kicked him?
 
Could I insert into numeric field using JDBC without preparedstatement?
 
Nah, I trashed the pings.
@JavaFan You can but you should do it the proper way.
 
okay
I tried but I failed
when the field is varchar I could insert into it
but when the field is numeric I couldn't
@Unihedro sure ?
 
fge
Why do you insert a number into a string anyway?
 
12:23 PM
@JavaFan If you try to insert a number with '5' into a numeric field, it's likely to fail, yes.
0
A: Merging branches on GitHub created on different locals

Second RikudoYou should first understand how branching is done in Git. Git doesn't really have a concept of branching like you might think of it. A Git "branch" is actually just a pointer to a commit. The "branch" you think about, is actually implemented by chaining the top commit (called the branch's HEAD, ...

 
I think that
 
I don't remember if we went over this in the git talk, but this is a nice practical example ^
 
but I tried to insert variables
they couldn't be inserted
into mysql numeric field
 
@JavaFan why are you trying to inject parameters into a non-parameterized query?
That's exactly what prepared statements are for...
 
what is the non-parameterize query?
 
12:27 PM
@JavaFan Non-prepared query
 
So I was false
I must use preparedStatement?
 
fge
Buidling SQL queries with parameters without using PreparedStatement is THE recipe for disaster
 
23 mins ago, by Unihedro
@JavaFan You can but you should do it the proper way.
"The Proper Way TM"
 
fge
(where "disaster" == "SQL injection")
 
@fge ===
 
12:29 PM
@SecondRikudo that what you meant?
 
fge
Also, well, using MySQL instead of a serious RDBMS is also a recipe for disaster
 
@JavaFan You technically can choose to not use prepared statements.
But you technically can also have all of your arguments of type Object and cast them at runtime.
And you can technically create and call all of your objects and methods with reflection.
It doesn't mean it's a good idea.
 
I failed to insert into numeric field
but I success with same field with same query when it converted to varchar
 
@JavaFan You haven't given us your table schema, or the query. So at this point we're just iterating how bad it is for you to not use prepared statements in this case.
 
	sql =" insert into data"+"(Type_ID,price,Img_Link,Site_Comment)"+"values"
	     		  + "('" + 1   + "','" +el.select("div.adv_side_price").text().replace("ريال", "")  +"','"+el.select("div[id=ads-pic-nav] a").select("img").attr("src")+ "','"
	     		    			     +el.select(".adv_content_details").select("span").text()+el.select(".adv_content_details").select("h2").text()+  "');";
 
12:38 PM
Morning, Java!
 
Morning!
(looks at clock, which says it's 8:39 pm)
 
My table CREATE TABLE Test.DATA
(
Prize Varchar(20) DEFAULT null,
Date_Addition Varchar(100) DEFAULT null,
Buy_Link Varchar(100) DEFAULT null,
Site_Stamp Varchar(100) DEFAULT null,
Waffer_Stamp Char(100) DEFAULT null,
Img_Link Varchar(100) NOT NULL DEFAULT null,
Type_ID Int NOT NULL,
Site_Comment Varchar(100) DEFAULT null);
 
fge
@JavaFan SQL injection galore
 
@Unihedro Wow, you are exactly 12 hours ahead of me. xD
 
fge
Use prepared statements
Also, date as a string? Null values everywhere?
not null default null?
...
 
12:41 PM
My be the problem here +el.select("div.adv_side_price").text().replace("ريال", "") +
do you agree with me?
 
fge
No, the problem is much more fundamental than that
Use, or learn to use, prepared statements
 
the previous statement dealt with as String!
 
@fge Which room do you want OakBot in?
 
Could it inserted as an int with preparedStatement?
 
@Michael read, like, four lines later?
 
12:50 PM
Ugh. You want me to read?
 
Just do it :|
 
Ah. Yeah, unless it has recently posted a message, its profile picture disappears from the sidebar.
Most likely because it doesn't use web sockets.
 
@JavaFan el.select("div.adv_side_price") is this user input?
 
it 's a variable
it 's final output like 27,000
@SecondRikudo Should PreparedStatement solves this problem?
 
1:05 PM
@Unihedro or @fge you guys know what "catalog name" refers to in ResultSetMetaData#getCatalogName?
I'm hoping it's the name of the column, but I honestly don't know.
 
I never used it, so I only know as much as the manual on this one.
... which = nope :(
 
fge
@SecondRikudo never used it either, but maybe the database schema when you have one?
 
Gotta love Javadoc...
 
1:24 PM
Hi guys
i'm getting this really pesky null pointer exception that I cant seem to get rid of
can someone help me in identifying where the problem might be?
else if (com[0].equals("String"){
if (com.length == 2){
folder.listfolder(allF, com[1], allC, fac);
....
}
the null pointer exception is thrown at this line:
folder.listfolder(allF, com[1], allC, fac);
 
@cp101020304 Sounds like either folder or com are null.
 
why is it throwing a null pointer exception when i'm checking if com.length is 2 though?
 
@cp101020304 Use a debugger and find out what folder is.
I bet you'll find that it's null.
 
if I have initialised it as follows:
Folder folder;
at the top of the class
does that mean its null?
 
@cp101020304 If you actually left it as Folder folder, then that is declaring it not initializing it.
@cp101020304 So I would assume that the one that is null is the folder.
 
1:34 PM
hmmm, I think that would be the case
however I have another question
the method im invoking on folder, "listFolder", it doesn't use the folder object at all, so is it okay to arbitrarily initialise the folder object as something random at the top of the class? so that it doesn't throw the null pointer exception?
 
@cp101020304 Print the stacktrace. They usually tell what part in the program to look at
Oh I forgot to say good morning
@cp101020304 If that's true, then what are you using the folder variable for, and what method is the folder variable in?
 
1:50 PM
@LuisAverhoff folder variable is used to store data from input, which the code is doing correctly. folder variable is declared as a global variable in the Main class
I think I have pinpointed where the problem lies
While I am reading input, I used to have a whole chunk of code which I have tried to clean up
 
@cp101020304 and all of this is in the same class?
 
I had something like this before:

else if (parts[0].equals("FOLDER")) {
folder = new Folder(parts[1], parts[2], parts[3]);

// chunk of code which processed folder objects

}
now I put that chunk of code into its own method and it looks like this
else if (parts[0].equals("FOLDER")) {
folder = new Folder(parts[1], parts[2], parts[3]);

processFolder(parts);

}
I placed print statements inside the method processFolder and outside, however nothing gets printed when I put it inside the method
@LuisAverhoff some of the methods i invoke are part of different classes
 
@LuisAverhoff Good morning!
 
@cp101020304 Sometimes that could be problem when you're sending an object from one class to another because in one instance the object in your current class could have the data and the obejct in the other class could be null. That might not be your problem, but it is a problem that I have dealt with before(a problem with object references)
@Unihedro you too
 
@LuisAverhoff yeah it was working perfectly before I tried cleaning up my code
i might just try and revert it
in exchange for a little messiness
 
2:00 PM
Hi
 
YES
 
@cp101020304 yes I would worry first in getting the program to work, then tidying it up and maybe even it make more efficient.
 
omg so elegant
I am the best train network builder
@fahdijbeli Hiya!
@HovercraftFullOfEels Hello!
 
private static Set<Map<String, Object>> resultSetToList(final ResultSet resultSet) throws SQLException {
    try {
        final ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
        Set<Map<String, Object>> result = new LinkedHashSet<Map<String, Object>>();
        while (resultSet.next()) {
            final Map<String, Object> row = new HashMap<String, Object>();
            for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {
                row.put(resultSetMetaData.getColumnName(i), resultSet.getObject(i));
WDYT? ^
 
2:04 PM
!!urban wdyt
 
@Unihedro WDYT Means, 'What Do You Think?'
 
resultSet.next() returns boolean?
 
@CapricaSix thanks for explain :)
 
You're welcome.
 
@Unihedro Yes
 
2:05 PM
Java 6 right?
 
Yup
Java 8 would have cut the number of LoC in this in half
If not more
 
Not bad!
 
Anything obvious I'm missing here?
 
ResultSet if finds a primitive type will convert it to its wrapper ?
 
@fahdijbeli With .getObject()? I don't think it can do anything else.
 
2:11 PM
resultSet.getObject(i);
@SecondRikudo yes
 
It can't convert to a primitive
Because Objects can't be cast to primitives
So it's either cast to the boxed wrapper, or remain an Object. Either is fine by me.
 
I know but I ask if your ResultSet contains that so
 
Oh
Yes, it does
booleans, numbers and strings
 
2:24 PM
hehehe @Michael is here :D
 
Hey there, @fahdijbeli :D
 
how are you?
 
2:53 PM
\o/
 
@fahdijbeli Not bad, you?
 
@Michael good thanks
@LuisAverhoff o/
 
3:35 PM
hi
@Unihedro what has happened to moderator election ?
 
@JudeNiroshan ?
 
i haven't seen your name in the final phase :(
 
I didn't make it into secondary. :p
 
what was the criteria to get into 2nd phase? only having more up votes ?
 
Yep
 
3:38 PM
don't worry... even for next time, you already got my vote :D
 
:D
See you next year then! ;)
 
i saw an interest guy there. 18 year android dev. guy from Indian
he was kind of outstanding ... he has already written some books too
 
But low moderation experience. :p
 
i don't know
@Unihedro did you changed the tags for chatroom? i see a different. i'm asking this i think you are governing this place
 
@JudeNiroshan @fge changed the room description. Upon discussion we cleaned up the tags as well.
I'm so tired -_-
Good night!
 
3:48 PM
k.. GN
 
Are CVS's off limits?
 
I dont know why I think always that's all people here are Hindi :/
 
@fahdijbeli Hindi?
 
@HovercraftFullOfEels What's CVS, OOP, and CVP?
 
3:57 PM
@Unihedro close vote please.
 
@Mr.777 Inde
 
Do post them; This room is not listened by the Low Quality Posts HQ so you won't get as much attention as contrary as posting them in the SO Tavern.

 Low Quality Posts HQ

Home of bots for catching low quality posts (and sometimes spa...
 
@Unihedro: regarding moderator elections, don't get discouraged. You're fairly new to the site.
 
@HovercraftFullOfEels Oh, I'm perfectly fine. I'm actually kinda glad that I didn't make it (t-shirt aside) since, as Benjamin mentioned in the comments, I'km probably really not ready.
 
And don't have nearly as many meta posts as some of the others. That will change with time.
 
3:59 PM
Think I'm going to build up to 20k rep and get a diamond on a beta site.
Yeah, that will be my resolutions until next year. :P
 
00:00 - 16:0016:00 - 00:00

« first day (1639 days earlier)      last day (3288 days later) »