Why was XPath dropped from jQuery? [closed] - javascript

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I didn't find any documentation as to why XPath support was dropped from jQuery.

Read this: http://ejohn.org/blog/xpath-overnight/
I should, also, probably answer the inevitable question: “Why doesn’t
jQuery have an XPath CSS Selector implementation?” For now, my answer
is: I don’t want two selector implementations – it makes the code base
significantly harder to maintain, increases the number of possible
cross-browser bugs, and drastically increases the filesize of the
resulting download. That being said, I’m strongly evaluating XPath for
some troublesome selectors that could, potentially, provide some big
performance wins to the end user. In the meantime, we’ve focused on
optimizing the actual selectors that most people use (which are poorly
represented in speed tests like SlickSpeed) but we hope to rectify in
the future.

Related

Testing performance of JavaScript vs. Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
As a high school student, I've recently decided to do a computer science experiment for my school science fair. My hypothesis is that when comparing Javascript and Python on similar programs, JS will perform better on certain common software benchmarking tests. In order to test my hypothesis, I need to write a set of programs in each language that execute common tasks and then test them according to relevant performance benchmarks.
Since I'm new at writing and testing code, I am hoping to get some advice in answer to these questions:
What types of (simple) routines would adequately represent the performance qualities of these two languages?
What specific tests (speed/CPU and memory usage/etc.) would be the best performance measures?
Is there (preferably free) software available to do this kind of benchmark testing?
So far, I've searched Google for general advice about software benchmarking and have found limited practical advice. I just need some initial guidance to point me in the right direction.
Thanks in advance for your tips and suggestions!

performance of dom element vs jquery object [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
which one is faster
document.getElementsByName('tempName')[0].value
or
$('[name="tempName"]')[0].value
I want to know because I'm writing js codes were I have to use it for around 10 thousand times on every change of a single field and I want to know its effect on performance.
The first one seems to be faster. Using pure javascript.
Tested with jsperf: http://jsperf.com/performance-fsdfsd
Pure JavaScript should work faster here. So this one is
document.getElementsByName('tempName')[0].value
The first one. No doubt about it. Not a single test needed for that.
However, the questions you should be asking yourself is:
By how much?
Does it really matter?
How big is your app that you worry about these things?
Is it worth sacrificing readability & cross-browser support for such a tiny gain?
If you can make do without jQuery as a dependency, then you can save yourself & your users some precious bytes. But, if you anyhow need jQuery elsewhere on the page, I don't think fiddling like this is gonna make a real-life difference.
Bottom line: you should test your real-world example, not just this one abstract line. The vanilla JavaScript might be faster, but if it makes no difference to your app, then why bother?

I would like to know of a site that would be useless if JavaScript was disabled [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I am looking for a site that if I disabled JavaScript the site would be useless, and what other functions would I not be able to use. Does anyone have a name of a site that I can look at? I want to know what no longer works.
You're looking at one right now.
Not quite sure if this is really programming related... but YouTube and Google Docs for instance.
http://jsfiddle.net
Most sites that use javascript heavily become less useful rather than useless. In order to do that, many of them will implement the important parts twice - once with javascript, and a less sophisticated version without.
Despite the popularity of the question, this one doesn't even load w/o JS.
http://www.graphikdesign.it/
Google.com looses it's Instant search capability with Javascript off.

Copyright when using parts of a third-party javascript from a webpage [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When i like a certain Javascript (for menu highlighting or so) used by some website, it would be pretty easy to copy this script from that site's source-code and use it in mine.
I would consider doing so as unauthorized use of intellectual property, since I have been granted the right to use this javascript in my browser, but certainly not to copy it and use it for my own purposes, even though it is so deceptivly easy to reuse other people's work without asking for permission.
I don't know much about online-copyright law, but is my stomach feeling right in this case?
Yes. You don't have a license to use it elsewhere.

JavaScript distributed computing project [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I made a website that does absolutely nothing, and I've proven to myself that people like to stay there - I've already logged 11+ hours worth of cumulative time on the page.
My question is whether it would be possible (or practical) to use the website as a distributed computing site.
My first impulse was to find out if there were any JavaScript distributed computing projects already active, so that I could put a piece of code on the page and be done. Unfortunately, all I could find was a big list of websites that thought it might be a cool idea.
I'm thinking that I might want to start with something like integer factorization - in this case, RSA numbers. It would be easy for the server to check if an answer was correct (simply test for modulus equals zero), and also easy to implement.
Is my idea feasible? Is there already a project out there that I can use?
Take a look at http://www.igvita.com/2009/03/03/collaborative-map-reduce-in-the-browser/ and http://www.igvita.com/2009/03/07/collaborative-swarm-computing-notes/

Categories

Resources