Visit my blog or connect with me on Twitter
git init
or
| function b64EncodeUnicode(str) { | |
| return btoa( unescape( encodeURIComponent( str ) ) ); | |
| } | |
| function b64DecodeUnicode(str) { | |
| return decodeURIComponent( escape( atob( str ) ) ); | |
| } |
Visit my blog or connect with me on Twitter
git init
or
| // Content Script to save data. | |
| chrome.extension.sendRequest({storage: 'foo', value: 'bar'}); | |
| // Content Script to get data. | |
| chrome.extension.sendRequest({storage: 'foo'}, function(response) { | |
| console.log('foo => ' + response.storage); | |
| }); | |
| // Background Page |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Building a router</title> | |
| <script> | |
| // Put John's template engine code here... | |
| (function () { | |
| // A hash to store our routes: |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /home/bookworm/Sites; | |
| index index.php index.html index.htm; | |
| try_files $uri $uri/ /index.php; | |
| location ~ \.php$ { | |
| fastcgi_pass 127.0.0.1:9001; |
안드로이드 개발에서 많은 비중을 차지하는 UI패턴은 ListView에서 여러 이미지를 보여주는 Activity입니다. 전형적인 흐름을 정리하면 아래와 같습니다.
1. 목록조회 API호출
2. API를 파싱하고 ListView에 데이터를 보여 줌.
3. 각 아이템마다의 이미지 주소로 다시 서버를 호출
4. 이미지를 디코딩하고 ImageView에서 보여줌.