'분류 전체보기'에 해당되는 글 104건

카테고리 없음

원글 : http://bongjaemoon.wordpress.com/2012/05/25/ffmpeg-x264-compile-for-using-with-android-ndk-on-mac-osx/

1. Toolchain for compile (This NDK version is r8)
a. Android’s NDK allows we to create toolchain installation using “make-standalone-toolchain.sh” script.
b. Execute like below.
$> $NDK/build/tools/make-standalone-toolchain.sh –platform=android-14 –install-dir=/work/my-android-toolchain
c. You can use directly with PATH, CC setting.
export PATH=/work/my-android-toolchain/bin:$PATH
export CC=arm-linux-androideabi-gcc
d. Done

2. Compile & Build x264 project for FFMpeg library.
a. Download x264 project (http://www.videolan.org/developers/x264.html)
b. Configuration for arm compile. (prefix option is very important for FFMpeg compiling.)
$> ./configure –host=arm-linux \
–cross-prefix=arm-linux-androideabi- \
–enable-shared \
–enable-static \
–prefix=/work/my-android-toolchain/sysroot/usr
c. make / install
$> make
$> make install
d. Done. You can find the library & include files in –prefix option’s directory.

3. Compile & Build FFMpeg project.
a. Download FFMpeg source code from http://ffmpeg.org/download.html (This case is FFmpeg 0.10.3 “Freedom” version)
b. Configuration for arm compile.
$> ./configure –enable-shared \
–enable-libx264 \
–cross-prefix=arm-linux-androideabi- \
–enable-cross-compile \
–target-os=linux \
–arch=arm \
–enable-gpl \
–prefix=/work/my-android-toolchain/sysroot/usr
c. Configuration for detailed module selection.
$> ./configure –prefix=../ffmpeg_build \
–enable-gpl \
–enable-shared \
–disable-doc \
–disable-ffmpeg \
–disable-ffplay \
–disable-ffprobe \
–disable-ffserver \
–disable-avdevice \
–disable-debug \
–disable-network \
–disable-protocols \
–disable-devices \
–disable-encoders \
–disable-decoders \
–disable-muxers \
–disable-demuxers \
–disable-parsers \
–disable-bsfs \
–disable-filters \
–enable-encoder=h264 \
–enable-libx264 \
–extra-cflags=-U__STRICT_ANSI__ \
–target-os=linux \
–extra-cflags=”-fno-short-enums” \
–extra-ldflags=”-mandroid -lm” \
–enable-cross-compile \
–cross-prefix=arm-linux-androideabi- \
–arch=arm
d. Make
$> make

e. Make install

$> make install

f. Done. You can see the library and header in ../ffmepg_build directory (in the prefix option)

카테고리 없음

mini displayport - displayport 를 Lenovo 1만5천원 짜리 사서 연결했더니 색깔도 화면도 깨지고 난리 난리가 아니였다.
반품까지 알아보다 구글링을 하던 중 , 아래와 같은 내용이 강제로 RGB모드 잡아준다는 프로파일을 오버로드해서

영어 하실 줄아시면 아래 설명보고 하시고, 귀찮으시면 지금 첨부해놓은 첨부 파일 받아서 
아무 곳에나 풀고 sudo ruby patch-edid.rb 치고 엔터, 새로 나오는 폴더를 /System/Library/Display/Override 인가?? 암튼 아래 폴더로 복사  역시 sudo 써서 

그리고 리부팅하면 아래 글처럼 인조이 할 수 있음.. 화면이 아이맥 부럽지 않는 화면이 되었음...
아 한가지 더  해상도 조절하는 곳에서 컬러 프로파일 선택을 일반 RGB나 다른 걸로 선택해서 색상을 좀 맞춰줘야함 그냥 DISPLAYPORT 라는 프로파일을 쓰면 뿌옇고 이상함.. 


Force RGB mode in Mac OS X to fix the picture quality of an external monitor

I recently bought a MacBook Pro (with ‘Retina’ screen), but when I hooked it up to my Dell U2410 monitor via HDMI cable I was shocked by the poor picture quality. The contrast was all wrong and text was misshapen. No amount of calibration in the monitor or software would fix it.

Short answer: OS X thinks my monitor is a TV, and is using the YCbCr colour space rather than RGB. I had to override an EDID setting to force the RGB colour space, and it is now working correctly.

Long answer: I haven’t owned a Mac for a while and had forgotten how difficult much of the “Apple community” can be when it comes to anything that can’t be adjusted in System Preferences. Googling for problems with external monitors on MacBooks found dozens of threads on official and unofficial Apple forums, all full of people with the same problem. The most common response was to blame the monitor, despite assurances from the stricken users that the monitor worked beautifully in Linux and Windows, even on the same machine under Boot Camp.

“You just haven’t calibrated it!”, “You are just too used to Retina now!”, “You just need to buy a Thunderbolt display!” Apple people also like to solve problems by throwing more money at it. (I realise that owning a Mac makes me an Apple person, too. Hypocritical self-loather?)

My lucky break was reading that the current colour space was “YCbCr” when I was browsing the monitor’s settings menu. I was sure that it was using RGB when hooked up to my PC, so I started searching instead for forcing RGB mode in OS X. It didn’t appear to be available out-of-the-box, but I have had some experience in overriding EDID settings for similar purposes so I searched instead for that.

I found this thread on the EmbDev.net forums. Mr Schwarz, thanks very much. Your thread and script was incredibly helpful and informative. It was written to fix problems connecting an external monitor via DisplayPort, but it fixed my HDMI issue just the same. I’ve summarised the required steps below.

My last word is to wonder what Apple is playing at. It seems that this problem has been reported by a lot of people for a long time, and I expect it would require a fairly simple software update. Do they just not care about those using third-party components, or are they actively attempting to force people on to Thunderbolt displays?

How to force RGB in Mac OS X

  1. Download the patch-edid.rb script from the forums thread above and put it in your home directory.
  2. Connect only the external monitor(s) in question (I closed my MacBook lid, for example). The script will make override files for any connected monitor.
  3. Type “ruby patch-edid.rb” in Terminal.
  4. A new folder will be created in your home directory. Move it into the “/System/Library/Displays/Overrides” folder. If Finder tells you that you are overwriting an existing folder, consider backing it up first.
  5. Restart your computer, enjoy your monitor.

To undo the changes, either delete the folder you had copied to the Overrides folder (if it didn’t already exist) or replace it with the folder you had backed up.

Updates

If you’re having trouble with any of these steps, please have a look through the comments below (and note that there are multiple pages). Many questions have been answered with helpful tips from others.

Update, 27 Oct 2013: If you’ve applied this fix before, the OS X Mavericks update will overwrite it. I’ve successfully re-applied the fix by following exactly the same steps, and other commenters below have done so, too.

Update, 13 Nov 2013: Andrew comments below that he has modified the script to add some useful new features, and provides a link to his GitHub for those wishing to use it instead.

Update, 28 Nov 2013: If the process appears to work but doesn’t seem to make a difference, consider Tom’s comments below. Depending on your monitor an extra tweak may be required. 
카테고리 없음

1) GRANT 명령을 통한 추가 (한방에 추가(명령 한번으로 사용자를 추가))

 

   GRANT ALL PRIVILEGES ON 접근 허용  DB 이름.* TO 'new_user_id'@'%' IDENTIFIED BY 'new_user_password' WITH GRANT OPTION;

 

   모든 테이블에 접근 하기위해서는  접근 허용  DB 이름.*  ==> *.*

   'new_user_id'@'%' 에서 '%' 의미는 신규 계정이 접속할 위치의 제한을 두지 않겠다는 의미.

   ) 'new_user_id'@'localhost' localhost 접속을 하였을 경우만 허용

         'new_user_id'@'127.0.0.1' 127.0.0.1 접속 하였을 경우만 허용

         'new_user_id'@'192.168.0.100' '192.168.0.100' 에서만 접속 허용.

[출처] MySQL 사용자 추가 삭제|작성자 콩이아부지

카테고리 없음
yum install php-pear

pear channel-discover pear.nrk.io
pear install nrk/Predis


pear channel-discover pear.apache.org/log4php
pear remote-list -c log4php

pear install log4php/Apache_log4php
yum --enablerepo=remi install php php-devel php-mysql php-pecl php-mbstring php-xmlrpc php-pear
완료
 
카테고리 없음

[원문]
http://www.yongbok.net/blog/how-to-install-mongodb-on-centos/

 


How to install MongoDB on CentOS

CentOS에서 MongoDB를 설치 하는 방법이며 굉장히 쉽습니다.

우선 MongoDB 저장소를 추가 합니다.

[root@ruo91 ~]# nano /etc/yum.repos.d/10gen.repo

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1

MongoDB를 설치 합니다.

[root@ruo91 ~]# yum install -y mongo-10gen mongo-10gen-server

mongo-10gen : MongoDB에 관한 도구들이 포함되어 있습니다.
mongo-10gen-server : MongoDB의 init 스크립트 및 mongod와 mongos 데몬이 포함되어 있습니다.

** 만약 yum update 시 MongoDB가 자동으로 업데이트가 되는 것을 방지 하고자 할경우 /etc/yum.conf 파일에 아래와 같은 구문을 넣으시면 됩니다.

[root@ruo91 ~]# nano /etc/yum.conf

exclude=mongo-10gen,mongo-10gen-server

설치가 완료 되면 MongoDB 설정 파일은 /etc/mongod.conf에.. 데이터 파일은 /var/lib/mongo, 로그는 /var/log/mongo에 위치해 있습니다. 또한, MongoDB를 실행하기 위한 mongod 계정이 자동 생성 됩니다.

MongoDB 설정 파일 : /etc/mongod.conf
MongoDB Data 파일 : /var/lib/mongo
MongoDB Log 경로 : /var/log/mongo

[root@ruo91 ~]# cat /etc/passwd | grep mongod
mongod:x:498:498:mongod:/var/lib/mongo:/bin/false

시스템이 부팅시 MongDB가 자동으로 실행 되도록 설정 합니다.

[root@ruo91 ~]# chkconfig mongod on

이제 MongoDB의 데몬을 시작 해봅니다.

[root@ruo91 ~]# service mongod start

Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: 28327
all output going to: /var/log/mongo/mongod.log
child process started successfully, parent exiting
[  OK  ]

mongod의 로그를 살펴보면 정상적으로 실행이 됐음을 확인 해볼수 있습니다.

[root@ruo91 ~]# cat /var/log/mongo/mongod.log

Mon Aug  5 22:19:11.176 [initandlisten] preallocating a journal file /var/lib/mongo/journal/prealloc.1
Mon Aug  5 22:19:13.010 [initandlisten] preallocating a journal file /var/lib/mongo/journal/prealloc.2
Mon Aug  5 22:19:15.071 [FileAllocator] allocating new datafile /var/lib/mongo/local.ns, filling with zeroes…
Mon Aug  5 22:19:15.077 [FileAllocator] creating directory /var/lib/mongo/_tmp
Mon Aug  5 22:19:15.150 [FileAllocator] done allocating datafile /var/lib/mongo/local.ns, size: 16MB,  took 0.002 secs
Mon Aug  5 22:19:15.187 [FileAllocator] allocating new datafile /var/lib/mongo/local.0, filling with zeroes…
Mon Aug  5 22:19:15.198 [FileAllocator] done allocating datafile /var/lib/mongo/local.0, size: 64MB,  took 0.01 secs
Mon Aug  5 22:19:15.208 [initandlisten] command local.$cmd command: { create: “startup_log”, size: 10485760, capped: true } ntoreturn:1 keyUpdates:0  reslen:37 164ms
Mon Aug  5 22:19:15.213 [websvr] admin web console waiting for connections on port 28017
Mon Aug  5 22:19:15.216 [initandlisten] waiting for connections on port 27017

MongoDB를 사용하고자 할때에는 mongo를 입력하시면 됩니다.

[root@ruo91 ~]# mongo

MongoDB shell version: 2.4.5
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type “help”.
For more comprehensive documentation, see

http://docs.mongodb.org/

Questions? Try the support group

http://groups.google.com/group/mongodb-user

>

카테고리 없음
eclipse에 javascript를 디버그 하기 위해 ATF를 설치해보자. 
먼저 Mozilla XPCOM for java와 Mozilla Xulrunner 를 설치해야 플러그인으로 설치가 된다.

Install new software 메뉴에서 add site 로

name : ATF
location : http://downloads.zend.com/atf/

를 등록해주고 넥스트 넥스트 설치 완료~~

http://www.eclipse.org/atf/downloads/index.php

위의 링크에서 All-in-one update site 를 다운로드하여 압축 풀고

위의 ATF 등록과 마찬가지로 등록
location을 압축 풀린 경로로

넥스트 넥스트 설치 완료 ~ 끝 
카테고리 없음
node.js 

wget -c "http://nodejs.org/dist/v0.9.9/node-v0.9.9.tar.gz "
tar xvfz node-v0.9.9.tar.gz
cd node-v0.9.9
configure
make
make install


express

npm install -g express
원하는 프로젝트 디렉토리를 만들고 해당 디렉토리로 가서
express
npm install

준비 완료

npm install socket.io mongoose forever

추가로 받기
 
카테고리 없음

1. keytool 필요

java/jre/bin 폴더에 있음

저같은 경우에는 C:\Program Files (x86)\Java\jre6\bin

 

2. openssl 설치

http://downloads.sourceforge.net/gnuwin32/openssl-0.9.8h-1-setup.exe 설치

 

3. Path 설정

윈도우 7 기준 > 제어판\시스템 및 보안\시스템 > 고급 시스템 설정 > 환경 변수 > 시스템변수 > Path 수정

저 같은 경우 맨 뒤에 C:\Program Files (x86)\Java\jre6\bin\;C:\Program Files (x86)\Git\bin\ 추가

앞 경로는 keytool, 뒤는 openssl <자신의 pc의 경로 확인> 

 

4. cmd 실행

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
붉은 글씨 부분에 자신의 경로로 수정

저 같은 경우 C:\Users\Administrator\.android

debug.keystore 파일의 경로를 입력 해줌

 

그래서

keytool -exportcert -alias androiddebugkey -keystore C:\Users\Administrator\.android\debug.keystore| openssl sha1 -binary | openssl base64 입력 

 

여기서 만약 keystore 암호를 묻지 않고 그냥 해시 코드가 출력 된다면 잘못된 해시 코드이니 낚이지 않도록 주의 !! 

 

암호는 android 라고 입력

 

이 후, 출력되는 값이 진짜 해시 코드 이다.

 

 

대부분 많이 하는 실수가 대충 입력해서 나온 잘못된 해시코드로 페이스북 설정에 등록하는 경우가 많은데 이를 주의 해야 함...

카테고리 없음

vi /etc/selinux/config

SELINUX=disabled

yum install mod_ssl 하여 mod_ssl을 인스톨한다.

openssl 도 인스톨되어 있는지 확인하고 없으면 인스톨한다.

공개키, 개인키, 싸인을 생성한다.

# Generate private key 
openssl genrsa -out ca.key 1024 # Generate CSR openssl req -new -key ca.key -out ca.csr # Generate Self Signed Key openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt


생성된 키파일들을 지정된 위치에 옮긴다. # Move the files to the correct locations mv ca.crt /etc/pki/tls/certs mv ca.key /etc/pki/tls/private/ca.key mv ca.csr /etc/pki/tls/private/ca.csr


vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf 한 후에,

SSLCertificateFile 항목과 SSLCertificateKeyFile항목을 아래와 같이 설정한다.

SSLCertificateKeyFile /etc/pki/tls/private/ca.key


SSLCertificateFile /etc/pki/tls/certs/ca.crt


httpd 서비스를 새로 시작한다.

/etc/init.d/httpd restart 
카테고리 없음

일반 안드로이드에 내장된 프로그램으로 Intent 호출하여 찍는다면 orientation 정보가 추가되어있어 그것만 보고 돌리면 된다만
surface로 직접 만들어 찍으면 정보가 없다. 그럴땐 저장할 때 돌려주자 아래 처럼 2.2 이상에서 잘된다. 그 이하는 책임 못짐


PictureCallback jpegCallback = new PictureCallback() {
  
public void onPictureTaken(byte[] data, Camera camera) {
     
FileOutputStream outStream = null;
     
try {
        imageFilePath
= getFilename();
       
InputStream is = new ByteArrayInputStream(data);
       
Bitmap bmp = BitmapFactory.decodeStream(is);
       
// Getting width & height of the given image.
       
if (bmp != null){
          
int w = bmp.getWidth();
          
int h = bmp.getHeight();
          
// Setting post rotate to 90
          
Matrix mtx = new Matrix();
           mtx
.postRotate(90);
          
// Rotating Bitmap
          
Bitmap rotatedBMP = Bitmap.createBitmap(bmp, 0, 0, w, h, mtx, true);
          
ByteArrayOutputStream stream = new ByteArrayOutputStream();
           rotatedBMP
.compress(Bitmap.CompressFormat.PNG, 100, stream);
          
byte[] byteArray = stream.toByteArray();
           outStream
= new FileOutputStream
                             
(String.format(imageFilePath,System.currentTimeMillis()));
           outStream
.write(byteArray);
           outStream
.close();
       
} else {
           outStream
= new FileOutputStream
                             
(String.format(imageFilePath,System.currentTimeMillis()));
           outStream
.write(data);
           outStream
.close();          
       
}      

        preview
.camera.startPreview();
   
} catch (FileNotFoundException e) {
        e
.printStackTrace();
   
} catch (IOException e) {
        e
.printStackTrace();
   
} finally {
   
}
 
}
};
1 2 3 4 5 6 ··· 11
블로그 이미지

개발자

우와신난다