반응형
반응형

Image Upload with Preview and Delete

 

http://stackoverflow.com/questions/10206648/image-upload-with-preview-and-delete/10206834#10206834

 

모바일에서 브라우저로 파일 업로드 할때 미리보기 기능 구현.

 

html5 에서 모바일브라우저상의 <input type="file" >을 지원 할때 사용 가능하다.

 

아래의 Demo가 실행이 되는 브라우저에서는 적용 가능하겠다.

 

Demo : http://plungjan.name/test/previewjq.html

 

 

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Image preview</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var blank="http://upload.wikimedia.org/wikipedia/commons/c/c0/Blank.gif";
function readURL(input) {
   
if (input.files && input.files[0]) {
       
var reader = new FileReader();

        reader
.onload = function (e) {
            $
('#img_prev')
           
.attr('src', e.target.result)
           
.height(200);
       
};

        reader
.readAsDataURL(input.files[0]);
   
}
   
else {
     
var img = input.value;
        $
('#img_prev').attr('src',img).height(200);
   
}
    $
("#x").show().css("margin-right","10px");
}
$
(document).ready(function() {
  $
("#x").click(function() {
    $
("#img_prev").attr("src",blank);
    $
("#x").hide(); 
 
});
});
</script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<style>
article
, aside, figure, footer, header, hgroup,
menu
, nav, section { display: block; }
#x { display:none; position:relative; z-index:200; float:right}
#previewPane { display: inline-block; }
</style>
</head>
<body>
<section>
<input type='file' onchange="readURL(this);" /><br/>
<span id="previewPane">
<img id="img_prev" src="#" alt="your image" />
<span id="x">[X]</span>
</span>
</section>
</body>
</html> 

 

반응형
반응형

Riak

: Dynamo 계열

  Key/Value Store 방식

  Value는 JSON문서로 저장되는 Document 저장 방식

  유사모델 - MongoDB, CouchDB

 

Riak의 특징 - Consistent Hashing

 

Dynamo계열의 구조라서 Ring 구조 기반의 아키텍처인데,

Hash알고리즘에 의해 데이터 Key에 따라서 적정노드를 찾는 구조.

클러스터링 단위는 node(물리적)/vnode(논리적)가 있는데,

하나의 물리서버에 여러개의 논리서버를 설치할 수 있다.

이 Ring 구조를 Runtime 시에도 동적으로 재설정 할 수 있다.

Riak는 별도의 마스터 노드를 가지지 않는다.

 

Riak의 데이터 구조

  • Bucket
  • Data Structure

 

 

 

반응형
반응형

NoSQL

 : Not Only SQL - RDBMS 형태의 관계형 데이터베이스가 아닌 다른 형태의 데이터 저장 기술.

 

Visual Guide to NoSQL Systems

 

* CAP 기반의 DB 분류

 

NoSQL의 특징

  • NoSQL은 RDBMS와는 달리 데이터 간의 관계를 정의하지 않는다.
  • RDBMS에 비해 휠씬 더 대용량의 데이터를 저장할 수 있다.
  • RDBMS와는 다르게 일반적인 서버 수십대를 연결해 데이터를 저장/처리한다.
  • 테이블 스키마가 유동적이다.

CAP 이론

  • Consistency : 분산된 노드 중 어느 노드로 접근하더라도 데이터값이 같아야 한다는 기능적 특징이다.(데이터 복제 중에 query가 되면, Consistency를 제공하지 않는 시스템의 경우 다른 데이터 값이 query 될 수 있다. )
  • Availability : 클러스터링된 노드 중 하나 이상의 노드가 FAIL이 되더라도, 정상적으로 요청을 처리할 수 있는 기능을 제공하는 특성.
  • Partition Tolenrance : 클러스터링 노드 간에 통신하는 네트워크가 장애를 겪더라도 정상적으로 서비스를 수행할 수 있는 기능.

NoSQL의 분류

  • Key/Value Store
  • Ordered Key/Value Store - Key/Value Store 와 저장방식은 동일하나. 데이터 내부적으로 Key순서로 Sorting 되어 저장된다. NoSQL은 RDBMS의 Order By와 같은 기능을 제공하지 않기 때문에 Sorting해서 보여주는 것이 용이하다.
  • Document Key/Value Store - Key/Value의 확장된 형태로 저장되는 Value의 데이터 타입이 Document라는 타입을 사용한다. DocumentXML,JSON,YAML과 같이 구조화된 데이터 타입으로 복잡한 계층 구조를 표현 할 수 있다.

NoSQL과 RDBMS의 차이

 : NoSQL은 데이터를 저장하는데 Key에 대한 PUT/GET만 지원한다.

     공통적으로 아래의 기능들을 고민해봐야 한다.

     - Sorting

     - Join    

     - Grouping

     - Range Query

     - Index

 

NoSQL 사용시 주의사항

  • NoSQL의 적용타당성
  • 용도에 맞는 NoSQL제품 채택
  • 데이터 모델링
  • RDBMS와 혼용
  • 적용시 하드웨어와의 설계 호환성
  • 운영 이슈 및 BackUP

 

 

 

반응형
반응형

13 Very Useful jQuery Modal Plugins

http://www.smashingapps.com/2013/03/14/13-very-useful-jquery-modal-plugins.html

 

Avgrund Modal

Avgrund is a jQuery plugin for modal boxes and popups. It uses interesting concept showing depth between popup and page. It works in all modern browsers and gracefully degrade in those that do not support CSS transitions and transformations (e.g. in IE 6-9 has standard behavior).

FancyBox

