반응형
반응형

PreloadJS is a library to make working with asset preloading easier. It provides a consistent API for loading different file types, automatic detection of XHR (XMLHttpRequest) availability with a fallback to tag-base loading, composite progress events, and a plugin model to assist with preloading in other libraries such as SoundJS.

 

https://github.com/CreateJS/PreloadJS

 

Support and Resources

Built by gskinner.com, and is released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement.

반응형
반응형

OpenWeatherMap - free weather data and forecast API

 

http://openweathermap.org/

 

 

OpenWeatherMap is a free service that provides weather data and a forecast API that can be used with any mapping services. Data includes current weather, weekly forecast, wind, clouds, precipitation, and more.

OpenWeatherMap

 

 

The OpenWeatherMap service provides free weather data and forecast API suitable for any cartographic services like web and smartphones applications. Ideology is inspired by OpenStreetMap and Wikipedia that make information free and available for everybody. OpenWeatherMap provides wide range of weather data such as map with current weather, week forecast, precipitation, wind, clouds, data from weather stations and many others. Weather data is recieved from global meterological broadcast services and more than 40 000 weather stations.

 

Getting current weather data

Using this kind of requests you can get weather data in any location on the earth. The current weather data are updated online based on data from more than 40,000 weather stations. All weather data can be obtained in JSON, XML or HTML format.

You can search weather data by different ways:

  • By city name
  • By geographic coordinats
  • By city ID

Examples of JSON format:

Examples of XML format:

To get data in XML or HTML formats you need to use mode = xml or html. Example:

Data format:

You can use different types of metric systems by units = metric or imperial
Example: api.openweathermap.org/data/2.5/weather?q=London&mode=xml&units=metric

Multilingual support:

You can use lang parameter to get output in your language. We support the following languages that you can use with the corresponded lang values: English - en, Russian - ru, Italian - it, Spanish - sp, Ukrainian - ua, German - de, Portuguese - pt, Romanian - ro, Polish - pl, Finnish - fi, Dutch - nl, French - fr, Bulgarian - bg, Swedish - se, Chinese Traditional - zh_tw, Chinese Simplified - zh_cn, Turkish - tr
Example: http://api.openweathermap.org/data/2.5/forecast/daily?id=524901&lang=zh_cn

Call back function for JavaScript code:

To use JavaScrip code you can transfer callback functionName to JSONP callback.
Example: api.openweathermap.org/data/2.5/weather?q=London,uk&callback=test

More about data returned:

 


You can recieve weather forecast in any location on the earth. The flexible algorithm of weather calculation let us provide weather data not only for cities but for any geographic coordinates. It is important for megapolices, for example, where weather is different on opposit city edges. You can get forecast data every 3 hours or daily. The 3 hours forecast is available for 5 days. Daily forecast is available for 14 days. All weather data can be obtained in JSON or XML format.

You can search weather data by different ways:

  • By city name
  • By geographic coordinats
  • By city ID

Getting forecast data every 3 hours


Getting daily forecast weather data

You can get weather forecast for 14 days. All weather data can be obtained in JSON or XML format.

Examples:


You can search weather data by different ways:

  • By city name. Put the city name or its part and get the list of the most proper cities in the world. Example - Lon or Lond or London. The more precise city name you put the more precise list you will get. To make it more precise put the city's name or its part, comma, the name of the county or 2-letter country code. You will get all proper cities in chosen county. The order is important - the first is city name than comma than county. Example - Lon, UK or Lon, GB or London, GB or Lon, England.
  • By geographic coordinats.

Seaching by city name

api.openweathermap.org/data/2.5/find?q=London&units=metric&mode=xml

Seaching by geographic coordinats

api.openweathermap.org/data/2.5/find?lat=57&lon=-2.15

Data output format:

Restriction output:

To limit number of listed cities please setup cnt parameter api.openweathermap.org/data/2.5/find?lat=57&lon=-2.15&cnt=3

Accuracy:

To setup accuracy level please use type parameter that have two values - accurate and like. In case of accurate value you will get results that exactly equivalent to your searching word. In case of like value the result is searching by substring. type ['accurate', 'like']
Example


 

Metric systems:


반응형

'프로그래밍' 카테고리의 다른 글

[EDITOR] Sublime 2.0.2 Update  (0) 2013.07.10
컬쳐랜드 오류에 대해서...  (0) 2013.06.20
SSO(Single Sign On)  (0) 2013.06.14
drupal - 드루팔  (0) 2013.06.11
문자메시지 피싱(SMS phising, 스미싱)  (0) 2013.06.10
반응형

Bootstrap

Sleek, intuitive, and powerful front-end framework for faster and easier web development.

 

http://twitter.github.io/bootstrap/

 

Github : https://github.com/twitter/bootstrap

 

Download : http://twitter.github.io/bootstrap/assets/bootstrap.zip

 

