How to Overcome the Same-Origin Policy in an Iframe

Common problem with an iframe...

Common problem with an iframe…

A lot of webmasters use the Access-Control-Allow-Origin header in order not to have their content displayed somewhere else on the web. It is quite understandable as they want to have their intellectual property protected. But sometimes it might be useful to have some website loaded into an iframe although the iframe is quite old-fashioned HTML element.

In order to do so I found interesting service called WhateverOrigin.org (which is an open Source clone of similar service called AnyOrigin.com). It just grabs content from a website specified in GET parameter and returns it together with HTTP status code as JSON data.
Continue reading

Posted in Programming | Tagged , , , | Leave a comment

How to Load Native JNI Library from JAR

The JNI (Java Native Interface) is a framework that provides a bridge between Java and native applications. Java applications can define native methods which are implemented in dynamic library written in other languages such as C or C++. The dynamic library is able to call both static and dynamic methods. More information about JNI can be found on Wiki or in tutorial Beginning JNI with NetBeans (for Linux).

The problem is that for loading such a dynamic library you have to call method System.load(String filename) which requires an absolute filename. This approach is just fine if you have dynamic library outside the application’s JAR archive, but when bundling dynamic library within the JAR it is necessary to extract the library into filesystem before loading it. And that’s exactly what my code does.

Continue reading

Posted in Programming | Tagged , | 6 Comments

Decimal Comma in Matlab Plots

A Matlab graph with decimal commas

A lot of languages (not only the European ones) use decimal comma instead decimal point to separate the whole and the fractional part of a number in decimal form. Matlab (like other programs) uses decimal point for this purpose. This is okay when using it for computations but it is better to use decimal comma in graphs embedded in documents written in some European language.

This approach also works in GNU Octave which is available for free. ;-)
Continue reading

Posted in Programming | Tagged , | 1 Comment

BeagleBone Enclosure by Built-to-Spec

A few days ago I discovered very nice acrylic enclosure for my BeagleBone board at Built-to-Spec. Craig placed his project to Thingiverse, so that everyone can make his own. I have sent these design files to one of local laser etching services (alexk.cz from Opava, Czech Republic if someone is interested).

 

The case looks really good! Since I have the new A6 revision of BeagleBone board, I had to make hole for its SD card slot a little big larger using my knife. Craig from Built to Spec has already created modified version which solves this issue.

Both sites Built-to-Spec and Thinkiverse are worth seeing since they offer more interesting projects. I am happy that so many people publish their constructions on the web. They all help to make our world better place :-)

Posted in Projects | Tagged | Leave a comment

Hello world!

So this is the first post on my blog. Let’s begin! Please be patient with my poor English. I will do my best to improve it :-)

Posted in Uncategorized | Leave a comment