« first day (1587 days earlier)      last day (3348 days later) » 

12:00 PM
Date.now() -> $.now()
Array.isArray() -> $.isArray()
node.offsetWidth -> $(node).outerWidth()
node.getBoundingClientRect() -> var offset = node.offset(); {top: offset.top - document.body.scrollTop, left: offset.left - document.body.scrollLeft}
left: vanilla, right: jq
oh, and: node.parentNode.removeChild(el); -> $(node).remove()
none of that is convenience, it's just lazy and inability to use the method that's originally there for
 
fge
OK, so here's the grunt of why I'll use jQuery: 1. it offers a consistent API throughout; I like consistency; and 2. it is very, very well documented
 
fge
I am not interested in learning the inner kegs of JavaScript
I want to get stuff done with it
The day when I need to plunge into it, I will
But not now
I just have No Need For That(tm)
 
I want to know the inner kegs of everything.
 
Can you answer my question?
What problem does jQuery solve, that you are so eager to use it?
 
12:06 PM
Ugh, message got too long.
Bah, never mind.
 
@fge
What is jQuery?
 
nope, makes no sense
14 mins ago, by Unihedro
jQuery makes no sense, the entire library should just die.
 
fge
@SecondRikudo very well documented and a consistent API
 
You didn't answer my question
What problem does it solve, what pain does it abstract from you?
 
There is nothing that jQuery solves that vanilla JS can't do
 
12:13 PM
That's not my point
 
The only thing I can think of that jQuery does nicer for you is AJAX
 
Oh, yes you do. One day from now you will look back at the code you write and you will regret using jQuery just for a few lines of utility code, and forgo the requirement.
By using jQuery, you're lying to yourself that browser incompatibility is hard to deal with, when, in truth, post-IE8, there's no difficulty dealing with each and every browser on its own.
jQuery is an illusion that you can solve things, where each of its wrappers are just referencing a simple, utility method that you could had called yourself for better access, with more useful parameters than what jQuery is doing. jQuer
 
An impressive rant indeed
 
fge
@Gemtastic I know
 
But I don't even know if what I said is true
 
12:15 PM
If you code in ASP.NET and have better things to care, fine, use it.
None of any ASP.NET programmers knows vanilla JS.
 
fge
@Unihedro you don't get my point; nevermind
jQUery it will be for me and that's the end of it
 
may god have mercy on your soul
 
fge
And on yours too; you are a little too prompt to rant and not readily understandable of other people's motives
 
Did you even look at devdocs?
 
Hi guys!
 
12:17 PM
Vanilla Javascript is well defined.
@deckard Hello!
 
@fge My problem is not with you using jQuery
My problem is with you using jQuery without knowing what problems it attempts to even solve.
 
After creating a JMenu, when a do a menuItem.setMnemonic(KeyEvent.VK_E); eclipse says Discouraged access The type Keyevent is not in API.
 
The debate is not even about jQuery vs vanilla, or Spring vs Java, it's about knowing what pains and problems you're having, and using the right tool for the job.
 
What should I do instead of using KeyEvent?
 
jQuery was written at a time where DOM was ugly.
 
fge
12:19 PM
@SecondRikudo I do know that it was first invented to solve incompatibilities between browsers by offering a unified API
 
IE reigned supreme, with its non-standard ugliness
So jQuery abstracted all that pain away
Today, those problems are nonexistent.
 
fge
The thing is, it also has an API which I happen to like; and its documentation is second to none in the JS world
 
Using the standard DOM API is, in 99% of the cases, more consice, more readable, better documented and faster.
 
@deckard I don't think it's a problem to use KeyEvent.VK_E.
 
@fge I call bullshit.
jQuery's docs are decent, they aren't amazing.
 
12:21 PM
It's rather weird the Eclipse claims it discouraged access.
 
And their API is not that great.
90% of what you'll do with jQuery is $("selector"), and for that you have document.querySelectorAll("selector")
Any interaction with a DOM node is better done in DOM API over jQuery
Even AJAX is not that complicated horribleness it used to be in IE times.
 
@Unihedro every tutorial I've found uses that, but coming from a C background I tend to be careful with warnings hahaha
 
Today, in 2015, there are very few problems that jQuery actually solves for you.
It'd be like using a library to output something to standard output, rather than using System.out.println().
"Because it's better documented", which is a shaky argument on its own.
 
ehh
function processData(input) {
    //Enter your code here
}

process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
   processData(_input);
});
 
@Unihedro What about it?
 
12:25 PM
stdin and stdout isn't that hard in vanilla javascript either
 
@Unihedro Yeah, I was making a Java example
 
fge
@SecondRikudo sorry, but I put high value in documentation
 
@fge Like I said, jQuery's documentation is not that great in comparison the MDN
So that point is relatively moot.
 
And devdocs scraps the best documentations its developers could find, so in comparison jquery's documentation isn't even better
 
