This is a post about making ansible more declarative, one step at a time.
Integer overflow needs attention of the developer and misimplementation can cause serious security implementations. We examine the conditions and remedies below.
This post is about the dangers of ignoring return values in functions and API calls (where I see exceptions as another form of returned value).
Long after my babbling on permutations before, here is a similar class on combinations.
I’ve recenty switched back a long and tormenting experience from Hackintosh to Ubuntu. Let’s see how more or less tormenting it will be (so far, I have to bid farewell to my beloved AMD Radeon card). But I’m happy to have iTunes running without a glitch. The trick is to make sure you have Wine stable from Ubuntu 18.04 repositories and make sure you install the 32 bit iTunes executable. Just run:
First of all, permutations are overrated. You will need to compute permutations a few times in your life, but then the rest will be all about reusing your last solution. On the other hand, iterators in java is a joy. Mostly when it’s about converting recursive solutions and feeding the results one by one non-recursively. So now you know how I spent one my Friday nights. Oh, by the way, this one can permutate some quite long sets since it doesn’t rely on recursion or the result of the factorial of the number of elements to fit in the range of long.
I recently notice that articles, blogs and tweets that denounce YAML as a viable format is on the rise. Introspecting, I feel I have the same feelings for a long time; and not only for YAML but also for JSON. For starters, have a look at this and this. To summarize, most of the critics address mostly design bugs, and a few inconveniences: It is insecure by default, allowing arbitrary code execution.
Here is a quick tip for time constrained operations in java. If you need to process a long list but stop at some point in time, here is a solution: import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.TimeUnit; public class TimedIterator<T> implements Iterator<T> { private Iterator<T> originalIterator; protected boolean nowIsTheTime; private final TimerTask timerTask = new TimerTask() { @Override public void run() { TimedIterator.this.nowIsTheTime = true; } }; public TimedIterator(Iterator<T> originalIterator, long duration, TimeUnit units) { this.