Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Are there any libraries knocking around that provide any additional general purpose math functions for Javascript? Say things like sums over a range, derivatives, integrals, etc. I can imagine that many things aren't possible, so even libraries that do rough approximations would be interesting.
Thanks!
Update: As mentioned below, I guess that there aren't any libraries that do what I want to do. In that spirit, I have started on my own library called MathPlus.
What are you looking for when you ask for integrals and derivatives? Numerical or symbolic? Indefinite or definite? Single-variable or multivariate? Etc.
It's actually not hard to write a program to do symbolic differentiation, though simplification and display is far from simple (contrary, perhaps, to intuition). Similarly, numerical differentiation and numerical definite integration is simple enough, depending on how much precision you need. (If you need a little it's easy; if you need a fair bit and are doing many operations, you need some serious numerical analysis (math) to make it work; if you need lots of precision you need a bignum library so JS isn't that great.)
'Of course' symbolic integration is extremely difficult in any language. Your best bet in that case would be to query a site like Wolfram|alpha...
If you need clarification or expansion on any of these points, let me know.
Yes, there is Sylvester, a JavaScript library designed to let you do mathematics with vectors and matrices without having to write lots of loops.
With thanks to Charles and luvieere for their responses, I guess that there aren't any libraries that do what I want to do. In that spirit, I have started on my own library called MathPlus.
Say, I know that this is an older post, but there is a newer javascript math library for more advanced mathematics. The library is the numeric.js library. You have all sorts of PDE, ODE solvers as well as vector mathematics.
I know this is an old question, but it's worth noting that some people have been doing automated conversions of physics libraries over from ActionScript to JS (using eg. Python for the parsing). I'm not saying it's an easy task, but it has to be easier than writing your own math libraries from scratch, so I guess this may be a possibility for some.
A fast search for local minima & maxima and differentiation & integration of lists of function values you can do with diff.js
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
When writing code in Java, the nice thing is that the IDE provides code-completion and auto suggestions mainly because Java is strongly typed language and therefore static type analysis can be achieved. When writing code with any library, or even with the standard JDK for that matter, I can easily reason about APIs (return types, and input parameters, etc.) for any given method of a class. If I need further understanding, I read up on standard JDK documentation or documentation for that given library.
With python, since the language is dynamically typed, type inference happens at runtime, for me, it's often a bit trickier to reason about APIs because there is no compile time checking. However, I can still be as productive because python offers built-in things such as the "dir" command which tells me everything about a particular object (methods, magic methods, fields, etc.) and also the built-in "help" command provides documentation at the command line for any type/class/module.
Does Javascript provide anything similar to python in that regard? I'd like to be more productive when coding in Javascript, but tabbing back and forth betweeen documentation and writing code has slowed me down a bit. Is there a better suggested approach?
Sublime text has a plugin called docblockr that works quite well. However, many IDE's (eclipse/intellij/sublime text are my favorite three) support this feature.
Languages and IDEs are two different things. A language can be supported by multiple IDEs, and it is possible for an IDE to support multiple languages. So, there is no such thing as "the Java IDE" -- there are many IDEs that support Java. The same applies to Javascript.
What you need to do is just search for an IDE (and/or plug-in for that IDE) that supports the features that you would like for your chosen language.
I happen to be partial to the eclipse IDE, which supports many, many different languages, including Javascript. Here is a link that might be helpful. But there are many other choices out there. The choice is up to you.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Are there any significant Javascript libraries for graph and network representation, with common algorithms, optimization, etc.? I'm imagining something like the C++ lemon library, with graph search, shortest path, maximum flow, and so on.
Google draws a blank, because the results are completely flooded with graph- and chart-drawing libraries.
Take a look at http://www.graphdracula.net/
It's got a number of algorithms including:
bellman-ford
dijkstra
floyd-warshall
You may be interested in Cytoscape.js, an open-source JS graph theory library. It can be run headlessly or with an interactive visualisation. It is styleable via CSS-like files, has built in gestures, support for touch devices, node.js, etc.
There's a bunch of algorithms now, and there will be many more shortly -- i.e. more complex algorithms like PageRank etc.
http://cytoscape.github.io/cytoscape.js/
Disclaimer: I work on the project
node-dijkstra
A NodeJS implementation of Dijkstra's algorithm
Study a graph, generally require a lot of computer effort, expecially for large graph (I don't know what kind of graph you are trying to analyze) but if it is simple, probably you didn't need libraries. You will never find what you're looking for... it's even difficult to find something like that for the common languages, I don't think that a scripting language studied to render HTML page can help you, expecially because it lives embedded in a browser that is neither studied nor capable to have the proper performance to your purposes.
I'm sure that you're only way is programming and perform analyzes on your graph through a server side programming language, in this case you will have a dedicated machine that performs operation on a graph and it has more sense.
I suggest you .NET because you can use your lemon library ... By the way have you ever tried SNAP http://snap.stanford.edu/ it's the best library you will ever find, I really suggest as a C++ library... take care that it lacks on documentation.
I'm sorry for javascript, but you will realize that I'm right
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Currently I've finished studying the book name "Beginning JavaScript 3rd Edition", so I just wonder what should be my next step in order to strengthen myself on using and manipulating this language?
Besides, how can I improve myself in programming in JavaScript? Is it by thinking something cool myself, and start coding it? Or googling around the internet to find some task and question offered?
Is there any book that teaches the correct method of coding? Thank you
One recommended resource would be
http://eloquentjavascript.net/index.html
It is a combination online tutorial + online book
After that, it depends on whether you want to focus on clientside or serverside JS.
Have a look through http://howtonode.org/
for Serverside.
I would recommend that you avoid relying on a javascript library until you are able to make a good assessment of its quality. And pick YUI3 once you can ;)
Is it by thinking something cool
myself,and start coding it?
yes - think of something that would be funny/cool to code and try to do that (and, of course, ask mr. google if you get to a problem somewhere)
You could take a look at "Javascript: The Good Parts", Douglas Crockford, O'Rielly & Yahoo Press:
http://oreilly.com/catalog/9780596517748
I suggest that you check out Douglas Crockford's JavaScript site for some quality articles on style and usage of the language itself. On top of that you should be constantly coding in it, look for interesting problems to solve and implement solutions using the techniques you have picked up.
As an aside I would also say that if you're looking to truly go further with the language and not just "get stuff done", stay away from jQuery etc for now until you have a good understanding of how it is likely to be working under the hood -- once you have this understanding though it'd be worth picking it up purely for efficiency.
Visual Studio allows you to develop mobile applications using JavaScript for all platforms. You can try your skills there
Watch the Crockford on JavaScript videos.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Currently i'm parsing bbcode server side but i'd like to show a preview just like this site does.
If I process the bbcode serverside using ajax it's a bit laggy, so i thought doing it client side, to just show the preview.
Do you guys know any bbcode parser written in javascript?
It is a bit late, and the question has certainly been answered. However if you are still open to suggestions, and have not yet spent your time converting the indicated parser from C# to JavaScript, I have written a parser (originally in PHP) which I converted myself[2] to JavaScript. It is available at bitbucket under the 3-clause BSD license. The parser seems to be reasonably fast, but I haven't performed any analysis on its speed.
It may not be as flexible in some ways as other possible projects out there, but it does allow defining your own codes ("bb-code" or not, with quite a few properties), and is also all contained within the one file. This is not a simple find-and-replace parser, and is not based on regex.
If this is of any interest to you, it might save you from having to convert that other library. Technically, I'm a relative "unknown", but that's the great things about JS/OSS: you can check out the source to see what I've done.
[2] As a result, there are a few remaining "compatibility functions", but I rewrote things which had native equivalents available.
I haven't personally used any Javascript BBcode parsers, but the top two Google results (bbcodejs and this blog post) seem pretty weak. The former only seems to support simple find-and-replace, and the latter seems to have pre-set BBcode built in, so you'd probably have to hack it a bit if you chose that solution.
Your best options are probably to roll your own solution (possibly basing your work off one of the two links here), or just use AJAX and move on. That's probably the best way to ensure that previews are accurate, and previewing doesn't have to be real-time on every keypress, anyway; a delay before even sending the request is acceptable.
I encountered the same problem, so I wrote my own. That supports BBCode -> AST Array -> any kind of markup, now supports HTML and React. And has plugins and presets support
https://github.com/JiLiZART/bbob
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
There are a lot of JavaScript libraries out there these days (extJs, Scriptaculous, Dojo, prototype, Solvent and many more). Couldn't find any site comparing cons and pros.
Could anyone give recommendations?
Things to consider:
- size
- performance
- Cross-Platform
- ease of use and documentation
- (special reason to use a specific one when developing in python/Django?)
Thanks!
Yaniv
jQuery is very good, and probably the most common.
jQuery is the most popular right now, and for good reason!
It is very lightweight. The mimified version is only 19kb.
You can use the jQuery hosted by google for increased speed, (using this there is a chance that your user already has it cached).
It (almost always) works the same in all browsers, stopping the need for a lot of the previously hated cross-browser development testing.
It is based on CSS which is familiar with web designers.
It uses CSS3 componenets.
It has a HUGE number of plugins available from the community. It is also easy to write your own.
It is used by some massive web companies. StackOverflow, digg, Dell, Google etc.
Don't forget jQuery
And I think it's more like cross browser than cross platform.
In my opinion, the most important thing to consider when choosing a framework is coding style. Every framework does roughly the same thing, but in different ways.
My advice is to choose the one that makes most sense to you. The size, performance and browser compatibility is about the same in every framework.
You may also want to take a look at "Comparison of JavaScript frameworks" at Wikipedia for some technical details about each framework.
I'll have to agree with the above (i.e. jQuery) - but also recommend Prototype
Prototype is a clean, simple, lightweight javascript engine that is server side language agnostic.
My answer to a very similar question:
Jquery
Fast
Well documented
Easy to use
Chaining
Unlike prototype it doesn't extend an object if you didn't specifically ask for it (try looping an array in prototype)
easy-to-use AJAX (I love the $.ajaxSetup() function)
Nice Event handlers
CSS selectors
filtering your selection
did I mention chaining?
Small (only 30kb)
Nice little build-in effects.
Plugins
(https://stackoverflow.com/questions/394601/which-javascript-framework-jquery-vs-dojo-vs/394837#394837)