^
@fge For the reason I'd tell you to use PHP rather than Java.
PHP's documentation is infinitely better than Java's.
 
12:27 PM
inb4 java sucks
 
In every conceivable way. That is a fact.
 
fge
@SecondRikudo you like to lie, don't you?
PHP, well documented? Uhm
 
xD
PHP has better documentation than API.
 
@fge PHP is extremely well documented.
 
That's for sure.
PHP has a grand total of five official manuals.
 
12:28 PM
It has a crap API, that's true.
@Unihedro I am familiar with just one, so you'll have to point me at the others.
php.net
 
phpwiki.sourceforge.net
www.dmoz.org/Computers/Programming/Languages/PHP
 
@Unihedro Not offical
@Unihedro Not official
 
eh, it's featured on php.net once
 
It's an added tutorial.
They aren't parts of the official documentation.
 
ah ok
 
12:30 PM
The only official documentation under the PHP group's control is the one on php.net.
And it's very comprehensive.
But let's drop that for a second
@fge jQuery's docs are not better than native JS's.
They're good, don't get me wrong
But so is MDN
(And devdocs as a "reader")
 
fge
Ohwell, anyway, as I'll be using jqWidgets, it requires jQuery to start with
So it's not like I have a choice
And don't complain, I could have chosen to go the GXT route :p
 
Not familiar with jqWidgets
 
... Couldn't you just have said that at first?
 
fge
@Unihedro I did
(say that I would use jqWidgets)
 
Sounds reasonable in that case.
My point is, don't blindly use a framework because it's cool (or because you think documentation is better)
 
12:36 PM
or "personal preference"
 
fge
jqWidgets does have the option of using angularjs as well
 
Understand the problem at hand first, experience the pain even, and then pick the library that best abstracts the problem away.
 
but angularjs is like meh
 
Not sure if fire or neighbors just don't know how to cook....
 
@fge I wouldn't recommend you to get into angular js at this point.
 
12:37 PM
Or both
 
It might be both
@Gemtastic They just don't know how to cook yet.
 
Angular is similar to spring
It does too many thtings, with too much magic.
 
It smells like something burning from the mailbox (if it's a real fire we can NOT open the door to the staircase)
 
Again, ask yourself, what problems you need to solve :)
 
And their fire alarm has been going on for 4 min...
 
12:39 PM
Quick! Stuff the edges of your door with wet towels!
 
If it's two-way binding (bind UI elements with JS code), Knockout does that best
If it's handling of UI components, you have React
@Unihedro Or... open a window?
 
fge
I'd have had a go at polymer if only its widgets were more suited to what I wanted by default :/
 
@SecondRikudo smoke will get in
 
@Unihedro Thankfully we live on the first floor so we can jump out of the balcony
 
The common sense of What Not To Do In Fire is to take lifts, open doors and open windows
 
12:40 PM
Should we need to
 
unless you hear firetruck and firefighters looking for survivors
 
@fge Polymer is nice, but requires a big shift in mindset to effectively work with.
@Unihedro Depends when the fire is
 
now
run for your life
 
Now it smells like matches
There's a fire
 
or there's a barbecue party
 
12:43 PM
@Gemtastic Time to call the firefighters
Better safe than sorry.
 
@SecondRikudo They just arrived
 
fge
<-- tries and creates a page with the basic layout he needs
 
1:04 PM
Well, seems to have been a small fire
 
@Unihedro java sucks
 
@rlemon That's why she makes such a good girlfriend
 
I approve.
 
> My Girlfriends name is DirtDevil
 
@deckard Have you gone back to Swing? Last time I remember you were doing JavaFX
 
1:14 PM
@ItachiUchiha Yep
@ItachiUchiha I've found it easier.
 
@SecondRikudo I thought to say that using AJAX in JQuery is easier, but guess that has changed as well..
@deckard Nope, it just seems to be easier, while is not! Once you start building an application, you will find it out. Try out JavaFX, without using FXML.
 
The design with SceneBuilder is easy, but going from the FXML to the actual code is something very different
 
^^ FXML, Controllers are stuffs which confuses beginners. Don't use them. JavaFX supports pure Java coding as well
 
I'm using now Swing with a little help form WindowBuilder
 
Well, because you are starting from scratch, I would still advise you to start with JavaFX. Swing is old, lacks bindings, properties, 3D etc etc.
 
1:20 PM
@deckard me too, great minds think alike
And then after you learn Swing, you can go the route I take and directly jump into OpenGL!
 
Don't need 3D nor fancy things
TBF, I would go with SWT for the native look and fell
But I think Swing is much better nowadays
 
Native look and feel? I give up..
 
(for what I've read, bare in mind that yesterday morning I didn't know what was SWT nor Swing or anything)
@ItachiUchiha XD not trying to discourage
 
