⭕ examples
- calculation
What is 15% of 92?
What’s the 5th root of 97?
How many dollars is 199 chinese Yuan?
How many Korea Won is 199 chinese Yuan?
- unit convert
16.73 inch is how many centi meters?
2 gallons are how many liters?
- 번역
What's "see you later" in French?
- spell
How do I spell vigorously?
-------------------------
⭕ timer
> set: “Set a 10 minute timer for pizza”
> left: "How much time is left on my pizza?"
> cancel: “Cancel pizza timer”
> etc: “Stop” “Pause timer” “Resume timer"
⭕ alarm
> set: “Set an alarm for 7 am called Medicine”
> ask specific
"When is my alarm set for?”
“When is my Friday alarm?”
"When is my medicine alarm?"
> ask all: “What alarms are set?”
> cancel: "Cancel my alarm" | "Cancel my medicine alarm”
> Snooze: “Snooze for 10 minutes.” | "Snooze"
⭕ Calculations
"What is 15% of 92? "
"What’s the 5th root of 97? "
⭕ Translation
"How do you say hello in Japanese?"
"What's "good morning" in French?
⭕ Currency conversions
"How many euros is a dollar worth?"
⭕ Holidays
“When is <holiday>?”
“How many days until <holiday>?”
⭕ Calendar and event
Hear information on a single upcoming event/meeting
“When/what/where is my first event/meeting?”
“When/what/where is my next event/meeting / agenda/calendar?”
Hear information about multiple events/meetings/ agenda/calendar
Note: You'll hear information for your first three scheduled events “List all events for August 1st”
"What’s my agenda for today?"
“What’s my calendar for Friday?”
⭕ light
To turn on/off a light
"Turn on | off hall light"
⭕ Shopping lists
Add item to list
“Add paper towels to my shopping list.”
Add multiple items to list
“Add paper towels and batteries to my shopping list.”
Ask what’s on list
“What’s on my shopping list?”
⭕ volume
"Set [Audio] volume to 50%".
"Set [Audio] volume to 15".
"Set volume to 5".
"Set volume to 40%".
⭕ news
Listen to the latest news
“Catch me up,"
“Listen to the news,"
"Tell me the news"
Listen to news from specific provider
“Listen to NPR News," "Play BBC Minute"
Listen to news about a topic
"Listen to news about North Korea,"
"Play the latest on Donald Trump,"
"Hear headlines about the Super Bowl"
Listen to the latest news about a specific news category
“What’s the latest in sports/business/technology?”
- Pause
"Pause" or "pause the news"
- Resume
"Resume" or "Continue playing"
- Play next news story
“Next”, “Skip”
⭕ What’s playing (news)
“What’s playing?”
“What news is playing?”
⭕ radio
Listen to radio station by frequency
“Play 95.1" 95.1MHz
Listen to radio station by frequency in another location
"Play 95.1 Seoul"
Listen to radio station by name in another location
“Play Z100 in Portland,” “Play Z100 in New York”
⭕ weather
Ask specific questions about weather / forecast
“Is it going to rain tomorrow?”
“Is it sunny today?”
“Should I carry an umbrella?”
⭕ Locations
“Where are pharmacies nearby?",
“Any ATMs nearby?”,
“Find me a restaurant”
⭕ phone number and address
“What is the phone number for the nearest Walgreens?”
“What is the address for Walgreens in Pacifica?”
Hear business open hours
"Is the Walgreens on Middlefield open right now?”
⭕ music
Play music on a specific device by name
Note: News and podcasts are not supported
“Play <artist> using <Spotify> on <boss|mini>”
"Play classical music on <doorway>", "Stop <doorway>"
Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts
Tuesday, December 11, 2018
Tuesday, September 04, 2018
인터넷 속도 - Byte, byte,
파일 용량은 B 단위를 쓰는데, 실제로는 iB 로 쓰는게 맞다. 사람들은 이를 B로 퉁친다.
저장 장치는 B 단위를 쓰는데, (iB라고 생각하지만) 실제론 B 단위다.
전송 속도는 b 단위를 쓰는데, (iB라고 생각하지만) 실제론 b 이다.
- 파일용량
iB (IEC Binary 단위-주.) = Byte 단위 (2진 배수) = 1 Ki B = 1 Kibi Byte = 1024 Byte = 8192 bit
- 저장 장치
B (SI Decimal 단위-주.) = Byte 단위(10진 배수) = 1kB = 1 kilo Byte = 1,000 Byte = 8,000 bit
- 전송속도
b (bit 단위) = 1kb = 1 kilo bit = 1,000 bit = 1,000 / 8 bit = 125 Byte
해서, 100 Mega 인터넷은 약 11 MiB/s (소수점 이하 절삭)이다.
100 Mbps = 12.5 MBps ≒ 11.9MiBps
1 Gbps = 125 MBps ≒ 119 MiBp
* 주. iB VS. B
|----------------+-----------+-----------------+--------|
| SI Decimal (B) | value | IEC Binary (iB) | JEDEC |
|----------------+-----------+-----------------+--------|
| kilo(k) | 1k = kilo | Ki kibi | K kilo |
| mega(M) | 1k 의 2승 | Mi mebi | M mega |
| giga(G) | 1k 의 3승 | Gi gibi | G giga |
| tera(T) | 1k 의 4승 | Ti tebi | |
| peta | 1k 의 5승 | Pi pebi | |
| exa | 1k 의 6승 | Ei exbi | |
| zetta | 1k 의 7승 | Zi zebi | |
| yotta | 1k 의 8승 | Yi yob | |
|----------------+-----------+-----------------+--------|
저장 장치는 B 단위를 쓰는데, (iB라고 생각하지만) 실제론 B 단위다.
전송 속도는 b 단위를 쓰는데, (iB라고 생각하지만) 실제론 b 이다.
- 파일용량
iB (IEC Binary 단위-주.) = Byte 단위 (2진 배수) = 1 Ki B = 1 Kibi Byte = 1024 Byte = 8192 bit
- 저장 장치
B (SI Decimal 단위-주.) = Byte 단위(10진 배수) = 1kB = 1 kilo Byte = 1,000 Byte = 8,000 bit
- 전송속도
b (bit 단위) = 1kb = 1 kilo bit = 1,000 bit = 1,000 / 8 bit = 125 Byte
해서, 100 Mega 인터넷은 약 11 MiB/s (소수점 이하 절삭)이다.
100 Mbps = 12.5 MBps ≒ 11.9MiBps
1 Gbps = 125 MBps ≒ 119 MiBp
* 주. iB VS. B
|----------------+-----------+-----------------+--------|
| SI Decimal (B) | value | IEC Binary (iB) | JEDEC |
|----------------+-----------+-----------------+--------|
| kilo(k) | 1k = kilo | Ki kibi | K kilo |
| mega(M) | 1k 의 2승 | Mi mebi | M mega |
| giga(G) | 1k 의 3승 | Gi gibi | G giga |
| tera(T) | 1k 의 4승 | Ti tebi | |
| peta | 1k 의 5승 | Pi pebi | |
| exa | 1k 의 6승 | Ei exbi | |
| zetta | 1k 의 7승 | Zi zebi | |
| yotta | 1k 의 8승 | Yi yob | |
|----------------+-----------+-----------------+--------|
Wednesday, July 11, 2018
30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
last updated in Categories Linux, Shell scripting, UNIXSunday, July 08, 2018
Seoul Bus Information - TOPIS (html, php)
-- html
<!DOCTYPE html>
<html>
<head>
<title>bus find</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="font-size:12;font-family:verdana">
<b>Search "station - topis.db"</b><br>
<form action="search_stname.php" method="post">
정류소ID<input type="text" name="stid"><input type="submit">
</form>
</body>
</html>
-- php
<?php
$stid = $_POST["stid"];
$stname = $_POST["stname"];
$line = $_POST["line"];
//$stname_es = sqlite_escape_string($stname);
// -- 다국어 -- 정류소아이디(stid) - station table
if ( !empty($stid) ) {
//$dbhandle = sqlite_open('topis.db', 667, $error);
//$dbhandle = new SQLite3('topis.db', 667, $error);
$myPDO = new PDO('sqlite:topis.db');
// if (!$dbhandle) die ($error);
// $stm0 = "select sn, stid, stname, xypos from station where stid = '01003'";
$stm0 = "select sn, stid, stnmkr, stnmen, stnmcn, stnmjp, note from mlineinfo where stid like '%".$stid."%';";
$result = $myPDO->query($stm0);
echo "<br><hr>정류소ID(stid)검색: ".$stm0."<br>";
//$ok = sqlite_exec($dbhandle, $stm, $error);
//if (!$ok) die("Error: $error");
//echo "Form submitted successfully";
echo "<table><tr><td>연번</td><td>정류소ID</td><td>정류소명</td><td>en</td><td>cn</td><td>jp</td></tr>";
foreach($result as $row) {
echo "<td>" . $row['sn'] . "</td>";
echo "<td>" . $row['stid'] . "</td>";
echo "<td>" . $row['stnmkr'] . "</td>";
echo "<td>" . $row['stnmen'] . "</td>";
echo "<td>" . $row['stnmjp'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
?>
Seoul Bus Information - TOPIS (download, sqlite)
# -*- coding: utf-8 -*-
#+STARTUP: overview
#+LANGUAGE: ko
#+PROPERTY: header-args:sqlite :dir ~/pkg/map/topis/20180403/ :db topis.db :var rel="cur" :results line :colnames yes :exports results
: #+PROPERTY: header-args:sqlite :dir ~/org/ :db journal.db :var rel="cur" :results silent :colnames yes
: #+PROPERTY: Effort_ALL 0 0:10 0:20 0:30 1:00 2:00 4:00 6:00 8:00
* download
** 정류장
http://data.seoul.go.kr/dataList/datasetView.do?infId=OA-15067&srvType=F&serviceKind=1
http://opengov.seoul.go.kr/data/15223948
서울시 버스정류소 위치 데이터(20180502).xls
** 노선
http://topis.seoul.go.kr/refRoom/openRefRoom_3_1.do
201804_Bus_노선.xls
http://topis.seoul.go.kr/
교통정보 자료실 > 버스 운행노선 현황
홈 > 교통자료실 > 기타 정보 > 버스 운행노선 현황
http://topis.seoul.go.kr/refRoom/openRefRoom_1_2.do#
번호 제목 첨부 작성일 다운로드수
966 2017 11월 버스 운행노선 현황 첨부파일 있음 2017-12-22 52
965 2017 10월 버스 운행노선 현황 첨부파일 있음 2017-12-22 4
서울시 교통량 생성개요
수집기간 : 1년 365일, 24시간 (00 ~ 24시)
수집범위 : 주요간선도로 및 도시고속도로
도심24개소
시계36개소
교량22개소
간선54개소
도시고속9개소
http://bus.go.kr/
순번 노선ID 정류소ID 노선번호 정류소명 정류소번호 Y좌표 X좌표 YX좌표
1 100100124 102000271 0017 청암자이아파트 03689 37.5345469961 126.9465552752 37.5345469961, 126.9465552752
* 다국어 버스노선
서울시 버스 정류소 노선도 다국어 목록 정보.xls
#+name: creating
#+begin_src sqlite :var tb="mlineinfo"
-- drop table if exists $tb;
create table $tb (
sn int, -- 연번
stid varchar(30), -- 정류소ID
stnmkr varchar(50), -- 정류소명
stnmen varchar(100), -- 정류소명
stnmcn varchar(100), -- 정류소명
stnmjp varchar(100), -- 정류소명
note varchar(50) -- 유형
);
#+end_src
#+RESULTS: creating
#+name: insert
#+begin_src sqlite :var tb="mlineinfo"
insert into $tb values (0,'my id', 'my station','a-en' ,'a-cn', 'a-jp','note');
#+end_src
#+RESULTS: insert
#+begin_src sqlite :var tb="mlineinfo"
select count(*) from $tb;
#+end_src
#+RESULTS:
| count(*) |
|----------|
| 0 |
#+begin_src sqlite :var tb="mlineinfo"
delete from $tb;
#+end_src
#+RESULTS:
* lineinfo
-- 기존
업체명,노선번호,유형,
기점,종점,인가대수,
인가거리,운행시간,
운행횟수,최소,최대,
첫차시간,막차시간
company,line,types,
starting,ending,nums,
distance,taketime,
carsby,mimby,maxby,
stime,etime
-- 변경
업체명,노선번호,유형,
기점,종점,인가대수,
운행대수,예비대수, -- new added 2 column
인가거리,운행시간,
총운행횟수,최소,최대,
첫차시간,막차시간
#+name: creating
#+begin_src sqlite :var tb="lineinfo"
drop table $tb;
#+end_src
#+name: creating
#+begin_src sqlite :var tb="lineinfo"
-- drop table if exists $tb;
create table $tb (
company varchar(50), -- 업체명
line varchar(20), -- 노선번호
types varchar(10), -- 유형
starting varchar(50), -- 기점
ending varchar(50), -- 종점
nums int, -- 인가대수
allocated int, -- 운행대수
areserved int, -- 예비대수
distance int, -- 인가거리
taketime int, -- 운행시간
carsby int, -- 운행횟수
mimby int, -- 최소
maxby int, -- 최대
stime varchar(5), -- 첫차
etime varchar(5) -- 막차시간
);
#+end_src
* station
#+name: creating - Year 2017
#+begin_src sqlite :var tb="station"
drop table if exists $tb;
create table $tb (
sn integer, -- 순번
lid int2, -- 노선ID
stid int2, -- 정류소ID
lnum varchar(10), -- 노선번호
stname varchar(50), -- 정류소명
stnum varchar(15), -- 정류소번호
xpos varchar(20), -- Y좌표
ypos varchar(20), -- X좌표
xypos varchar(40) -- YX좌표
);
#+end_src
#+name: creating Year 2018
#+begin_src sqlite :var tb="station"
drop table if exists $tb;
create table $tb (
sn integer, -- 순번 --> add excel -- o
stid varchar(14), -- 정류소ID or 정류소번호 -- o
stname varchar(50), -- 정류소명 --> o
xpos varchar(20), -- Y좌표 o
ypos varchar(20), -- X좌표 o
xypos varchar(40) -- YX좌표 --> add
);
#+end_src
#+STARTUP: overview
#+LANGUAGE: ko
#+PROPERTY: header-args:sqlite :dir ~/pkg/map/topis/20180403/ :db topis.db :var rel="cur" :results line :colnames yes :exports results
: #+PROPERTY: header-args:sqlite :dir ~/org/ :db journal.db :var rel="cur" :results silent :colnames yes
: #+PROPERTY: Effort_ALL 0 0:10 0:20 0:30 1:00 2:00 4:00 6:00 8:00
* download
** 정류장
http://data.seoul.go.kr/dataList/datasetView.do?infId=OA-15067&srvType=F&serviceKind=1
http://opengov.seoul.go.kr/data/15223948
서울시 버스정류소 위치 데이터(20180502).xls
** 노선
http://topis.seoul.go.kr/refRoom/openRefRoom_3_1.do
201804_Bus_노선.xls
http://topis.seoul.go.kr/
교통정보 자료실 > 버스 운행노선 현황
홈 > 교통자료실 > 기타 정보 > 버스 운행노선 현황
http://topis.seoul.go.kr/refRoom/openRefRoom_1_2.do#
번호 제목 첨부 작성일 다운로드수
966 2017 11월 버스 운행노선 현황 첨부파일 있음 2017-12-22 52
965 2017 10월 버스 운행노선 현황 첨부파일 있음 2017-12-22 4
서울시 교통량 생성개요
수집기간 : 1년 365일, 24시간 (00 ~ 24시)
수집범위 : 주요간선도로 및 도시고속도로
도심24개소
시계36개소
교량22개소
간선54개소
도시고속9개소
http://bus.go.kr/
순번 노선ID 정류소ID 노선번호 정류소명 정류소번호 Y좌표 X좌표 YX좌표
1 100100124 102000271 0017 청암자이아파트 03689 37.5345469961 126.9465552752 37.5345469961, 126.9465552752
* 다국어 버스노선
서울시 버스 정류소 노선도 다국어 목록 정보.xls
#+name: creating
#+begin_src sqlite :var tb="mlineinfo"
-- drop table if exists $tb;
create table $tb (
sn int, -- 연번
stid varchar(30), -- 정류소ID
stnmkr varchar(50), -- 정류소명
stnmen varchar(100), -- 정류소명
stnmcn varchar(100), -- 정류소명
stnmjp varchar(100), -- 정류소명
note varchar(50) -- 유형
);
#+end_src
#+RESULTS: creating
#+name: insert
#+begin_src sqlite :var tb="mlineinfo"
insert into $tb values (0,'my id', 'my station','a-en' ,'a-cn', 'a-jp','note');
#+end_src
#+RESULTS: insert
#+begin_src sqlite :var tb="mlineinfo"
select count(*) from $tb;
#+end_src
#+RESULTS:
| count(*) |
|----------|
| 0 |
#+begin_src sqlite :var tb="mlineinfo"
delete from $tb;
#+end_src
#+RESULTS:
* lineinfo
-- 기존
업체명,노선번호,유형,
기점,종점,인가대수,
인가거리,운행시간,
운행횟수,최소,최대,
첫차시간,막차시간
company,line,types,
starting,ending,nums,
distance,taketime,
carsby,mimby,maxby,
stime,etime
-- 변경
업체명,노선번호,유형,
기점,종점,인가대수,
운행대수,예비대수, -- new added 2 column
인가거리,운행시간,
총운행횟수,최소,최대,
첫차시간,막차시간
#+name: creating
#+begin_src sqlite :var tb="lineinfo"
drop table $tb;
#+end_src
#+name: creating
#+begin_src sqlite :var tb="lineinfo"
-- drop table if exists $tb;
create table $tb (
company varchar(50), -- 업체명
line varchar(20), -- 노선번호
types varchar(10), -- 유형
starting varchar(50), -- 기점
ending varchar(50), -- 종점
nums int, -- 인가대수
allocated int, -- 운행대수
areserved int, -- 예비대수
distance int, -- 인가거리
taketime int, -- 운행시간
carsby int, -- 운행횟수
mimby int, -- 최소
maxby int, -- 최대
stime varchar(5), -- 첫차
etime varchar(5) -- 막차시간
);
#+end_src
* station
#+name: creating - Year 2017
#+begin_src sqlite :var tb="station"
drop table if exists $tb;
create table $tb (
sn integer, -- 순번
lid int2, -- 노선ID
stid int2, -- 정류소ID
lnum varchar(10), -- 노선번호
stname varchar(50), -- 정류소명
stnum varchar(15), -- 정류소번호
xpos varchar(20), -- Y좌표
ypos varchar(20), -- X좌표
xypos varchar(40) -- YX좌표
);
#+end_src
#+name: creating Year 2018
#+begin_src sqlite :var tb="station"
drop table if exists $tb;
create table $tb (
sn integer, -- 순번 --> add excel -- o
stid varchar(14), -- 정류소ID or 정류소번호 -- o
stname varchar(50), -- 정류소명 --> o
xpos varchar(20), -- Y좌표 o
ypos varchar(20), -- X좌표 o
xypos varchar(40) -- YX좌표 --> add
);
#+end_src
Monday, May 14, 2018
전자정부 개발자 개발환경 (부제: 개미굴)
From. http://www.egovframe.org/wiki/doku.php?id=egovframework:dev2:install_guide
egovframework:dev2:install_guide
From: http://www.egovframe.org/wiki/doku.php?id=egovframework:dev2:install_guide
* Install Guide
순서에 맞게 설치
* Eclipse Neon(4.6) Packages 이용 시 설치가이드
- 소프트웨어
> 버전
> 자동설치/업데이트주소
> 필수여부
** Eclipse 4.6.3 필수
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/neon3
→ Eclipse IDE for Java EE Developers 다운로드
** Spring Core 3.8.4 필수
http://dist.springsource.com/release/TOOLS/update/e4.5
→ Core / Spring IDE → Spring IDE Core
** UML2 Extension 5.2.3 필수
http://download.eclipse.org/releases/neon
→ Modeling → UML2 Extender SDK
** Subversive SVN Connector 6.0.4 필수
http://download.eclipse.org/technology/subversive/4.0/update-site/
→ Subversion SVN Team Provider Plugin
→ Subversive SVN Team Provider(4.0.5) 설치
http://community.polarion.com/projects/subversive/download/eclipse/6.0/neon-site/
→ Subversive SVN Connectors
→ Subversive SVN Connectors(6.0.4) 설치, SVNKit 1.8.14 Implementation(6.0.4) 설치
** eGovFrame 3.7.0 필수
http://maven.egovframe.kr:8080/update_3.7/에서 필요 기능 설치
** JUnit 4.12 필수
Eclipse에 JUnit이 내장되어 있으므로 별도 설치 필요 없음
** MyBatipse 1.1.0 선택
http://dl.bintray.com/harawata/eclipse
→ MyBatipse → MyBatipse(1.1.0)
** PMD 4.0.14 선택
https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/ (not work)
→ PMD for Eclipse 4 → PMD Plug-in (4.0.14) 설치
---> use this
http://netassist.dl.sourceforge.net/project/pmd/pmd-eclipse/update-site-latest/
(ref. https://github.com/pmd/pmd-eclipse-plugin/issues/19)
** FindBugs 3.0.1 선택
http://findbugs.cs.umd.edu/eclipse
** Properties Editor 6.0.4 선택
http://propedit.sourceforge.jp/eclipse/updates/
→ PropertiesEditor 설치
** EclEmma 3.0.0
http://update.eclemma.org/
→ EcliEmma → EclEmma Java Code Coverage
** Gradle 1.0.21 선택
http://download.eclipse.org/buildship/updates/e45/releases/1.0
→ Buildship: Eclipse Plug-ins for Gradle
→ Buildship: Eclipse Plug-ins for Gradle
** Developer Tools 23.0.7
http://rgladwell.github.com/m2e-android/updates/
→ Developper Tools → 모두설치 안드로이드 개발 필수
** Android Connector for M2E 1.4.0
http://rgladwell.github.com/m2e-android/updates/
→ Android for Maven Eclipse → Android for Maven Eclipse
안드로이드 개발 필수
egovframework:dev2:install_guide
From: http://www.egovframe.org/wiki/doku.php?id=egovframework:dev2:install_guide
* Install Guide
순서에 맞게 설치
* Eclipse Neon(4.6) Packages 이용 시 설치가이드
- 소프트웨어
> 버전
> 자동설치/업데이트주소
> 필수여부
** Eclipse 4.6.3 필수
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/neon3
→ Eclipse IDE for Java EE Developers 다운로드
** Spring Core 3.8.4 필수
http://dist.springsource.com/release/TOOLS/update/e4.5
→ Core / Spring IDE → Spring IDE Core
** UML2 Extension 5.2.3 필수
http://download.eclipse.org/releases/neon
→ Modeling → UML2 Extender SDK
** Subversive SVN Connector 6.0.4 필수
http://download.eclipse.org/technology/subversive/4.0/update-site/
→ Subversion SVN Team Provider Plugin
→ Subversive SVN Team Provider(4.0.5) 설치
http://community.polarion.com/projects/subversive/download/eclipse/6.0/neon-site/
→ Subversive SVN Connectors
→ Subversive SVN Connectors(6.0.4) 설치, SVNKit 1.8.14 Implementation(6.0.4) 설치
** eGovFrame 3.7.0 필수
http://maven.egovframe.kr:8080/update_3.7/에서 필요 기능 설치
** JUnit 4.12 필수
Eclipse에 JUnit이 내장되어 있으므로 별도 설치 필요 없음
** MyBatipse 1.1.0 선택
http://dl.bintray.com/harawata/eclipse
→ MyBatipse → MyBatipse(1.1.0)
** PMD 4.0.14 선택
https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/ (not work)
→ PMD for Eclipse 4 → PMD Plug-in (4.0.14) 설치
---> use this
http://netassist.dl.sourceforge.net/project/pmd/pmd-eclipse/update-site-latest/
(ref. https://github.com/pmd/pmd-eclipse-plugin/issues/19)
** FindBugs 3.0.1 선택
http://findbugs.cs.umd.edu/eclipse
** Properties Editor 6.0.4 선택
http://propedit.sourceforge.jp/eclipse/updates/
→ PropertiesEditor 설치
** EclEmma 3.0.0
http://update.eclemma.org/
→ EcliEmma → EclEmma Java Code Coverage
** Gradle 1.0.21 선택
http://download.eclipse.org/buildship/updates/e45/releases/1.0
→ Buildship: Eclipse Plug-ins for Gradle
→ Buildship: Eclipse Plug-ins for Gradle
** Developer Tools 23.0.7
http://rgladwell.github.com/m2e-android/updates/
→ Developper Tools → 모두설치 안드로이드 개발 필수
** Android Connector for M2E 1.4.0
http://rgladwell.github.com/m2e-android/updates/
→ Android for Maven Eclipse → Android for Maven Eclipse
안드로이드 개발 필수
Sunday, October 22, 2017
Upgrading Ubuntu 17.10 (Artful Aardvark) - todo
1. screenshot problem
gnome-screenshot
2. supress animation
3. Input Sources key in iBus
Chinese(Pinyin), Korean (Hangul) key not work
gnome-screenshot
2. supress animation
3. Input Sources key in iBus
Chinese(Pinyin), Korean (Hangul) key not work
Upgrading Ubuntu 17.10 (Artful Aardvark) - 언어추가(Language Input)
언어추가 (한국어,중국어,러시아어,영어)
Language Support Korean, English, Chinese, Russian
> 참조(Reference)
[Settings] -> ]Region & Language] -> [Input sources]
add input sources "Chinese (Pinyin)", Korean(Hangul), Russian
check 'options' Keyof
a. Switch to previous source (default Shift + Super L)
b. Switch to next source (default Ctrl + shift L)
※ Ctrl + Shift meangs 'with continusouly compressed [Ctrl] key then stroke [Shift]'
--> Setup Chinese Input Method in Ubuntu 17.10 Artful
http://gangmax.me/blog/2017/10/20/setup-chinese-input-method-in-ubuntu-17-dot-10-artful/
---------
Ubuntu 17.10 Artful Aardvark is just released. A big change in this release is that it ditches Unity for Gnome. Most likely this will be part of the next LTS version “18.04”.
Here is the instructions how to setup Chinese input method in Ubuntu Artful.
1. First, go to “Language Support”, make sure the “Chinese(simplified)” or “Chinese Traditional”(or both) is installed completely.
2. Go to “Input Method”, make sure you select “ibus” as the selected user configuration. An user logout may be required.
3. Go to “Settings -> Region & Language”, in the “Input Sources” section, add the “Chinese(Pinyin)” input method.
Now you should be able to see the input method icon “en/拼” on the top left corner of the desktop. Use “Super + Space” to switch the input method as normal.
---------
※ notice fcitx users
If you are use Fcitx input method in previous, it will still remian process after upgrade but keyboard sequence will not work. Becase iBus is default settting for 17.10 Artful Aardvark.
So, use one of following 3 method.
1. change OS's defult iBus input method to Fcitx which is your old default method.
2. use iBus input method and remove Fcitx
> explicitly set to iBus in 'keyboard and language' setting, 17.10 will automatically remove fcitx process
(it maybe different your situation)
Language Support Korean, English, Chinese, Russian
> 참조(Reference)
[Settings] -> ]Region & Language] -> [Input sources]
add input sources "Chinese (Pinyin)", Korean(Hangul), Russian
check 'options' Keyof
a. Switch to previous source (default Shift + Super L)
b. Switch to next source (default Ctrl + shift L)
※ Ctrl + Shift meangs 'with continusouly compressed [Ctrl] key then stroke [Shift]'
--> Setup Chinese Input Method in Ubuntu 17.10 Artful
http://gangmax.me/blog/2017/10/20/setup-chinese-input-method-in-ubuntu-17-dot-10-artful/
---------
Ubuntu 17.10 Artful Aardvark is just released. A big change in this release is that it ditches Unity for Gnome. Most likely this will be part of the next LTS version “18.04”.
Here is the instructions how to setup Chinese input method in Ubuntu Artful.
1. First, go to “Language Support”, make sure the “Chinese(simplified)” or “Chinese Traditional”(or both) is installed completely.
2. Go to “Input Method”, make sure you select “ibus” as the selected user configuration. An user logout may be required.
3. Go to “Settings -> Region & Language”, in the “Input Sources” section, add the “Chinese(Pinyin)” input method.
Now you should be able to see the input method icon “en/拼” on the top left corner of the desktop. Use “Super + Space” to switch the input method as normal.
---------
※ notice fcitx users
If you are use Fcitx input method in previous, it will still remian process after upgrade but keyboard sequence will not work. Becase iBus is default settting for 17.10 Artful Aardvark.
So, use one of following 3 method.
1. change OS's defult iBus input method to Fcitx which is your old default method.
2. use iBus input method and remove Fcitx
> explicitly set to iBus in 'keyboard and language' setting, 17.10 will automatically remove fcitx process
(it maybe different your situation)
Upgrading Ubuntu 17.10 (Artful Aardvark) - installation
1. Prepare
> backup - pass
> turn on addition cooler pan - not necessary
2. Popup Upgrade Message
3. File downloading, installation, clean up
> it takes time, if network bandwidth and computer CPU fast enought, it will take at least 30 minute.
> downloading packages
> installing files
> backup - pass
> turn on addition cooler pan - not necessary
2. Popup Upgrade Message
3. File downloading, installation, clean up
> it takes time, if network bandwidth and computer CPU fast enought, it will take at least 30 minute.
> downloading packages
> installing files
Sunday, May 07, 2017
Website mockup with Pencil Sketching
* Website mockup with Pencil Sketching
** why
I'm not a designer but I need mockup web site for desinger and other member of developer team.
- Microsoft Office is a good tool which I used more than 10 years, but it makes me tired.
- LibreOffice is a good tool sometime it crash, but since verion 5.x it stabilized. It makes feel like more than MS-Office, just kidding.
- Actually, I use Emacs. You know what it make you is somewhat fear. So, I need out of this Emacs word!
** where it came from?
*** Once it was in -> https://code.google.com/archive/p/evoluspencil/
*** Now it is one -> https://github.com/prikhi/pencil
** download
*** source and release -> https://github.com/prikhi/pencil/releases
*** homepage and nightly build -> http://pencil.evolus.vn/Downloads.html
(Firefox Extension link)
** installation guide
-> Read Readme.md https://github.com/prikhi/pencil
: Prerequisites
:
: You will need version 4 or higher of firefox to run Pencil as a
: Firefox Extension. Linux users will need version 4 or higher of either
: firefox, iceweasel or xulrunner, or version 25 or higher of
: palemoon. The Windows installer and OS X archive has everything you
: need built-in.
** browser requirement
※ (from the above)
Pencil requires browser "firefox, iceweasel, xulrunner, palemoon"
*** firefox in Ubuntu
> env. I am running firefox installed 53.0 (64-bit) on Ubuntu 17.04 in Linux(4.10.0-20-generic), which is not compatable with pencil extension.
> I can't drag & drop
(If you use nightly build firefox 55, it opted multi-thread and you can not even activate)
*** xulrunner
(If I have enough time, it's a good chice but time is always short to me.)
*** palemoon
download -> http://www.palemoon.org/
It's simple and fast, actually not far differenct. I choose it.
** install pencil with extension
download -> https://addons.mozilla.org/en-US/firefox/addon/pencil-prototyping/
Launch ▶ [Menu] ▶ Pencil Sketching ...
※ other (just for fun)
search engine change -> https://www.ecosia.org/
** Add Extra Stencil Collections
> from. https://github.com/prikhi/pencil
: Extra Stencil Collections
: Android Lollipop by Nathanielw
: Bootstrap by Nathanielw
: Bootstrap Glyph Icons by Craig-Fisk
: Material Design Icons by Nathanielw
: Polymer Iron Icons by MercMobily
① download zip file from above link.
② then launch pencil extension in the browser (palemonn)'s
Tools ▶ [Menu] ▶ Pencil Sketching ...
③ in the Pencil's menu ▶ Tools ▶ Install new Collection...
then select download in ① file named with .zip file
** why
I'm not a designer but I need mockup web site for desinger and other member of developer team.
- Microsoft Office is a good tool which I used more than 10 years, but it makes me tired.
- LibreOffice is a good tool sometime it crash, but since verion 5.x it stabilized. It makes feel like more than MS-Office, just kidding.
- Actually, I use Emacs. You know what it make you is somewhat fear. So, I need out of this Emacs word!
** where it came from?
*** Once it was in -> https://code.google.com/archive/p/evoluspencil/
*** Now it is one -> https://github.com/prikhi/pencil
** download
*** source and release -> https://github.com/prikhi/pencil/releases
*** homepage and nightly build -> http://pencil.evolus.vn/Downloads.html
(Firefox Extension link)
** installation guide
-> Read Readme.md https://github.com/prikhi/pencil
: Prerequisites
:
: You will need version 4 or higher of firefox to run Pencil as a
: Firefox Extension. Linux users will need version 4 or higher of either
: firefox, iceweasel or xulrunner, or version 25 or higher of
: palemoon. The Windows installer and OS X archive has everything you
: need built-in.
** browser requirement
※ (from the above)
Pencil requires browser "firefox, iceweasel, xulrunner, palemoon"
*** firefox in Ubuntu
> env. I am running firefox installed 53.0 (64-bit) on Ubuntu 17.04 in Linux(4.10.0-20-generic), which is not compatable with pencil extension.
> I can't drag & drop
(If you use nightly build firefox 55, it opted multi-thread and you can not even activate)
*** xulrunner
(If I have enough time, it's a good chice but time is always short to me.)
*** palemoon
download -> http://www.palemoon.org/
It's simple and fast, actually not far differenct. I choose it.
** install pencil with extension
download -> https://addons.mozilla.org/en-US/firefox/addon/pencil-prototyping/
Launch ▶ [Menu] ▶ Pencil Sketching ...
※ other (just for fun)
search engine change -> https://www.ecosia.org/
** Add Extra Stencil Collections
> from. https://github.com/prikhi/pencil
: Extra Stencil Collections
: Android Lollipop by Nathanielw
: Bootstrap by Nathanielw
: Bootstrap Glyph Icons by Craig-Fisk
: Material Design Icons by Nathanielw
: Polymer Iron Icons by MercMobily
① download zip file from above link.
② then launch pencil extension in the browser (palemonn)'s
Tools ▶ [Menu] ▶ Pencil Sketching ...
③ in the Pencil's menu ▶ Tools ▶ Install new Collection...
then select download in ① file named with .zip file
Friday, March 31, 2017
Wednesday, March 29, 2017
Emacs Web Server
Emacs Web Server
http://nullprogram.com/blog/2009/05/17/May 17, 2009
The server log is lisp itself. Here is an example log starting the server, serving one request, and halting,
'(log (start "Wed May 13 23:33:34 2009") (connection (date "Wed May 13 23:36:25 2009") (address "192.168.0.3") (get "/0001.html") (req ("Referer" "http://192.168.0.2:8080/") ("Connection" "keep-alive") ("Keep-Alive" "300") ("Accept-Charset" "ISO-8859-1,utf-8;q=0.7,*;q=0.7") ("Accept-Encoding" "gzip,deflate") ("Accept-Language" "en-us,en;q=0.5") ("Accept" "image/png,image/*;q=0.8,*/*;q=0.5") ("User-Agent" "Mozilla/5.0 [...] Iceweasel/3.0.9 (Debian-3.0.9-1)") ("Host" "192.168.0.2:8080") ("GET" "/0001.html" "HTTP/1.1")) (path "~/public_html/0001.html") (status 200)) (stop "Wed May 13 23:38:17 2009"))
--
simple-httpd and impatient-mode
Thursday, March 23, 2017
Cinnamon shortcut
* Cinnamon shortcut
The Complete List Of Linux Mint 18 Keyboard Shortcuts For Cinnamon by Gary Newell
Updated March 23, 2017
1. Toggle Scale - List All Applications On Current Workspace (CTRL, ALT, DOWN)
2. Toggle Expo - List All Applications On All Workspaces (CTRL, ALT, UP)
3. Cycle Through Open Windows (ALT, TAB) (SHIFT, ALT, TAB)
4. Open The Run Dialog (ALT, F2)
5. Troubleshooting Cinnamon (SUPER, L)
6. Maximise A Window (ALT, F10)
7. UnMaximise A Window (ALT, F5)
8. Close A Window (ALT, F4)
9. Move A Window (ALT, F7)
10. Show The Desktop (SUPER, D)
11. Show The Window Menu (ALT, SPACE)
12. Resize A Window (ALT, F8)
13. Tile A Window To The Left (SUPER, LEFT) (CTRL, SUPER, LEFT)
14. Tile A Window To The Right (SUPER, RIGHT) (CTRL, SUPER, RIGHT)
15. Tile A Window To The Top (Super, UP) (CTRL, SUPER, UP)
16. Tile A Window To The Bottom (SUPER, DOWN) (CTRL, SUPER, DOWN)
17. Move A Window To A Workspace To The Left (SHIFT, CTRL, ALT, LEFT)
18. Move A Window To A Worksapce To The Right (SHIFT, CTRL, ALT, RIGHT)
19. Move A Window To The Left Monitor (SHIFT, SUPER, LEFT)
20. Move A Window To The Right (SHIFT, SUPER, RIGHT)
21. Move A Window To The Top Monitor (SHIFT, SUPER, UP)
22. Move A Window To The Bottom Monitor (SHIFT, SUPER, DOWN)
23. Move To The Workspace To The Left (CTRL ALT, LEFT)
24. Move To The Workspace To The Right (CTRL, ALT, RIGHT)
25. Log Out (CTRL, ALT, DELETE)
26. Shut Down The System (CTRL, ALT, END)
27. Lock The Screen (CTRL, ALT, L)
28. Restart The Cinnamon Desktop (CTRL, ALT, ESCAPE)
29. Take A Screenshot Of Part Of The Screen (SHIFT, PRTSC) (CTRL, SHIFT, PRTSC)
30. Take A Screenshot (PRTSC) (CTRL, PRTSC)
31. Take A Screenshot Of A Window (ALT, PRTSC) (CTRL, ALT, PRTSC)
32. Record The Desktop (SHIFT, CTRL, ALT, R)
33. Open A Terminal Window (CTRL, ALT, T)
34. Open The File Explorer At Your Home Folder (SUPER, E)
The Complete List Of Linux Mint 18 Keyboard Shortcuts For Cinnamon by Gary Newell
Updated March 23, 2017
1. Toggle Scale - List All Applications On Current Workspace (CTRL, ALT, DOWN)
2. Toggle Expo - List All Applications On All Workspaces (CTRL, ALT, UP)
3. Cycle Through Open Windows (ALT, TAB) (SHIFT, ALT, TAB)
4. Open The Run Dialog (ALT, F2)
5. Troubleshooting Cinnamon (SUPER, L)
6. Maximise A Window (ALT, F10)
7. UnMaximise A Window (ALT, F5)
8. Close A Window (ALT, F4)
9. Move A Window (ALT, F7)
10. Show The Desktop (SUPER, D)
11. Show The Window Menu (ALT, SPACE)
12. Resize A Window (ALT, F8)
13. Tile A Window To The Left (SUPER, LEFT) (CTRL, SUPER, LEFT)
14. Tile A Window To The Right (SUPER, RIGHT) (CTRL, SUPER, RIGHT)
15. Tile A Window To The Top (Super, UP) (CTRL, SUPER, UP)
16. Tile A Window To The Bottom (SUPER, DOWN) (CTRL, SUPER, DOWN)
17. Move A Window To A Workspace To The Left (SHIFT, CTRL, ALT, LEFT)
18. Move A Window To A Worksapce To The Right (SHIFT, CTRL, ALT, RIGHT)
19. Move A Window To The Left Monitor (SHIFT, SUPER, LEFT)
20. Move A Window To The Right (SHIFT, SUPER, RIGHT)
21. Move A Window To The Top Monitor (SHIFT, SUPER, UP)
22. Move A Window To The Bottom Monitor (SHIFT, SUPER, DOWN)
23. Move To The Workspace To The Left (CTRL ALT, LEFT)
24. Move To The Workspace To The Right (CTRL, ALT, RIGHT)
25. Log Out (CTRL, ALT, DELETE)
26. Shut Down The System (CTRL, ALT, END)
27. Lock The Screen (CTRL, ALT, L)
28. Restart The Cinnamon Desktop (CTRL, ALT, ESCAPE)
29. Take A Screenshot Of Part Of The Screen (SHIFT, PRTSC) (CTRL, SHIFT, PRTSC)
30. Take A Screenshot (PRTSC) (CTRL, PRTSC)
31. Take A Screenshot Of A Window (ALT, PRTSC) (CTRL, ALT, PRTSC)
32. Record The Desktop (SHIFT, CTRL, ALT, R)
33. Open A Terminal Window (CTRL, ALT, T)
34. Open The File Explorer At Your Home Folder (SUPER, E)
Thursday, March 16, 2017
fcitx language, xim setting, Gnome Key change
* fcitx language, xim setting, Gnome Key change
[[file:img/fcitx_lang.png]]
리눅스 우분투 키 시퀀스 변경은은 2곳에서 설정하는 데,
1. 주메뉴 [시스템 설정] > Hardware [Keyboard] > [Shortcuts] 탭 > "Typing" [List Menu)
( [시스템 설정] > Hardware [Keyboard] > [Typing] 탭의 "Text Entry" 을 선택해도 된다 )
- Switch to next source: Super+Space
- Siwtch to previous source: Shift + Super +Space
[[file:img/fcitx_system_key.png]]
2. fcitx 설정에서 변경
Fcitx [Icon] 실행 혹은 Configure Fcitx [mouse light popup menu]
-> Input Method [tab]
-> Pinyin [list select]
-> Global Config [Tab]
-> Trigger Input Method [item]
change from: "Ctrl+Space" --> to "Shift+Space"
-> Scroll between Input Method: Ctrl_Shift
[[file:img/fcitx_config.png]]
3. Emacs key sequence 변경
(만약 emacs 에서 사용하는 키가 시스템에서 정의한 키와 중복될 경우 먼저 제거한다)
#+name: dot emacs
#+begin_src elisp
;; <leim> 을 사용할 경우 require (required korea-util.el and hangul.el)
;; <S-Hangul> --> toggle-korean-input-method from korea-util.el
;; [한자]키 --> toggle-korean-input-method hangul-to-hanja-conversion from hangul.el
;; <fcitx> 를 사용할 경우 --> fcitx -> change fcitx and system key sequence
;; 1. in [fcitx config]
;; a. [Trigger Input Method] from [Control-SPACE] to [Shift-Space]
;; b. Scroll between Input Method: Control+Sift
;;
;; 2. in [system kebyaord sequence setting]
;; Next source (fcitx): [Super-Space]
;; Switch to previous source (fcitx): [Super+Space+Space]
;(global-set-key (kbd "S-SPC") 'toggle-input-method)
;(global-set-key (kbd "S-SPC") 'toggle-korean-input-method)
(global-unset-key (kbd "S-SPC")) ; leave it to fcitx [Trigger Input Method]
(global-set-key (kbd "C-SPC") 'set-mark-command) ; constomize
;(define-key global-map [(control meta ?r)] 'remember)
(global-set-key [(shift meta q)] 'rebox-cycle)
;(global-set-key (kbd "C-c r r") 'my-put-file-name-on-clipboard)
(global-set-key (kbd "C-x C-f") 'find-file) ; ido-find-file
;(global-set-key [?\M-j] 'ido-display-buffer)
;(global-set-key (kbd "C-x x f") 'ido-find-file)
(global-set-key (kbd "<C-f1>") (lambda()(interactive) (kill-this-buffer)))
(add-hook 'bs-mode-hook 'turn-on-font-lock) ; bs.el
(global-set-key (kbd "C-%") 'replace-regexp)
;(global-set-key [(meta _)] 'sh-switch-to-process-buffer)
(global-unset-key "\M-q")
(global-set-key (kbd "M-q q") 'fill-paragraph)
(global-set-key (kbd "M-q w") 'unfill-paragraph)
(global-set-key (kbd "C-c t t") 'delete-trailing-whitespace)
(global-set-key (kbd "C-c t f") 'flush-blank-lines)
#+end_src
[[file:img/fcitx_lang.png]]
리눅스 우분투 키 시퀀스 변경은은 2곳에서 설정하는 데,
1. 주메뉴 [시스템 설정] > Hardware [Keyboard] > [Shortcuts] 탭 > "Typing" [List Menu)
( [시스템 설정] > Hardware [Keyboard] > [Typing] 탭의 "Text Entry" 을 선택해도 된다 )
- Switch to next source: Super+Space
- Siwtch to previous source: Shift + Super +Space
[[file:img/fcitx_system_key.png]]
2. fcitx 설정에서 변경
Fcitx [Icon] 실행 혹은 Configure Fcitx [mouse light popup menu]
-> Input Method [tab]
-> Pinyin [list select]
-> Global Config [Tab]
-> Trigger Input Method [item]
change from: "Ctrl+Space" --> to "Shift+Space"
-> Scroll between Input Method: Ctrl_Shift
[[file:img/fcitx_config.png]]
3. Emacs key sequence 변경
(만약 emacs 에서 사용하는 키가 시스템에서 정의한 키와 중복될 경우 먼저 제거한다)
#+name: dot emacs
#+begin_src elisp
;; <leim> 을 사용할 경우 require (required korea-util.el and hangul.el)
;; <S-Hangul> --> toggle-korean-input-method from korea-util.el
;; [한자]키 --> toggle-korean-input-method hangul-to-hanja-conversion from hangul.el
;; <fcitx> 를 사용할 경우 --> fcitx -> change fcitx and system key sequence
;; 1. in [fcitx config]
;; a. [Trigger Input Method] from [Control-SPACE] to [Shift-Space]
;; b. Scroll between Input Method: Control+Sift
;;
;; 2. in [system kebyaord sequence setting]
;; Next source (fcitx): [Super-Space]
;; Switch to previous source (fcitx): [Super+Space+Space]
;(global-set-key (kbd "S-SPC") 'toggle-input-method)
;(global-set-key (kbd "S-SPC") 'toggle-korean-input-method)
(global-unset-key (kbd "S-SPC")) ; leave it to fcitx [Trigger Input Method]
(global-set-key (kbd "C-SPC") 'set-mark-command) ; constomize
;(define-key global-map [(control meta ?r)] 'remember)
(global-set-key [(shift meta q)] 'rebox-cycle)
;(global-set-key (kbd "C-c r r") 'my-put-file-name-on-clipboard)
(global-set-key (kbd "C-x C-f") 'find-file) ; ido-find-file
;(global-set-key [?\M-j] 'ido-display-buffer)
;(global-set-key (kbd "C-x x f") 'ido-find-file)
(global-set-key (kbd "<C-f1>") (lambda()(interactive) (kill-this-buffer)))
(add-hook 'bs-mode-hook 'turn-on-font-lock) ; bs.el
(global-set-key (kbd "C-%") 'replace-regexp)
;(global-set-key [(meta _)] 'sh-switch-to-process-buffer)
(global-unset-key "\M-q")
(global-set-key (kbd "M-q q") 'fill-paragraph)
(global-set-key (kbd "M-q w") 'unfill-paragraph)
(global-set-key (kbd "C-c t t") 'delete-trailing-whitespace)
(global-set-key (kbd "C-c t f") 'flush-blank-lines)
#+end_src
Monday, March 13, 2017
How to Install Synching on Ubuntu 16.04 via Official Deb Repository
How to Install Syncthing on Ubuntu 16.04 via Official Deb Repository
https://www.linuxbabe.com/ubuntu/install-syncthing-ubuntu-16-04-via-official-deb-repositoryFriday, March 10, 2017
Wednesday, March 08, 2017
How to enable Nginx FancyIndex on Ubuntu
> From: How to enable Nginx FancyIndex on Ubuntu
sudo apt-get install nginx-extras
sudo apt-get install nginx-extras
location / { fancyindex on; fancyindex_exact_size off; }
Read more about Nginx FancyIndex:
- http://wiki.nginx.org/NgxFancyIndex
- https://github.com/aperezdc/ngx-fancyindex
Tuesday, March 07, 2017
SQLite Source Code Blocks in Org Mode
SQLite Source Code Blocks in Org Mode--> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html
# -*- coding: utf-8 -*-
#+STARTUP: content
#+LANGUAGE: ko
#+PROPERTY: header-args:sqlite :dir ~/org/ :db journal.db :var rel="cur" :results line :colnames yes
: header arguments -> :csv, :column, :line, :list, :html
: results -> silent raw
: separator \
※ 1. File scope variable which is name "#+PROPERTY" can be located any location of file.
※ 2. "#+PROPERTY" var will be initialize when file opening time.
(therefore, if you modify "#+PROPERTY" it can be use until reopen the file again!)
* sqlite org babel
[[http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html][guide_from orgmode.org]]
** emacs babel setup
#+TITLE: dot
#+begin_src elisp
(org-babel-do-load-languages
'org-babel-load-languages (quote ((emacs-lisp . t)
(sqlite . t)
(R . t)
(python . t))))
#+end_src
** Org Mode Features for SQLite Source Code Blocks
Header Arguments
Language-specific default values
There are no language-specific default header arguments for SQLite.
** Language-specific header arguments
There are 11 SQLite-specific header arguments.
db
a string with the name of the file that holds the SQLite database. Babel requires this header argument.
header
if present, turn on headers in the output format. Headers are also output with the header argument :colnames yes.
echo
if present, set the SQLite dot command .echo to ON.
bail
if present, set the SQLite dot command .bail to ON.
csv
the default SQLite output format for Babel SQLite source code blocks.
column
an SQLite output format that outputs a table-like form with whitespace between columns.
html
an SQLite output format that outputs query results as simple HTML tables.
line
an SQLite output format that outputs query results with one value per line.
list
an SQLite output format that outputs query results with the separator character between fields.
separator
a string that specifies the separator character used by the SQLite `list' output mode and by the SQLite dot command .import.
nullvalue
a string to use in place of NULL values.
** Variables
It is possible to pass variables to sqlite. Variables can be of type table or scalar. Variables are defined using :var=<value> and referred in the code block as $<name>.
Table variables
Table variables are exported as a temporary csv file that can then be imported by sqlite. The actual value of the variable is the name of temporary csv file.
Scalar variables
This is a value that will replace references to variable's name. String variables should be quoted; otherwise they are considered a table variable.
** Sessions
SQLite sessions are not supported.
** Result Types
SQLite source code blocks typically return the results of a query. The header arguments :csv, :column, :line, :list, and :html determine the output format.
: #+PROPERTY: header-args:sqlite :dir ~/org/ :db org.db :results list
* sample create
: #+name: sqlite-populate-test
: #+header: :results line
: #+header: :dir ~/tmp/
: #+header: :db hello.db
: #+begin_src sqlite
: create table greeting(one varchar(10), two varchar(10));
: insert into greeting values('Hello', 'world!');
: #+end_src
#+begin_src sqlite
create table greeting(one varchar(10), two varchar(10));
insert into greeting values('Hello', 'world!');
#+end_src
* sample query
: #+name: sqlite-hello
: #+header: :list
: #+header: :separator \
: #+header: :results raw
: #+header: :dir ~/tmp/
: #+header: :db hello.db
: #+begin_src sqlite
: select * from greeting;
: #+end_src
#+begin_src sqlite
select * from greeting;
#+end_src
#+RESULTS:
| one | two |
|-------+--------|
| Hello | world! |
* Using scalar variables
** using local var.
#+BEGIN_SRC sqlite :db ~/org/journal.db :var rel="tname" n=300 :colnames yes
drop table if exists $rel;
create table $rel(n int, id int);
insert into $rel(n,id) values (1,210), (3,800);
select * from $rel where id > $n;
#+END_SRC
#+RESULTS:
| n | id |
|---+-----|
| 3 | 800 |
** usign file var.
#+BEGIN_SRC sqlite :var n=300
drop table if exists $rel;
create table $rel(n int, id int);
insert into $rel(n,id) values (1,210), (3,800);
select * from $rel where id > $n;
#+END_SRC
#+RESULTS:
| n | id |
|---+-----|
| 3 | 800 |
* Using table variables
We can also pass a table to a query. In this case, the contents of the table are exported as a csv file that can then be imported into a relation:
** local var.
#+NAME: tableexample
| id | n |
|----+----|
| 1 | 5 |
| 2 | 9 |
| 3 | 10 |
| 4 | 9 |
| 5 | 10 |
#+begin_src sqlite :db ~/org/journal.db :var orgtable=tableexample :colnames yes
drop table if exists testtable;
create table testtable(id int, n int);
.mode csv testtable
.import $orgtable testtable
select n, count(*) from testtable group by n;
#+end_src
#+RESULTS:
| n | count(*) |
|----+----------|
| 5 | 1 |
| 9 | 2 |
| 10 | 2 |
** using global file var.
#+begin_src sqlite :var orgtable=tableexample
drop table if exists testtable;
create table testtable(id int, n int);
.mode csv testtable
.import $orgtable testtable
select n, count(*) from testtable group by n;
#+end_src
#+RESULTS:
| n | count(*) |
|----+----------|
| 5 | 1 |
| 9 | 2 |
| 10 | 2 |
Sunday, February 26, 2017
(require 'scala-mode-auto)
(require 'ensime)
#+RESULTS:
(add-to-list 'auto-mode-alist '("\\.sc$" . scala-mode))
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-hook 'scala-mode-hook 'ensime-mode)
(require 'ensime)
#+RESULTS:
(add-to-list 'auto-mode-alist '("\\.sc$" . scala-mode))
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-hook 'scala-mode-hook 'ensime-mode)
* org babel mode scala
#+begin_src scala :exports both :results output
def helloworld() = {
println("Hello there")
println("한글로처리2")
}
helloworld()
#+end_src
: Hello there
: 한글로처리2
#+begin_src scala :exports both :results output
def helloworld() = {
println("Hello there")
println("한글로처리2")
}
helloworld()
#+end_src
: Hello there
: 한글로처리2
Subscribe to:
Posts (Atom)
-
* postgres - pgmodelear ** new version > download: https://github.com/pgmodeler/pgmodeler sudo apt-get install qt-sdk sudo apt-get ins...
-
Consolas also work with VS2010 Consolas 폰트가 설치만으로 사용가능하지만 이름 선택을 "Consolas "로 하고 싶다면 아래와 같이 한다. 다운로드 링크: http://www.microsof...
-
how to connect postgres in openoffice --> https://wiki.openoffice.org/wiki/Base/connectivity/PostgreSQL Base/connectivity/PostgreS...