Kasper

Page 4 of 7

Hugo

Last weekend I saw Hugo, beautiful movie. And one of the main characters, Hugo, said something very intriguing that I needed to share with the world.

I’d imagine the whole world was one big machine. Machines never come with any extra parts, you know. They always come with the exact amount they need. So I figured if the entire world was one big machine… I couldn’t be an extra part. I had to be here for some reason. – Hugo

Datepicker headache

The jQueryui datepicker has been a pain in the ass for us the last few days. But with some research I managed to enter a date before 1970 as timestamp. These values are normally represented as negative timestamps. For yet an unknown reason the datepickers setDate function does not allow these values.

To solve this issue we simply create a new Date() from the timestamp to fill the setDate function. Now the datepicker does accept these values.

$date.datepicker('setDate', new Date(-4496400000));
									

iScout – Opening Ceremony 2.0

i, i, i all you hear is i. iPhone, iLife and now also iScout. iScout is a game for scouts where they have to solve puzzles and perform crazy exercises. Like last year we participated and I wanted to share one of the exercises we had to do.

The description was “Built a opening ceremony 2.0” and nerds as we are we immediately thought of a jQuery solution. So we started thinking and worked out a simple idea.

The HTML consists of just 2 div elements and 2 buttons, we could get the same result with one but for simplicity this was chosen.

<div id="mast"></div>
<div id="vlag"></div>
<button id="hijs">Hijs vlag!</button>
<button id="strijk">Strijk Vlag!</button>
​
									

The CSS, we used a gradient for the creation of a Dutch flag.

#mast {
    width: 10px;
    height: 200px;
    border:1px solid #000;
    border-radius: 5px;
}
#vlag {
    width: 100px;
    height: 50px;
    position: absolute;
    left: 10px;
    top: 150px;
    background: #ff0000; /* Old browsers */
    background: -moz-linear-gradient(top, #ff0000 0%, #ffffff 50%, #0000ff 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff0000), color-stop(50%,#ffffff), color-stop(100%,#0000ff)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #ff0000 0%,#ffffff 50%,#0000ff 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #ff0000 0%,#ffffff 50%,#0000ff 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #ff0000 0%,#ffffff 50%,#0000ff 100%); /* IE10+ */
    background: linear-gradient(top, #ff0000 0%,#ffffff 50%,#0000ff 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff0000', endColorstr='#0000ff',GradientType=0 ); /* IE6-9 */
}
​
									

And the jQuery for handling the required events.

$('#vlag').hide();
$('#strijk').hide();
$('#hijs').click(function() {
    $('#vlag').fadeIn().animate({
        "top": "5px"
    }, 3000);
    $('#hijs').fadeOut(function() {
        $('#strijk').fadeIn()
    });
});
$('#strijk').click(function() {
    $('#vlag').fadeIn().animate({
        "top": "150px"
    }, 3000).fadeOut();
    $('#strijk').fadeOut(function() {
        $('#hijs').fadeIn()
    });
});​
									

Check jsfiddle for the result.

Fronteers

Today on my 24th birthday I joined the Fronteers association, this organisation is focussed on improving the level of knowledge of Dutch frontend developers. I am looking forward to follow some courses and I hope to be able to visit the conference.

 

Create string from jQuery object

Examine the following:

​<div class='item'>
    Here is some sample text.
    <a class='​​​​​​​​​​​​​​​​​​​​​​item-of-interest'​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ href='#'>add</a>
</div>
									

The “Here is some sample text” might be there but not always. What you then want to check is whether the inner html of $(‘.item’) is equal to the link item alone. Since .html() returns a string representation of the html and $(‘.item-of-interest’) returns a jQuery object, you will have to find a way to convert this object to a string representation. The easiest way to do this is by using the following code:

var html = $('<div>').append($('.item-of-interest').clone()).html();
									

You temporarily create an element to which you append the .item-of-interest, then you request the inner html of it.

Album top-10

To me the best album of 2011 was Falling Deeper by Anathema. It is just magic.
Anathema Falling Deeper
  1. Anathema – Falling Deeper
  2. Airbag – All Rights Removed
  3. Maria Mena – Viktoria
  4. Within Temptation – The Unforgiving
  5. Mogwai – Hardcore Will Never Die, But You Will
  6. Agnes Obel – Philharmonics
  7. DeWolff – Ochards/Lupine
  8. Petter Carlsen – Clocks Don’t Count
  9. Snow Patrol – Fallen Empires
  10. Gare du Nord – Lilywhite Soul

Ninsun releases their demo

The demo has been released one day before the official release date. Click this post to listen to it.
Continue reading

Ninsun to release their demo.

The album will be entitled “Ninsun”. Since the band is no more, we decided to release the songs we recorded as an untitled record.

VLC became Incentro

On the first day I started at VLC I already heard that there were big plans upcoming. The first thing was that we were changing our brands name. From the 24th of October we were INCENTRO. I wanted to share this with you by showing the reverse graffiti movie:

Reverse graffiti

Ninsun parts ways with Stephan and Sander

After summer we rehearsed a lot and worked on new material. Whilst doing this we realized that we all had a different point of view in what we wanted to reach. Also there were some major differences in the idea of how we should create songs and which style we wanted to adept.

After some reflection Sander decided that he did not want to continue. This more or less meant that Stephan also had to quit, because of the distance and not having a drivers license.

This means that only Jasper, Bas and I are left behind, because of our busy schemes we don’t yet know what we are going to do next. But that will be cleared out in future. For now we wish Sander and Stephan the best in their musical careers.

Yours,
Jasper, Bas en Kasper

« Older posts Newer posts »

Copyright © 2021 Kasper

Theme by Anders NorenUp ↑