Double-entry accounting libraries for Java? [closed] - java

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
What double-entry accounting libraries are available for Java?

I did write a library for myself, but since it was for a really trivial application, I don't know if it would suit a general purpose accounting need.
It has an interface like:
ledger.newPosting(new Date(), "Received $10 from Anne")
.debit("Cash:Anne", 1000)
.credit("Dues Received", 1000)
.post();
int cashBalance = ledger.getAccount("Cash").getTrialBalance();
assertEquals(-1000, cashBalance);
int anneBalance = ledger.getAccount("Cash:Anne").getTrialBalance();
assertEquals(-1000, anneBalance);
int duesBalance = ledger.getAccount("Dues Received").getTrialBalance();
assertEquals(1000, duesBalance);
Is this the kind of thing you're looking for? Anyone else actually INTERESTED in this code? I wrote it generically, but never published it because I didn't think anyone would want something this trivial.

There's a Swedish project called fribok.org (free (as in GNU free) accounting). It's an application too, but might be componentized and contain what you look for (given that GPL is a viable option for you).

I've seen JMoney used with custom plug-ins. What are you trying to do?

Well, I am not aware of any such libraries. Personally me thinks that double entry accounting framework would boil down to couple of interfaces and minimal code to ensure equation invariants. Hence no libs for that: try to bite a relevant code snippet from JMoney or something like that...
;)

How about jLedger - Java Business Accounting API?
Citing the project's home page: "This is a Java Business Accounting API that consist of invoicing, general ledger, stock/inventory control and other business API that will assist java developer to build a business software with ease."
Note, however, that this project releases the software under the GNU GPL v2 license, not the Apache license that's usually associated with Java-related projects.
GNU GPL is a copyleft license and libraries licensed under it may not be appropriate for internally developed or commercial software.

There is this more recent implementation using JTA and Spring. As it states:
The Double-entry bookkeeping concept implemented with Spring 4, the
Java Transaction API and the H2 database in embedded mode

The best I have seen is a jPos module called minigl which is part of jpos-ee., The jPOS framework is used widely in many production grade deployments. I have personally used in at scale on some high-profile projects.
You will need to get up to speed on jpos-ee, a very solid java framework for all things payment and fintech related. It is worth the learning curve as if you are asking about ledgers you are probably going to have other needs which are likely already addressed in the jPos codebase.

I just wrote a java library for accounting. The beauty of my library is that it uses a 4GL to do the credits, debits and ledgers. You can also import other functions to handle inventory, payroll and things like that. Fetal Libraries

Related

Google library for Java logging? [closed]

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.
This post was edited and submitted for review last year and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Is there a Java Logging Library from Google?
I have been using the Google Guava library and find it much more usable than Apache Commons for argument validation (i.e. checking preconditions, invariant object state, conveniently throwing the right Exception type on null, empty String, inlining null checks with assignments, Exception message formatting and specialised typing of nullable types). I have not looked at other features of the library but this was enough for me to switch.
Now the very natural question:
I am doing my logging using Apache Commons Logging, as I was doing for argument validation. Is there a similar "this goes to 11" of the framework from Google that I could switch to, with compound benefits? I don't mind either Log4j or Commons but Guava is so much better than Commons in the aspects I have studied...
I see Android has its logging framework, which I like, does Google offer one for basic Java too?
EDIT: Re-reading my question I realise it may somehow hint to a dogmatic preference for Google code, which I do not have, and an underlying assumption that anything that comes out of Google will be by definition "perfect". I do not hold these "positive preconceptions" at all, what I meant but failed to convey in writing, is that there may be some synergies in adopting a single provider for the two layers. There may be something that intelligently logs, for example, a Guava Optional object or associated object, saving time in constructing specific String.format()s. I was looking for a Google library to leverage these potential synergies not out of a priori preference. I did, in fact, first compare Guava to my old Commons-based way of argument checking before deciding to switch. All things considered, I do appreciate very much the code Google releases for free and I think I have learnt a lot from it and will continue to do so, given its very high quality. I never allowed this to become a cult, though.
References:
Apache Commons Logging
Google Guava
Commons Logging is best avoided. See http://articles.qos.ch/thinkAgain.html for a thorough analysis. Yes, it's very old (and yes, author has a vested interest) but it all applies. The linked 'Commons Logging was my fault' illustrates - there is really not much love for this library - anywhere.
Apparently, Google's preferred solution is java.util.logging. You will see this if you do Java programming on Google App Engine.
The best standard is slf4j over logback. There is no reason to avoid it I think. You will quite possibly be using slf4j already - if not directly then indirectly via other libraries on your classpath - it is the de facto modern standard.
Not that I know of. I recommend using slf4j.

