'전체 글'에 해당되는 글 120건

  1. 2012.05.01 sun java 설치 2
  2. 2012.04.28 아파치 속도 증가 mod_spdy 버전 2.2 이상
  3. 2012.04.28 wkhtmltopdf 소개
  4. 2012.04.28 superfastmatch
  5. 2012.04.28 CartoDB 소개
  6. 2011.12.11 스프링 참고할만한 소스들....
  7. 2011.11.19 스프링 MVC 예제 링크 및 간단 정리..
  8. 2011.10.10 내 소개

2012. 5. 1. 09:01 Programming/Java

sun java 설치

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-bin sun-java6-jdk


sudo update-alternatives --config java


* another method

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html

적당한 bin 파일 받음.

chmod 755 jdk-x.x.x.x.bin

./jdk-x.x.x.bin


ln -s /home/xxxx/jdk-x.x.x.x/ /usr/local/java

path 설정

vi .bashrc

PATH = 

JAVA_HOME = 

export path = 



http://blog.manishchhabra.com/2012/05/installing-oracle-sun-java-jdk-and-setting-java_home-in-ubuntu-linux/


Installing Oracle Sun Java (JDK) and setting JAVA_HOME in Ubuntu (Linux)

by Manish on May 6, 2012

This post is not only for people who are new to Linux or Java but also quick notes for me to setup my environment next time I install my system or setup a virtual machine.

Installing OpenJDK can be very simple but not Oracle JDK. You can use one of the two following commands (depending on which version you which to install) to setup OpenJDK in your linux environment.

sudo apt-get install openjdk-6-jdk
or
sudo apt-get install openjdk-7-jdk

But I have always used Oracle Sun JDK for my development. While Oracle JDK (earlier Sun JDK) is under the Binary Code License (earlier Sun License), OpenJDK is under GPL with a linking exception. From JDK version 7, Oracle has planned to support OpenJDK and withdraw the Operating System Distributor License for Java. This has resulted in a withdrawal of Oracle JDK from the repositories of Linux distributions. Therefore you can’t just use apt-get to install Oracle JDK.

Here is the stackoverflow link to help you choose between the Oracle JDK or OpenJDK.

But users who prefer to use the Oracle JDK binaries over OpenJDK builds packaged in their Linux distributions of choice can of course download the package fromhttp://oracle.com/java under the same terms as users on other platforms. Here is the direct link to JavaSE downloads.

Coming the point I have downloaded JDK 7 (update 4) for Linux x86 (32-bit) – file:jdk-7u4-linux-i586.tar.gz

Step 1: After downloading the file open the terminal and navigate to the file

tar -xf jdk-7u4-linux-i586.tar.gz

This will extract and create a jdk folder at your current path.

Step 2: Create a location to keep your new JDK . I prefer and usually use /usr/lib/jvm/

You may need root permission to create the /usr/lib/jvm (hence use sudo).

sudo mkdir /usr/lib/jvm 

Step 3: Move the extracted jdk folder to /usr/lib/jvm/

sudo mv jdk1.7.0_04 /usr/lib/jvm/

Step 4: Now we have to setup our system to use refer to our new jdk

sudo update-alternatives --install "/usr/bin/java" "java" \
"/usr/lib/jvm/jdk1.7.0_04/bin/java" 1

sudo update-alternatives --config java

And also register Firefox Java Plugin

sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" \
"mozilla-javaplugin.so" "/usr/lib/jvm/jdk1.7.0_04/jre/lib/i386/libnpjp2.so" 1

sudo update-alternatives --config mozilla-javaplugin.so

ALL DONE. You can test your java install by

java -version

Here is a small screen capture of what happened on my screen when I went through above steps

Oracle JDK Install

Finally if you need to add JAVA_HOME variable, you can do so by adding it to the.bashrc file in your home directory

Open .bashrc file using an editor. If you use VI then
vi ~/.bashrc

and add the following 2 lines in your .bashrc file.

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_04/
export JAVA_HOME

There may be other ways to install, but this is what I have followed always.

Cheers


Posted by 한효정
Posted by 한효정

Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.

http://code.google.com/p/wkhtmltopdf/


python binding도 존재.. 안써봐서 모르겠지만 사용하기는 무지 쉽고 간혹 API문서 웹으로 제공하는데 백업용으로 사용하기 좋을 듯.

Posted by 한효정


문서를 sha-256 hash를 통해 빠르게 비교한다는... 완전 동일만 찾겠다는건가? 

http://superfastmatch.org/#1

https://github.com/mediastandardstrust/superfastmatch



Posted by 한효정

2012. 4. 28. 13:01 DataBase

CartoDB 소개

It was built to make it easier for people to tell their stories by providing them with flexible and intuitive ways to create maps and design geospatial applications. CartoDB can be installed on your own server and we also offer a hosted service at cartodb.com.

