There is no exact match between dependencies in Maven and Gradle, however here’s a rough mapping: You can auto-convert your dependencies from Gradle to Maven here: https://gradle2maven.stackblitz.io/
Category: Uncategorized
iCloud vs GDrive vs Dropbox vs AWS Glacier
I’ve compiled a small table for myself to check what’s best suited for me. Thought I’d share if someone tries to make the same decision. iCloud GDrive Dropbox AWS Glacier Possible to store in Cloud but not on local machine? Yes (append .nosync to file or folder in iCloud-WebView) Yes (pref -> google drive -> […]
Caching with Gradle in Gitlab with AWS Autoscale
So you have a Continuous Integration Server that runs some build tasks. For example, you’re running ./gradlew buildTaskOne. Now, if you run ./gradlew buildTaskOne again you don’t want it to build again if nothing has changed, you just want it to say “up-to-date” and then move on to the next task. On your local machine this […]
StackOverflow Sorting is Broken
StackOverflow sorting sucks. The accepted answer is always on top. This is a joke. The asker of the question usually accepts the first best thing and then heads off. Thousands of people to come will then see the first best answer on top. For example: https://stackoverflow.com/questions/16267339/s3-static-website-hosting-route-all-paths-to-index-html . How ridiculous is that? Below the accepted answer, it’s […]
What’s up with Angular Universal?
I was excited when I heard Angular 2 would support server-side rendering since SEO was a huge PITA (pain in the ass) with Angular 1. It was said that server-side rendering would be possible through Angular Universal. Yet, this Angular Universal thing, what’s up with that? Seems to have a really small team on that […]
5 Funny Computer Science Jokes
Why do Java programmers wear glasses? Because they can’t C#. SQL A SQL query goes into a bar, walks up to two tables and asks, “Can I join you?” 3 guys A physicist, an engineer and a programmer are on a steep mountain passage, when suddenly the breaks stop functioning. After some shouting and near […]
I can’t see my <hr> tag (horizontal line), where did it go?
If you can’t see your <hr> tag, your best bet might be that it somehow got display: flex . This will cause the hr to have width 0. Test it by giving it the style <hr style=”width: 100%”> and see whether this solves your problem. For example, if you use an Angular Material Design Card md-card, they […]
UIB (Bootstrap) Component Modals Made Easy
So UIB decided to support “component modals”. Unfortunately, the way I see it, the components need to be “dirtied” with the modal logic, meaning you will also need to include resolve and close in every component you want to display as a modal. Inside the components constructor or $onInit you then proceed to “resolve the resolve” (i.e. if(resolve){ […]
Bootstrapping an Angular 1.5 Component with Typescript
Angular 1.5 introduces the “Component” concept in order to get closer to Angular 2. By now you might have started to use typescript in your project, but upgrading to Angular 2 was too big of a step. However, you can start writing “Components” in an exact-angular2-style. Here’s what you’ve got to do. First of all […]
Long to Base64 and Base64 to Long in Java
The following code converts a base64 String to a long and vice versa. private static final String alphabet = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-“; public static String encodeBase64(long v) { char[] a = alphabet.toCharArray(); v = Math.abs(v); String s = “”; for (int i = 0; i < 11; i++) { long val = v & 63; s = […]