« first day (2767 days earlier)      last day (2157 days later) » 

12:00 AM
"Remove the temptation to settle for anything short of what you deserve." -Lorii Myers (source)
 
12:42 AM
morn
 
morn
 
1:00 AM
corn
 
 
3 hours later…
3:56 AM
@RAJESHKUMARARUMUGAM I am glad that worked.
 
 
1 hour later…
5:09 AM
morn
 
morn
 
 
2 hours later…
USM
6:41 AM
how to run only test cases in mvn clean install
 
Good morning
 
Good morning.
 
Hey @OakBot , dig this ƃuᴉuɹoɯ
 
@objectiveME Type /help to see all my commands.
 
ƃuᴉuɹoɯ
@OakBot You failed
;)
 
6:45 AM
morning
 
USM
/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.
 
Anyone who knows how i would take this and convert to json jsfiddle.net/3d8fv4Lz
It was stringfied result from SimpMessagingTemplate
/cat
 
USM
15 mins ago, by USM
how to run only test cases in mvn clean install
 
7:00 AM
@USM whats wrong with Dtest
get surefire and rock on
 
Zoe
7:18 AM
Morno
 
USM
7:31 AM
@objectiveME what is syntaz
 
@objectiveME My stupid approach would be replacing the = with : and () with {}.
About the quoting though... Too lazy to think about :D
 
@geisterfurz007 That would work but it can end up being complex and my data may change
 
Yeah true...
 
USM
8:42 AM
@objectiveME that doesnt say much abt running all test cases
 
9:10 AM
hello
 
G'day
 
Zoe
o/
 
\o
 
user8622974
\o
 
I want to use String method replaceAll("","") to replace all string special chars except intergers
how to accomplish that
 
Zoe
9:12 AM
[^0-9]
 
Zoe replaceAll("[^0-9]","") ?
 
also if you only want all special chars you might want to put in a-zA-Z in there as well
 
No I want integers only
 
Zoe
@Webdev Yeah
 
Couldn't you just use "[^\\d]" instead of "[^0-9]"?
 
Zoe
9:18 AM
That works too
 
Or "(?!\\d)."
 
The first works
 
Zoe
^\\d is shorter than ?!\\d though
 
another problem
I have to insert into decimal coulmn with jdbc but I get error com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect decimal value: '' for column 'price' at row 1
how to get rid from this character ''
 
If the string is empty, then 0?
 
9:26 AM
@JennaSloan well I am using jsoup if you have idea sometimes there is no attribute
EE.get(i).select("span.price").text().replaceAll("[^0-9]",""));
The attribute ("span.price") sometimes is not present
@Zoe what difference [^\\d]" vs "[^0-9]
 
Zoe
It's the same
\d is the regex keyword for numbers
 
ok
 
9:51 AM
How bad is the singleton injected from a dependency injector like Guice: github.com/google/guice/wiki/…. There's no static keyword, the injector is just returning the same instance.
 
10:51 AM
@2dsharp Perfectly fine
The key difference is that the "singleton-ness" of the object doesn't come from the fact that it has a private constructor and a static instance getter
It comes from being instantiated within a "framework" of sorts, which enforces on its own that you only have one instance of it.
 
I was wondering if there were any hidden bad smells in the likes of static getters in that.
 
