반응형
반응형

[EXCEL] 지정한 수만큼 지정한 문자를 반복해 주는 REPT 함수

 

* REPT 함수

수치만큼 지정한 문자를 반복 표시해 준다.

형식 : =REPT("반복할문자", "반복할 숫자 또는 셀주소)


 

 

반응형
반응형

ADID / IDFA 확인 방법

 

구글은 ADID - Google Advertising ID  *광고ID 정책 안내 

 

확인방법 : 설정 > google  설정 > 광고 > 내 광고 ID 확인

광고 ID

광고 ID란 광고 용도로 Google Play 서비스에서 제공하는 고유한 ID로 사용자가 재설정할 수 있습니다. 광고 ID를 통해 사용자는 더 효율적으로 광고를 관리할 수 있으며 앱 개발자는 앱에서 수익을 계속 창출할 수 있는 간단한 표준 시스템을 얻게 됩니다. 사용자는 ID를 재설정하거나 Google Play 앱 내에서 맞춤 광고(이전 명칭: 관심기반 광고)를 선택 해제할 수 있습니다

 

 

애플은 IDFA - iOS6 이전에 UDID(Unique Device IDentifier) 

 

설정 > 개인정보보호 > Apple 광고 에 들어가서 설정할 수 있다. ID 확인은 다른 앱을 이용해서 가능. 

 

 

참고 : www.blog.adbrix.io/post/adid-idfa

 

모바일 앱 환경의 최소 식별값, ADID와 IDFA값 이해하기

모바일 앱 환경에서 신뢰할 수 있는 광고ID의 존재는 매우 중요합니다. 앱 이용자들의 행동을 디바이스 단위로 분석할 수 있는 수단이기 때문입니다.

www.blog.adbrix.io

 

 

 

 

'광고ID'는 개인정보인가?

애드브릭스와 같은 모바일 앱 환경의 분석툴들은 고객사가 운영하는 앱으로부터 광고ID(ADID, IDFA)를 수집하여 분석합니다. 자연스럽게 광고ID가 '개인정보'인가 라는 고객사 문의를 자주 받습니다. 국내 개인정보 보호법 상 개인정보란 '특정 개인을 식별' 할 수 있어야 합니다. 광고ID는 다바이스를 사용하는 최종 이용자가 스스로 변경할 수 있기 때문에 업계 일반적으로는 개인정보로 인식하지 않습니다.

 

"It enables users to reset their identifier or opt out of personalized ads (formerly known as interest-based ads) within Google Play apps." - Play Console Help (Advertising ID)

 

하지만 광고ID에 대한 해석은 고객사의 업종에 따라 다를 수 있기 때문에, 고객사 내부 보안팀에 검토 받을것을 권장하고 있습니다. 또한 애드브릭스는 앱 이용자의 요청에 따라 모든 데이터를 삭제하는 API를 함께 제공하고 있습니다.

 

구글 플레이와 앱 스토어의 광고ID 설명은 아래 링크를 참고하실 수 있습니다.

https://support.google.com/googleplay/android-developer/answer/6048248?hl=ko

https://developer.apple.com/documentation/adsupport/asidentifiermanager

 

반응형
반응형

안드로이드 ADID 확인

설정 > 개인정보보호 > 광고

---------------

반응형
반응형

CentOS에서 Python 버전 변경

hippogrammer.tistory.com/m/170

 

CentOS에서 Python 버전 변경

CentIOS를 설치하면 기본적으로 python path가 2.7로 설정되어 있다. 리눅스의 Alternatives를 이용하면 python 버전을 쉽게 변경하고 관리할 수 있다. Alternatives는 기본 커맨드의 심볼릭 링크를 관리해주는

hippogrammer.tistory.com

# python -V
# which python

# ls -al /usr/bin/python

# ls /usr/bin | grep python

# yum install python3 

-- CentOS에 여러 버전의 파이썬이 설치되어있는 것을 확인할 수 있다. 
# ls /bin | grep python


-- Update-alternatives로 파이썬 버전 등록 및 변경

# update-alternatives --config python


# update-alternatives --install /bin/python python /bin/python2.7 1
# update-alternatives --install /bin/python python /bin/python3.6 2

# update-alternatives --config python

# ls -al /bin/python
# python -V

# yum update

# vim /usr/bin/yum
내용 : #!/usr/bin/python2

# vim /usr/libexec/urlgrabber-ext-down
내용 : #!/usr/bin/python2


# yum update


# yum install python3-dev



반응형
반응형

숫자 카운트 효과

 

 

function numberCounter(target_frame, target_number) {
    this.count = 0; this.diff = 0;
    this.target_count = parseInt(target_number);
    this.target_frame = document.getElementById(target_frame);
    this.timer = null;
    this.counter();
};
numberCounter.prototype.counter = function() {
    var self = this;
    this.diff = this.target_count - this.count;
     
    if(this.diff > 0) {
        self.count += Math.ceil(this.diff / 5);
    }
     
    this.target_frame.innerHTML = this.count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
     
    if(this.count < this.target_count) {
        this.timer = setTimeout(function() { self.counter(); }, 20);
    } else {
        clearTimeout(this.timer);
    }
};

new numberCounter("counter1", 99999);
new numberCounter("counter2", 21565748);
new numberCounter("counter3", 121554864865);
반응형
반응형

PostgreSQL 날짜&시간 사용하기

www.postgresql.org/docs/8.4/functions-datetime.html

 

Date/Time Functions and Operators

Table 9-27 shows the available functions for date/time value processing, with details appearing in the following subsections. Table 9-26 illustrates the behaviors of the basic arithmetic operators (+, *, etc.). For formatting functions, refer to Section 9.

www.postgresql.org

www.postgresql.org/docs/8.4/functions-formatting.html

 

Data Type Formatting Functions

The PostgreSQL formatting functions provide a powerful set of tools for converting various data types (date/time, integer, floating point, numeric) to formatted strings and for converting from formatted strings to specific data types. Table 9-20 lists them

www.postgresql.org

해당 날짜의 데이터 

 

select count(watt_max) from tbl_test_watt3_sm2ch_min
where to_char(regdate, 'YYYY-MM-DD') = '2016-10-17'

 

소요시간 : 124초  (150만건)  (하루: 20*60*60*24 = 1,728,000)   이렇게 하면 망함!

 

해당 날짜의 데이터 

 

select count(watt) from tbl_test_watt_lsh where 

regdate >= date '2016-10-17'

and regdate < date '2016-10-17' + integer '1'   // 여기선 하루 

 

소요시간 : 634ms  (150만건)  (하루: 20*60*60*24 = 1,728,000)

 

 

해당 날짜의 데이터 

 

select count(watt) from tbl_test_watt_lsh where 

regdate >=  current_date 

and regdate < current_date + 1

 

소요시간 : 634ms  (150만건)  (하루: 20*60*60*24 = 1,728,000)

 

 

해당 시간의 데이터 

 

select count(watt) from tbl_test_watt_lsh where regdate

between  to_timestamp('2016-10-17 07:40:00' , 'YYYY-MM-DD HH24:MI:SS')  and   to_timestamp('2016-10-17 07:43:00', 'YYYY-MM-DD HH24:MI:SS')

 

소요시간 : 14ms  (3600건)  (하루: 20*60*60*24 = 1,728,000)

 

 

select count(watt) from tbl_test_watt_lsh where regdate

between  to_timestamp('2016-10-17 07:40:00' , 'YYYY-MM-DD HH24:MI:SS')  and   to_timestamp('2016-10-17 07:43:00', 'YYYY-MM-DD HH24:MI:SS') + interval '1'    // 여기선 1초 

 

소요시간 : 14ms  (3620건)

 

 

select count(watt) from tbl_test_watt_lsh where regdate

between  to_timestamp('2016-10-17 07:40:00' , 'YYYY-MM-DD HH24:MI:SS')  and   to_timestamp('2016-10-17 07:43:00', 'YYYY-MM-DD HH24:MI:SS') + interval '1' HOUR   // 여기선 1 시간  

 

소요시간 : 23ms  (63340건)

 

select count(watt) from tbl_test_watt_lsh where regdate

between  to_timestamp('2016-10-17 00:00:00' , 'YYYY-MM-DD HH24:MI:SS')  and   to_timestamp('2016-10-17 00:00:00', 'YYYY-MM-DD HH24:MI:SS') + '1-1 00:00:00' // 여기선 하루 , 인터벌 값을 이렇게 나타낼 수 있다 

 

'10-10' 는 10년 10개월 

 

소요시간 : 433ms  (1496720건)

 

 

select * from tbl_test_watt_lsh where to_char(regdate , 'YYYY-MM-DD HH24;MI:SS') > '2016-10-17 07:40:00' AND  to_char(regdate , 'YYYY-MM-DD HH24;MI:SS') < '2016-10-17 07:43:00'

 

역시 to_char 사용하면 망함!

 

-- 오늘 (date)
select current_date;
 
-- 현재시각 (timestamp)
select now();
select current_timestamp;
 
-- 어제/오늘/내일
select
  current_date - 1 "어제",
  current_date     "오늘",
  current_date + 1 "내일"
;
 
-- day of week
select extract(dow from current_date);    -- 일요일(0) ~ 토요일(6)
select extract(isodow from current_date); -- 월요일(1) ~ 일요일(7)
 
-- day of year
select extract(doy from current_date);
 
-- week of year
select extract(week from current_date);
 
-- 두 날짜 사이의 날수
select '2010-07-05'::date - '2010-06-25'::date;
 

 

반응형

+ Recent posts