Change a Font Awesome icon on hover (using content) + Sopler news!

Hi everyone! The past few days, we made some major updates on Sopler that we started designing a long time ago.

It is now possible to set a due date or edit your items using a brand new options menu. Also, when you enter a YouTube link, a (auto-scalable) player will appear on the list! ๐Ÿ™‚

Nonetheless, this post concerns changing a Font Awesome icon to another Font Awesome icon when the first one is on hover.

Firstly, I came across this post and a few (unrelated but helpful) answers on Stack Overflow that used the content property. Then, I thought that this might work pretty well and it did.

For example,

  <div class="divclass">
    <i class="fa fa-circle-o"></i>
  </div>

using this CSS:

.divclass{
  font-size:5em;
  color:grey;
  cursor:pointer;
}

.divclass:hover .fa-circle-o:before{
  content:"\f05d";
  color:green;
  opacity:0.4;
}

OK, the div element will be a full-width rectangle (use your Developer Toolbar to check what’s going on), but you can modify it later. Anyway, the result is: http://jsbin.com/noqiwi/

It might be trivial but it’s also a lot easier than other implementations I’ve seen so far.

An implementation of a person (and object) re-identification method

Hi! I would like to present you my latest upload on GitHub:

https://github.com/constanton/bLDFV

It’s the implementation of a research publication on human re-identification [1] in C++ (…with a very minimal OO design though).

This programme was created for academic purposes (!) and it can most probably also be used to re-identify other (similarly distinctive) objects as well, although this has not been tested. It divides the image into 3×4 blocks and uses very simple features (HSV values, first and second order derivatives).

As you will see on the GitHub page, the programme uses the open source OpenCV and VLFeat libraries. Also, it was developed on a Fedora 19 64bit machine using the Eclipse IDE.

I am aware that without proper documentation, the learning curve for using this programme might be steep but I hope I will find time to prepare something. All configuration happens inside the config.xml file. Using this file, after the training procedure (function zero), the programme creates a gmm_parameters.xml file which must be used aftewards during all other program functions (one, two and three) in order to produce the fisher.xml files that contain the image’s Fisher vectors and the .csv files that contain the Euclidean distances. The results are very similar to those of the publication using the same evaluation methods.

Nonetheless, improvements can be made. For example, during the training process, there is no random selection of the image features. This will improve the performance of the programme. Various other improvements are also possible.

[1] B. Ma, Y. Su, and F. Jurie, โ€œLocal descriptors encoded by fisher vectors for person re-identificationโ€ in ECCV Workshops (1) (A. Fusiello, V. Murino, and R. Cucchiara, eds.), vol. 7583 of Lecture Notes in Computer Science, pp. 413โ€“422, Springer, 2012.

A Creative Commons music video made out of other CC videos

Hello! Let’s go straight to the point. Here is the video:

…and here are the videos that were used having the Creative Commons Attribution licence: http://wonkydollandtheecho.com/thanks.html. They are downloadable via Vimeo, of course.

Videos available from NASA and the ALMA observatory were also used.

The video (not audio) is under the Creative Commons BY-NC-SA licence, which I think is quite reasonable since every scene used from the source videos (ok, almost every scene) has lyrics/graphics embedded on it.

I hope you like it! I didn’t have a lot of time to make this video but I like the result. The tools I used are not open source unfortunately, because the learning curve for these tools is quite steap. I will definitely try them in the future. Actually, I really haven’t come across any alternative to Adobe After Effects. You might say Blender…but is it really an alternative? Any thoughts?

PS. More news soon for the Sopler project (a web application for making to-do lists) and other things I’ve been working on lately (like MQTT-SN).

2013 in review powered by WordPress

The WordPress.com stats helper monkeys prepared a cute annual report for this blog for 2013 ๐Ÿ™‚ For 2014 I’ve bought tickets for FOSDEM 2014 to represent Sopler and share what cool things can happen with it.

Right now, I’m taking a look at Mozilla’s version of the l10n.js library in order to localise Sopler (at least on FirefoxOS).

Well, that’s it! Have a great 2014! By the way, for this year, the 3-years-in-a-row champion is again “My Fedora 15 tweaks for an SSD” (ok, it accumulates all previous years but nevertheless it still gets views). I guess they’ve become even more popular! (both Fedora and SSDs).

PS. A weird thing to say but, if anybody works for a new wave/post-punk/indie rock record label, comment or PM me! I got good news for you from Wonky Doll and the Echo.