@2dsharp Definitely are
Here's an example
static User fetchUserFromDb(int id) {
  // ...
}
Without reading the implementation itself (say it's an SDK and you only have the javadoc)
What does this static method need in order to get you a user from the database?
 
id?
 
@2dsharp Right
But the API lied to you, because this is the implementation
static User fetchUserFromDb(int id) {
  Database db = Database.getInstance(); // fails in runtime if your app isn't configured properly

  return db.fetchFrom('users').where('id', id);
}
While it needs an ID, which you pass
It also needs a Database instance
Which it will get with the static getter, but fail at runtime if you aren't configured properly and this is the first time you invoke the getter.
As opposed to
static User fetchUserFromDb(Database db, int id) {
  // ...
}
Now there are no surprises, you literally can't call this function unless you already have a Database instance in your hand to pass to it.
 
@MadaraUchiha And I never knew that!
 
10:58 AM
These are the very basics of Dependency Injection, a fancy way of saying "pass whatever you need to the constructor/method that needs it" instead of relying on globals
There's a very good series of videos about the subject by Misko Harvey
 
Yes, I have been following his talks.
Which actually brought me to this question.
Because the Singleton which I started avoiding from about a year back, I felt a need for it, but not in the same way. I wanted the same instance to be injected by the injector.
And found out that Guice has a nice way of doing so, but wasn't sure if I was doing the right thing.
@MadaraUchiha I came to the question from here: youtube.com/watch?v=-FRm3VPhseI
 
Right
The main point he's putting across in that video is that there should be a separation between construction logic and business logic
The class that's responsible for Database manipulation and querying, shouldn't be responsible for building itself or enforcing its own Singleton-ness
 
And thank you for this very clean example. I finally got cleared of my doubts about Singletons and using DIs.
 
You're welcome :)
 
11:50 AM
posted on May 21, 2018

archive - contact - sexy exciting merchandise - search - about ← previousMay 21st, 2018nextMay 21st, 2018: GUESS WHAT I HAVE A NEW BOOK!! It's coming out this September and it's called HOW TO INVENT EVERYTHING and I really hope you like it! – Ryan

 
Several groups have called on organic food producers not to use nanotechnology, which is the process of manipulating matter at the atomic and molecular matter. Some nanotechnology already exists in organic products. For example, Nano Green Sciences sells a nano-pesticide they claim is "organic." Additionally, some personal care products that are promoted as being "organic" also already contain nanoparticles. (source)
 
USM
12:31 PM
0
Q: Rest API - Handle Special Characters in XML Request

USMSo I have exposed a Rest API where the Request Payload will be in application/xml. Sample Payload: <NAMES> <NAME ID="P2" DESCRIPTION="Johnson & Johnsons" /> </NAMES> Code: @PostMapping(value = "/UpdateSomeThings", consumes = { MediaType.APPLICATION_XML }) public ResponseEntity<SomeResponse...

Hey Guys Any Help?
 
 
1 hour later…
1:44 PM
morning
 
Morning.
 
user8622974
morning
 
Zoe
morning
 
morning
 
//morning
 
user8622974
1:51 PM
@SurajRao Maybe you should consider looking up the manual
 
Zoe
@Suraj you broke the train! :o
 
@USM Don't use the chat as question shortcut, please. If we want to answer questions on the main site, we will look for them on our own :)
 
@Zoe you didnt teach Alisha to greet :p
 
user8622974
\o
 
1:53 PM
\o
 
Zoe
@SurajRao Meh, my morning listener beats oaks, that's good enough for me ;p
 
Yo Zoe! Guess who was on a solo cross country flight today :)
 
Zoe
:o
Lucky you ^^
 
Oooooooh yeah :D
I also took zwo pictures I will post when I am back home
 
Zoe
@geisterfurz007 So we'll finally see the pictures? :o
 
2:29 PM
Thaaaat was the idea, yeah.
 
Dang it @gei!! Where are the pictures!!
 
Zoe
Dang it @mic!! They're on their way!!
 
Patience is a virtue.
> I will post when I am back home
 
3:09 PM
Images @Zoe
 
Zoe
@geisterfurz007 Dammit
 
Zoe
:o
@Michael ping
 
@Michael @ItachiUchiha @JennaSloan @Wietlol and no clue who else might be interested :)
7 hours out of the house for an hour of flying. Worth it :D
To be fair it wouldn't be that long on a normal weekday because the busses drive more frequently
 
3:32 PM
 
Zoe
lol
 
@geisterfurz007 I call 'shopped.
 
I call you shopped!
 
xD
 
Zoe
Oh? You can buy @Michael s now? :p
 
3:52 PM
Wow.. nice @geisterfurz007
 
Just ask at your local grocery store. If they don't have one there, they will be happy to order one for you @Zoe
 
Zoe
lol
 
Yeah that won't work
 
wrong room
 
Zoe
lmfao
 
3:56 PM
What is it with xkcd and all the "lol I'm old" strips?
 
Zoe
Because that's what they're thinking? /shrug
 
They are there to make you say "lol I'm old" so everybody can quote you on that :)
 
4:31 PM
@gei So, do you have an official license now or anything?
 
By far not, no. But the training includes at least 10 hours of flying without instructor and today was my first time flying solo outside of my home airport ^^ @Michael
 
Nice!
 
Oh yeah :) The feeling when you are out of the control zone and can do essentially anything you want up there is amazing
 
4:58 PM
@geisterfurz007 Cool pictures!
 
 
3 hours later…
8:06 PM
@wonderb0lt uhm... im not sure how to describe this BoI run
I have free items from shop
and now i also have Never Ending Stores
 
 
2 hours later…
Zoe
9:44 PM
Heh, I can run my userscripts on my phone because Firefox supports tampermonkey
 
10:35 PM
Hola! :D
 
@NeoCortex 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
 
Colud someone help me with this question?
https://stackoverflow.com/questions/50455764/how-to-drag-slider-to-certain-string
 
11:15 PM
@NeoCortex I don't think anyone that visits here regularly knows about selenium
 

« first day (2767 days earlier)      last day (2157 days later) »