the world is a pixel
Ilex Paraguariensis

Creative Commons image from Flickr.
From days 15 to 20 from April, I’ll be in Porto Alegre. I’ll participate on FISL (an old dream) with the presentation “Netbeans: beyond Java”. I’d like to talk about how you can use Netbeans as a great IDE for languages others than Java like Ruby, PHP, JavaFX, Javascript, Python, etc.
Probably I’ll be able to participate also on two events before FISL (about Opensolaris and Java ME). :)
So … how chimarrão tastes?
You must be logged in to post a comment.
No trackbacks yet.
Python, flatten a list
Surprisingly python doesn’t have a shortcut for flatten a list (more generally a list of lists of lists of…). I made a simple implementation that doesn’t use recursion and tries to be written clearly. I get a element from a “bad” list (a list that can have another lists). If the element is not a [...]
Heroku on Ubuntu 11.04 (Natty Narwhal)
28 September, 2011 - 11:43 pm
Tags: configuration, Heroku, Ruby, ubuntu
Posted in english | 1 comment
As root execute: apt-get update apt-get install build-essential ruby rails rubygems1.8 apt-get install ruby1.8-dev libopenssl-ruby Chance PATH at /etc/environment: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin" Update your current environment: source /etc/environment Install the Heroku gem: sudo gem install heroku Run Heroku authentication configuration: heroku auth:login Enter the credentials for your Heroku account. Done!
simple HTML5 animation: clouds over background
2 June, 2011 - 5:27 pm
Tags: clouds, HTML5, JavaScript, Pixelart
Posted in english | 6 comments
If you are reading this text, sorry, your browser don’t support HTML5 Canvas (or maybe I did something wrong). var canvas;var ctx;var background;var width=300;var height=200;var cloud;var cloud_x;function init(){canvas=document.getElementById(“cloud_demo_canvas”);width=canvas.width;height=canvas.height;ctx=canvas.getContext(“2d”);background=new Image();background.src=’http://silveiraneto.net/wp-content/uploads/2011/06/forest.png’;cloud=new Image();cloud.src=’http://silveiraneto.net/wp-content/uploads/2011/06/cloud.png’;cloud.onload=function(){cloud_x=-cloud.width};return setInterval(main_loop,10)}function update(){cloud_x+=0.3;if(cloud_x>width){cloud_x=-cloud.width}}function draw(){ctx.drawImage(background,0,0);ctx.drawImage(cloud,cloud_x,0)}function main_loop(){draw();update()}init(); Code: var canvas; var ctx; var background; var width = 300; var height = 200; var cloud; var cloud_x; [...]
Elgg metadata performance issue
9 May, 2011 - 12:14 pm
Tags: Elgg, performance, PHP, Social Network
Posted in english | 3 comments
Elgg is a open source social networking framework. In my Elgg instance (1.7.2) I have some entities with a metadata called tags. One entity can have zero, one or many tags. Tags are strings. I’m trying to retrieve the last updated files with the tags tagA, tagB, … tagI in a profile widget using this [...]
PHP: array, all elements but first
9 March, 2011 - 12:52 pm
Tags: array, array_shift, PHP, programming
Posted in english | No comments
$bric = array("Brazil", "Russia", "India", "China"); $ric = $bric; // array copy $br = array_shift($ric); // left shift at $ric. $br stores "Brazil" print_r($bric); // $bric remains the same print_r($ric); // $ric lost "Brazil" Output: Array ( [0] => Brazil [1] => Russia [2] => India [3] => China ) Array ( [0] => Russia [...]
differents shutter speeds over a waterfall
22 June, 2010 - 1:44 pm
Tags: Brazil, bridal veil, cachoeira, Guaramiranga, photography, shutter speed, waterfall
Posted in english | No comments
Photos using differents shutter speeds over a waterfall at Guaramiranga to create a bridal veil look.
Openpixels – Chars
19 May, 2010 - 3:10 pm
Tags: Brazil, Field, Gimp, Openpixels, Pixelart, soccer
Posted in english | 5 comments
As the big subject now is soccer world cup, the main brazilian team uniform is now available on the project. Here a example of character: Gimp source file: open_chars.xcf
Contando Algarismos Em Um Intervalo
29 January, 2010 - 8:21 pm
Tags: compreensão de lista, Programação, programação funcional, Python
Posted in english | 3 comments
Quantos zeros tem entre um e mil? É mais fácil responder perguntas desse tipo escrevendo pequenos programas usando o suporte a programação funcional e compreensão de lista que algumas linguagens como Python oferecem. Para contar os zeros de um número, transformamos ele em uma string e contamos quantas substrings ’0′ ele contém. Por exemplo o [...]
Easily Sortable Date and Time Representation
20 January, 2010 - 10:55 pm
Tags: date, datetime, ISO 8601, Jochen Voss, Markus Kuhn, programming, Python, representation, sort, sorting, time
Posted in english | No comments
I was looking for a date and time representation useful for registering stock quotes in a simple plain file. I found that the standard ISO 8601 is just the answer for this, it’s called “Data elements and interchange formats — Information interchange — Representation of dates and times”. Here is a example: 2010-01-20 22:14:38 There’s this [...]
Extração de Dados e Fundos de Investimento do Banco do Brasil
11 January, 2010 - 9:02 pm
Tags: ações, aplicações, Banco do Brasil, bolsa de valores, CRON, Data Mining, fundo de investimento, fundos, fundos de investimento, JSON, Mineração de Dados, Python, screen scraping, Web Harvest, web scraping, XML, yaml
Posted in english | 4 comments
Eu não achei onde coletar os dados diários de rentabilidade dos fundos de investimento do Banco do Brasil em formato bem estruturado. Num mundo ideal as coisas seriam assim, você faria uma requisição numa url como esta: http://bb.com.br/apps/rentabilidade?fundo=Siderurgia&saida=xml E ele cuspiria um XML com as informações da rentabilidade diária desse fundo, isso se eu não [...]













16 July, 2009 - 10:41 pm
It’s very goog!