« first day (1642 days earlier)      last day (3299 days later) » 

12:11 AM
Anyone online?
 
12:42 AM
anyone online?
 
hello, anyone here?
 
1:19 AM
God how in the world can anyone do any of the stuff in svg?
 
1:50 AM
If anyone can explain to me how the hell you can go about creating this monstrosity  <shape>
            <javafx.scene.shape.SVGPath content="
            M 367.50508377099305, 221.2203271312984 L  529.1999964115984, 212.74575099709477
            L 510.55592891635035, 199.18642918236895 L 367.50508377099305, 198.5084630916327
            L 345.81016886743174, 208.677954452677 L 368.52203290709747, 221.55931017666654
            L 509.53897978024594, 221.89829322203468 L 529.1999964115984, 212.74575099709477
It's like, I know what M and L do, but how the hell you come with those numbers manually? Do you just sit and type away until you get the shape that you want through trial and error?
 
2:06 AM
If i have an arraylist of objects that represent songs, how do i sort it by three properties? The fields in the Song class are title, composer and length. I want to sort the array list by greatest length, and for objects of the same length, by lexicographic order of title, and then composer
I know how to sort by one property using a custom comparator but unsure how to implement this with multiple sorting levels
 
2:37 AM
Morning all
 
2:59 AM
Anyone here?
 
3:17 AM
hello
 
@LuisAverhoff You can probably generate it with a script.
 
@Unihedro can you elaborate a little further?
@Unihedro it seemed a little unnecessary that I had to do that in order to get the shape that I wanted but whatever I guess.
@Unihedro I initially was doing it manually and was able to draw a rectangle but I couldn't get diamond edges around the rectangle. Too complicated for me at my level at the moment.
 
3:33 AM
Meh, SVG.
 
@Unihedro yes meh to that
@Unihedro or bump that
@Unihedro whichever comes first
I'm just looking at those numbers and thinking "yeah no"
 
Hello, I wanted to drop in and see if anybody here might have experience with RoboVM -- trying to test out a javaFX program on my iOS device.
 
all the examples are there, you can't possibly need more
wait wrong link
 
Thank you. Can I ask you something real quick so I don't go on a wild goose chase..
I want to stream data from the serial port (arduino) which is connected to my mac atm, eventually want to go wireless...
and display the data on charts. I've already created the program and it works, but I'd like to use it on my phone.
Thank you for the links, btw.
 
4:04 AM
"If I delete the '<>' then I get many errors at compile time." - what other errors? Because deleting the <> is the correct thing to do. Most likely, you have a program completely full of errors, but putting in this one error hides the rest of them. — user2357112 25 mins ago
 
\o/
sucks that you just got here and I have to go to sleep in about 10 minutes.
 
@LuisAverhoff there is a problem with your SVG path
 
most probably
I haven't tried it yet :P
 
4:17 AM
Well I have and I got the shape that I wanted
so it's all good
I'm assuming you read all the stuff I said about my svg path?
 
alright :D
Not that far
 
too many freaking numbers
Looks like something someone would get if they were just typing randomly.
The shape that I was doing wasn't even that complicated(It was a rectangle with diamond edges) and this is what I got. Madness I say.
 
wow
Why do you want a SVG path?
Why not just use an image?
and a fixed window size
That would be an easier way unless you want a completely auto sizable component
 
4:35 AM
Well jewelsea recommended that I use svg. I initially wanted the image to superimposed the button and make it look like the image was the button but I could never make the image cover the rectangle properly. Plus it was rectangle with diamond edges superimposing on a normal rectangle.
 
Ahh, now I get the problem. The problem would have arise when you wanted to color the interior of the rectangle while hovering up or while you need to show the correct answer :)
 
yes something to that extent. The svg may be a mess(no it is a mess), but it is a solution my friend.
 
I have used SVG's in the past. It is a mess until you get a hold of it.
 
Though I'm not sure how much of a hit I'm going to take in the performance department.
Because I have to do it for 3 more buttons
One my friends is probably going to look at this and say "WTF is this bro!!!"
 
haha
nope SVG is not a performance killer
it probably takes more time to load an image than to draw a SVG
 
4:44 AM
To me, that svg path is the equivalent of coding in binary
And I'm not sure if I rather do binary or svg
 
Do you understand SVG?
 
yes to a basic level
I started today
 
good, get a grab of how it works before you make it work ;)
 
I know what M mean what L means, what A means etc etc
now if you bring in cubic functions with Arcs all around it and expect me to draw it with my mind. It's going to look like a freaking mess.
01010111 01101000 01111001 00100000 01100100 01101001 01100100 00100000 01111001 01101111 01110101 00100000 01100010 01101111 01110100 01101000 01100101 01110010 00100000 01101100 01101111 01101111 01101011 01101001 01101110 01100111 00100000 01110100 01101000 01101001 01110011 00100000 01110101 01110000 00111111
 
