« first day (1552 days earlier)      last day (3613 days later) » 
00:00 - 16:0016:00 - 00:00

00:01
gooooooooodmorning vietnam
00:12
@fge I wanna be as good a coder as you some day :) 23 now just finishing comp sci college, I know I'm not the best "software engineer" but I've definitely better than I was four years ago :)
Nyugh... I have a hard time figuring this for each loop in thymeleaf D; Where does it find the object?
fge
fge
@BrianJ who said I am good? :p
just my perception from when ever I asked you questions on here, are you working in industry or in college? Be great to ask a few questions. @fge
fge
fge
00:31
@BrianJ right now I'm unemployed and actively searching, and I have reasonably high hopes to receive a "yes" to employment very soon
Otherwise, I have 15 years experience as a systems engineer
00:58
Huh?
Ah
well, hello to you then. Welcome to the Java chat
fge
fge
01:30
Hehe
Even the author of lombok seems to get an interest in my debugger
I have no idea what lombok is
interesting
I know eclipse and other ides can get and set for you, but not at runtime
01:49
Well, neither am I (yet)
I'm trying to decode how thymeleaf works in spring with javaconfiguration by Looking at one person's project which looks nothing like mine, while I look at a produced thymeleaf project without spring project.
it's not going too well >_>
you probably need to edit the project settings
hmm
I don't use eclipse nor external setups so I'm afraid I can't help you :/
02:16
great :)
Spring?
yep
spring listening to an XMPP conference, which inserts it into a database and then spits it out onto a message queue
and then uses websockets to read it to a website
only taken me the better part of a week
02:50
Hiyo
Ita!
I've encountered a problem with thymeleaf I could need some help with. I need to setup the variables to use in the thymeleaf document like th:text="${Object}"
Do you know how to fix that?
03:22
You need the have the objects in the context to use them
You can send them to the view via the controller
Or load a resource during application start up
Could you show me some examples on how to do that?
puppydog eyes
03:35
I tried adding a @ModelAttribute to the returnmethod of the object. No success with that >_>
What is your method signature?
@ita I put it like this:
@ModelAttribute("categories")
    public List<String> getAllCategories(){
        return categories;
    }
It's a little bit hard to translate how you do it with thymeleaf without spring to with spring and java config D;
03:50
@Ita my bitbucket project is now up to date with what I've done.
04:30
Ok, back!
Wb ^^
@Gemtastic was afk
Yeah, I noticed :P
so you are sending back a List<String> named as categories
Yes, which is to be iterated through in a <li> tag in the html documents
04:35
<th:each>
If you look at index I tried this: <li class="" th:each="category : ${categories}" th:text="category"><a></a></li>
I don't know why it isn't working, but my guess was that thymeleaf doesn't find the categories list
<ul th:each="category : ${categories}">
      <li class="" th:text="${category}">Text</li>
</ul>
Can you try this?
<--- Noob when it comes to ThymeLeaf
trying
Nope, the code you suggested doesn't work :/
I edited it
Nope. Funny enugh, the UL doesn't even shoe up O.o
04:42
You need to first check if categories has data in it or not
It should
But how do I check?
Can you just try printing it?
<p th:text="${categories}">SomeText</p>
<p> appears, but nothing is being printed. Like I said, I think that it doesn't find the object categories
I suppose I'll just post a question >_>
I don't see your method returning categories in the controller
How is it suppose to look? model.addObject("categories")
04:53
@Controller
public class IndexController {

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ModelAndView index() {
        ModelAndView model = new ModelAndView();
        model.setViewName("index");

        return model;
    }
}
This is what your controller has..
Yes, but what is the return supposed to look like?
where is the List<String> ??
In ProductRepository
and how are you planning to get it to the controller and send it to the view, via the model
That's how I don't know how to do it
I tried typing this:
    @ModelAttribute("categories")
    public List<String> getAllCategories(){
        return categories;
    }
But it doesn't do anything either :/
05:00
You need to autowire the Repository to your controller (incase you don't have a service) and then use it to get the categories
I don't have a service, so how do I do that?
05:16
Hmm it seems I'm having a path problem to find the database file
Resource not found
this is what you have
+ there are multiple problem in your project structure
Alright, give me the dirt then :)
Hi everyone is there anything equavlance of java direct/unsafe/raw memory in C# ?
Dear friend, please explain about this error: imgur.com/lo6ndCP
for(Product p : products){
            products.add(p);
            if(!categories.contains(p.getCategory())){
                categories.add(p.getCategory());
            }
        }
