JP

Experimenting with interactive art. Maybe that's next?

Category: another snippet | code (page 1 of 3)

Code/Uncode Discussion Posts

Mocking the HTTP/2 Apple push notification gateway in Go

At CleverTap, we had the need to mock the new HTTP/2 Apple push gateway API. After trying to do this in Java, and then in Python, I succeeded in getting it to work in Go. Go out of all languages! To me, Go has a completely strange syntax, compared to Java and C. This mock server […]

Compile LESS on the fly for your exploded WAR in IntelliJ

At CleverTap, we’ve recently started using LESS for dynamic CSS. While it has it’s upsides, the biggest downside was that most of our developers couldn’t use the hot deploy feature for their local deployments. After an hour or so, we came up with a neat solution.   There are two parts to this: Just before deploying […]

Sending notifications via Apple’s new HTTP/2 API (using Jetty 9.3.6)

HTTP/2 is still very much new to Java, and as such, there are just two libraries who support it – Jetty (from 9.3), and Netty (in alpha). If you’re going the Jetty way (as I have), you’ll need to add their ALPN library to your boot classpath. Note: Jetty 9.3.x requires the use of Java […]

openFrameworks and AppCode

Developing an openFrameworks app with AppCode is pretty easy. However, if you just open and run the project created by the project generator, you might see the following errors: Why doesn’t it just work? This is because openFrameworks doesn’t support 64 bit builds yet on the Mac, due to a dependency on the deprecated QT […]

CLion 1.1.1 and openFrameworks 0.8.4

A basic template to start building oF projects using CMake within CLion. It’s here on GitHub! All credits go to kureta for the CMake files. I’ve just pieced it together as a project which can be imported.

OpenWRT won’t bring my WiFi interface up, unless the other is up

I recently bought a D-Link DIR 505 router. So far, I’ve got a DLNA server running on it, along with Transmission, a bit torrent client. Life is awesome so far. I set it up to repeat another WiFi router in my house, the one connected to the internet – using a bridge. It works really […]

Discover – my second iOS app

iTunes Genius is a great feature. However, it lacks music discovery outside your own music library. Sure, you can always do a Google search for similar tunes, but let’s face it – who has time to do this anymore? There weren’t any great music discovery apps on the App Store either. All of them either […]

Download your Coursera lectures using JS, bash and wget

So, in light of recent events, I was unable to follow up on my Coursera Algorithms course. Trying to find a way to download all the lectures at once, I couldn’t find a way that worked for me – I found two, but they simply didn’t work. With the help of some JavaScript that I […]

“The Library” is here

“The Library” is a collection of several popular encyclopedias. It is your one stop for popular game guides and TV show trivia. You can search, and bookmark articles from various encyclopedias. What’s more? Each time the app is launched, it displays a random featured article from the encyclopedia you last viewed! Explore more about your […]

CardBox – Personalize a card for every occasion

We[the CardBox developers], have recently launched a brand new app, CardBox, which allows you to create and instantly share greeting cards for almost any occasion! CardBox allows you to create cards for the following occasions currently: Birthdays Anniversaries Christmas New Year’s day Valentine’s day Women’s day Mother’s day Father’s day Parents’ day Grandparents’ day Halloween […]

How to get a File object of an Android raw resource using reflection

Context: You have a URI to a resource which is placed in the raw directory inside the Android resources directory, res. Say you want to take that raw resource(let’s say it’s an image) and add it to an attachment using FIleBody to a MultiPartEntity. Both these classes are available in the Apache HTTP Components library. FileBody […]

Uncyclopedia App for Android – On GitHub

I’ve decided to open source the Uncyclopedia app for Android, which some of you may remember was available on the Play store during the first quarter this year. Browse the code on GitHub. The source code is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

Calculate the REAL scale factor and the angle of rotation from an Android Matrix

After performing transformations such as rotation of a bitmap about an arbitrary point, the scale is lost. Of course, this makes sense because the bitmap is rotated inside the same bounds. To get the real scale now, along with the most reliable degree of rotation, I had to follow this method. Hope it saves the […]

Multi Touch in Android – Translate, Scale, and Rotate

Here’s a quick and easy implementation of Android’s multi touch feature – one finger to move, two to zoom, and three to rotate the image. Assuming you have a basic understanding of 2D matrix transformations, the Matrix class in Android uses a 3×3 matrix to achieve all of the 2D transformations. The source code and […]

Older posts

© 2016 JP

Experience powered by CleverTapUp ↑