Sunday, December 21, 2008
No sound in some AVI videos problem correction
Sometimes I get some AVI videos that my K-Lite Codec Pack couldn't synthesise its sound. I realized that uninstalling the Codec Pack the sound would work (but the video not). After a series of trials I found the solution: With the codec pack installed, during playback, a couple of icons will appear on the system tray. Double-clicking the FFa icon will give you the ffdshow audio setup window, and its right panel will have MP3 as the first line, you shall change its Decoder to mp3lib to solve the no-audio problem.
Tuesday, October 21, 2008
Android is now Open Source
Finally, i've been decompiling android the past weeks, and now that Android is Open Source, i finally can debug it on my pc.
http://source.android.com/download
http://source.android.com/download
Saturday, October 11, 2008
WinGrep - a simple Windows grep-like console application
Windows search tool wasn't enough to find the methods I was looking for, inside .jad files. So I wrote a few lines of C# code to have this explendid tool. It behaves like Linux grep, except for its regular expressions, lol.
http://jaderd.googlepages.com/WinGrep.exe
Arguments:
1: start folder path (e.g.: c:\)
2: file pattern (e.g.: *.class)
3: search string (e.g.: getFromLocation)
Full example : WinGrep.exe c:\ *.class getFromLocation
http://jaderd.googlepages.com/WinGrep.exe
Arguments:
1: start folder path (e.g.: c:\)
2: file pattern (e.g.: *.class)
3: search string (e.g.: getFromLocation)
Full example : WinGrep.exe c:\ *.class getFromLocation
Batcher - a simple .NET C# Console Application for multiple java .class files decompiling
To decompile the whole Android.jar zipped content we need to JAD each .class file. To do it automatically you can use a tool I developed with this specific purpose.
http://jaderd.googlepages.com/Batcher.exe
Arguments:
1: jad.exe file path (e.g.: c:\jad.exe)
2: unzipped .jar file path (e.g.: c:\android\android)
Full example: Batcher.exe c:\jad.exe c:\android\android
Note: JAD files inside the target path may be overwritten without asking permission
http://jaderd.googlepages.com/Batcher.exe
Arguments:
1: jad.exe file path (e.g.: c:\jad.exe)
2: unzipped .jar file path (e.g.: c:\android\android)
Full example: Batcher.exe c:\jad.exe c:\android\android
Note: JAD files inside the target path may be overwritten without asking permission
Thursday, September 11, 2008
Google Android Reverse Geocoder Hack
I'm trying to publicize the Google Android Reverse Geocoder.
The problem is that the response comes in an unknown binary file format.
Only the Android.jar can decrypt it, and I can't decompile the JAR (cause it's not java bytecodes) to see how he does it.
Anyone has any brilliant idea on this matter?
The code follows:
Geocoder g = new Geocoder(this);
List la = g.getFromLocation(51 , 0, 1); //somewhere in UK
then the Android makes a HTTP post to "http://www.google.com/loc/m/api" and from there comes the fiendish binary response.
The problem is that the response comes in an unknown binary file format.
Only the Android.jar can decrypt it, and I can't decompile the JAR (cause it's not java bytecodes) to see how he does it.
Anyone has any brilliant idea on this matter?
The code follows:
Geocoder g = new Geocoder(this);
List la = g.getFromLocation(51 , 0, 1); //somewhere in UK
then the Android makes a HTTP post to "http://www.google.com/loc/m/api" and from there comes the fiendish binary response.
Sunday, July 27, 2008
Resizable and movable Controls, C# .NET Forms
Imagine resizable and movable controls at runtime. Now make it possible! Just download the following .NET open source class.
http://jaderd.googlepages.com/ResizableControlDLL.zip
http://jaderd.googlepages.com/ResizableControlDLL.zip
Sunday, July 20, 2008
Open source Wave Graph C# .NET Control
In addition to my Wave Reader C# .NET Class, I am also present my open source Wave Graph Resizable Control, and an example project, all zipped in a single package at the following location:
http://jaderd.googlepages.com/WaveGraph.zip
http://jaderd.googlepages.com/WaveGraph.zip
Open source Wave Reader C# .NET Class
Hello groupies. I'm glad to present to you a didactic code: the Wave Reader C# .NET Class
The code is hosted at the following location:
http://code.google.com/p/dot-net-wave-reader/
You can download the zipped source code at:
http://dot-net-wave-reader.googlecode.com/files/WaveReader.zip
The code is hosted at the following location:
http://code.google.com/p/dot-net-wave-reader/
You can download the zipped source code at:
http://dot-net-wave-reader.googlecode.com/files/WaveReader.zip
Tuesday, June 3, 2008
Goosh Google Gadget
With the release of Goosh (stands for "google shell"):
I'm happy to announce my Goosh Gadget:
and the smaller version:
You can add it to your iGoogle using the following link:
http://goosh.org
I'm happy to announce my Goosh Gadget:
http://hosting.gmodules.com/ig/gadgets/file/110595523932409593167/goosh3.xml
and the smaller version:
http://hosting.gmodules.com/ig/gadgets/file/110595523932409593167/goosh2.xml
You can add it to your iGoogle using the following link:
http://www.google.com.br/ig/directory?root=/ig&dpos=top&url=hosting.gmodules.com/ig/gadgets/file/110595523932409593167/goosh3.xml
Saturday, May 31, 2008
Selecting by id in Google's Datastore API
While developing a Google App, I have found some difficulty while trying to retrieve data by id. The method is very simple, and below is the Phyton code:
Thanks to: http://www.thinkvitamin.com/features/webapps/developing-with-google-app-engine-part-i
objectname = ModelName.get_by_id(longIntegerId)This is how to select by id from Google's Datastore API
Thanks to: http://www.thinkvitamin.com/features/webapps/developing-with-google-app-engine-part-i
Wednesday, May 28, 2008
Google Maps Polyline Encoder and Drawing Tool
or: "How to draw encoded polylines?"
or: "2 Steps for polylines encoding for GMaps"
Out there are some sites that allows you to draw and/or encode polylines, like these:
or: "2 Steps for polylines encoding for GMaps"
Out there are some sites that allows you to draw and/or encode polylines, like these:
- Encoder javascript
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/ - Polyline and polygons drawing tool
http://gmaps-samples.googlecode.com/svn/trunk/poly/mymapstoolbar.html - Google's encoder
http://code.google.com/apis/maps/documentation/polylineutility.html
Friday, May 16, 2008
Ideas for StreetSize
Yesterday I sent two e-mails to Matt from http://streetsize.com
-------Email 1----------
Hello Matt,
Thank you for your wonderfull site. I think I'm the first Brazilian user, and I have invited my coworkers to join. I think that you'll achieve great success while you respect your users privacy. I'm also a Google Maps mashups developer.
Sugestions:
+ Let me change my public name. I have my login name, and my real name, but I wanna choose which one users will see when they find me on the map.
+ The GMarker should be smaller and with a darker colour to distinguish itself from the background
I have more sugestions that demands much more time from you than the simple ones above. Ask me if you wanna hear.
-----Email 2 ----
Hello again Matt,
I don't know what you have in mind for your site when it gets real crowded. You don't have to share with me your plans, I just wanna be able someday to meet a neighbor, with the help of your site, without knocking his door. It seems that for now you use the Keep It Simple motto, but following are some ideas that may help, if you want to add some complexity to it:
+ Like a social site, instead of location-based-only relationships, friends should be able to track themselves through a contact list.
- With a contact list, the user should be able to filter the map to only see his contacts on it.
- With a contact list, the user should be able to add contacts automaticaly with a Gmail/Yahoo/Hotmail crawler.
+ Users should be able to input where they will be in the future, this feature should be used to schedule parties and meetings
+ Users should be able to update continuosly their location through GPS equiped mobile phones.
+ Users should be able to maintain a history of previous locations, and they could even store whole tracks.
+ If you don't know, Fire Eagle (at http://fireeagle.yahoo.net/) seems to be a service that will share his users location with a limited number of websites that each user will choose. Your Street Size could explore this opportunity also by providing an API to webdevelopers.
Thank you for your time, I hope it's worth reading and good luck!
-------Email 1----------
Hello Matt,
Thank you for your wonderfull site. I think I'm the first Brazilian user, and I have invited my coworkers to join. I think that you'll achieve great success while you respect your users privacy. I'm also a Google Maps mashups developer.
Sugestions:
+ Let me change my public name. I have my login name, and my real name, but I wanna choose which one users will see when they find me on the map.
+ The GMarker should be smaller and with a darker colour to distinguish itself from the background
I have more sugestions that demands much more time from you than the simple ones above. Ask me if you wanna hear.
-----Email 2 ----
Hello again Matt,
I don't know what you have in mind for your site when it gets real crowded. You don't have to share with me your plans, I just wanna be able someday to meet a neighbor, with the help of your site, without knocking his door. It seems that for now you use the Keep It Simple motto, but following are some ideas that may help, if you want to add some complexity to it:
+ Like a social site, instead of location-based-only relationships, friends should be able to track themselves through a contact list.
- With a contact list, the user should be able to filter the map to only see his contacts on it.
- With a contact list, the user should be able to add contacts automaticaly with a Gmail/Yahoo/Hotmail crawler.
+ Users should be able to input where they will be in the future, this feature should be used to schedule parties and meetings
+ Users should be able to update continuosly their location through GPS equiped mobile phones.
+ Users should be able to maintain a history of previous locations, and they could even store whole tracks.
+ If you don't know, Fire Eagle (at http://fireeagle.yahoo.net/) seems to be a service that will share his users location with a limited number of websites that each user will choose. Your Street Size could explore this opportunity also by providing an API to webdevelopers.
Thank you for your time, I hope it's worth reading and good luck!
Wednesday, May 14, 2008
Opening Google Earth (*.kmz) files with the browser
I already knew that Google Maps shows KML file content at its website. You only need to put the KML's URL at the following site search textbox:
Example KMZ file:
http://maps.google.com.br/maps?q=http://www.gearthblog.com/kmfiles/lasvegas.kmz
Open it in your browser.
http://maps.google.comthen execute the search. But I was unaware that the same applies to Google Earth's KMZ files. They seem unreadable without Google Earth, but you can use the same method above or use the following one:
Example KMZ file:
http://www.gearthblog.com/kmfiles/lasvegas.kmzAppend at the beginning of the above URL:
http://maps.google.com.br/maps?q=The result is:
http://maps.google.com.br/maps?q=http://www.gearthblog.com/kmfiles/lasvegas.kmz
Open it in your browser.
Saturday, May 10, 2008
Best Google Maps Mashups
Following are my favorite Google Maps Mashups:
1. Amsterdam Helicopter Game - I'm making my own javascript version, click here to see it.
2. Twitter Spy - See where people are microblogging. It should have geographic boundaries, I could do it myself, but I would have to study Twitter's API.
3. Street View Immersive Videos - Like Google Maps Street View but now as a Video, use the mouse to rotate the view.
4. Free real state mashup - find houses and apartments for sale in Brazil, search by size, location or price, for free.
5. Geolocated voice messages - I think that is a great Idea, but it has to be specific to achieve greater success.
6. Paris user contributed map - better than Wikimapia because markers are simpler than polygons, categorization is good for searching and the side bar is easier to locate.
7. London Profiler - Nice looking data viewing!
8. WikiCrime - A wiki for crime reporting and locating.
1. Amsterdam Helicopter Game - I'm making my own javascript version, click here to see it.
2. Twitter Spy - See where people are microblogging. It should have geographic boundaries, I could do it myself, but I would have to study Twitter's API.
3. Street View Immersive Videos - Like Google Maps Street View but now as a Video, use the mouse to rotate the view.
4. Free real state mashup - find houses and apartments for sale in Brazil, search by size, location or price, for free.
5. Geolocated voice messages - I think that is a great Idea, but it has to be specific to achieve greater success.
6. Paris user contributed map - better than Wikimapia because markers are simpler than polygons, categorization is good for searching and the side bar is easier to locate.
7. London Profiler - Nice looking data viewing!
8. WikiCrime - A wiki for crime reporting and locating.
Google Maps Javascript Helicopter Game
Click the following textbox to start to play:
Use keyboard arrows < ^ > to navigate and + - for zooming
To Do list:
- Integrate with Google Adsense to estabilish goals that the user will have to find, with or without the help of address or pointers.
- Alternative: Use a categorized list of known places (ex: night clubs) to put the player under a known places knowledge test.
- Use FireEagle to open the map rightly above the user real location.
- Change the Helicopter gif for one that changes with the inputed commands.
- Change the aerial mode for a terrestrial one that limits the movement to the streets.
- The API method "panTo" is smoother, but I couldn't make it load new images as you reach the map's edges. Currently I'm using "setCenter" and this method makes map blink.
Monday, May 5, 2008
Website Performance
Or "How to make my website faster?"
Steve Souders says that he is the YSlow creator, which is a Firefox's and Firebug's extension that calcs the conformity degree of a site with th rules for high performance websites. Now he says he got "14" new rules but lists only 10. Now I will list the current 34 YDN rules plus the 10 "new" ones:
The second rule applies to mobile web development, where hardware resources are fewer, and complete browsers slowers than browsers that read only XHTML. Visit http://validator.w3.org/ to validate your website.
Steve Souders says that he is the YSlow creator, which is a Firefox's and Firebug's extension that calcs the conformity degree of a site with th rules for high performance websites. Now he says he got "14" new rules but lists only 10. Now I will list the current 34 YDN rules plus the 10 "new" ones:
- Make Fewer HTTP Requests
- Use a Content Delivery Network
- Add an Expires or a Cache-Control Header
- Gzip Components
- Put Stylesheets at the Top
- Put Scripts at the Bottom
- Avoid CSS Expressions
- Make JavaScript and CSS External
- Reduce DNS Lookups
- Minify JavaScript and CSS
- Avoid Redirects
- Remove Duplicate Scripts
- Configure ETags
- Make Ajax Cacheable
- Flush the Buffer Early
- Use GET for AJAX Requests
- Post-load Components
- Preload Components
- Reduce the Number of DOM Elements
- Split Components Across Domains
- Minimize the Number of iframes
- No 404s
- Reduce Cookie Size
- Use Cookie-free Domains for Components
- Minimize DOM Access
- Develop Smart Event Handlers
- Choose <link> over @import
- Avoid Filters
- Optimize Images
- Optimize CSS Sprites
- Don't Scale Images in HTML
- Make favicon.ico Small and Cacheable
- Keep Components under 25K
- Pack Components into a Multipart Document
- Split the initial payload
- Load scripts without blocking
- Don’t scatter scripts
- Split dominant content domains
- Make static content cookie-free, repeated
- Reduce cookie weight, repeated
- Minify CSS, repeated
- Optimize images, repeated
- Use iframes sparingly, repeated
- To www or not to www
- Optimize inner loops
- Make XHTML web pages
The second rule applies to mobile web development, where hardware resources are fewer, and complete browsers slowers than browsers that read only XHTML. Visit http://validator.w3.org/ to validate your website.
Yet another post about Firefox plugins
I can't understand people that like Internet Explorer (IE) better than Mozilla Firefox (FF). Benchmarks like this and the plurality of add-ons are my arguments against those people. Following there are some of the essential FF extensions that I know:
- IE Tab - some web pages (like .mht) just open in IE, you can open them inside FF with this trick.
- Customize Google - removes Google Ads from all websites, also improves security and privacy at any Google website, customize the number of Google's results and makes image results point directly to images.
- Ad Block Plus - Remove all Ads from any Website.
- Downloads in Tab - The annoying little download window will be a tab.
- No Script - this is what makes FF safer than any other browser.
- PDF Download - now you can choose what will happen when you click on a PDF link.
- Table2Clipboard - copy HTML tables content to you spreadsheet editor.
- Gmail Manager - checks for new mail at your(s) Gmail account(s)!
- GSpace - turns your Gmail account into a remote drive
- PermaTabs - turns a selected tab into a permanent (unclosable) one, useful to people who uses iGoogle or Google Reader.
- Tabs Open Relative - new tabs will be open next to current one, not at the end anymore.
- Firebug + DOM Inspector - essential for every Web developer: javascript debugger, complete HTML, DOM, style, traffic analysis
Saturday, May 3, 2008
Globalization Tips for Web Programmers (ASP.NET)
The most important thing when you develop an ASP.NET website which interface language is portuguese, is to use the following Web.Config entry:
Javascript (and also JScript) also has escape(), encodeURI() and encodeURIComponent() and their complementary functions, that have a slightly different results from ASP.NET ones.
<globalization uiculture="pt-BR" culture="pt-BR" fileencoding="iso-8859-1" responseencoding="utf-8" requestencoding="utf-8">The newbiest programmers usualy forget the that his application users could insert special characters into a form. When sending parameter via QueryString the browsers always convert those special characters in an encoded form via one of these functions below:
- escape(), example:
@ is escaped to %7E
- encodeURI(), example: % is encoded to %25
- encodeURIComponent(), example: @ is encoded to %40
Request.Params["parameter's name"];But if you forget the explict encode, none of the functions below will be able to retrieve correctly those special chars:
- Microsoft.JScript.GlobalObject
.unescape(), complemented by escape() - Microsoft.JScript.GlobalObject
.decodeURI(), complemented by encodeURI() - Microsoft.JScript.GlobalObject
.decodeURIComponent(), complemented by encodeURIComponent() - Server.UrlDecode(), complemented by Server.UrlEncode()
Javascript (and also JScript) also has escape(), encodeURI() and encodeURIComponent() and their complementary functions, that have a slightly different results from ASP.NET ones.
Tuesday, April 22, 2008
Cacheable ASP.NET pages
Or "Caching ASPX pages"
Or "How to make ASP.NET pages be stored in the browser's cache?"
I used to save every static page in my Web Projects as .HTML files. But Sandro, from MS-Developers taught me how to make cacheable ASPX pages:
Just insert the following C# .NET code into the Page_Load
Researching a little more I found an alternative method, just include in the beggining of the ASPX file:
But if you want to disable cacheability use the following code:
Or "How to make ASP.NET pages be stored in the browser's cache?"
I used to save every static page in my Web Projects as .HTML files. But Sandro, from MS-Developers taught me how to make cacheable ASPX pages:
Just insert the following C# .NET code into the Page_Load
Response.Cache.SetExpires(DateTime.Now.AddYears(3));You can use the if(!IsPostBack) condition enclosing the code above, for AJAX Pages.
Response.Cache.SetCacheability(System.Web.HttpCacheability.Public);
Researching a little more I found an alternative method, just include in the beggining of the ASPX file:
<%@ OutputCache Duration="31536000" Location="Any" VaryByParam="none" %>As written at ASP Alliance ASP.NET reference
But if you want to disable cacheability use the following code:
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Wednesday, April 16, 2008
Simple Windows Drumkit
Would you like to play drums while do you hear your songs? Even if it's only to play while you wait or download something? This app could be nearly invisible so you could play without disturbing you normal pc use, and to avoid your bosses' eyes.
With a couple of work hour I made this Simple Drum Kit, that fullfills all those requirements, and beyond, because it uses WAV files that can be replaced at your taste. Here's some suggestions:
- Special effects
- Backing vocals
- Percussion
- Melodies
- Bases
- Other music
To download follow the link:
http://www.codeplex.com/skd
With a couple of work hour I made this Simple Drum Kit, that fullfills all those requirements, and beyond, because it uses WAV files that can be replaced at your taste. Here's some suggestions:
- Special effects
- Backing vocals
- Percussion
- Melodies
- Bases
- Other music
To download follow the link:
http://www.codeplex.com/skd
Subscribe to:
Posts (Atom)