Bayesian networks in Scala [closed]

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
I'm looking for a library to create Bayes nets and perform learning and inference on them in Scala (or Java, in case of lack of a better solution). The library should be actively maintained, performant, preferably easy, definitely well-documented unless the usage is really straightforward. Free, open-source and commercial alternatives are ok, but for commercial solutions a free trial is required.
An ideal solution would be the equivalent of what in the .NET world is Infer.NET by Microsoft Research, but more documented.
Thanks in advance!
FACTORIE is a young project, but it fits the bill and is implemented in Scala:
FACTORIE is a toolkit for deployable probabilistic modeling,
implemented as a software library in Scala. It provides its users with
a succinct language for creating relational factor graphs, estimating
parameters and performing inference.
It's developed by Andrew McCallum and his lab at UMass, who are also responsible for the hugely useful MALLET machine learning toolkit.
You might want to look into SMILE. It is free and has Java API. Other free options in Java are UnBBayes and SamIam.
SMILE
SMILE (Structural Modeling, Inference, and Learning Engine) is a fully
portable library of C++ classes implementing graphical
decision-theoretic methods, such as Bayesian net-works and influence
diagrams, directly amenable to inclusion in intelligent systems.
UnBBayes
UnBBayes is a probabilistic network framework written in Java. It has
both a GUI and an API with inference, sampling, learning and
evaluation. It supports BN, ID, MSBN, OOBN, HBN, MEBN/PR-OWL, PRM,
structure, parameter and incremental learning.
SamIam
Samiam includes two main components: a graphical user interface and a
reasoning engine. The graphical interface lets users develop Bayesian
network models and save them in a variety of formats. The reasoning
engine supports many tasks including: classical inference; parameter
estimation; time-space tradeoffs; sensitivity analysis; and
explanation-generation based on MAP and MPE.
Pure Scala and free options are FACTORIE (already mentioned) and Figaro. But Figaro currently lacks learning part.
Figaro - Probabilistic Modeling
Figaro models are data structures in the Scala programming language,
which is interoperable with Java, and can be constructed, manipulated,
and used directly within any Scala or Java program.
Perhaps Banjo fits the bill? I'm not sure how actively it is developed, but I know it has been around for at least a few years ... (never used it myself).
Banjo: Bayesian Network Inference with Java Objects
Some Java alternatives to Infer.NET were presented as answers to this question. So, I think basically you're asking about either a follow up to that question (it was asked during the second half of 2010) with respect to Java or fully Scala-based solution.
There is a Scala lib out there by now:
https://github.com/danielkorzekwa/bayes-scala

