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
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 2 years ago.
Improve this question
I'm trying to speed up my website. I used www.unused-css.com/ to trim away excess CSS, but I cannot find anything similar for JavaScript. Is there an online service that can detect the js code being used and then trim away the unused code?
Here is the website with the problem: IQ Tests for Kids
I'm using bootstrap code and it is very bloated. I'm sure that I'm only using a fraction of js because I trimmed down my HTML as well.
The best you are going to get is running the JavaScript itself through a dead code removal process, such as the one provided by the Google Closure Compiler with ADVANCED_OPTIMIZATIONS enabled or Uglify's dead_code option. Some people even combine both of these.
Tree shaking is an even better process you will hear people talk about. But this is more difficult to achieve in your case, because tree shaking involves using ES6 modules, which the code you are dealing with almost certainly is not. Thus it would be a lot of work to get that going, as you would have to modify the code.
Don't know any online tool for that, but there are techniques to do what is called "tree shaking". You can google about it more.
Best my used tools to have it working are webpack and Flow
Webpack is quite general tool to make all kind of magic with JS, while Flow is type checking tool which, if you have type checking active can provide very good tree shaking.
But as you mentioned, you are using Bootstrap, so best place to start looking at would be customize your build:
http://getbootstrap.com/customize/
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 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
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)