open source download

  • CartoDB-SQL-API
  • Mapnik 2.0
  • NodeJS 0.4.10+
  • PostGIS 2.0
  • Postgres 9.1.x
  • Redis 2.2+
  • Varnish 3.0+
  • Ruby 1.9.2+
  • Windshaft-cartodb

https://github.com/Vizzuality/cartodb


여행관련 스토리텔링 할 수 있는 플랫폼을 계속 구상중인데 잘만들었지만 원하는 기능을 담기에는 조금 부족하다.

뭐 그 다음 작업은 오픈소스인데 알아서 붙여서 쓰면 되겠지... 

http://developers.cartodb.com/examples.html


Posted by 한효정



package org.springframework.samples.mvc.ajax.account;

import java.math.BigDecimal;
import java.util.Date;
import java.util.concurrent.atomic.AtomicLong;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.springframework.core.style.ToStringCreator;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.format.annotation.NumberFormat.Style;

public class Account {

private Long id;

@NotNull
@Size(min = 1, max = 25)
private String name;

@NotNull
@NumberFormat(style = Style.CURRENCY)
private BigDecimal balance = new BigDecimal("1000");

@NotNull
@NumberFormat(style = Style.PERCENT)
private BigDecimal equityAllocation = new BigDecimal(".60");

@DateTimeFormat(style = "S-")
@Future
private Date renewalDate = new Date(new Date().getTime() + 31536000000L);

public Long getId() {
return id;
}

void setId(Long id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public BigDecimal getBalance() {
return balance;
}

public void setBalance(BigDecimal balance) {
this.balance = balance;
}

public BigDecimal getEquityAllocation() {
return equityAllocation;
}

public void setEquityAllocation(BigDecimal equityAllocation) {
this.equityAllocation = equityAllocation;
}

public Date getRenewalDate() {
return renewalDate;
}

public void setRenewalDate(Date renewalDate) {
this.renewalDate = renewalDate;
}

Long assignId() {
this.id = idSequence.incrementAndGet();
return id;
}

private static final AtomicLong idSequence = new AtomicLong();

public String toString() {
return new ToStringCreator(this).append("id", id).append("name", name)
.append("balance", balance).append("equityAllocation",
equityAllocation).append("renewalDate", renewalDate)
.toString();
}

}




package org.springframework.samples.mvc.basic.account;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value="/account")
public class AccountController {

private Map<Long, Account> accounts = new ConcurrentHashMap<Long, Account>();
@RequestMapping(method=RequestMethod.GET)
public String getCreateForm(Model model) {
model.addAttribute(new Account());
return "account/createForm";
}
@RequestMapping(method=RequestMethod.POST)
public String create(@Valid Account account, BindingResult result) {
if (result.hasErrors()) {
return "account/createForm";
}
this.accounts.put(account.assignId(), account);
return "redirect:/account/" + account.getId();
}
@RequestMapping(value="{id}", method=RequestMethod.GET)
public String getView(@PathVariable Long id, Model model) {
Account account = this.accounts.get(id);
if (account == null) {
throw new ResourceNotFoundException(id);
}
model.addAttribute(account);
return "account/view";
}

}



package org.springframework.samples.mvc.basic.account;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(value=HttpStatus.NOT_FOUND)
public class ResourceNotFoundException extends RuntimeException {
private Long resourceId;
public ResourceNotFoundException(Long resourceId) {
this.resourceId = resourceId;
}
public Long getResourceId() {
return resourceId;
}
}

'Programming > Spring' 카테고리의 다른 글

스프링 MVC 예제 링크 및 간단 정리..  (0) 2011.11.19
Posted by 한효정

'Programming > Spring' 카테고리의 다른 글

스프링 참고할만한 소스들....  (0) 2011.12.11
Posted by 한효정

2011. 10. 10. 22:58 카테고리 없음

내 소개

전문 분야 및 주요 경력사항
- Computer Vision & Pattern Recognition / Python, C, C++
- 사물 검색, 음악 검새, 이미지, 동영상 중복 검출, 성인 이미지 검출, 라인아트, 쇼핑 중복, 이미지 메타 데이타 추출 (얼굴, 흑백, ...)
- 모바일, TV 객체 광고 플랫폼, 
- 사용자 상호작용기반 2D-3D 입체 영상 생성기법, 객체 추출

XX를 선택한 이유
- 제주에 오래 있다간 결혼 못할거 같아서....

XX에서의 목표와 비전
- 일단은 적응, 두번째도 적응, 세번째는 새로운 서비스???

자신의 성격과 취미, 관심분야
- 성격은 많이 내성적이며 자유로운 영혼.... 취미는 독서와 걷기 & 드라이브
- 관심 분야는  비전, 인터넷 서비스, 주식
Posted by 한효정

블로그 이미지
착하게 살자.
한효정

카테고리

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.3
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

최근에 올라온 글

최근에 달린 댓글

글 보관함