Licence models for frameworks/libraries/apis [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'm a programmer who is starting to build small commercial apps (for mobile phones (java,android), web pages and c++ apps built in visual studio).
Now the problem is that i don't understand how licencing works. From what I've seen I am not allowed to use any library, not even java's basic one because they are either under GPL or something else.
For example, am I obliged to pay Sun to use their java libraries to build my app ? or how can I write a mobile app when it is necessary to release my code. How do big companies get around that ?
Another thing I don't understand, what libraries and apis am I allowed to use for free that are windows specific (like MFC, .NET, COM). How do this licences work? if I just bought the visual studio suit will it be enough to allow me to use this api's ? I'm in a situation that I learned to use this libraries/apis/frameworks and now when it's time to actually use them for something I must pay for them.
If that's true than that means it's impossible to build commercial apps without spending thousands of dollars on other things ?
Here are some cases and how to deal with them:
copying source code into your own code
This is where you should be very aware where you're copying from and under which license(s) the code was released. Most of the cases you will NOT be allowed to copy it. In almost all other cases you will need to put the original copyright notice in the code. In some cases (GPL) you're obliged to release the source code along with any public distribution of your product. In some cases you can purchase a license for redistribution rights in binary form. In all cases it's good practice to put a comment, marking the origin of the code.
Using libraries but not shipping
If you compile an application for Android or for Windows, you'll inevitably use their API's and libraries. As long as these belong to the platform, you do not need to ship the libraries with your app. So you only need to care if you're allowed to use them (link to them) from within your app. For OS and Language libs, this is usually the case.
Shipping 3rd party libraries with your app
Here again, you will need to know exactly what you're doing because there are big differences. This field is quite complex... Some development environments and frameworks include "redistributable" packages, which are meant for inclusion in your app. But they come with license terms, too, and it's worthwhile to read and understand the implications.
Rule of thumb: BSD style licenses are fine if you give proper credit in your documentation. GPL is almost always a no-go for commercial applications unless you're willing to release your entire source code with your product.
Disclaimer: IANAL
Your question is extremely broad, covering a wide range of libraries and associated licenses. IANAL but the short answer is that most of the library code that you mention can be used for commercial purposes without paying anything; particularly the Java and .Net code. The respective platform holders WANT people to use them. It's only when you get into more specialised situations that they start extracting revenue, usually through support contracts or special VM versions (like the old JRockit VM).
There is a big difference between copying code and use it as your own, versus linking to it.
The semantics can get complicated very fast, as there are many types of licences, so as a warm recommendation, hire the services of a good lawyer that is familiar with the field. That can save you a lot of trouble in the future!!
Big companies are careful in examining the license for every tool/sdk/library that they incorporate in their solutions.
In what's concerning the obligation of releasing your source code, you don't have to if you are using either Microsoft sdks or the Java base libraries.
But in order to be 100% sure, you always have to read the licenses. A good start to understanding how licensing works would be to read the following Wikipedia articles:
CopyLeft - if a license is copyleft then all the restrictions of that license will also apply to your code, but you will not be able to impose further restrictions to the code or product. That means that if you use an open source sdk that has a License which is Copyleft you will have to distribute your source code as open source.
CopyFree - if a license is copyfree, you may impose further restrictions on it like adding a fee for the end product and refuse to distribute the code.
GNU public license - the copyleft standard applies if you included or linked to copyleft based license
Lesser GNU public license - the copyleft standard applies only if you directly included copyleft licensed code into your source base. But it does not apply if you merely linked to a copyleft type licensed product
Try to spend some time and go trough a few articles on the licensing subject and then you will start to understand licenses a bit better.
HTH,
JP

Is there any statistical library for javascript? [closed]

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 8 years ago.
Improve this question
I need to implement some statistical tests like: T-test, Anova and Wilcoxon on javascript.
Similar to Java's - Apache Commons Math Library, is there any statistical tests library or codes for javascript?
jStat : a JavaScript statistical library
https://github.com/jstat/jstat
OpenEpi is a Javascript stats library, is open source, and has ANOVA and t-tests. I've not tried it (it's a bit too focused on epidemiology for my needs) but it might be useful.
jStat is a javascript statistical library project, and it looks like it's got a great future, but it might not have all you need right now. Edit: as of Dec 2012 it looks like the jStat project page is no longer maintained but the project is continuing to be developed. There's more up to date documentation on github. It now does have anova tests and varieties of t-test. No sign of Wilcoxon signed-rank though.
If you need very specific statistical processing in javascript urgently, you might have most success by browsing Omegahat who have various little tools that bridge the established stats language R with others including javascript.
It'll depend on the details of exactly what you want to do, but you might have some success with packages such as RJavascript - a code translator which aims to help turn existing R features into Javascript (just don't expect quality results first time). Also, SpiderMonkey builds on R for browsers, so it might be useful for internal or personal uses (but it's unlikely to be suitable for public publishing).
Some years ago I ported https://code.google.com/p/statistics-distributions-js/ so that I could use it in http://elem.com/~btilly/effective-ab-testing/ - it may have the functionality you need if you only need simple things.
If you're looking for a simple library for descriptive statistics, you could use javascriptstats.com
It does:
Mean
Median
Mode
Range
Variance
Standard Deviation
Best!
Leveraging a related answer:
The following blog post lists some recent packages: http://jgoodall.me/posts/2012/02/01/javascript-statistical-libraries/
As mentioned by others, native JS is a far cry from R, which web-wise has progressed from RApache (http://rapache.net/) to shiny (http://www.rstudio.com/shiny/). The latter uses node.js server-side, so this is quite promising. Of course both approaches will require you to code stats in R server-side, instead of using JS either on client or server.
Marc

Could you pls comment before we start our mobile+server project? [closed]

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
We are a team of four CS undergrad seniors developing a mobile app (+ the web-based servicing architecture ofcourse) with the following intentions:
(1) Its our Degree Project (Thus comes, UML Modeling, Documented Testing & other specification reports)
(2) Our chance to learn & solve issues ranging from UI, data mining, AI, TO product-marketing!
At the end of the day, we wanna see many people globally, benefiting from it.
Could you please comment on the tool set we are using?
(1) Java + Eclipse + Android Plugin (ADT) & SDK (to start with)
(2) Various web-services SDKs
(3) On the server: ?? (dunno yet)
(4) For other artifacts: IBM Rational Modeler
any resources you think shall be better/helpful?
Thanks in advance!
UPDATE: We shortlisted UML/MDT extensions of Eclipse instead of IBM Rational Modeler
That seems a pretty typical setup. If you were doing this professionally, the next addition would be version control; Subversion is probably the most common.
Edit: If you're looking at the "free" price point on a Java server, Tomcat and GlassFish are the first three to mind, I think JBoss also offered a free/evaluation copy.
If you want a server you'd be hosting remotely, Java is one of the more expensive languages to host; PHP is probably the least expensive to host, with Apache being the most common server.
How will you manage your feature/task assignments? I would recommend Google Code if you don't mind allowing your tasks assignments to be public.
Otherwise JIRA is a good alternative (only $10) that my team has started using recently, though I have mixed thoughts about it. A different team currently administers the install so we haven't been able to customize it to our needs.
As for the technical architecture, I would need to know more about your project to make recommendations. Make sure you think about high level components and requirements before selecting technologies.
UPDATE: Without knowing exactly what you need to do on the server side, I would say a good technology to consider using is Spring Core (and possibly some of the other Spring modules). Spring will still allow you to use POJOs, but allow you to construct your application using dependency injection - which ensures your code is loosely coupled. Spring is worth learning - it promotes good programming practices and is used it many Java apps today.

Categories