4:56 AM
Figure it out ;)
I have an idea
MAke a program to translate it.
 
I censored it ;)
 
I am genius.
 
@ItachiUchiha XD
 
@Gemtastic check the history :P
 
@ItachiUchiha Hmm?
 
4:59 AM
@ItachiUchiha you don't speak binary?
 
3 mins ago, by ItachiUchiha
I censored it ;)
 
Good Morning Everybody !
 
@LuisAverhoff I don't and I am very thankful to new age developers for that :P
 
I just thought the picture was funny. And to me it looks like it's related to the binary :P
 
@ItachiUchiha that's ok, I'll have bender translate for you. Ahem "Bender get over here"
 
5:02 AM
^^ My earth day quiz result
 
@ItachiUchiha hey man I have task for you and it is to build skynet.
@ItachiUchiha in Cobol
@ItachiUchiha on Notepad
 
@Gemtastic Can I kick someone's ass in here?
The kid in here is asking for it..
Just kidding @LuisAverhoff :P
 
First you must code a program in binary, then you have my permission to die. I mean kick butt ;P
 
@ItachiUchiha i've had enough when i first went to some chatrooms :P
 
5:07 AM
@Gemtastic why meeeeeeeeeeeee
@JudeNiroshan Aww, nobody will kick you :P
 
Because binary seems to be the Bane of your existence ;P
 
@ItachiUchiha and that how i learned to keep low profile
 
@jude explain low profile
 
lolz
 
5:12 AM
from the google quiz haha
Apparently I can bend my body into a ball and thus thwart my predators. that's great
Going to need to try that some time. Hope I don't break my spine.
 
I won't like the sound of it
 
It's ok I have done years of yoga
What I'm more worried about is people mistaking me for a soccer ball or basketball. Because that is going to get messy.
 
haha, think of all the people in Java room playing soccer with you :P
 
Yeah I hope you guys don't play rough with my face.
Don't worry when it comes to that type of situation, I'll just turn into luffy and get the heck out of there.
Or maybe mr fantastic.
Both should get the job done
 
5:31 AM
Hi all
 
\o/\o/\o/
 
I need help to solve bonus question .. The question is about TCP-based Distributed Applications
^___^
 
@ItachiUchiha I'll be seeing you later. I'm MEAN LATER LATER oops left the cap lock on.
 
5:39 AM
@LuisAverhoff l8r
 
I have written the code for the server and client.. and they are communicating with each other.. the client send a request and the server replies. Now I want to implement a backup server, I started to write the code for the backup server.. for now the backup server has the ip addresses and the port numbers for all clients connected to the main server ... but I dont know how to implement this part... when the main server fails the backup server will take on and continue serving the
client in a transparent way. The backup should detect that the main server is down and then uses
Can anyone explain to me how do that?
Thank you in advance
 
6:05 AM
Morning!
 
hi, morning
 
Morning!
 
@Appu hi. i just started to learn regex.
Not matching
Regex: [ert] checked String: 1e
regex doesn't check for the given match anywhere in the string?
 
fge
It does match; but let me guess: you use String's .matches()
If so, this is unfortunately expected: this method is misnamed
 
