test
emacs
png, jpeg view in emacs-24.4
ELISP> (emacs-version) "GNU Emacs 24.4.1 (i686-pc-mingw32)\n of 2014-10-25 on LEG570"
DONE popup menu in emacs key
- State "DONE" from "TODO"
lacarte.el (global-set-key "\C-xrp" 'replace-rectangle) ; menu command lacarte-execute-… (global-set-key "\C-xrn" 'insert-number-rectangle) ;if not block insert descedent order
DONE image in emacs-24.4
- State "DONE" from "TODO"
iimage-mode: M-i (Meta+shift+i) 이미지 => 파일://위치/파일이름.확장자
(org-display-inline-images) ;iimage-mode (defun my-epresent-run () "epresent-run start with org-display-inline-images or iimage-mode" (interactive) ; (require 'epresent) (org-display-inline-images) ; or iimage-mode (epresent-run) )
DONE shell command in ruby
- State "DONE" from "TODO"
7z a -tzip d:\home\download\emacs_20150116f.zip d:\pkg\emacs
#+Title 간단한 설명
dir d:/home/download/
#+Title 쉘 압축하기
7z a -tzip d:\\home\\download\\emacs_20150116f.zip d:\\pkg\\emacs
echo "test" echo "only work with sh.exe"
test | |||
only | work | with | sh.exe |
DONE presentation
- State "DONE" from "TODO"
(load-library "d:/pkg/emacs/lib/dot/epresent") ;open org > M-x epresent-run > ;;;; t:top_level > "n", "p", "t" and quit with "q"
(defun my-epresent-run () "epresent-run start with org-display-inline-images or iimage-mode" (interactive) ; (require 'epresent) (org-display-inline-images) ; or iimage-mode (epresent-run) )
DONE org-mode sql
- State "DONE" from "TODO"
Meta + F11 keybindg :* Heading
SELECT d_project, string_agg(fullname, ', ') AS title_list FROM phonebook GROUP BY 1 ;
d_pa | titl |
---|---|
a | aa성 |
tesa | aa스 |
appa | aa성 |
droa | aa범 |
pcva | aa채 |
quaa | aa현 |
droa | aa성 |
ccta | aa영 |
ccta | aa종 |
cctawc | aa경 |
STARTED Project Journal.org
SELECT d_project, string_agg(fullname, ', ') AS title_list FROM phonebook GROUP BY 1 ;
CREATE TABLE countries ( code CHAR(2) NOT NULL, year INT NOT NULL, gdp_per_capita DECIMAL(10, 2) NOT NULL, govt_debt DECIMAL(10, 2) NOT NULL );
select version();
version |
---|
PostgreSQL 9.3.2, compiled by Visual C++ build 1600, 32-bit |
org export to html
- menu bar add (define-key menu-bar-mytools-menu [org-html-export-to-html] '("org2htm" . org-html-export-to-html))
- css tag add
DONE ruby install & test
- State "DONE" from "TODO"
- d:\Devs\row.bat
set PATH=c:\windows\system32\;c:\windows set PATH=%PATH%;d:\Devs\Ruby193\bin start "Ruby on Windows" /D d:/Devs
- download http://rubyinstaller.org/downloads Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2 <- install Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2 <- install
- install
> Ruby-1.9.3-p551 (32bit) ==> d:\Devs\Ruby193\ <- install Ruby home > DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe ==> D:\Devs\Ruby193\Ruby_193_DevKit<- install Development kit
- install ruby development kit
cd d:\Devs\Ruby193\Ruby_193_DevKit ruby dk.rb init
- test installation
> gem install json –platform=ruby –no-ri –no-rdoc > ruby -rubygems -e "require 'json'; puts JSON.load('1').inspect"
- check
ruby -v
D:\Devs\Ruby193\Ruby_193_DevKit>ruby -v ruby 1.9.3p551 (2014-11-13) [i386-mingw32]
- install mysql interface
mysql –user root -p mysql-connector-c-noinstall-6.0.2-win32.zip -> extract => d:\Devs\mysql-connector-c-noinstall-6.0.2
get install mysql2 –no-ri –no-rdoc – –with-mysql-dir=d:\Devs\mysql-connector-c-noinstall-6.0.2
. test
mkdir d:\Devs\test\mysql
cd d:\Devs\test\mysql
https://github.com/lakelse/row => test.rb
– test.rb
require 'mysql2' client = Mysql2::Client.new(host: 'localhost', username: 'root', password: 'mypass') sql = 'select NOW() as timestamp' result = client.query(sql) result.each do |row| puts row['timestamp'] end
- row.bat ; add path
set PATH=c:\windows\system32;c:\windows set PATH=%PATH%;D:\Devs\Ruby193\bin set PATH=%PATH%;D:\Devs\mysql-connector-c-noinstall-6.0.2-win32\lib start "Rails on Windows" /D D:\Devs\
> select emails group by d_project
SELECT d_project, string_agg(email, ', ') AS email_list FROM phonebook where d_project like '%drone%' GROUP BY 1 ;
- test connection
require 'pg' conn=PGconn.connect( :hostaddr=>"127.0.0.1", :port=>5432, :dbname=>"emacsdb", :user=>"kys", :password=>'mypass') # or for a non IP address :host => 'my.host.name.com' instead of hostaddr # run the query res = conn.exec("SELECT * FROM phonebook") # Ran only once in order to get field Name fieldArray=res.fields() fieldArray.each do |elem| print "elem="+elem+"\n" end # print data from the query res.each{ |row| puts "Code="+row["code"] +" title="+row["title"] +" did="+row["did"] +" date_prod="+row["date_prod"] +" kind="+row["kind"] +" len="+row["len"] }
org-mode languge
def hello(str): return "Hello, " + str + "!" return hello ("dude")
Hello, dude!
Footnotes:
DEFINITION NOT FOUND.
No comments:
Post a Comment