@ItachiUchiha ajax is only a tiny bit more verbose than jQuery's wrapper.
That alone doesn't warrant using jQuery.
 
@deckard It is a fact that JavaFX lacks in support for native look and feel.
 
1:25 PM
@ItachiUchiha The Ajax wrapper in jQuery is easier, but often makes it more difficult for consistency
 
@ItachiUchiha Now, you have my attention sir.
 
@SecondRikudo I have never used ajax without jquery!! Guilty!!!!
 
$.post(url, params).success(function(o){}), etc
 
@deckard But, you have CSS. You can always design your own look and feel
 
JQuery's promises are meh
I have this default function I have that wraps ajax with bluebird promises
Makes for a much more pleasant and flexible experience
 
1:28 PM
Wow! This is sooo hilarious XD youtu.be/BL-3QvC6bq4
 
function ajax(url, method = "get", headers = {}, params = {}) {
This returns a promise
 
headers ={} <---- does this help accept multi arg?
 
2:02 PM
hey everyone! I am facing problem while doing anything from a private git repo
somebody added me to their private git repo and allowed me to push
but, even if I try to clone that from my terminal
I just get repo not found error
any ideas?
 
The repo's link is probably wrong.
 
I copied that from the given clone url on repo page
I can see the repository in from my settings>repositories in git account
 
Hi. If inside a main function...you define a class...what type of class is that called in Java parlance?
 
What do you mean defining a class within "a main function"?
 
Ok. Nev mind...its called a local class...
 
2:09 PM
Java doesn't have virtual classes.
You mean inner classes?
 
Now why isn't a local class instance showing up on the Expressions window?
I suppose inner classes are classes defined inside classes...
 
@deostroll What does that have to do with 'local class'?
 
a class defined inside of a function...any function is general...
 
^ There's the Oracle JavaTM tutorial about nesting classes
 
No it isn't technically nested classes...
I mean what I am interested about...
I have a class defined in a function...I have created an instance of that class - stored that into a variable...I am unable to watch the variable in eclipse....
...while debugging ofcourse
 
2:18 PM
Expressions are "Watches"
you define the expression yourself
check the Variables view
@deostroll you can't define classes in methods.
it's simply impossible
but you seem to be looking for an anonymous class here
 
@Vogel612 I just did! I'll share that code...
 
external link pls..
 
wat??? that shouldn't even compile
what the actual flying f***
okay found it...
@deostroll it's called local classes in the jls
@deostroll oh and they are nested classes
> A local class is a nested class (§8) that is not a member of any class and that has a name (§6.2, §6.7).
 
2:36 PM
I've just posted my problem...
0
Q: unable to watch java local class instance in eclipse

deostrollHere is a small sample: public class LocalClassSample { public static void main(String[] args) { class Utils { public void printHello(String name) { System.out.println("Hello " + name); } public String outHello(String name) { ...

 
how to load resource from classpath in spring?
I have an applicationcontext.xml in my maven dependency.
<import resource="classpath*:/applicationContext.xml" />
what does the above line mean?
what is the difference between ./ and /
 
@JavaTechnical look up on wikipedia "absolute paths"
 
2:59 PM
OPs
 
3:46 PM
@JavaTechnical it means that you are trying to search applicationContext. xml from your classpath
@JavaTechnical your dependencies are added to the classpath
 
@Smrita but I am getting FileNotFoundException
 
try replacing classpath*/**applicationContext.xml
i think that will solve your problem
 
@Smrita do you mean classpath:*/**applicationContext.xml
is : there?
 
yes
there is
 
@Smrita or classpath*:**/applicationContext.xml
 
3:49 PM
Hello Everyone!
A general question. Is that just me being a noob see so many ways to solve a problem and actually solve it?
 
classpath*:**/applicationContext
 
I stuck into an issue because I was trying so many other ways to solve it. Then finally asked a friend and he made me stick to one way and solved it in minutes.
 
.xml
@LifeH2O there are no hard and fast ruled
*rules to be honest
 
actually my classes are in classpath in src/main/java and the applicationContext.xml is in src/main/resources/applicationContext.xml
does the above work?
 
whixh ide are you using?
 
3:53 PM
eclipse
juno
 
yes if your src/main/resources is added to ypur classpath
 
how to add it?
 
go to your project directory
do you see a .classpath file?
open it and check out
tgere should be a classpath entry for your src/main/resources folder
i guess importing maven project in exlipse automatically add your resources folder to the classpath
 
you mean i'll have to add that to the project in which I am using applicationContext.xml file or the project in which the applicationContext.xml file is present?
 
i guess you have 2 projects : say project A and project B
A depends on B
B has applicationContext.xml
 
3:57 PM
yes
 
then check out B's . classpath file
 
it is
<classpathentry kind="src" path="src/main/resources"/>
in B
 
then double astericks will solve yoyr problem
 

« first day (1587 days earlier)      last day (3348 days later) »