13 May, 2010 - 10:55 am
Tags: Shell Script, XML
Posted in english | No comments
One more Shell script snippet. Scenario: I have several directories, each one with a file called strings.xml. The problem with those files is that they are like: <string desc="whatever">"text"</string> I’d like to remove those double quotation marks inside the string element. I’m already in the directory which contains all others directories with the xml files. [...]
23 April, 2010 - 3:12 pm
Tags: Android, CC-BY-SA, i18n, resource
Posted in english | No comments
a new android I just drew. source-code: android_look.svg. CC-BY-SA as usual. You can acess internal Android resources such strings, drawables, layouts and others. For example, if you need to create a button with the text “Cancel” you can do: <Button android:id="@+id/CancelButton" android:text="@android:string/cancel" /> Using this you are using the internal resource for “Cancel” in that [...]
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 [...]
Some times a good picture is ruined by a little detail or someone that shouldn’t be there. If you are willing to trade a complete portraying of the reality for a better photo, here are some tips for Gimp. Use them wisely. Here is the original photo of two friends playing a game, and an [...]
25 December, 2009 - 3:04 pm
Tags: dtd, expat, game, programming, pygame, Python, sax, schema, urllib, XML
Posted in english | 2 comments
Here is a useful tip on Python XML decoding. I was extending xml.sax.ContentHandler class in a example to decode maps for a Pygame application when my connection went down and I noticed that the program stop working raising a exception regarded a call to urlib (a module for retrieve resources by url). I noticed that [...]
14 November, 2009 - 4:27 am
Tags: Class, Douglas Adams, Field, getclass, getDeclaredField, Hack, Hacking, Java, Life, Object, Object-Oriented Programming, OOP, Reflection
Posted in english | 3 comments
Using reflection to change the accessibility of a private object field and access it at runtime. import java.lang.reflect.Field; class Life { private int meaning = 42; } class Hack { public static void main(String args[]){ Life life = new Life(); try { Field field = life.getClass().getDeclaredField("meaning"); field.setAccessible(true); System.out.println(field.get(life)); } catch (NoSuchFieldException e) { [...]
Como prometido, palestra que eu e o Rafael Carneiro fizemos para apresentar no Café com Tapioca desse mês. Tomorrow Java View more documents from José Maria Silveira Neto. Update: O Paulo Jr também fez uma cobertura do evento e da apresentação dele.
Yeah. No more workarounds. Download now JavaFX 1.2 for Windows, MacOS X, Linux and OpenSolaris! \o/ There’s also a lots of improvements in the language and the API. For details on that read this document. Unfortunately, as a side effect of those great changes some JavaFX source codes posted here are now deprecated and need [...]
Usuually on JavaFX we grab data using HttpRequest from external resources on formats like JSON or XML. I showed how to get it on the post Reading Twitter with JavaFX and how to parse it using PullParser on the post Parsing a XML sandwich with JavaFX. Another day I need to grab and interpret some [...]
23 May, 2009 - 4:30 pm
look, I want to load an image from a directory in my hd, but the app could’t find the file.
Can you help me?
Thanks.