this is my condition
if(str.matches(regex)){
 
fge
6:10 AM
You have to use a Pattern and a Matcher, then .find(): Pattern.compile('[ert]").matcher("1e").find()
Yes, here is your problem
.matches() is misnamed
It tries and matches the whole input
 
@fge thanx a lot ^_^
boolean java.lang.String.matches(String regex)


Tells whether or not this string matches the given regular expression.
An invocation of this method of the form str.matches(regex) yields exactly the same result as the
expression java.util.regex.Pattern.matches(regex, str)
 
This REgex reg.*? matches only Reg on this string "regabcdefregregasdfghjreg"
but this .?*reg matches everything on the same string "regabcdefregregasdfghjreg"
Why is that so ?
 
6:34 AM
@fge still struggling with the java.lang to php port. now i'm trying to design the exception hierarchy but i'm having really bad times :P
i don't know what i'm doing anymore
 
Anyone here familiar with jsoup? I want to know how to pass post login data this url: internetvas.slt.lk/SLTVasPortal-war/application/…
 
fge
PHP? twitch
 
ya :D
 
fge
Poor you
 
Hellooo
 
fge
6:41 AM
Hello @Mr.777
 
@fge php is getting surprisingly cool. i've considered switching to another lang but atm it's not worth it
 
php and cool? :O
 
huh? makes me disappointing
 
6:56 AM
):
 
@Worf The only advantage about PHP is that it pays
But then again, so do Java and JavaScript.
 
@fge Pattern.compile("^[\\d+]$").matcher("234jggw34").find() >>>> returns false
I want to check whether the string is starting with a digit AND ends with a digit
 
@JudeNiroshan ^\d.+\d$
 
@SecondRikudo thank you
 
hello everyone i am trying to display highscores like this?
, but it is not working is there another way to do this?
myText.setText("HighScores: " + DrawingView.savedScore);
its done in the TextView object.
TextView myText = new TextView();
 
7:10 AM
May be a Toast? @Paul
 
Thats a good alternative, but not the look im going for
keep in mind this isn't a View class
 
@PaulTrueman Not sure the other solutions
 
well darn
 
@PaulTrueman What do you mean it's not working?
So, the point is you are getting the final scores in non-view class, right? And you want to display them in view?
 
7:27 AM
@JudeNiroshan also you might want to check capture groups, depending on what exactly you need
 
@Vogel612 what are capture groups ?
 
if you want to get the digits starting the string for example, you'd do the following:
Matcher m = Pattern.compile("^(\\d+).*?\\d$").matcher("234jggw34");
if (m.find()) {
     String startingDigits = m.group();
}
() denotes a capturing group in a regex
it's also possible to create non-capturing groups, to simplify extracting only what you want, but in essence you can repeat a capturing group
and after you made your matcher find, you can access the groups.
group(0) is the full match
group(1) is the first capturing group that was found in the regex, and so on
 
@Vogel612 simple example would be much appreciated for group(1) is found but full regex is not matching.
 
meh.. I forgot to quantify the last digits
add a + before the $
 
7:34 AM
no wait..
that doesn't make sense
 
2 mins ago, by Vogel612
group(1) is the first capturing group that was found in the regex, and so on
does this mean, we can get to know whether the part of our regex is matched?
 
yes exactly...
 
simple example please?
 
holy crap... this site is awesome for regex beginners like me :D
 
7:38 AM
yes it damn sure is
it's a little bit easier to match for the engine if you remove the question mark. can you tell me why?
(well I know, but ;))
 
i haven't use as SecondRikudo suggested . instead of .*? he gave to use .+
. represent world of characters
+ Occurs one or more times
 
8:02 AM
I see you have a regex problem
 
@Gemtastic am now
 
php and cool in the same line? Am I in the wrong world??
 
@Unihedro no, Worf is. The USS Enterprise only runs on PHP, though..
 
:D
 
oh yes. I did get git into my SVN workspace now
and since we're about to branch out a new version I have 5 branches already
because 3 different tickets, one for the original version and one to clarify where exactly the new version is going to happen
 
8:19 AM
java morning
 
morning @fahdijbeli
@JudeNiroshan yes, but why does .* require less attempts than .*? ?
for the link I sent you it's a difference of 20 matching steps!
 
