이클립스 주석 색깔 변경

Eclipse preference -> Java -> Editor -> Syntax Coloring

 

Posted by 知彼知己百戰不殆
,

1. 공통점

==, compare, equals 메소드 모두 문자열 비교가 가능함.

 

2. 차이점

== 연산자: 내용과 객체까지 같은지 비교. 

즉, 객체로 저장된 String과 상수 String을 ==연산자로 비교한 값을 확인해 보면 false로 나온다.

 

 

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
public static void main(String[] args) {
 
        String str1 = "abc";
        
        System.out.println("[variable] str1 == \"abc\" ▶︎▶︎▶︎ " + (str1 == "abc") );
        System.out.println("[variable] str1.equals(\"abc\") ▶︎▶︎▶︎ " + str1.equals("abc") );
        System.out.println("[variable] str1.compareTo(\"abc\") == 0 ▶︎▶▶︎︎ " + (str1.compareTo("abc")==0) );
        System.out.println();
        
        String str2 = new String("abc");
        System.out.println("[object] str2 == \"abc\" ▶︎▶︎▶︎ " + (str2 == "abc") );
        System.out.println("[object] str2.equals(\"abc\") ▶︎▶︎▶︎ " + str2.equals("abc") );
        System.out.println("[object] str2.compareTo(\"abc\") == 0 ▶︎▶︎▶︎ " + (str2.compareTo("abc")==0) );
        System.out.println();
 
        
        String [] str3 = new String [1];
        str3[0= "abc";
        System.out.println("[object] str3[0] == \"abc\" ▶︎▶︎▶︎ " + (str3[0== "abc") );
        System.out.println("[object] str3[0].equals(\"abc\") ▶︎▶︎▶︎ " + str3[0].equals("abc") );
        System.out.println("[object] str3[0].compareTo(\"abc\") == 0 ▶︎▶︎▶︎ " + (str3[0].compareTo("abc")==0) );
        
        System.out.println("========================================================");
        System.out.println("[DEBUG] str3[0] ▶︎▶︎▶︎ " + str3[0]);
        System.out.println("[DEBUG] str3 ▶︎▶︎▶︎ " + str3);
    }
cs

 

 

코드 실행 결과

Posted by 知彼知己百戰不殆
,

1. Open the Terminal Apps in  /Applications/Utilities

2. sudo spctl --master-disable


How to disable the using unidentified Apps? 

>> sudo spctl --master-enable

'OS > Mac OS' 카테고리의 다른 글

Mac 부하테스트(stress test)  (0) 2020.12.27
Eclipse for mac OS Catalina  (0) 2019.12.02
Oralcle DB 설치  (0) 2017.09.05
Beyond Compare - 디데이 초기화 프로그램  (0) 2017.08.07
맥북 기본 Source Code Compare 프로그램  (0) 2017.07.31
Posted by 知彼知己百戰不殆
,

Oralcle DB 설치

OS/Mac OS 2017. 9. 5. 16:39

1. 설치 과정

https://dimitrisli.wordpress.com/2012/08/08/how-to-install-oracle-database-on-mac-os-any-version/


2. 설치 파일 준비물

-VirtualBox.dmg

http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

-DeveloperDaysVM2017-06-13_01.ova

http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html

용량이 큰 관계로 여기에 올리진 못함. 위의 URL 참조 후 다운로드

Posted by 知彼知己百戰不殆
,

http://verysimple.org/wiki/moin.cgi/CategoryMac?highlight=%28%5CbCategoryCategory%5Cb%29

objective-C 참고 사이트

Posted by 知彼知己百戰不殆
,
Lance Mason Robinson wrote:

> I'm having problems using gettext() and puttext().  I'm trying to use 
> them

> to save the screen and restore the screen.  Sometimes when I'm running


> the program, it locks up after I call gettext() and sometimes after I
> call puttext().  I was thinking maybe the function is getting confused 
> by
> other included files.  Here's how I am using it in my program..

> void * screen;
> //save screen
> gettext(1,1,80,25,screen);
> //here I am changing the screen, for example in one instance if they 
> press
> //F1 it shows a help screen with all the commands available.
> //then after they exit the help screen...
> //restore screen
> puttext(1,1,80,25,screen);

> If I remove all the gettext()'s and puttext()'s from my program then 
> it
> works great.  Any ideas how to fix it?  Or alternative methods to save
> & restore the screen state?

> Lance

Lance,

Your problem is easy to fix. YOU have to allocate the memory you pass 
to gettext. It will use it to store the display info. (The lockups
are due to a memory violation.) The memory space needed for the array
can be calculated the following way:

   bytes = number_of_rows * number_of_columns * 2

   where number_of_rows    = bottom - top + 1
   and   number_of_collums = right - left + 1

In your example the following lines would do it:

   #include <conio.h>
   
   // allocate 80*25*2 = 4000 bytes
   void screen[4000];
   // save screen
   gettext(1,1,80,25,screen);
   // your stuff
   // ...
   //
   // restore screen
   puttext(1,1,80,25,screen);

'언어 > C' 카테고리의 다른 글

[Linked List] 연결리스트를 활용한 도서관리prog  (0) 2017.02.08
[CubeBite] File_Create_Write 함수  (0) 2017.02.08
[Tip] File I/O Error 다루는 법  (0) 2016.11.05
구조체의 크기와 pragma pack  (0) 2016.10.28
비트필드 구조체  (0) 2016.10.27
Posted by 知彼知己百戰不殆
,

Project -> Build Settings -> No Common Blocks -> Yes -> No



Posted by 知彼知己百戰不殆
,

#!/bin/bash

rm /Users/dongki/Library/Application\ Support/Beyond\ Compare/registry.dat



script


Posted by 知彼知己百戰不殆
,

Spotlight 에서 FileMerge를 검색하면 나오는 프로그램!

'OS > Mac OS' 카테고리의 다른 글

Oralcle DB 설치  (0) 2017.09.05
Beyond Compare - 디데이 초기화 프로그램  (0) 2017.08.07
[맥북 실행파일 만들것]  (0) 2017.05.19
vi 에디터로 작성 시 마우스 휠로 커서 옮기기  (0) 2016.11.13
Vim 자동완성  (0) 2016.11.13
Posted by 知彼知己百戰不殆
,

UIAlertView 띄우는 법


UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@""

                                                                     message:@"가라미네이트 "

                                                                     delegate:self

                                                       cancelButtonTitle:@"취소"                   /* nil 지정할 경우 cancel button 없음 */

                                                       otherButtonTitles:@"확인", nil];

    

[alert show];


Posted by 知彼知己百戰不殆
,