http://localhost:8080으로 화면을 확인하면 이제 올릴 준비가 되었습니다.


app이 있는 폴더 상위에서 다음과 같이 명령을 입력합니다. 구글 계정 로그인하면 앱이 올라갑니다.

appcfg.py update helloworld/


explorer http://khcuweb.appspot.com 입력하면 IE가 뜨는데, 브라우저 인코딩을 UTF-8로 변경하면 제대로 보입니다. 크롬브라우저에서는 잘 보입니다.


관련: https://developers.google.com/appengine/docs/python/gettingstartedpython27/uploading

다음과 같은 에러 메시지를 만나면 당황하게 됩니다.

  File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\wsgi_server.py", line 31, in <module>

    from cherrypy import wsgiserver

  File "C:\Program Files\Google\google_appengine\lib\cherrypy\cherrypy\__init__.py", line 70, in <module>

    from cherrypy import _cptools

  File "C:\Program Files\Google\google_appengine\lib\cherrypy\cherrypy\_cptools.py", line 245, in <module>

    from cherrypy.lib import cptools, encoding, auth, static, jsontools

  File "C:\Program Files\Google\google_appengine\lib\cherrypy\cherrypy\lib\static.py", line 7, in <module>

    mimetypes.init()

  File "C:\Python27\lib\mimetypes.py", line 358, in init

    db.read_windows_registry()

  File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry

    for subkeyname in enum_types(hkcr):

  File "C:\Python27\lib\mimetypes.py", line 249, in enum_types

    ctype = ctype.encode(default_encoding) # omit in 3.x!

UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 in position 9: ordinal not in range(128)



C:\Python27\Lib 폴더의 mimetypes.py 249번째 줄에서 발생한 에러입니다.


편집기로 열어서 지우거나 앞에 #을 붙여서 주석처리합니다.

끝!


추가로 메모장에서 한글을 사용하는 경우, 파일 > 다른 이름으로 저장 메뉴를 선택하고 인코딩을 UTF-8로 저장하는 것을 추천합니다.


안녕, World! 보기 쉽지 않네요.



관련 글: http://stackoverflow.com/questions/4237898/unicodedecodeerror-ascii-codec-cant-decode-byte-0xe0-in-position-0-ordinal/4238212#4238212



구글 앱엔진 시작하기 윈도우XP 편


구글 앱엔진 애플리케이션 업로드



윈도우에서 구글 앱 엔진을 돌려 봤습니다. 파이썬으로 작업을 하면서 삽질을 조금했기 때문에 기록을 남겨봅니다. 현재 구글앱엔진은 파이썬 2.7을 공식 지원합니다. python 3.x은 지원하지 않습니다. 때문에 python27을 다시 설치했습니다.(삽질1)


절차는 다음과 같습니다.

part 1 앱 엔진 등록

1.1 http://appengine.google.com/ 사이트에 구글 계정으로 등록을 합니다. 휴대폰인증이 있습니다.

1.2 앱엔진 애플리케이션을 만듭니다. Application Identifier(예, khcuweb)가 정해지면 http://khcuweb.appspot.com 로 접근하게 됩니다.


part 2 로컬 개발환경

2.1 구글앱엔진 SDK 파이썬 버전을 다운로드 받아서 설치합니다.

2.2 http://python.org 사이트에서 Python 2.7을 다운로드 받아서 설치합니다.

2.3 환경 변수 > 사용자 변수 Path에 C:\Program Files\Google\google_appengine\ 경로 추가된 것 확인

2.4 환경 변수 > 시스템 변수 Path에 C:\Python27;C:\Python27\Scripts; 경로를 추가합니다.


part 3

3.1 helloworld.py 만들기

3.2 app.yaml 만들기

3.3 dev_appserver.py helloworld.py 실행하기 

윈도우 XP에서 UnicodeDecodeError 발생하는데, 이에 관해서는 다음 글에 올리겠습니다.












http://api.jquery.com


  1. Ajax
  2. Attributes
  3. Callbacks Object
  4. Core
  5. CSS
  6. Data
  7. Deferred Object
  8. Deprecated
  9. Dimensions
  10. Effects
  11. Events
  12. Forms
  13. Internals
  14. Manipulation
  15. Miscellaneous
  16. Offset
  17. Properties
  18. Removed
  19. Selectors
  20. Traversing
  21. Utilities
  22. Version



## 소스

http://code.jquery.com/jquery-1.11.0.js


http://jsbeautifier.org 에서 정리


## 전체 구조

(function(g, f){console.log(g + f)}(3, 4));
7


## functions and prototypes



### init

    // Give the init function the jQuery prototype for later instantiation

    init.prototype = jQuery.fn;

### Tween.prototype.init

    Tween.prototype.init.prototype = Tween.prototype;


### Sizzle



### setFilters



### jQuery.fn.init



### jQuery.Event



### Tween






자바스크립트에서 어렵다고 생각하는 개념이 hoisting 입니다.




function abc() {
    var a = 'bbb';
    console.log(a) //  ---- 1
    function c() {
		console.log(a); // --- 2
		(function() {
             console.log(a); // --- 3
	         a = 'ccc';
        })();
        var a;
        console.log(a) // ---4
    }
    function d() {
	    console.log(a); // --- 5
//	    var a = 3;
    }
    c();
    a = 'ddd';
    d();
};

삽질 유발자

  • 디버깅
  • 단순 노가다
    • 서버 30대에 똑같은 소스를 배포하는 경우
    • 로그 파일 지우기
  • 무개념 요구사항
  • 주석없는 인수인계
  • 코드와 다른 매뉴얼
  • 몬스터 함수, 몬스터 클래스
  • 같은 이름의 다른 파일 편집



image from: http://en.wikipedia.org/wiki/Wikipedia:Call_a_spade_a_spade


윈도우 스토어에 이제 떴네요.

3.63G 인데, 윈도우의 짝수 버전은 시험용이라는 생각이 듭니다.

설치를 마치면 후기를 남겨볼 생각입니다.




자바 주석도 함부로 달 수 없게 되네요.

HTML 4.01에 어긋나는 자바독은 에러를 발행하는데 그 옵션을 끄는 방법은 -Xdoclint:none 이라고 합니다.


from: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html

joda-time 을 만드신 분의 블로그네요.

http://blog.joda.org/search/label/jodatime


b128로 공개되었습니다. beta벗어나서 RC(Release Candidate) 버전입니다.

3/14 정식버전 출시예정이라고 합니다. 이제 한 달 정도 남았네요.


kenuui-Retina-MacBook-Pro:~ kenu$ java -version

java version "1.8.0"

Java(TM) SE Runtime Environment (build 1.8.0-b128)

Java HotSpot(TM) 64-Bit Server VM (build 25.0-b69, mixed mode)


스프링4 빌드할 경우 jdk1.8이 필요합니다.

https://jdk8.java.net/download.html




+ Recent posts