@Vogel612 sorry. i haven't learned up to that level. i don't understand what you are talking about :(
 
you got the link open?
 
check the upper right in the middle section
there's a green field saying: "3 matches - 50 steps"
now get to the regex field and remove the question mark
 
8:24 AM
yeap
 
it goes down to "3 matches - 30 steps"
 
it becomes 30
 
exactly
 
exactly
what does that mean?
 
regex matching is a very iterative process
 
8:25 AM
what do they meant by steps ? combinations ?what i learned in mathematics ?
 
yawns
 
no.
a regex is matched step by step
look at the explain window. What is the difference between the regex with ? and the one without
 
5
A: Regular expression in regards to question mark "lazy" mode

UnihedroWhat's "lazy" (reluctant) matching? When matching with regex, the pointer is greedy by default: Left | Right \d+ 12345 ^ ^ \d+ 12345 ^ ^^^^^ Matched! Lazy is the opposite of greedy: Left | Right \d+? 12345 ^ ^ \d+? 12345 ^^ ^ 12345 ^ 12345...

^ what the ? construct does with regards to modifying the quantifier, all you need to know in 5 minutes :P
 
Did I already mention I love that site?
 
^ regex101 is one of the sites I'm most commonly on
 
8:33 AM
@Vogel612 .* Quantifier: ? Between zero and one time, as many times as possible, giving back as needed

.*? *? Between zero and unlimited times, as few times as possible, expanding as needed
 
@JudeNiroshan exactly.
 
can u please explain it in simple english. My understanding in english is not very fluent
 
now why does it take more steps to expand from as few times as possbile in comparison to as many times as possible, shrinking as needed?
lol already had that one dv'd
 
@JudeNiroshan Given abcdef
a?b will match ab
\w* will match abcdef
 
8:35 AM
@MadaraUchiha you changed your name?
 
\w*? will match empty string
 
:O
 
and you don't have JS mentioned in your about me section :P
 
@ItachiUchiha actually, it does :p
 
fge
@MadaraUchiha uhm no
 
8:38 AM
@fge uhm yes
 
@MadaraUchiha \w* will match empty string?
 
fge
No
 
@JudeNiroshan no
 
fge
There is no element after \w*? which the regex has to give to
 
@fge Yes
 
8:39 AM
@Unihedro he just edited it
 
fge
Therefore the whole input is matched
 
@fge incorrect
 
@fge \w*? means zero or more word characters, lazily, which is always 0
 
@fge Not in Java
This is true only for Perl 5.12.
 
@MadaraUchiha unless of course you require something after it
 
8:39 AM
> "abcdef".match(/\w*?/)
[ '', index: 0, input: 'abcdef' ]
 
^ this is how it works in PHP implementation, Java since 1.5 and JS
 
@Vogel612 Yes
 
\w*?f would be a different story
 
\w*?c will match abc
 
or ^\w*?$ (which is somewhat inane)
 
8:40 AM
In abccccccccc \w*?c will match abc and \w*c will match the whole string.
 
yee
 
@JudeNiroshan that's the difference between lazy and greedy ^
 
@MadaraUchiha and that's the simplest answer (Y)
 
and if you anchor it, both will match the whole string, but the lazy one will need longer
 
@Vogel612 Funny how it's the lazy that works the hardest :D
2
 
8:41 AM
because it goes "abc" -> am I finished yet? -> "abcc" -> am I finished yet? -> "abccc" -> .....
 
!!>"hello\nworld".match(/^[^]+$/m)
 
@Unihedro ["hello\nworld"]
 
!!>"hello\nworld".match(/^[^]+?$/m)
 
@Unihedro ["hello"]
 
^ see
 
8:42 AM
aight stop wait what??
~confused
 
in /m, ^ is start of line, $ is end of line
 
and the m signifies multiline....
okay now I got it I think
 
We have an \n, so we have two end of lines: pre-\n and \G
 
@Vogel612 Yes, even in multiline . doesn't match the newline character
[^] does.
 
You can use /s to make . match \n
But many flags = bad
 
8:44 AM
!!> "hello\r\nworld".match(/^[^]+?$/m);
 
@Vogel612 ["hello"]
 
that's less of a surprise
 
To debug a regex in JS, use an impure function for replace
 
well I'll get back to really working now, not just pretending ;9
 
TIL you can multi-custor copy/paste in intellij
Extremely cool
@Unihedro you should unpin that
 
8:48 AM
@MadaraUchiha
@MadaraUchiha I prefer calling it hypertyping, but it's officially named multitype assist :p
 
Hello
 
Hiya
 
Oh god lol
I knew Java had some bad spots but man
@fge a riddle for you
TreeSet<URL> set = getURLSet();
What's the complexity of sorting that set?
 
fge
Uhm
I know that URL tries and resolves the hostname in .equals(), now I don't know for .compareTo()
But basically you should use URI
But URL doesn't implement Comparable, so does this mean you have a custom comparator?
 
@fge that blew my mind
It literally means you'll get a different result when the machine has network connection and when it doesn't
That feeling of merging two months' worth of work into master <3
 
9:04 AM
where is facebook hehe
 
There ==>
 
fge
9:17 AM
@MadaraUchiha yep, which is why you should always use URI ;)
 
9:32 AM
how do i create a file called hello.txt and output the first three env variables from a list of all of them sorted alphabetically
in terminal
 
fge
@lovetolearn env | sort | head -3 >hello.txt
 
thanks
 
o_O
 
sysadmin strikes again
 
sysadmin powa
 
9:44 AM
@fg
@fge i have been going over commands all day, is there a command i can use to outout all the commands in my history in to that file
 
fge
If you use bash this is in .bash_history, but you can use the builtin history command
 
history > file.txt
 
.bash_history > file.txt
 
cat .bash_history
^ the correct way to open a file
 
going to test it on virtual box
 
9:49 AM
You using solaris?
 
neither of them work on my widows emulator
 
Windows in 2015?
 
haha
i know
its fucked up, i cant run a single command without getting an error
 
fge
At the very least, install cygwin
 
^^^
burn a boot drive
 
9:50 AM
do i have a virtual box running ubuntu
but its so slow that it kills me
 

« first day (1642 days earlier)      last day (3299 days later) »