Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
| === General Commands | |
| help # show this usage | |
| version # show the gem version | |
| list # list your apps | |
| create [<name>] # create a new app | |
| keys # show your user's public keys | |
| keys:add [<path to keyfile>] # add a public key | 
Nicolas Grekas - nicolas.grekas, gmail.com
17 June 2011 - Last updated on 3 sept. 2011
Not updated any more on this gist. See:
| <?xml version="1.0"?> | |
| <ivysettings> | |
| <settings defaultResolver="downloadGrapes"/> | |
| <resolvers> | |
| <chain name="downloadGrapes"> | |
| <!-- todo add 'endorsed groovy extensions' resolver here --> | |
| <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/> | |
| <filesystem name="cachedGrapes"> | |
| <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/> | |
| <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/> | 
| function sendData(url, data, onSuccess, onError) { | |
| $.ajax({ | |
| url: url, | |
| type: 'POST', | |
| data: data, | |
| dataType: 'json', | |
| xhrFields: { | |
| withCredentials: true | |
| }, | 
| Recentemente enfrentei problemas em um aplicativo Android que desenvolvi, o qual se comunica com o banco de dados de um dos sistemas da empresa, codificado em ISO-8859-1 (Firebird) através de um web service. | |
| Os dados eram gravados de forma errada, muitas vezes truncavam e as vezes apareciam caracteres estranhos. | |
| Depois de algumas tentativas, cheguei até a seguinte solução: | 
| var Comparator=Comparator||(function(){var c=function(g,f){return this[g]===f};var a=function(f){if(!this.hasOwnProperty(f)){this[f]=undefined}};var b=function(g,m,f){var k=g.prototype,o=(f?f.length:0),j=0,l,h;for(j;j<o;j++){l=f[j];h="is"+l.replace(/^./,l.match(/^./)[0].toUpperCase());if(k[h]===undefined){k[h]=(function(){return c}(m,l))}}};var d=function(g,k,f){var i=g.prototype,h,j;for(h in f){j=f[h];if(i[h]===undefined){i[h]=(function(){return c}(k,j))}}};var e=function(g,h,f){if(g.constructor!=Object){a.call(g.prototype,h);if(Object.prototype.toString.call(f)==="[object Array]"){return b(g,h,f)}return d(g,h,f)}else{throw new Error("Attempting to augment Object prototype")}};return{each:e}}()); | 
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>jsf.demo</groupId> | |
| <artifactId>GridDemo</artifactId> | |
| <packaging>war</packaging> | |
| <version>1.0-SNAPSHOT</version> | |
| <name>GridDemo Maven Webapp</name> | |
| <url>http://maven.apache.org</url> | 
| # Download: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html | |
| sudo apt-get install alien | |
| sudo alien -k --scripts sqldeveloper*.rpm | |
| sudo dpkg -i sqldeveloper*.deb | |
| mkdir -p ~/.sqldeveloper | |
| # Paste the JDK path inside (/usr/lib/jvm/java-1.6.0-openjdk-i386) | |
| vim ~/.sqldeveloper/jdk |