Click here to see the complete report.

Making a Tabzilla clone using Bootstrap

Hi, as you might have noticed Sopler has a navigation menu very similar to that of Mozilla’s Tabzilla…but it’s not ๐Ÿ™‚

I think Tabzilla is a great tool but while making Sopler’s front-end with Bootstrap I faced a problem integrating it. I had to use a string in order to place HTML inside my menu. That’ss very restrictive. But, I found a similarity between a component of Bootstrap and Tabzilla!

I have no idea if someone else has found that out too, but it’sย  the same effect with Bootstrap’s accordion. It expands & retracts.

In this post I will use the template of the navbar-fixed-top example from Bootstrap 3. Go get it here (Download source). It’s in the examples folder. Tabzilla is not fixed so I think we have an improvement here. Anyway, someone might find it too much, so, to implement my example on the navbar-static-top, you won’t need the javascript code at the end of this post. Here is a demo for navbar-static-top (not the navbar-fixed-top I mentioned before): http://jsbin.com/EkAweqA/1/ (press the Menu button)

The whole trick is to place the “accordion-body” div above the “accordion-heading” and then write a few lines of Javascript to change the navbar’s position from fixed to relative….and that’s it!

Go to the navbar-fixed-top example, open index.html and replace everything between:


<!-- Fixed navbar -->

and


<div class="container">

<!-- Main component for a primary marketing message or call to action -->

(this is NOT the first div class=”container”ย  you’ll find, it’s the one in line 69)

<!--- This will not show up until you press the Menu button --->
<div id="login_box" class="login-box">
   <div class="accordion" id="accordion2">
      <div class="accordion-group">
         <div id="collapsemenu" class="accordion-body collapse">
            <div class="accordion-inner">
		    <div class="row inner_box">
			<div class="col-md-12">
			    <h2>Put any HTML goodies you want here!</h2>
			</div>
		    </div>
	    </div>
         </div>
      </div>
   </div>
</div>

     <!-- Fixed navbar (To make it static simply change to navbar-static-top)-->
    <div class="navbar navbar-default navbar-fixed-top">
      <div class="container">
         <ul  class="nav navbar-nav list-inline" style="float:right; margin-right: 5em; white-space: nowrap;">
   	<div class="accordion-heading">
        </div>
	 <button type="button" id="menu_button" class="btn btn-primary navbar-btn" data-toggle="collapse" data-parent="#accordion2" href="#collapsemenu">Menu</button>
</ul>
	<a  class="navbar-brand" href="#">Brand name</a>
      </div>

    </div>

Now, we need to create two more classes at the navbar-fixed-top.css (it’s next to index.html inside the navbar-fixed-top folder) :

.login-box{
white-space:nowrap;
top:0;
width:100%;
background:#fff;
overflow: hidden;

}

.inner_box{
margin:0 auto; max-width:57em; text-align:center;
}

Of course you can style it the way you want! And finally let’s go to the footer of the page (under the jquery.js call) and put this script (not useful for the navbar-static-example):

<script type="text/javascript">
$(document).ready(function(){
var isopen="";
$('#menu_button').click(function(){
if (!open){
$('.navbar-fixed-top').css('position','relative');
$('html,body').animate({ scrollTop: 0 }, 'normal');
}else{
$('.navbar-fixed-top').css('position','fixed');
}
isopen=!isopen;
});
});
</script>

Let’s explain the script! We use the isopen variable (line 3) which is set to false by default. It’s working like a switch. If the menu is not open and we click the Menu button then the page scrolls to the top and the position of the bar is set to relative. If we click the button again then the navbar’s position is se to fixed. We don’t need to scroll because when the menu is open the bar won’t move from its place anyway (that’s why we used relative).

If all goes well, when you click the Menu button it should look like that:

Introducing Sopler, a new open web application!

Here are some exciting news: The last two of months I’ve been part of a promising project. We made a web application that uses open standards (and it’s open source). It’s called Sopler and we are the Sopler project. I worked on the UI/UX design partย  (meaning, HTML5, CSS3, JQuery etc) and oh boy…I’ve learned a lot of new stuff (like Bootstrap 3, FirefoxOS etc) and there are lot’s of things to post on this blog in the near future.

What can you do with Sopler? Make a list, add some items and share the link with your friends.They can add or check some items, make comments etc…

Sopler is still in Beta but you can check our code on Github. Enjoy our new video (with english & greek subtitles available):

