Skip to main content

Posts

Showing posts with the label library

javascript data structures library

I'd like to ask for recommendation of JavaScript library/libraries that supply an implementation of some basic data structures such as a priority queue, map with arbitrary keys, tries, graphs, etc. along with some algorithms that operate on them. I'm mostly interested in: The set of features covered, Flexibility of the solution - this mostly applies to graphs. For example do I have to use a supplied graph implementation, Use of functional features of the language - again it sometimes gives greater flexibility, Performance of the implementation EDIT Ok, I'd like to point out that I'm aware that it's possible to implement using js the following data structures: A map, if key values are either strings or numbers, A set, (using a map implementation), A queue, although as was pointed out below, it's inefficient on some browsers, At the moment I'm mostly interested in priority queues (not to confuse with regular queues), graph

Writing an Android library - Using its own custom Application class (getApplication)

I'm writing an Android library and I wish to use a custom Application class, which will be accessible from all of the library's activities (using the getApplication method). The problem is when I call the getApplication method from one of my library's activities, it returns the application class of the app using my library (and not the custom class I declared in the library's Android manifest). My current guess (based on this answer and the official documentation ) is that the application using my library must also declare the custom Application class in their Android manifest - which is a problematic solution, since that application can also have its own custom class (and a single app cannot have more than one custom Application class, right?). Can anyone offer a better solution? (or verify that this solution is accurate) Any help will be appreciated..

Javascript zoom library isn"t working

i am using this library zoomooz.js and i implemented it on my website but it isn't working, i followed the examples which came with the library but it only seems to work on the background. When i click on an article to zoom to i get an error in the google chrome console saying: "Uncaught TypeError: Object # has no method 'initialize'" in the "jquery.zoomooz.js:294" but i dont think it is a good idea to change the library so it must be an other problem sinds it works fine in the examples. many thanks in advance!

gRaphael Library: Can't Create Line Chart

I'm using the gRaphael JavaScript library, and am attempting to draw a simple line graph. The code I currently have on the page is: <script language="javascript" type="text/javascript"> var paper = Raphael(10, 50, 640, 480); paper.g.linechart(10,10,300,220,[1,2,3,4,5],[10,20,15,35,30]); </script> I found this code from a tutorial, located here: https://github.com/kennyshen/g.raphael/blob/master/examples/linechart/linechart_basic.html All the required files, raphael.js , g.raphael.js , and g.line.js , are included earlier on the page as well. When I view the page, it just shows up as a white screen. Would appreciate any help, thank you.