Swap the rows and columns of an HTML table

Recently I found myself converting a PDF into an EPUB. One challenge of such a task is to make the tables more compact to be able to fit in small screens. Sometimes, the best solution was to invert the rows and the columns of the table.

I looked on the web how to quickly swap rows and columns but most of the solutions involved CSS. The EPUB format does not handle CSS very well and I preferred to convert the table in pure HTML. The only solution I found was in this SO post. I added support for the TH tag, wrapped the algorithm into a nice page and published it as a ready-to-use tool.

So if you need a quick way get the transpose of an table in pure HTML, try my HTML table swapper! Note that it does not support “colspan” and “rowspan” yet.

You can also have a look at the source code.

Posted in Various | Leave a comment

Letter O or digit 0?

When playing online with friends yesterday, I had to dictate over phone a short URL with random characters in it. Unfortunately, some characters could have been the letter O or the digit 0 and I was unable to know that!

I quickly looked up for an online tool to help me but I couldn’t find one. That’s why today I release “Letter O or digit 0”, the first online tool to quickly know where are letters O and digits 0 in a text.

You can also have a look at the source code.

Posted in Web | 1 Comment

[Unity3D] Manage links with TextMeshPro

In Unity3D, you can use TextMeshPro or TextMeshProUGUI with embedded links. For example, your text can be:

TextMeshPro Text component with a link

But this is not enough to get it open on click. You also need to handle the click and execute the action you want, based on the link ID (here the link ID is the URL). To do that, just attach this script to the same object of your TextMeshPro or TextMeshProUGUI component.

Continue reading

Posted in Unity3D | 4 Comments

[Unity3D] Make a Coroutine synchronous

Unity3D coroutine synchronous

In Unity3D, Coroutine is a great tool to make parallel scripts in a safe way. However, in certain cases you may need to execute a Coroutine synchronously, and Unity does not offer any method out of the box to do so.

Here is a small code snippet you can use in C#:

Continue reading

Posted in Unity3D | 12 Comments

Restart service after update (Android)

Restart service after update through the Google Play Store

Maybe it is time to update your rusted background service?

For my Android project Stopeen, I implemented a functionality to schedule actions with a recurrence over time. But one of my problem was : when people will update my app from the store, the service in background will be killed, and so do they the pending intents handled by the alarm manager. So how could I restart the service without forcing my user to launch my app immediately after each update?

Continue reading

Posted in Android | 5 Comments

Android Studio Bookmarks

Android Studio Bookmarks toggle

Android Studio Bookmarks toggle

Here is a small tip for Android Studio. I added a bookmark by accident, in one of my source file, and I did not find out easily how to remove it.
Continue reading

Posted in Android | 4 Comments

Parallax scrolling in HTML5

Parallax scrolling example scene

Example of parallax scrolling (by OhSqueezy)

The parallax scrolling is an effect applied to an image to make it move slower or faster than the other images. This effect is very popular in the 2D games, to create a feeling of deepness : when an image goes faster, you think that this image is closer than the rest of the page, if it goes slower, you will think that it is further.
Continue reading

Posted in Web | Leave a comment

Turn off 4G on Android phones

Turn off 4G

It does not exist a “4G switch” on Android!

You can stop looking for a “4G switch” to toggle 4G in your Android settings, it does not exists. To turn off 4G on smartphones, you need to disable access to the LTE network. Many Android devices (Galaxy S4, Galaxy S5, Galaxy Note 4,…) have similar steps to modify this option.

Continue reading

Posted in Android | 26 Comments

Activity: forget onPause to handle focus changes

onPause to handle focus changes seems to be a good way, but actually it is not!

Even if, in the lifecycle graph, the onPause method seems to be called when the activity loose the focus, it is not always the case!

I spent one whole afternoon on a very silly issue about the Android activity lifecyle when the focus changes and the device is turned on. I want to share it with you to avoid you some hours of investigation!

Continue reading

Posted in Android | 1 Comment

Droidcon Paris 2014: talks

Droidcon Paris 2014 talks

Attentive audience 🙂

This article follows the Droidcon Paris 2014 overview I published two weeks ago. Unfortunately, I could not assist to all of the talks, because generally they were 3 at the same time. Here is a sum up of the talks I preferred, among those I attended.

Note that most of the photos here are from the Paris Android User Group and BeMyApp. You can find more of their photos on Flickr.
Continue reading

Posted in Android, Event | 7 Comments