31. December 2012

Syntax highlight does not work in IntelliJ Idea for .jade – solution

Jade Templating Engine is popular in Node.js world. There is also plugin for IntelliJ Idea which has support this format.

If you open .jade file in Idea and there is no syntax highlight then there is something wrong.

Most common mistake is that people open .jade file before installing plugin and they choose Text editor to open this file. Idea remembers this decision and after installing plugin it will always open .jade files in basic Text editor without syntax highlight.

Correction is quite easy. You need to fix file extension association.

Open Settings – Editor – File Types. Find Jade and add *.jade file extension.

idea-jade

26. November 2012

There is more to C and C++. Slides from talk at FI MUNI 2012

This year I had opportunity to speak at two courses at FI MUNI. Check out slides :)

There is more to C (PDF)

Libraries ant tools for C++ (PDF)

Source code of examples is at GitHub: github.com/georgik/fimuni-c-cpp-examples

29. January 2012

Quick online QR code generator in JavaScript

Update: quick access to this application – qr.sinusgear.com

I found nice jQuery plugin for generating QR codes written by Jerome Etienne: jquery.qrcode.

It’s fairly easy to use. Just pass a text to function and QR code is ready:

jquery('#qrcode').qrcode("this plugin is great");

Here is small application that generates QR codes on the fly as you type.

You can also download QR code as image (use: Chrome, FF, Opera or Safari for download).

Enter text:

Link to standalone QR code HTML5 application.

27. October 2011

WebGL – Mine3D

Three.js is amazing 3D library written in JavaScript.

Eberhard Gräther wrote very interesting port of old Minesweeper. Now you can play it in 3D space :)

Checkout Ebehard’s web site. You can find there other cool examples of WebGL and JavaScript. Like this one:

15. October 2011

Composing and playing music with HTML5

I was searching for a web based music note editor. I found HTML5 Cloud Composer from Greg Jopa.

Then I found something more like good old FastTracker: Sonant Live composer.

You can use Sonant Live composer to create tracks with music.

What is even more interesting about this composer is that you can store your song into pure JavaScript file and replay it with js-sonant.

The princeple of js-sonant is quite simple. You just store music structure into song variable and then you call createAudio. It will produce HTML5 audio object with wav rendered from your song tracks.

Here is sample code:

var songGen = new sonant();

for (var t = 0; t < 8; t++)
{
    songGen.generate(t);
}

audio = songGen.createAudio();
audio.loop = true;
audio.play();

Here you can play my simple attempt to make music. :-)

Note: Your browser must support HTML5 audio in order to play this music. Browsers which have support for HTML5 audio: Google Chrome, Firefox, Opera, Safari.

Note 2: Please wait few seconds after you clicked the Play button. You browser will render JavaScript music notation into playable Wav.

5. October 2011

EurOpen – Security in context of RIA apps

You can find here slides from my talk about security in context of RIA applications.

Conference EurOpen.czŽeliv. Slides are Slovak only.

29. May 2011

Flex ExternalInterface – sending big amount of data

When you want to exchange data between Flash Player and JavaScript then you can use ExternalInterface.

There are two issues that you should be aware of:

1. Binary data must be encoded.

You could not send binary data directly from JavaScript to ExternalInterface. Data will be garbled. You have to encode it e.g. using Base64.

2. Send small chunks of data.

When you need to send 2 MB via ExternalInterface, you need to chop it into smaller pieces. E.g. 256 KB. Bigger chunks cause big load and it slows down transfer.

It takes 15 seconds to transfer 2 MB big chunk in Google Chrome 11. When you chop 2MB into 256 KB chunks, then it’s less than second.

25. April 2011

D3.js – JavaScript charts and graphs that rocks!

Project D3.js is simply great. Visual look of charting components is cool.

Another great charting library written in JavaScript is Flot.

15. April 2011

jQuery workshop – FRI Žilina – slides

I was invited to give another talk at FRI Žilina. Previous topic was development for Google Android platform.

This time I focused on jQuery.Together with Michal Kaukič we started jQuery workshop. Attendees learned basics of jQuery in two hours. At the end they have running application with simple animation in HTML.

You can download slides in PDF version.

You can also download ZIP file with all demo applications.

I was using IntelliJ Idea IDE. It has very intelligent code completion for jQuery, JavaScript and HTML.

I suggest to download also jQuery Cheat Sheet, it is very handful manual.

I mentioned two interesting projects. One was Adobe Browser Lab which allows you to get snapshot of your web site displayed in different browsers on different systems.

The second project was jQuery Mobile. This project could help you to create applications for mobile environment.

I provide this workshop also in form of training for companies. You can find more details about available trainings at sinusgear.com.

Do not forget to watch lauch of Adobe CS5.5 Dreamweaver. Adobe promised to provide support for packaging JavaScript application as a native app for Apple iOS, Google Android and Blackberry.

19. December 2010

Hľadajú sa JavaScriptové knižnice pre tvorbu hier

Akú JavaScript knižnicu by ste zvolili pre tvorbu 2D plošinovej hry?

Pre C/C++ je možné použiť Allegro alebo SDL. Pre Flash/Flex je výborný Flixel.

Čo ale v prípade JavaScriptu?

Narazil som napríklad na Game Query. Aké sú vaše skúsenosti a čo by ste odporučili?

Update: Zdá sa, že JavaScript ako nástroj na tvorbu hier, nie je medzi čitateľmi tohoto bulvárneho plátku príliš zavedený. :-D

Dovolím si pridať odkaz na zaujímavý portál, ktorý poskytuje priamo nástroje pre tvorbu JavaScript plošinoviek: EffectGames

  • Babel fish

      Translate from:

      Translate to:

  • Where’s the fish?

  • Further info

  • Badges

  • Video channel

  • Learning

    Grow your brain.
  • Tags

  • Topics

  • May 2013
    M T W T F S S
    « Feb    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031  
  • Comments