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
I am looking for a web service that returns the current moon phase as some kind of string, like "Waxing 88%" or a similar string that I can store later in a database. This is for a mobile app, so would rather not use some of the suggested algorithms to calculate it.
Short of finding this, what is your opinion of calculating this in JavaScript on a device? Will this be too resource intensive?
Based on an article I found describing moon phase calculation, I can tell you already that sending a network request over the internet, waiting for and then parsing a response, and finally dealing with the calculations is far more resource intensive then simply performing arithmetic on the device. It will almost certainly use less computing power, less battery power, and less network bandwidth.
You can find a simplified calculation method here:
http://www.voidware.com/moon_phase.htm
This project uses JavaScript to both calculate and display moon-phase information, and may be more relevant to you:
https://github.com/tingletech/moon-phase
Related
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 2 years ago.
Improve this question
Question Is there an API for Windows and/or Linux that will let me find out which processes are draining battery?
A few notes:
It doesn't have to be precise, I'd be ok with only three levels (low energy cost/fair energy cost/high energy cost) if that's all I can get.
I already have CPU load information, that's not what I am looking for, as experience shows that processes with very low CPU use can nevertheless drain battery by having high I/O, high swapping or frequent wakeups. This is why I'd like to piggyback on whatever the OS is already using: OS developers are much more likely than me to have actually tested this.
I found a partial solution for macOS. See answers.
MSDN doesn't seem to indicate any energy-related API.
I cannot request admin/root rights for running my task manager, so I cannot simply parse the syslogs looking for power usage alerts.
I've found a great reference for how macOS does it.
https://blog.mozilla.org/nnethercote/2015/08/26/what-does-the-os-x-activity-monitors-energy-impact-actually-measure/
That should be fairly easy to follow.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I searched on Google, but didn't get straight answers that what are the advantages of Service Oriented Architecture?
Can someone please highlight some of the benefits of SOA?
The two most important (at least in a practical sense) are:
Small, manageable (i.e. maintainable) components.
Services can be distributed across different machines. This makes
the system highly scalable.
In other words: SOA is a good fit into the modern software development landscape with distributed teams and ever-changing requirements, be it functional or non-functional.
It gives great deal of re usability to your code and enormous power to the business as well.
Lets say you start creating an application for banking, now you need to create a mobile app for the same, and if that's not it you have to expose methods from your service to Master /Visa for transaction.
Now in the above scenario if application has been designed with SOA in mind, then lot of code is reused with added advantage of centralized deployment.
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 8 years ago.
Improve this question
I'm looking to write a reporting tool. The data resides in a ~6GB postgresql database. The application is an online store/catalog application that has items and orders. The stakeholders are requesting a feature that will allow them to search for an item and give a count of all those orders in the last 2 years.
Some rows contain quantities, and units of measure, which would require multiplication of quantity and UoM for each row.
It's also possible that other reporting functions will be necessary in the future.
I have not delved much into the data analysis aspect of programming. I enjoy Clojure, so I would be thrilled to find a solution that uses Clojure, but only if Clojure offers competitive tools for my needs.
Here are some options I'm considering:
merely SQL
Clojure
core.reducers
a clojure hadoop library
Hadoop
Can anyone shed some insight into these kinds of problems for me? Are there articles that you would recommend?
Hadoop is likely overkill for this project. It seems most likely that simply using Clojure-jdbc or Korma to read the data form the database and filter/reduce it in Clojure is likely to be fine. At work we routinely work with sequences of that size, though this depends on the expected response time. You may need to do some preprocessing and caching if instantaneous responses are expected.
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
I need some library which has comprehensive set of APIs which can help to collect performance data of current machine. Could be very useful if this library written in C++ or Perl.
Tried to googling, since I don't know right terminology for that I found a lot of big and already established projects, which I cannot embed into my code.
What you are looking for is called PAPI Performance Application Programming Interface. It lets you collect data on all performance counters available e.g. FLOP (floating point operations) if you wish to validate your theoretical FLOP count. It also offers an API to compute MFLOPS or even find the cache hit ratio for your application. I have used the library extensively in supporting platforms in addition to Intel VTune.
Here is a list of "native" PAPI events but everything else you will find as CPU native counters.
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
Anyone knows a good FREE dictionary service? I want to consume it through HTTP Get and then parsing simple HTML or Json.
Dictionary.com is free for non commercial purposes. I need something completely free and reliable.
Google used to have a good api but thy have since changed it to a paid service.
Wordnik API might be usefull http://developer.wordnik.com/docs
It requires a registration, but it supports a bunch of cool features, such as word audio, and you can easily find client libraries for that in different programming languages.
The okapi framework offers a set of translation connectors. Take a look:
http://www.opentag.com/okapi/wiki/index.php?title=Connectors
Not sure about the licenses for those services they are using - but some of them might be just what you need. (click on each connector to read about the webservice it is based on)