FancyBox is a tool for displaying images, html content and multi-media in a Mac-style “lightbox” that floats overtop of web page.

Simple Modal

SIMPLEMODAL is a small plugin to create modal windows. It can be used to generate alert or confirm messages with few lines of code. Confirm configuration involves the use of callbacks to be applied to affirmative action; it can work in asynchronous mode and retrieve content from external pages or getting the inline content. SIMPLEMODAL is not a lightbox although the possibility to hide parts of its layout may partially make it similar.

Lightview

Lightview was built to change the way you overlay content on a website.

jQuery.bPopup.js

bPopup is a lightweight jQuery modal popup plugin (only 1.34KB gzipped). It doesn’t create or style your popup but provides you with all the logic like centering, modal overlay, events and more. It gives you a lot of opportunities to customize so it will fit your needs.

LeanModal.js

Bare bones modal dialog windows.

jQuery SuperBox!

jQuery Superbox! is a script which allows you display windows with the lightbox effect.

Highslide JS

Highslide JS is an image, media and gallery viewer written in JavaScript.

GreyBox

GreyBox can be used to display websites, images and other content in a beautiful way.

Reveal: jQuery Modals Made Easy

Reveal is awesome because it’s easy to implement, is cross-browser compatible with modern browsers (with some graceful degradation of course) and lightweight coming in at only 1.75KB. What that means for you is that it’s fast, sexy and just works. Now let’s see how easy is can be to get Reveal working!

jQuery lightBox plugin

jQuery lightBox plugin is simple, elegant, unobtrusive, no need extra markup and is used to overlay images on the current page through the power and flexibility of jQuery´s selector.

PrettyPhoto is a jQuery lightbox

prettyPhoto is a jQuery lightbox clone. Not only does it support images, it also support for videos, flash, YouTube, iframes and ajax. It’s a full blown media lightbox.

Simplemodal

SimpleModal is a lightweight jQuery Plugin which provides a powerful interface for modal dialog development. Think of it as a modal dialog framework. SimpleModal gives you the flexibility to build whatever you can envision, while shielding you from related cross-browser issues inherent with UI development.



Read more: http://www.smashingapps.com/2013/03/14/13-very-useful-jquery-modal-plugins.html#ixzz2Nqjjf8ZL

반응형
반응형

MVNO(Mobile Virtual Network Operator)

 : 가상이동통신망사업자 또는 이동통신재판매사업자


MNO(Mobile Network Operator) 
 : 이동통신망을 보유한 이동통신망사업자(네트워크운영사업자)


MNO   - SK텔레콤, KT, LG 유플러스
MVNO - 한국케이블텔레콤(KCT), 온세텔레콤, CJ헬로비전

 

2010년 9월 MVNO 도입을 주요 내용으로 한 전기통신사업법개정안(일명 MVNO법)이
통과됨으로써 2011년부터 본격적으로 시작되었다.

MVNO의 장점으로는 차별화된 서비스와 요금을 들 수 있다.
MVNO는 통신망 관리비 및 유지비 등의 비용이 들어가지 않기 때문에
소비자가 부담하는 요금을 낮출 수 있고, 이동통신시장에서의 경쟁체제를 활성화시킴으로써

경쟁을 통한 요금 인하 효과도 기대할 수 있다.

각 업체가 제공하는 특화된 부가 서비스에 따라 소비자의 선택권이 확대되는 효과를 얻을 수 있다.

반응형
반응형

This script downloads required JavaScript libraries

 

install.sh

 

 #!/usr/bin/env sh
echo "This script downloads required JavaScript libraries"

# Constants
LIBS=_libs

# If the "_libs" directory exists, delete it
if [ -d "$LIBS" ]; then
  rm -r $LIBS
fi

# Create the directory
mkdir $LIBS

 


echo
echo "############################"
echo "#                          #"
echo "# Downloading Sencha Touch #"
echo "#                          #"
echo "############################"
curl http://cdn.sencha.io/touch/sencha-touch-2.1.0-gpl.zip --output $LIBS/sencha.zip

# Extract the contents of the zip file
unzip $LIBS/sencha.zip -d $LIBS/sencha/

# Remove the zip file
rm $LIBS/sencha.zip

 


echo
echo "############################"
echo "#                          #"
echo "# Downloading Sencha Cmd   #"
echo "#                          #"
echo "############################"
curl http://cdn.sencha.io/senchacmd/SenchaCmd-3.0.0.250-osx.app.zip --output $LIBS/sencha_cmd.zip

# Extract the contents of the zip file
unzip $LIBS/sencha_cmd.zip -d $LIBS

# Execute the application contained in it (OS X only)
# open $LIBS/SenchaCmd-3.0.0.250-osx.app

# Remove the zip file
rm $LIBS/sencha_cmd.zip

 


echo
echo "######################################"
echo "#                                    #"
echo "# Downloading the latest Siesta Lite #"
echo "#                                    #"
echo "######################################"
curl http://www.bryntum.com/download/?product_id=siesta-lite --output $LIBS/siesta.zip

# Extract the contents of the zip file
unzip $LIBS/siesta.zip -d $LIBS

# Remove the zip file
rm $LIBS/siesta.zip

# Rename the folder
mv $LIBS/siesta* $LIBS/siesta

 

 

반응형

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

Google Maps API 웹 서비스  (0) 2013.03.28
DOM Reference - 레퍼런스  (0) 2013.03.28
[APTANA] ftp setting  (0) 2013.03.13
php의 allow_url_fopen 설정의 보안 취약점에 주의하세요  (0) 2013.03.11
CAPTCHA - chess CAPTCHA  (0) 2013.03.11

+ Recent posts