What can’t you see in the video? Sopler can “remember” all previous lists of an authorized user (who signed in using a social account), plus, his privileges over any item are greater than those of a non-authorized user.

That’s because a social account profile makes a user unique and in this way it’s easy to map a user to his list.

Yes, Sopler is on many social networks too: Facebook, Twitter & Google+

So, see you soon with more news ๐Ÿ™‚

MSP430 + Eclipse CDT on Fedora 19

Hello! This is a guide to install Eclipse and everything required to flash your project to a MSP430 board ๐Ÿ™‚

First, you need to install Eclipse CDT (the Eclipse version using the C/C++ IDE) and there are three ways:

  1. Go the Eclipse’s website, download and install it yourself
  2. Use Fedora’s “Software” application (which is PackageKit, the GUI of yum) and search for “eclipse-cdt”
  3. Use your terminal, type su, press enter, give your root password and then type yum install eclipse-cdt. Type “y” to install all dependencies required for eclipse-cdt ๐Ÿ™‚

After you have successfully installed Eclipse CDT you can continue to the main course. We need a plugin for MSP430 called msp430-eclipse by xPG. Don’t download anything yet. We’ll use Eclipse for that!

Now, open Eclipse go to Help->Install new software and add http://eclipse.xpg.dk as a software source. Use it to install the msp430 plugin.

Next, we need a tool-chain that includes all files to compile, debug etc our code specifically for our MSP430 platform! Visit xPG’s website as mentioned previously. Scroll down and choose the version of the tool-chain for your system.

We will need to install a few packages more though as xPG’s tool-chain is not sufficient (If you try to compile without those packages it will fail to find libmpc.so.2, or something like that). I fixed it by installing five msp430-related packages: msp430-binutils, msp430-gcc, msp430-libc, msp430mcu, mspdebug. Maybe some of them are not really needed but ok it’s only a few Kbytes and in the end everything works well. You can use step 2 or step 3 from above!

If you are confident for your tool-chain and skipped my previous steps, you don’t need to download any package (the next step), you just need to configure Eclipse later on.

Download and extract the package in an appropriate location (like your home folder, or any other folder inside it). Go to Eclipse (with the plugin already installed, like I showed you before) and from Eclipse’s menu click on MSP430 -> Tool Manager. Pressย  “Add…”, find the tool-package folder, select it and click OK. On the Tool Manager, select the tool-chain and press “Activate”.

If you want to use your own tool-chain, all MSP430 compilation and debug tools can be configured at Window->Preferences->MSP430.

As normal users we don’t have permission to use the USB bus. To fix that, go to Fedora’s “Users and Groups” or system-config-users (if you don’t have that install it like all other packages). Create a group named eg. “usb” and add your user into it (“Users” tab -> select your user-> Properties). Log out and log in again for changes to take effect.

Next, go to a terminal, type “su -” and create a file with the command: gedit /etc/udev/rules.d/71-persistent-msp430.rules . Then, copy, paste and save this:

SUBSYSTEM==”usb”, ATTRS{idVendor}==”0451″, ATTRS{idProduct}==”f432″, MODE=”0660″, GROUP=”usb”

The numbers “0451” and “f432” can be verified if you connect your board and use the command “lsusb”.ย  Now, go to a terminal for the last time and give these three commands:

systemctl restart systemd-udevd.service

systemctl restart systemd-udev-trigger.service

systemctl restart systemd-udev-settle.service

Now, let’s make a new project and test what we’ve done. This will require a MSP430 board, hopefully supported by the plugin (which is very probable as you will notice). Create a new C/C++ project and select the “Empty project” at the “MSP430 Cross Target Application” folder. Give it a name and then click Finish.

Right-click the project at the “Project Explorer” and choose Properties. Go to the “MSP430” section, select your MCU and debug settings. Next, go to the “C/C++ General” section -> Paths and Symbols, select GNU C at the “Includes” tab and include the path โ€œ/home/username/any_directory/msp430-toolchain-linux-amd64-3.0/msp430/includeโ€ (same for GNU C++)

Right-click the folder, create a src folder and place a source file into it preferably with a blink.c (a blinking LED example) file for your board such as this one in this blog. Don’t forget to include your board’s header file!

Build the project, then right-click the project and select MSP430->Upload to target (or use the icon for that job at the main bar).

The example should work and this brings us to the end of this tutorial ๐Ÿ™‚

YouTube HTML5 Switch v0.1.7 & News

Hello!

Long time no see! I’ve been busy outside the blog-sphere and I’ve got some news to share. First of all, I upgraded my Firefox Add-on to version 0.1.7. So here is the link:

