« first day (1609 days earlier)      last day (3556 days later) » 

16:07
-1
Q: Bukkit: How can I move a mob to a location?

MarkusK96I am trying to develop a bukkit plugin and I need mobs to go to some locations. But I can not find any way to do this. There is an API for this but it does not work with the newer bukkit version.

Argh, as if the entire bukkit tutorial isn't there.
cv-plz ^^^
sighs
How far is the app done?
16:21
50% :/
A little further than yesterday but I get stuck on trying to create a result set
because Result<Record> r = new Record(); doesn't work :(
Well it wont. ResultSet in as interface
Well, the actual code is Result<CarRecord> r =
But what am I supposed to do to create a new empty one?
I want to add CarRecords to it
The 1st monthly most awesome pronunciation of my username award this month is awarded to:
16:26
When using jdbc, you need to have ResultSet rs = preparedStatement.execute();
in The Garden Shed on The Stack Exchange Network Chat, 53 secs ago, by Lori
Hi back at you J.Musser and Unidedrrro!
Then how to I make a collection of records in Jooq?
Me neither :/
16:29
For the love of god, please delete this. stackoverflow.com/q/27041854/3622940
@Unihedro dedrro :D
hello, I am having a lot of trouble adding jar files from an external library to my project when I convert it to a jar. I have tried following many of the questions asked in SOF but when I follow them and convert it to a jar it still doesn't execute correctly. I keep getting a ClassNotFoundException. Can someone tell me what I would need to do to properly add the libs to my project with ANT
I'm going to sleep now. If anything warrants attention to be dealt with, ping fge.
I suppose I'll jsut use the Java way with an array list
fge
fge
@Gemtastic section 5 of the manual has examples; yes, I say it again and I will say it again
16:40
@fge Ok, ok I'll stop asking.
A beginner should first using JDBC, before jumping into using frameworks
@ItachiUchiha Agreed 150%
fge
fge
@Gemtastic here's a hint for you: JooQ's Result implements List
Therefore, if you want a List<CustomerRecord> it's as simple as jooq.selectFrom(CUSTOMER).where(....).etc().etc().fetch()
Well, I already went with the old fashioned way
@ItachiUchiha Agreed. Protip: Recommend what you don't use.
Jooq rocks.
fge
fge
16:46
Using JDBC is Doing It Wrong(tm) except when you have no choice
I never said JooQ is bad/evil
fge
fge
And even then --> Mybatis ftw
It may be just too much for a beginner.
fge
fge
@ItachiUchiha and JDBC isn't?? You're kidding me, right?
OK, just a question
How many potentials for SQL injection do you see PER WEEK of code samples posted on SO using JDBC?
@fge They are already taught about sql statements. It is just Connection, statement and resultset they need to know about :)
@fge Again, sql injection is not something a beginner should really worry about :)
fge
fge
16:48
WHAT??
fge
fge
@ItachiUchiha are you sure you don't have a fever or something?
First they should know how things work, later how to perfect them
fge
fge
That's no reason to learn and do crap, isn't it? I'm sorry but I have a fundamental disagreement with you here
Well, we all have the freedom to make choice :)
Anyways, I have some good news
I got RichTextFX demo work flawlessly
fge
fge
16:52
Aha
Link?
It is just a demo, I still need to integrate it with debugger. I will start it in sometime, so most probably I will be bugging you from time to time :P
fge
fge
OK
Is the API that different from a TextFlow?
yeah kinda
Any takers on helping me??
It doesn't add texts as children, but append String
It is closer to a TextArea than a TextFlow
fge
fge
16:59
But how do you decorate only parts of it, then?
well, it provides you with a special method called as setStyleClass(from, to, "styleClass");
fge
fge
Ah, CSS it is then
fge
fge
You'll have to write it for me, I know nada about it :p
Since the whole text in it is just one string
you need to have the start and end index
and the style class
Well, thats the plan ;)
btw, is there a keyboard shortcut for organize imports in idea?
fge
fge
17:04
Yes, Ctrl-Alt-O
Works for individual files as well as directory hierarchies
Oh, cool
hi al
all
:-)
hello
heya
@fge I am still waiting for the mail
thanks all :)
fge
fge
17:36
@ItachiUchiha that's strange; can you send me an email? This way I'll answer you back
Done
@fge A quick question
I just edited the gradle.build to include
compile (group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.6.3');
In the terminal I typed : gradle build
But I still don't find the jar under ~/.m2/repository/ path
Any insights?
fge
fge
17:57
THat's because gradle doesn't download them in there
OK, mail sent
I'm looking to create a file path string to an xml file stored in the root of my Eclipse project, how would that path be constructed?
this is my current attempt
private static final String GAME_FILE = "game.xml";
would that find the xml file?
fge
fge
18:18
@BrianJ do you expect this file to be found when your jar is packaged?
yes, but from your question I'm guessing not? Where should it be placed?
@fge
fge
fge
@BrianJ in your resources (src/resources), and use .getResourceAsStream() to access it
And, uh, you should do well to stick to the standard project layout
okay I was thinking soemthing like that, hard coding is bad
fge
fge
Java sources in src/main/java, resources in src/main/resources, and for tests, s,main,test,
you mean the package name should be main?
@fge
I'm not too familiar with what you mean there regarding the project layout
do you mean I should have a separate package called "Resources" for my xml file?
fge
fge
18:27
No, I mean that what your src/ is right now should really be src/main/java/ instead
huh?
hi
is anyone facing problem to to stackoverflow.com
???
@fge can you clarify where should my xml file be? In another package called "Resources"? I haven't came across what your suggesting..
could you show a screeny of the eclipse project layout your suggesting. I'll understand what you mean then.
@fge this more like it?
¨@fge remember the insert question I had? Well, I have an interesting issue; adding to the database using that code returns a null on Id; pastebin.com/YAeTMqq3
Everything looks fine in the database.
19:14
Oh well... I worked my way around it
fge
fge
Weee, I have never seen such a convoluted language
fge
fge
19:33
Work stuff
THe language I have to parse is one of the worst designed languages I have ever seen
Tokenizing it is a real challenge
Heh you really don't like Portuguese?
http://www.commitstrip.com/en/2015/03/20/coders-childhood-the-accessories-menu/
CommitStrip - Blog relating the daily life of web agencies developers
Coder’s Childhood : The Accessories menu
CommitStrip
1426880434
fge
fge
Uh no, this is not a natural language; such stuff is waaay beyond my abilities
20:09
hehe :P
crl
crl
20:24
@Unihedro I'm blocked with the websocket url: gist.github.com/cauburtin/83359b45a783aadb500c
hello guys
21:00
@Gemtastic status??
crl
crl
ok.. $.post("/ws-auth", fkey({roomid: 139})).done(function(e){console.log(e)}) gives the hash at least
now the timethingy
@SecondRikudo Going smoothly but lots to do
@Gemtastic Want to delegate some to me?
@SecondRikudo Not sure :P
Got some free time. If you need anything, pingme :)
21:07
It's kinda at the copy-paste level
TBF while coding, if you copy-paste a lot you're doing something wrong :D
fge
fge
@SecondRikudo the most urgent thing to do would be to provide a centralized way to reference a DSLContext; right now it seems to be one DSLContext per db operation
I myself am hard at work on my parser so I don't have the time :/
@SecondRikudo it's all the more damageable that it prevents the use of UpdatableRecords
@Gemtastic use the Factory pattern
Add an interface to every mapper that uses jOOQ like JooqMapper with a method setDSLContext()
Then create a JooqMapperFactory that creates those based on stuff
Or alternative, just manually instantiate all of the mappers in the system on startup, and inject them into their proper places as you go along.
The startup phase of your application is there to instantiate and wire all of your logic objects
Hmm... I wonder if I have the time?
The alternative is to instantiate a new connection for each mapper.
21:19
@Second if you want to you could work on the statistics tab?
In the constructor
@Gemtastic What needs to be done?
Everything >_>
XD Link to the requirements again please?
Not sure I can...
I'm not at home
But they want monthly statistics on how often a customer is buying their services, how much more often a gender is turning their car in for repair... and ti kinda says "and stuff like that"
@fge was this what you meant by correcting the project structure?
fge
fge
21:33
@BrianJ not completely, but nevermind; I have my hands really full at the moment so I really can't help, sorry
@fge I'm running code generator against a database. User and password are set correctly (because if I don't it borks), database has public schema with all the tables. User owns the database
It finishes with a success code, but no tables are being generated.
@fge okay no problem, I'll figure it out eventually
Any idea why?
Only a "Public.java" file (for the schema, I guess?) gets created.
fge
fge
@SecondRikudo my guess is that you have the wrong user or something
Are you sure you have actually created the tables?
@fge I thought so too. Wrong user fails the build.
@fge I ran psql gemtastic < /path/to/schemafile.txt
The tables show up in pgAdmin
22:01
@Gemtastic do you happen to have a file I can use to populate my tables with some data?
Nope, sorry ;/
My tables are full of herpaderps
@fge The tables were owned by the wrong user :|
@Gemtastic You should make one to hand in with the project
I probably should
is it ok if 90% of plugin are static methods and static variables
22:25
Alright I think I got a pretty good grasp of what's going on
@Gemtastic I'm going to violate the law of demeter a few times. But I think it's a necessary evil to maintain a good structure.
That will allow you to inject services and mappers with the DSLContext already injected
demeter?
The Law of Demeter states that you should not pass an object in an argument, only to pass it further down the chain.
I don't want to make too much structural change, as that would take time.
(The way I'd do it, by the way, is to inject the ApplicationController as an argument to the LoginController, rather than LoginController creating it with new)
And the ApplicationController is injected with all of the other controllers it needs to create
And all of those controllers are injected with all of the services they need
anyone know how I should add an xml file to my Eclipse project? I want to create a file path string to it using `.getResourceAsStream() `

Should this work?
All of this is done in the startup phase
22:31
@Gemtastic Sounds like a pain, doesn't it? :P
Well, that's exactly the problem Spring solves. And it solves it well.
(It's just that it's too often abused)
You went with a Navigator, which is pretty much a static class
22:50
@SecondRikudo Yeah :P
@Gemtastic I'm going to make your static navigator.setController method as your object graph builder
Because that's where you create all of your controllers
I'm going to pass a context factory there, and you should create all of the services there and pass them to your controllers
For example
    public static void setController(ApplicationController controller, DatabaseContextProvider provider) throws SQLException {

        final DSLContext create = provider.getDslContext("jdbc:postgres:postgres", "postgres", "pass");

        // Todo: Instantiate services **HERE**. Pass the DSLContext above to those who need it.

        final CustomerCRUDService customerCRUDService = new CustomerCRUDService(create);

        ApplicationNavigator.listCustomersController = new ListCustomerController(customerCRUDService);
Let me commit to my fork, so you can see this in work...
Then you can create all of your services and inject the same DSL context
That DSL context is to be used in the creation of mappers in the services (or, if you want to skip that layer of abstraction, directly used to query in the methods. That's fine too)
Then you don't need to create a database connection for each action.
Alright now I get what you meant when you said you need controllers to talk to each other.
23:17
@SecondRikudo When you see it it makes sense
;P
@Gemtastic From what I gather, you want a situation where one controller updates another
i.e. the search functionality updating the customer list
fge
fge
Well, do you really need THAT many controllers to begin with?
Or that many services for that matter
@fge I'm not sure about controllers, since I'm not familiar with FXML
But I can definitely see redundant services here and there.
fge
fge
Well, don't be "fooled"; a JavaFX controller is not a "real" controller as defined by MVC
@fge do I need to create this as Maven project?
fge
fge
23:25
The only "thing" it does is instantiate the widgets for you and attach listeners to events; and a few other things if you want it to (personally I refrain from those "few other things")
@SecondRikudo Yes since I need to exchange a view inside the view :P
@Gemtastic Well, you get an observable list
Why not expose that and change it when you get a search result?
SearchController has access to ListCustomerController, and it can make changes to listController.customerList
That should propagate back to the origin controller, should it not?
You can also wrap it in a nice method to hide the fact that you're tampering with a list directly (optional)
@fge TBF, that's all a controller needs to do :D
Respond to user events, and call other things
23:41
You could improve this without end
But I'm almost one hour passed deadline :(
@Gemtastic I'm not sure how much you've progressed locally, but if it's anything short than 6+ hours of work ahead of what's committed and pushed, you aren't going to make it without asking for an extension
It's blunt, but that's how it is
crl
crl
0
Q: Issue with matching an html element with both Jsoup and regex

crlThe code is the following: Pattern p = Pattern.compile("(<input .* name=\"fkey\" .*>)"); Document d = Jsoup.connect("https://stackoverflow.com/users/login").get(); // selecting the fkey input with 3 different way System.out.println(p.matcher(d.body().html())); System.out.println(d.getElementByI...

@SecondRikudo I know
:/

« first day (1609 days earlier)      last day (3556 days later) »