2011/07/26

http, put

- reference

-- java
--- http://d.hatena.ne.jp/nacookan/20080108/1199774995

--- http://stackoverflow.com/questions/2099576/java-http-put-with-httpurlconnection

--- http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=48794&forum=12

-- java : sounds untrue
http://stackoverflow.com/questions/1051004/how-to-send-put-delete-http-request-in-httpurlconnection-looks-like-not-working

-- java servlet
--- http://mergedoc.sourceforge.jp/tomcat-servletapi-5-ja/javax/servlet/http/HttpServlet.html

-- perl : http://blog.tanarky.com/2010/01/perlhttp-put-method.html

2011/07/25

apache directive

* settings file

- /etc/httpd/conf/httpd.conf

- reference : http://httpd.apache.org/docs/2.0/ja/mod/core.html

* PUT

- in /etc/httpd/conf/httpd.conf

-- affirm
--- LoadModule dav_module modules/mod_dav.so
--- LoadModule dav_fs_module modules/mod_dav_fs.so

-- add DAV On

<Directory "/var/www/html"&rt;
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
DAV On
</Directory &rt;


* OPTIONS

- Request

OPTIONS / HTTP/1.1
User-Agent: Java/1.6.0_26
Host: 192.168.11.10
Connection: keep-alive


- Response


HTTP/1.1 200 OK
Date: Tue, 26 Jul 2011 10:39:10 GMT
Server: Apache/2.2.3 (Red Hat)
DAV: 1,2
DAV:
MS-Author-Via: DAV
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: httpd/unix-directory

linux centos ftp

* vsftpd

** install & start

- yum -y install vsftpd

- /etc/rc.d/init.d/vsftpd start

** default path

./var/ftp/pub/

** settings

- /etc/vsftpd/vsftpd.conf 


- reference :
-- http://centossrv.com/vsftpd.shtml
-- http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?topic=41607&forum=10

2011/07/24

java iterator - for


for(int i=0;i<projects.length;i++){
Log.logInfo(projects[i].toString());
}

Handling File in Eclipse Plugin


* Add Dependenceis in MANIFEST.MF
- MANIFEST.MF > Dependencies > Add > org.eclipse.core.resources



IWorkspace ws = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = ws.getRoot();
IProject[] projects = root.getProjects();

//ws.toString:org.eclipse.core.internal.resources.Worksapce@**
//root.toString : R

IProject project = projects[0];
IFolder tmpDir = null;
IFile file = null;

if(project.exists()){
//1. Create in Project not System
tmpDir = project.getFolder((new Path("tmp")));
if(!tmpDir.exists()){
try {
//2. Create in System
tmpDir.create(false, true, null);
}catch (CoreException e) {
e.printStackTrace();
}
}
file = tmpDir.getFile(new Path("boo.txt"));
if(!file.exists()){
try{
String str = "dummy";
InputStream is = new ByteArrayInputStream(str.getBytes());
file.create(is, false, null);
}catch(CoreException e){
e.printStackTrace();
}
}
Log.logInfo(file.getLocation().toString());
}else{
Log.logInfo("project is NOT exist");
}


- reference :
--http://www.masatom.in/pukiwiki/Eclipse/%A5%D7%A5%E9%A5%B0%A5%A4%A5%F3%B3%AB%C8%AF%A4%CETIPS%BD%B8/%A5%EF%A1%BC%A5%AF%A5%B9%A5%DA%A1%BC%A5%B9%A4%CE%A5%EA%A5%BD%A1%BC%A5%B9%A4%F2%BC%E8%A4%EA%B0%B7%A4%A6/

eclipse link

* Eclipse Tips Japanese

http://www.masatom.in/pukiwiki/Eclipse/%A5%D7%A5%E9%A5%B0%A5%A4%A5%F3%B3%AB%C8%AF%A4%CETIPS%BD%B8/

* Eclipse Tutorials English

2011/07/23

2011/07/22

eclipse plugin (sample action)


1. Open plugin of sample view

2. View MANIFEST.MF

2-1. show Extensions tab > add > Extension Points : org.eclipse.ui.actionSets

2-2. Edit

* org.eclipse.ui.actionSets
- Extension Element Details
-- id : foo.foo.foo.actionSet_id1
-- label : any string
-- visible : true

* org.eclipse.ui.actionSets > Right Click > New > menu
- Extension Element Details
-- id : foo.foo.foo.menu_id1
-- label : {Label of Menu Bar}
-- path : additions @@
-- icon :

** Right Click on actionSet > New > gourpMaker
- Extension Element Details
-- name : content @@

** Right Click on actionSet > New > separator
- Extension Element Details
-- name : additions @@

* org.eclipse.ui.actionSets > Right Click > New > action
-- menubarPath : foo.foo.foo.menu_id1/content
-- toolbarPath : Normal/additions
-- Click class @ then create class.
--- implements IWorkbenchWindowActionDelegate ((equals to interface))

-3. Debugging

-- Project Property > Run As > Eclipse Application




wmv in mac

* Flip4Mac

- Mac Menu > System Environment Setting > Flip4Mac
-- Player > Advanced > Add Application