Clojurescript_s_Reagent__Using_props_in_lifecycle_hooks

Clojurescript's Reagent: Using props in lifecycle hooks

I was struggling to get use Facebook React’s props in Reagent’s lifecycle hooks. Don’t worry if you are in the same boat, here comes the solution. My current way of doing this is to use reagent.core/props in the lifecycle hooks. Here is a small working example (based on my work on an application for polytopic vector analysis (PVA): PVA-Parrot), illustrating how to plot with Reagent and the Flot charting library. Pay attention to the usage of `props` in the first `let` block. ...

March 8, 2015 · 2 min · Nils
Face Detection with Clojure

Image analysis with Clojure and OpenCV: A face detection example

I recently got not only interested in Clojure but also want to utilize it for some image analysis now. OpenCV is a very solid package for image and video analysis. Java bindings have been released for OpenCV at the beginning of 2013. Unfortunately it wasn’t as easy as I expected in the first place to use it from Clojure. I would like to show you how to do it. Here is an outline of the necessary steps: ...

April 26, 2013 · 6 min · Nils
AngularJS Logo

AngularJS: Send auth token with every request

AngularJS is an awesome javascript framework. With it’s $resource service it is super fast and easy to connect your javascript client to a RESTful API. It comes with some good defaults to create a CRUD interface. However if you are using an API, which needs authentication via an auth token, you might run into issues: The resource factory creates a singleton. If you do not already have an auth token when the factory is called, or if the auth token changes afterwards, you cannot put the auth token as a default request parameter in the factory. ...

July 5, 2012 · 6 min · Nils

CORS API with OAuth2 authentication using Rails and AngularJS

Introduction For my latest project PomodoroEasy I wanted as much decoupling of the web client and the server as possible. So the server only provides a RESTful JSON API to feed the client. All the templating, views and business logic are done clientside. Furthermore I wanted them to be provided on different servers and domains. The client is a single page webapp, which resides as a static project on it’s own server. It is not sent from the Rails API server. ...

June 23, 2012 · 10 min · Nils