05:24
at line11: <servlet-name>helloServlet</servlet-name>
will result in ConcurrentModificationException
Yes, I'm so stupid >_>
I am not sure why products.add(p);
@gem in index.html, where do you want to add the <ul> ?
@ItachiUchiha It's already in the code in the productMenu div
Even though I fixed the Concurrency error it still doesn't find my database.json file
@Gemtastic Fixed Everything! :D
05:32
Ooh! How?!
In index.html
<li class="" th:each="category : ${categories}" th:text="${category}"><a></a></li>
@Repository
public class ProductRepository {

    private List<Product> products;
    private final List<String> categories;

    private ProductRepository() throws IOException{
        this.products = new ArrayList<>();
        this.categories = new ArrayList<>();

        ObjectMapper mapper = new ObjectMapper();
        TypeReference<List<Product>> typeRef = new TypeReference<List<Product>>(){};
        InputStream in = getClass().getResourceAsStream("/JSON/database.json");
        if (in == null) {
This is your ProductRepository, I removed the unwanted singleton instance and added the @Repository on top
In IndexController
@Controller
public class IndexController {

	@Autowired
	private ProductRepository repository;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ModelAndView index() {
        ModelAndView model = new ModelAndView();
        model.setViewName("index");
        model.addObject("categories", repository.getAllCategories());
        return model;
    }
}
Just added the ProductRepository as a dependency and used it
brb
If you have questions, put it here
Does that serve the same way as if it were a singleton?
Hmm for some reason my server is borking now :/
hello can someone assist me on a java assignment i have?
05:47
did you make any other changes? @ita
Heya All xD
Hello
Community,
I use SQLite to store information in a local light-weight database. As my program becomes a little more complex I need to map Java objects to this database. What is the most commonly used ORM ?
fge
fge
06:03
Moo
I can't believe it took me all night to get those categories to print :')
I wonder, what Moo means? I thought it is something equivalent to "morning" ?
i have two delete transactions and but when I try to rollback it, the deleted data are not there. any idea why?
the code is like

designationDAO.deleteAllDesignation();
accessMatrixDAO.deleteAllAccessMatrix();
transaction.setRollbackOnly();

but when rollback is being processed no data was revived
06:14
@gem nope
I found the error anyway :P
Oh well
ahh! nice
Now I'm trying to add the properties files. Do I have to state them somewhere?
yes, inside src/main/resources
No I menat in the code, Where do I tell thymeleaf where the .properties files are?
06:28
You don't have to
Spring Loads them into the context
Hmm..
I get this: ??home.welcome_en_US?? as I have it now
I tried making a messageConfig like you did
Hi everyone...
can we edit the any xml configuration within the war file during runtime?
fge
fge
@PavanKumar no
@Gemtastic and?
@ItachiUchiha It won't display my message :(
06:35
@fge : any alternative for that???
please let me know..
Have I missed something?
what is the name of the property file?
messages.properties
I tried putting the properties file in the dame folder as the html file, and in the resources, but nope O.o
Works for me
Where did you put the files?
06:45
thought there is some encoding issue
UTF-8 shouldn't make it a ? on ä
inside resources
in a folder or just in resources?
Weird. It has to be in the default package?
How ugly
06:46
lolz
yeah it is :P
Oh well. It's working now at least. :)
do I make a new bean for every properties file?
And it looks exactly the same apart from the name of the properties file?
Good morning, Java!
07:01
@Gemtastic You can use the PropertyPlaceHolder as well
I hate that when you google everything it's in XML >_>
@Bean
public PropertyPlaceholderConfigurer propertyConfigurer() throws IOException {
    PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();
    props.setLocations(new Resource[] {new ClassPathResource("instance.properties")});
    return props;
}
thanks!
@Unihedro So, yeah: only one person in comments section asked about how would SE earn all that money...
fge
fge
07:28
Aaah, binary search
07:55
hi
@fge Hey, I like binary search!
fge
fge
Me too
It's one of the most simple, yet most efficient, search algorithms
The only algorithm which is more simple than that is linear search :p
:P
Linear search is so simple, practical and make-do that even if you don't know of a search algorithm, you can implement it.
fge
fge
08:18
* What went wrong:
Execution failed for task ':enforceVersion'.
> Wrong java version; required is 1.7, but found 1.8
I love that kind of things
Now I avoid building with the wrong versions
 
1 hour later…
09:40
@fge With 1.8 if you compile using compiler version 1.7, isn't it the same?
10:01
anybody there?
@Darshan Nope.
10:21
Anyone got advice on separating dev and production config files for deployment? Should I leave the config files out of the JARs and and just copy the production configs to the same folder? Or is there something a bit more "proper"
@bcoughlan fork for development environment?
[repo] <- prod
|
-> fork of repo <- dev
so have a branch with the production config files and merge the master into it before building?
@bcoughlan I personally keep forks of repositories. Branching is different from forking a repository.
fge
fge
@ItachiUchiha I don't want to take any undue risks ;)
@bcoughlan you can always keep your config files in a separate branch
@fge That leaves you with a complicated build script that requires you to switch between branches in automated fashion.
fge
fge
10:30
OK, second appointment for the job in 4 hours exactly
@Unihedro it's not that complicated
@fge GL HF
fge
fge
Well, at my old job config files were in a separate repository entirely
And the build script just git cloned them before making the jars
isn't it a bad idea to keep production settings (database passwords etc) in git?
fge
fge
(actually no; it fetched then did git archive to extract them)
@bcoughlan it certainly is
Which is why they should be in a separate branch which you do NOT push publicly
OK, off
See you
@fge That's what we do as well. We fork (duplicate and link) prod repositories onto dev repositories, but for the settings of the dev repositories we keep two origins. We have a branch "master-prod" that is the only thing we push to "origin-prod/master" ever,
Argh, grammar.
10:51
Thanks for the advice. One thing I plan to do is diff the dev/production properties when building so devs remember to add a new property to both configs. An alternative I'm thinking of is using maven profiles to copy config/ to JARs by default, and copy config_production/ to JARs when the production profile is enabled... then put config_production/ in .gitignore. Is there anything wrong with this approach? (Sorry I'm a deployment newbie and everyone seems to do it differently)
hello everyone
I am trying to run sonar in my maven eclipse projecr
and I am getting the following error :
Can not execute Sonar Embedded error: loader constraint violation: when resolving field "VISIBLE" the class loader (instance of org/sonar/runner/impl/IsolatedClassloader) of the referring class, org/apache/commons/io/filefilter/HiddenFileFilter, and the class loader (instance of org/codehaus/classworlds/RealmClassLoader) for the field's resolved type, org/apache/commons/io/filefilter/IOFileFilter, have different Class objects for that type"
how are you running it?
I have downloaded a sonar server
my sonar server is running in the following http//:localhost:9090
*following URL
11:01
hmm
I know how to run sonar on a maven project :P
I am trying to run it in a maven project
then run mvn sonar:sonar
in HTML / CSS / WebDesign, 27 secs ago, by Feeds
posted on January 22, 2015 by Remy Porter

There are a lot of different schools of thought on administering programming tests to new hires. On one hand, you’re hiring them to program, so it might be nice to see if they can actually do it. On the other hand, given the time constraints of most interviews , it’s nearly impossible to give them a meaningful test. From that conflict grows tests like FizzBuzz. Greg Q’

I know
I did it
but m getting that error
Which java version are you using?
and which maven version?
11:32
@ItachiUchiha Sonar, yay!
Let's see... Issues: 18,275. Only 18.3k, nice!
At the current rate we will fix it... someday! :P
11:47
Hai all, I want to record voice using media stream recording
the recording button will be a toggle button for both record and stop
catch u after bye guys
12:37
Hello can someone well experienced in java assist me on a assignment i have. It is confusing and I can't implement methods.
@Sephireth I'm not well experienced in Java nor do I have the time to invest over what I'm already doing.
@Sephireth Just ask, someone will try to assist :)
@Unihedro Don't be rude :P
@ItachiUchiha How is that rude? I expressed clearly that I didn't have the time. Harsh != Rude.
@Unihedro lol And you have the time to say that at least xD
@TheLittleNaruto It took me under 15 seconds, so yep. :p
12:45
haha, That I can see now :P
13:00
Its cool
You know, @TheLittleNaruto instead of commenting on my behaviour you could have helped the user :p
@Unihedro lol You could have said that before :D
Also, I cant assist anyone, if I dont know what the problem is specifically
My principle: If you don't know/don't want to help then stop spreading entropy
13:43
morning
@Gemtastic Heyo!
Today I got Uni sleep. Just a few hours >_>
Someone called and woke us up. Why can't people with normal day-rhythms just be at work, do their work and not bother us who are at home sleeping ;P
"Uni Sleep" <---- what a name :-P
For uni I suppose sleeping 4-5h is a good night's full sleep
13:50
Poor Uni.
Yes. You need more sleep
:looks around nervously:
how did I end up in the Java room?
I wish my parents were as lenient with me when I was 16
@rlemon Did you take a wrong turn around the for loop?
;P
@rlemon guess you skipped a stop
if( roomTitle.startsWith('Java') ) enter(); // I think I see the problem.
13:54
Java room helped find a bug Hell Yeah !!
@rlemon Hmm. And didn't JavaScript used to use tags ? :p
@Unihedro probably in jest
we like to joke around
Yes, I am aware. :P
Playful developers slacking off work!
not slacking off at all....
;)
I'm different because I'm a student. I don't have jobs to attend, and currently doesn't have a freelance project anywhere. :P
Also, kudos on having a big enough monitor to see the entire list of rooms I'm in, it's oversized for Sam and Fox :P
13:58
SO only occupies 1/6th of my screen real-estate
so there is that!
@rlemon is your CPU connected to a theatre screen? :P
@DroidDev 2*24" + 17" laptop
my work setup
so a theatre screen :)
I like my screens :)
lets see if I got a pic laying around..
14:01
I need more screens
I have two displays only.
if I could connect my laptop to my stationarry computer I would be soooo happy
One is a hovering monitor though. Even engineered it myself - am proud of it :)
only one, I never needed another
14:01
@rlemon :O
@rlemon that's humongous. Do you use binoculars to see data on farthest one? :P
I don't have enough screens for all windows I'm multitasking in >_<
@DroidDev the little one in the top left is just a 16" monitor
it isn't actually far away
perspective; messing with you since always
and the blue light you see casting on the desk is an underlight I added to my keyboard riser
Pimped My Desk ™
14:04
@rlemon Which keyboard do you use?
right now a POS generic one
my other one lost to a rage-quit
@rlemon Well, I suppose your workstation is your ride in life ;P
Guess you are a freelancer
14:05
@OlegKuznetsov at home I use the mx550, and for work I'm just torn on what customizations to put on it wasdkeyboards.com/index.php/…
but I'm going to order that
^^ Seems more like a audio/video mixing station..
@rlemon lol, I thought the other way
@rlemon cool :)
Everyone's hyping microsoft right now and I'm just sitting here completely unimpressed with their poor marketing schemes.
@Gemtastic Wait, microsoft has a new thing?
Not that I care but, what is it?
14:17
@Unihedro No, but they are pretending they do
windows 10 is free (for a year and only to those with already existing licenses)
And they have a "new" pair of "groundbreaking" VR glasses which is basically just a transparent screen and a little webcam that captures what you're seeing so you can skype your friends to show your dinner or dick from your POV
@Gemtastic Sounds lame...
@Unihedro It is. It's like google glasses but less functionality and a much bigger headgear
The image caption feels very sarcastic to me
:O
LOL
THE FUTURE IS NOW WITH YESTERDAY'S TECHNOLOGY!
Adz
Adz
14:33
errr guys, I'm using file.getAbsolutePath() and it was including the eclipse workspace in the path + with the actual path, I restarted eclipse and now it's showing the actual path? WHAT DOES IT MEAN?
I have no idea D:
Adz
Adz
no wait, it's still doing it-_-
BEST. GAME. EVER :D
Lowest possible productivity...
hi. anyone understand ldap?
Adz
Adz
integrated domestic abuse?
nvm
thought it was na I
14:39
miss one letter, and is L not I
 
1 hour later…
15:46
@ita you around?
Hey everyone
how ar eyou guys
quite fine...
@Gemtastic yeahh
@Ita you said you had some comments on the project structure?
00:00 - 16:0016:00 - 00:00

« first day (1552 days earlier)      last day (3613 days later) »