Less.js : The dynamic stylesheet language.

Less.js : http://lesscss.org

                https://github.com/cloudhead/less.js

 

 

Bootstrap : Scaffolding (http://twitter.github.io/bootstrap/scaffolding.html)

 - built on responsive 12-column grids, layouts, and components.

    부트스트랩에는 컬럼,레이아웃,컴포넌트가 있어서 구현에 용이하다.

 

 

Customize and download : http://twitter.github.io/bootstrap/customize.html

 : 필요한 요소들만 선택해서 다운로드 받을 수 있다.

 

Javascript : componets to life-now with 13 custom jQuery plugins.

 : 자바스크립트 플러그인이 포함되어 있다.

  http://twitter.github.io/bootstrap/javascript.html

반응형
반응형

SSO(Single Sign On)

 

단 한 번의 로그인만으로 기업의 각종 시스템이나 인터넷 서비스에 접속하게 해 주는 보안 응용 솔루션.

각각의 시스템마다 인증 절차를 밟지 않고도 1개의 계정만으로 다양한 시스템에 접근할 수 있어

 ID, 패스워드에 대한 보안 위험 예방과 사용자 편의 증진, 인증 관리 비용의 절감 효과가 있다.

클라이언트 SSL(Secure Sockets Layer) 인증서와

S/MIME(Security Services for Multipurpose Internet Mail Extension) 인증서가

포함된 싱글 사인온 솔루션으로 개인 키 데이터베이스에 있는 하나의 키로 로그인하고,

다른 패스워드 없이 SSL 사용 서버에 접근할 수 있다.

 

반응형
반응형

TDD : Test Driven Development

BDD : Behavior Driven Development

 

TDD에 대한 코칭을 하던 BDD의 아버지 댄 노스(Dan north)의 고민.

  1. 프로세스의 어디서부터 시작해야 하는가?
  2. 무엇을 테스트하고 또 무엇을 하지 말아야 하는가?
  3. 한 번에 얼마만큼 테스트 해야 하는가?
  4. 테스트를 어떻게 명명해야 하는가?
  5. 테스트가 실패하는 이유에 대해 어떻게 이해해야 하는가?

 

전통적인 TDD 소프트웨어 개발 방법론

  1. 첫 번째로 유닛을 위한 테스트 셋을 정의한다.(define a test set for the unit first).
  2. 유닛을 구현한다(the implement the unit).
  3. 마지막으로 유닛에 대한 구현이 테스틀르 통과하는지 검증한다(finally verify that the implementation of the unit makes the tests success).

TDD 템플릿

  1. 특정 값이 주어지고(Given)
  2. 어떤 이벤트가 발생했을 때(When)
  3. 그에 대한 결과를 보장해야 한다(Then).

 

 

 

 

 

 

반응형
반응형

[마소] 2013.05 Angular.JS 의 구조와 특징

 

예제를 로컬에 구현해 보았다.

여러번 해본 것이지만 예제 나온김에 한번 더.

angular.js 파일은 받아두어야 한다.

 

기본적으로 일단 <html> 태그에 ng-app 를 입력해주어야 한다.

<body>에는 ng-controller 를 입력해주어야 한다.

 반복문은 반복하려는 구문에  ng-repeat 를 입력해주면 해당 데이터 배열 갯수만큼 반복된다.

 

 $scope로 데이터를 전달한다.

 데이터 출력은 "{{데이터}}"의 형식으로 된다.

 

모델은 $scope의 속성값이다. (todoList)

뷰는 DOM, 보이는 템플릿 자체가 뷰인 셈이다.

컨트롤러는 자바스크립트 함수로, $scope를 argument로 가지고 있다.  

 

※ Angular.JS 에서 사용하는 지시문

 

 ng-app

 Declares an element as a root element of the application allowing behavior to be modified through custom HTML tags.

 ng-bind

 Automatically changes the text of a HTML element to the value of a given expression.

 ng-model

 Similar to ng-bind, but allows two-way data binding between the view and the scope.

 ng-class

 Allows class attributes to be dynamically loaded.

 ng-controller

 Specifies a JavaScript controller class that evaluates HTML expressions.

 ng-repeat

 Instantiate an element once per item from a collection.

 ng-show

& ng-hide

 Instantiate an element once per item from a collection.

 ng-switch

 Conditionally instantiate one template from a set of choices, depending on the value of a selection expression.

 ng-view

 The base directive responsible for handling routes that resolve JSON before rendering templates driven by specified controllers.

 

 

Model–view–controller (MVC)

 

 

 

 Model          >     JS Objects

 View            >     DOM

 Controller     >     JS Function

 

 

Template, Model, View 방식으로 구현된다.  
   
(참고 : http://docs.angularjs.org/#!/tutorial/step_04)

 

 

예제 구현 화면 

 

소스 화면 (Sublime Text 2) 

 

.

반응형

+ Recent posts