https://addons.mozilla.org/en-US/firefox/addon/youtube-html5-switch/

All in all, the important addition is that you can now use the hotkey Control+Y instead of pushing the button on the toolbar. Plus, I think it now has no other issues for most new versions of Firefox. I need to point out that I get most of the help from the SDK’s documentation which is great, but, to anyone interested, don’t hesitate to contribute to its content! Restartless add-ons rule!

You may use it and see if it works on YouTube (yeah it works, at least for Firefox 21.0 w/ Fedora Linux) using this video:

Yes! It’s the first video of the band I play with, directed by Kostas Gounaris. Cool huh? ๐Ÿ™‚

I hope you’ll like it as we put a lot of effort to complete it and guess what? There’s also going to be a short film based on the song. I’ll let you know!

Happy new year & YouTube HTML5 Switch v0.1.3

Happy new year everybody!!!

Here I am, once more, to announce the new version of my recent small project YouTube HTML5 Switch. I made quite a few additions to the previous version (for which I already made a post) and changes to it and it’s on its way to become a fully reviewed add-on for Firefox ๐Ÿ™‚

So what the 0.1.3 version does and has right now is:

  • A navigation bar button using the toolbarbutton-jplib (and its depdencies) by erikvold
  • a new 16×16 icon for better cross-platform compatibility (I know, it used to be prettier but I will make it again soon)
  • It works only when “youtube.com/watch” has been opened
  • It doesn’t work if &html5=1 is already in the URL
  • A clickable widget icon at the add-on bar.

What really changed is that now the navigation bar button is movable and its position is maintained if you open a new window etc. More fixes soon ๐Ÿ™‚

Once again, the code is on my github repo. Of course, for any major change I will keep you posted ๐Ÿ™‚

For those and only those who already use YouTube HTML5 Switch and will upgrade to v0.1.3: Don’t worry if the old icon remains on the browser window. Just restart Firefox and everything will work fine!

————————- Ahem…ahem… Your attention pleaseย ๐Ÿ™‚ย  ————————————–

Update: The campaign ended successfully ๐Ÿ™‚

Another project I want to talk about is one that’s on Indiegogo, a crowdfunging website! It’s for my band, Wonky Doll and the Echo. If you dig cinema and like our music please, have a look on our Double project: a music video & a short movie. We will collaborate with a director, Costas Gounaris, for our first music video! Our page is here: http://igg.me/p/297701/ Every cent counts and everyone wins gifts too!

By the way…this is the song of the music video:

YouTube HTML5 Switch (and other news)

Hello! Long time no see!

It’s been a busy period and I have lots of news to share. First of all, I decided to have a look on the Mozilla Add-on SDK . It has a very simple API to create Add-ons for Firefox.

Anyway, I tried to come up with an idea of what would be my first Add-on. Hmmm…An Add-on that can make my web experience less annoying. Considering that I spend half of my time on YouTube to listen to songs (mostly), view videos etc, as a Linux user, I get really annoyed when the Flash plug-in crashes and I have to restart Firefox.ย  You can always visit youtube.com/html5 to change that but what if you delete your cookies? It’s a boring procedure.

youtube_html5_switch_logo
YouTube HTML5 Switch logo

So, what I thought was to make an Add-on that would simply add the “html5=1” parameter on the URL. And I did it…well, kind of, it’s now an experimental Add-on for Firefox. I need to add some more features for it to be considered as a proper Add-on. It’s called “YouTube HTML5 Switch” and here it is at the Mozilla Add-ons website, and here is the source code on Github.

I currently develop the Add-on at the Add-on Builder (that means online). I will eventually download the SDK and try it on Fedora ๐Ÿ™‚ It’s not the smartest Add-on in the world, but I think it’s a good start for a newbie. By the way I need to say that the SDK’s documentation is not very helpful and I needed to google a lot to write down a few lines of code. Anyway, in every “major” release I will be posting here any changes etc. You can also read the README.md on Github.

What’s more? Wonky Doll and the Echo (the band where I play) are supporting I Like Trains here in Athens on December 15, 2012. You can check our Bandcamp page and listen to our songs. Now, if you have installed the Add-on you can test it with these video…if you go on YouTube of course ๐Ÿ™‚

Some videos like this for instance don’t have an HTML5 player so the plugin will not be of any use here.

Other videos though, do have have an HTML5 version and the plugin will work!

%d bloggers like this: