블로그 이미지

mind10

,

일단 일본어를 인식하기 위해서 pLatex기반으로 컴파일하게 될때


pdf figure를  사용하는 경우


no Boundingbox 라는 에러 메시지가 발생할 경우.


(일단 texlive 가 깔려 있다는 전제하에)


pdf 그림이 있는 위치에서 콘솔창을 열고 다음과 같이 xbb파일을 생성해준다.


\extractbb xxxxx.pdf 


이렇게 하면 xxxx.xbb란 파일이 생성된다.


여러가지 warning이 발생할경우 pdf버전을 낮춰서 다시 시도해본다.


그리고 작성중인 Tex문서의


\usepackage[dvipdfmx, hiresbb]{graphix}


이렇게 hiresbb옵션을 추가해준다.



P.S. 파워포인트나 VISO로 작성된 그림을 adobe pdf로 변환할경우

     extractbb 실행시 \Rotate 90이란 경고가 나오면서 

     그림이 90도 돌아서 표시된다.

      이럴경우 다른 pdf컨버팅을 사용하거나 tex에서 figure 옵션으로 angle=-90해줘도 된다.


블로그 이미지

mind10

,

1. Install Apple File Conduit "2"


2. /System/Library/Frameworks/MediaToolbox.framework ( by iFunbox)


3. backup RegionalSystemSoundsThatShareBehaviour.plist File


4. replace by attached RegionalSystemSoundsThatShareBehaviour.plist


5. Reboot


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

Delete

<key>J</key>

<dict>

<key>BeginVideoRecording</key>

<string>BeginVideoRecordingAlwaysHeard</string>

<key>CameraShutter</key>

<string>CameraShutterAlwaysHeard</string>

<key>CameraShutterAlt</key>

<string>CameraShutterAltAlwaysHeard</string>

<key>EndVideoRecording</key>

<string>EndVideoRecordingAlwaysHeard</string>

</dict>

<key>KH</key>

<dict>

<key>BeginVideoRecording</key>

<string>BeginVideoRecordingAlwaysHeard</string>

<key>CameraShutter</key>

<string>CameraShutterAlwaysHeard</string>

<key>CameraShutterAlt</key>

<string>CameraShutterAltAlwaysHeard</string>

<key>EndVideoRecording</key>

<string>EndVideoRecordingAlwaysHeard</string>

</dict>

</dict>

</plist>


(origin)RegionalSystemSoundsThatShareBehaviour.plist


RegionalSystemSoundsThatShareBehaviour.plist



'iOS' 카테고리의 다른 글

Cydia 접속 느림 문제  (0) 2015.02.09
푸시알림을 위해 itunes 연결 어쩌구....  (0) 2013.07.12
musicbox 안될때  (2) 2013.03.25
집안에서 잃어버린 아이폰 쉽게 찾기  (0) 2013.03.03
카메라 셔터음 무음으로 바꾸기.  (0) 2013.03.03
블로그 이미지

mind10

,

bibliograph 을 생략하고


문서를 컴파일 할경우


문서에서 bibliograph를 citation 하는 부분들은 전부 ? 로 표시가 된다.


그럴때는 다음과 같은 패키지를 써주면


\usepackage[backend=bibtex]{biblatex}



i ama boy [ref1] <- 이런식으로 표현을 해준다.



블로그 이미지

mind10

,

이 패키지는


문서의 그림들을 전부 제일 마지막페이지로 옮긴다.


원래 그림이 있어야 할 위치에는


[Figure x about here]


라고 표시된다.


그림이 제일 마지막 페이지로 이동할 시에 


그림들 맨 앞페이지에 그림목록을 만들어준다.



블로그 이미지

mind10

,

다른 view를 참조하는 가장 보편적인 방법을 설명드리죠.. ^^;; 
SDI의 multi view라고 하더라도 당연히 Doc는 하나입니다. 그렇죠?? 
그럴 경우 이렇게 하시면 됩니다. 

먼저 View가 CAaaView와 CBbbView가 있고, Doc의 이름은 CPppDoc라고 합시다. 시작해 보죠.. 

먼저 CPppDoc의 헤더에 View의 포인터를 받을 포인터 객체를 선언합니다. 
CAaaView *pAaaView, *pBbbView; 

그런 다음에 Doc의 생성자에서 각각에게 NULL을 줍니다. 왜냐면 처음 생성되었을 때에는 쓰레기 값을 가지고 있으니까요.. 
CPppDoc() 

pAaaView = NULL; 
pBbbView = NULL; 


이러면 Doc에서 할 일은 끝났구요.. 다음은 각각의 View에서 할 일입니다. 각 View에서 할 일은 OnInitialUpdate에서 수행하면 됩니다. 
CAaaView::OnInitialUpdate() 

CPppDoc *pDoc = GetDocument(); //GetDocument()함수 재정의 하셨죠?? 
pDoc -> pAaaView = this; // 현재 view의 pointer를 여기에 넣어 줍니다. 



///////////////////////////////// 
CBbbView::OnInitialUpdate() 

CPppDoc *pDoc = GetDocument(); 
pDoc -> pBbbView = this; // 마찬가지구요... 


이제부터는 이녀석들을 얻어오기만 하면 되죠.. 예를들어 CAaaView에는 m_edit라는 멤버 변수가 있는데, 이 변수의 값을 CBbbView의 m_string이라는 변수에 얻어오고 싶으시면... 

CPppDoc *pDoc = GetDocument(); 
m_string = pDoc->pAaaView->m_edit; 

'VS 2010' 카테고리의 다른 글

Direct X SDK 설치시 s1023 error  (0) 2014.03.08
블로그 이미지

mind10

,

MATLAB Install Tips!!

Ubuntu 2014. 7. 19. 21:01

1. 설치시에 Archive is not a ZIP achive 이런 에러 메시지가 발생하면서 설치가 중단 될 시...


원인 :  /tmp 폴더의 용량이 작아서발생했을 가능성이 높다.

$df -h  실행시 /tmp폴더의 용량을 확인해본다.

용량이 작을시에 여기 다른 글에 있는 tmp폴더 용량 늘리는 명령어를 이용하여 5G정도로 늘려준다.



2. 설치되고 나서 런쳐에 아이콘이 생성 안되고 터미널에서만 실행이 되는데..($/usr/local/MATLAB/R201xa/bin/matlab) 


원인  : 이미 실행 아이콘은 등록이 되어 있는데 자동으로 런쳐에 등록되지 않았을 뿐이다.

전체 사용자의 경우 /usr/share/applications/MATLAB.desktop <== 여기에 있으니 이걸 런쳐에 갖다 붙이면 된다.


블로그 이미지

mind10

,

dh -h


Filesystem      Size  Used Avail Use% Mounted on

/dev/sdb5        50G  6.7G   41G  15% /

none            4.0K     0  4.0K   0% /sys/fs/cgroup

udev            3.9G   12K  3.9G   1% /dev

tmpfs           2.0G  843M  1.2G  42% /tmp

tmpfs           797M  1.4M  796M   1% /run

none            5.0M     0  5.0M   0% /run/lock

none            3.9G   22M  3.9G   1% /run/shm

none            100M   52K  100M   1% /run/user

tmpfs           512M     0  512M   0% /var/spool

tmpfs           512M   52K  512M   1% /var/tmp

/dev/sdf1       1.9T  1.5T  329G  83% /media/garam/Ext_HDD2_2T

/dev/sde2       2.8T  1.8T 1000G  65% /media/garam/Ext_HDD1_3T

/dev/sdd2       2.8T  1.8T 1000G  65% /media/garam/Ext_HDD1_3T1


이런식으로 나오는데..
/tmp 가 꽉차 있을 가능성이 높다..
그런경우 /tmp 용량을 늘려서 해결할수 있다.

mount -o remount,size=10G,noatime /tmp

블로그 이미지

mind10

,

sudo dpkg --configure -a


이렇게 한 후 어떤 패키지가 오류가 났는지 확인 후,


sudo rm -f /var/lib/dpkg/info/[패키지].postrm
sudo rm -f /var/lib/dpkg/info/[패키지].prerm
sudo apt-get remove [패키지]


이렇게 한 후 다시 설치한다.

블로그 이미지

mind10

,

warning 4099

카테고리 없음 2014. 6. 13. 12:56

만약 pdb 정보를 담지않아서 warning LNK4099 ~ 경고가 날땐 다음 내용을 참조하여 수정해 보자

 

 

출처 : http://cafe.naver.com/jzsdn.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=12816

 

해당 라이브러리 프로젝트에서

1) C/C++ ->General -> Debug Information Format 을 Program Database (/Zi) 로 변경

2) C/C++ -> Code Generation -> Enable Minimal Rebuild 를 No 로 변경

3) C/C++ -> Command Line -> /Ylsymbol 을 입력

 이는 해당 라이브러리의 디버깅 정보를 pdb화일에 담지 않고 직접 lib화일에 저장시키는 것이다.


블로그 이미지

mind10

,

properties - c/c++ - command line


add  /D "_CRT_SECURE_NO_DEPRECATE"

'VS 2010 > Error & Warning' 카테고리의 다른 글

LNK4098  (0) 2013.03.08
블로그 이미지

mind10

,

캐스트 : 형변환

C++스타일의 캐스트는 reinterpret_cast, static_cast, const_cast, dynamic_cast 등이 있다.

 

쉽게 말해 C 스타일의 캐스트는 식별자를 그냥 괄호로 둘러 싼 그것

float a = 1.23;

int b = (int)a;

이게 바로 C스타일의 캐스트, 즉 형변환

이렇게 써놓으면 눈으로 찾기도 힘들고 내부적으로도 코드가 더러워지는 등 불편함이 있다고 합니다.

 

그런데 C++스타일의 캐스트는

static_cast<타입>(표현식)

이런식으로 작성됩니다.

 

예를들면,

int형을 double형인것 처럼 결과를 내고싶어 그렇다면 C스타일로는

int a, b;

double result = ((double) a) / b;

요런식이겠지요

 

그런데 C++스타일의 캐스트를 적용하면

double result = static_cast<double>(a) / b;

이런 스타일로 적용됩니다.

이러면 가독성이 높아집니다, 왜냐하면, static_cast 부분은 파란색으로 나오기 때문입니다,

아니 그건 그렇다쳐도 컴파일러도 내부적으로 저 부분이 인식이 더 잘된다고 합니다.

 

static_cast

기본적으로 C스타일의 캐스트와 같은 역할

그래서 double을 포인터로 바꾼다던지 int를 struct로 바꾼다던지 하는 일은 하지 못합니다.

 

const_cast

이것은 상수성(const)이나 휘발성(volatile)을 떼버리는데 사용되는 캐스트입니다.

const로 선언된 것을 제거하는데 쓰입니다

예를들면,

int update(int *a);

int b;

const & cb = b;  // cb는 b를 상수객체 인것처럼 참조합니다

update(&cb);     // 에라!! 상수라서 안돼

update(const_cast<int*>(&cb));   // 상수성을 제거해서 되는거야


 

dynamic_cast

얘는 상속계층 관계를 가로지르거나, 하향시킨 클래스 타입으로 안전하게 캐스팅 할 때 사용

기본 클래스의 객체에 대한 포인터나 참조자의 타입을 파생클래스나 형제클래스 타입으로 형 변환해주는 것

걍 예제를 보아요

class Widget {.....};                                    // 위젯 클래스

class SpecialWidget : public Widget {.....};    // 위젯의 하위클래스

void update(SpecialWidget *psw)

Widget *pw;

update(dynamic_cast<SpecialWidget*>(pw));  // 이상 없음 하위클래스의 형태로 형변환


당연한 얘기지만 dynamic_cast는 상수성을 제거하는데에는 사용될 수 없습니다

 

reinterpret_cast

얘가 정의되어 있는 코드는 컴파일러에 따라 다르게 정의되어 있기 때문에 왠만하면 쓰지 않는 편이 좋겠습니다.

함수 포인터 타입을 바꾸는데 사용되는데, 

예를들면,

typedef void (*FuncPtr)();  // 인자 안받고, void를 반환하는 함수에 대한 포인터

FuncPtr funcPtrArray[10];  // funcPtrArray는 10개의 FuncPtr로 이루어진 배열

이런 상횡에서 어쩔 수 없이 다음 함수에 대한 포인터를 넣어야할 사정이 생겼어요

int doSomething();

간단한 문제같지만 캐스트를 반드시 해 주어야 합니다.

왜냐, doSomething()은 funcPtrArray에 넣기엔 타입이 맞지 않아요

funcPtrArray는 void를 리턴하구 doSomething은 int를 리턴하니까요

funcPtrArray[0] = &doSomething;    // 걍에러 타입이 안맞습니다

funcPtrArray[0] = reinterpret_cast<FuncPtr>(&doSomething);   // 됩니다.

ㅇㅋㅇㅋㅇㅋ?

 

캐스트를 알아보았는데,

되도록이면 안쓰는걸 추천합니다

잘못된 결과가 나오기도하고, 이식성에도 좋지 않기 때문입니다.

블로그 이미지

mind10

,

Display manager based on GDM.


Installation

sudo add-apt-repository ppa:noobslab/mint
sudo apt-get update
sudo apt-get install mdm mdm-themes

Remove

sudo dpkg-reconfigure lightdm
sudo apt-get remove mdm mdm-themes

<출처 : http://www.noobslab.com/2014/04/mdm-display-manager-and-mdm-themes-for.html>

블로그 이미지

mind10

,

Terminal 에서


gnome-session-properties


그런후 등록 하고 싶은거 등록


블로그 이미지

mind10

,

$ locale


현재 각종 로케일 관련된 셋팅을 볼  수 있다.


LC_COLLATE는 파일 정렬(sort)에 관련된 것으로


만약 바꾸고 싶으면 


$sudo update-locael LC_COLLATE="ko_KR.UTF-8"


이렇게 해주고 로그아웃-로그인 해주면 된다.


 < National Language Support Guide and Reference >


Understanding Locale Environment Variables


National Language Support (NLS) uses several environment variables to influence the selection of locales. You can set the values of these variables to change search paths for locale information:

  • LANG

Specifies the installation default locale.

Note:

The LANG environment variable value is established at installation. (This is the locale every process uses unless the LC_* environment variables are set). The LANG environment variable can be changed by using the Manage Language Environment menu in SMIT. For more information about using SMIT, see System Management Interface Tool (SMIT) Overview in Operating system and device management. The C and POSIX locales are designed to offer the best performance.

  • LC_ALL

Overrides the value of the LANG environment variable and the values of any other LC_* environment variables.

  • LC_COLLATE

Specifies the locale to use for LC_COLLATE category information. The LC_COLLATE category determines character-collation or string-collation rules governing the behavior of ranges, equivalence classes, and multicharacter collating elements.

  • LC_CTYPE

Specifies the locale to use for LC_CTYPE category information. The LC_CTYPE category determines character handling rules governing the interpretation of sequences of bytes of text data characters (that is, single-byte versus multibyte characters), the classification of characters (for example, alpha, digit, and so on), and the behavior of character classes.

  • LC__FASTMSG

Specifies that default messages are used for the C and POSIX locales and that NLSPATH are ignored when LC__FASTMSG is set to true. Otherwise, POSIX compliant message handling will be performed. The default value 

will be LC__FASTMSG=true in the /etc/environment file.

  • LC_MESSAGES

Specifies the locale to use for LC_MESSAGES category information. The LC_MESSAGES category determines rules governing affirmative and negative responses and the locale (language) for messages and menus.

Application developers who write applications that do not display multibyte characters on a terminal should make sure the LC_MESSAGES value is not set to C@lft. If necessary, disable the setting with the putenv("LC_MESSAGES=") subroutine. The result is output that uses translated message catalogs. C@lft is disabled by login sessions that can display multibyte characters. Processes launched using cron or inittab retain the C@lft LC_MESSAGES value and use the setlocale() subroutine to establish the language environment for default messages.

  • LC_MONETARY

Specifies the locale to use for LC_MONETARY category information. The LC_MONETARY category determines the rules governing monetary-related formatting.

  • LC_NUMERIC

Specifies the locale to use for LC_NUMERIC category information. The LC_NUMERIC category determines the rules governing nonmonetary numeric formatting.

  • LC_TIME

Specifies the locale to use for LC_TIME category information. The LC_TIME category determines the rules governing date and time formatting.

  • LOCPATH

Specifies the search path for localized information, including binary locale files, input methods, and code-set converters.

Note:

All setuid and setgid programs ignore the LOCPATH environment variable.

  • NLSPATH

Specifies the search path for locating message catalog files. This environment variable is used by the Message Facility component of the NLS subsystem. See the catopen subroutine for more information about expected format of the NLSPATH variable.

The environment variables that affect locale selection can be grouped into three priority classes: high, medium, and low. Environment variables in the high priority class are:

  • LC_ALL
  • LC_COLLATE
  • LC_CTYPE

Environment variables in the medium priority class are:

  • LC_MESSAGES
  • LC_MONETARY
  • LC_NUMERIC
  • LC_TIME

The environment variable in the low priority class is:

  • LANG


When a locale is requested by the setlocale subroutine for a particular category or for all categories, the environment variable settings are queried by their priority level in the following manner:


  • If the LC_ALL environment variable is set, all six categories use the locale it specified. For example, if the LC_ALL environment variable is equal to en_US and the LANG environment variable is equal to fr_FR, a call to the setlocale subroutine sets each of the six categories to the en_US locale.
  • If the LC_ALL environment variable is not set, each individual category uses the locale specified by its corresponding environment variable. For example, if the LC_ALL environment variable is not set, the LC_COLLATE environment variable is set to de_DE, and the LC_TIME environment variable is set to fr_CA, then a call to the setlocale subroutine sets the LC_COLLATE category to de_DE and the LC_TIME category to fr_CA. Neither environment variable has precedence over the other in this situation.
  • If the LC_ALL environment variable is not set, and a value for a particular LC_* environment variable is not set, the value of the LANG environment variable determines the setting for that specific category. For example, if the LC_ALL environment variable is not set, the LC_CTYPE environment variable is set to en_US, the LC_NUMERIC environment variable is not set, and the LANG environment variable is set to is_IS, then a call to the setlocale subroutine sets the LC_CTYPE category to en_US and the LC_NUMERIC category to is_IS. The LANG environment variable specifies the locale for only those categories not previously determined by an LC_* environment variable.
  • If the LC_ALL environment variable is not set, a value for a particular LC_* environment variable is not set, and the value of the LANG environment variable is not set, the locale for that specific category defaults to the C locale. For example, if the LC_ALL environment variable is not set, the LC_MONETARY environment variable is set to sv_SE, the LC_TIME environment variable is not set, and the LANG environment variable is not set, then a call to the setlocale subroutine sets the LC_MONETARY category to sv_SE and the LC_TIME category to C.
블로그 이미지

mind10

,