http://coolors.co/
空白鍵random產生
可以lock喜歡的顏色 or 自己填色碼
2014年10月28日
2014年10月22日
2014年10月14日
如何訂閱facebook專頁
http://azo-edu.blogspot.tw/2012/04/facebookrss.html
1.去專頁 點開相簿
2.進入相簿後會看到網址列有「?set=a.10150716075848487.457573.164793763486&type=3」,將其最後一段的粉絲頁面ID「164793763486」複製下來。
3.直接將ID套用到下面的網址,就是該粉絲頁面的RSS網址了:
http://www.facebook.com/feeds/page.php?format=rss20&id=164793763486
1.去專頁 點開相簿
2.進入相簿後會看到網址列有「?set=a.10150716075848487.457573.164793763486&type=3」,將其最後一段的粉絲頁面ID「164793763486」複製下來。
3.直接將ID套用到下面的網址,就是該粉絲頁面的RSS網址了:
http://www.facebook.com/feeds/page.php?format=rss20&id=164793763486
另一種方法,直接在〔讚〕按鈕上按右鍵→【複製連結網址】,再開一個純文字檔將剪貼簿內容貼上,一樣可以輕鬆取得其中的粉絲頁面ID:「http://www.facebook.com/ajax/signup_dialog.php?page_id=164793763486&next=http%3A%2F%2Fwww.facebook.com%2Ffreewarefans」。
2014年10月13日
oracle10升11
To import and export data between 10.2 XE and 11.2 XE, perform the following steps:
Copy the gen_inst.sql file from the upgrade directory of 11.2 XE shiphome to your local directory.
Connect to 10.2 XE database as SYS user and run gen_inst.sql. This will generate install.sql, gen_apps.sql and other .sql files. The files will be generated in the folder containing gen_inst.sql.
SQL> @gen_inst.sql
To export the data from 10.2 XE database, perform the following steps:
Connect to 10.2 XE database as SYS user.
Create a dump folder dump_folder on the local file system.
Create directory object DUMP_DIR with READ and WRITE privilege to SYSTEM user.
SQL> CREATE DIRECTORY DUMP_DIR AS '/<dump_folder>';
SQL>GRANT read, write ON DIRECTORY DUMP_DIR TO system;
Export data from 10.2 XE database to the dump folder.
expdp system/system_password full=Y
EXCLUDE=SCHEMA:\"LIKE \'APEX_%\'\",SCHEMA:\"LIKE \'FLOWS_%\'\"
directory=DUMP_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
expdp system/system_password
TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ directory=DUMP_DIR
dumpfile=DB10G2.dmp logfile=expdpDB10G2.log
Deinstall 10.2 XE if installation of 11.2 XE is planned on the same system.
Install 11.2 XE database. For more information see Section 4, "Installing Oracle Database XE".
To import data to the 11.2 XE database, perform the following steps:
Connect to 11.2 XE database as SYS user.
Create directory object DUMP_DIR with READ and WRITE privilege to SYSTEM user.
SQL> CREATE DIRECTORY DUMP_DIR AS '/<dump_folder>';
SQL>GRANT read, write ON DIRECTORY DUMP_DIR TO system;
Import data to 11.2 XE database from the dump folder.
impdp system/system_password full=Y directory=DUMP_DIR
dumpfile=DB10G.dmp logfile=expdpDB10G1.log
impdp system/system_password directory=DUMP_DIR
TABLE_EXISTS_ACTION=APPEND TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$
dumpfile=DB10G2.dmp logfile=expdpDB10G1b.log
Connect to 11.2 XE database as SYS user and run the script install.sql, which was generated in Step 2. This will trigger the execution of ws.sql, gen._apps.sql, and other .sql files.
---實際步驟—
↑下載oracle11
↑↑
SQL> conn sys/密碼 as sysdba
SQL> @C:\路徑ooxxx\gen_inst.sql
產生的檔案會在【C:\oraclexe\app\oracle\product\oracle版本\server\bin\】(複製到【路徑aabb】)
↑↑↑
SQL> drop directory DUMP_DIR;
SQL> CREATE DIRECTORY DUMP_DIR AS 'C:\路徑xyz\實際資料夾名稱';
SQL>GRANT read, write ON DIRECTORY DUMP_DIR TO system;
換開cmd
expdp system/密碼 full=Y EXCLUDE=SCHEMA:\"LIKE \'APEX_%\'\",SCHEMA:\"LIKE \'FLOWS_%\'\" directory=DUMP_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
expdp system/密碼 TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ directory=DUMP_DIR dumpfile=DB10G2.dmp logfile=expdpDB10G2.log
↑↑移除10 安裝11
建議安裝完後先到管理者頁面(workspace:internal username:admin password:安裝時輸入的密碼)設定不要APEX表和DEMO表
否則之後新建的schema和下一步匯入的原schema 會多了一些table
像是
↑↑
SQL> conn sys/密碼 as sysdba
SQL> CREATE DIRECTORY DUMP_DIR AS ' C:\路徑xyz\實際資料夾名稱';
SQL>GRANT read, write ON DIRECTORY DUMP_DIR TO system;
換開cmd
impdp system/密碼 full=Y directory=DUMP_DIR dumpfile=DB10G.dmp logfile=expdpDB10G1.log
impdp system/密碼directory=DUMP_DIR TABLE_EXISTS_ACTION=APPEND TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ dumpfile=DB10G2.dmp logfile=expdpDB10G1b.log
SQL> @C:\路徑aabb \install.sql
完成!
匯出11G 至10G (import from 11g export to 10 g)
用原本的EXP IMP 指令匯入匯出的話會有錯
SO.. 要改用EXPDP IMPDP 指定版本
STEP1 打開SQL命令 在資料庫中建立一個別名為datapump的 directory
SQL> CREATE DIRECTORY datapump AS 'C:/DB';
STEP2 測試是否有建成功
SQL> SELECT * DBA_DIRECTORIES;
STEP3 把權限給 OOXX 這個USER
SQL> GRANT READ, WRITE ON DIRECTORY datapump to OOXX;
STEP4 打開命令提示字元
expdp OOXX/密碼@xe directory=datapump dumpfile=newdump.dmp VERSION=10.2 content=metadata_only
content=metadata_only 是只匯出schema 也可content=all|data_only
接著到 要匯入的電腦 先重做STEP1~3
STEP5 打開命令提示字元
impdp OOXX/密碼@xe directory=datapump dumpfile=newdump.dmp VERSION=10.2
content=metadata_only
2014年10月7日
Dropbox + Subversion
0.安裝TortoisesSVN、Dropbox
1.打開Dropbox的同步資料夾
2.建一個svn的資料夾 右鍵【TortoriseSVN】→【Create repository here】
之後就像平常用法
1.打開Dropbox的同步資料夾
2.建一個svn的資料夾 右鍵【TortoriseSVN】→【Create repository here】
之後就像平常用法
建立 RESTful WS Server
Web.xml
WS的Class
WADL
URL: https://localhost:8888/ws/application.wadl
chrome套件:Postman
<servlet>
<servlet-name>ServletAdaptor</servlet-name><!--指定 Servlet 幫你處理 RESTful WS-->
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>imemo.ws</param-value><!--指定 RESTful WS Package-->
</init-param>
<load-on-startup>1</load-on-startup>
</servlet> <servlet-mapping>
<servlet-name>ServletAdaptor</servlet-name>
<url-pattern>/ws/*</url-pattern><!--指定 Servlet Mapping URL-->
</servlet-mapping>
WS的Class
@Path("/members") //指定 RESTful 服務的 Path (URL)
public class AccountsServices {
@POST //指定 HTTP Method
@Consumes(MediaType.MULTIPART_FORM_DATA) //指定 Consumes (消化)資料型態
@Produces(MediaType.TEXT_PLAIN) //指定 Produces (產出)資料型態
@Path("vip") //指定 Subpath
public String vip(@FormParam("account") String account) {
return Response.ok("OK").build();
}
}
WADL
URL: https://localhost:8888/ws/application.wadl
<application xmlns="http://research.sun.com/wadl/2006/10">
<resources base="https://localhost:8888/ws/">
<resource path="/members"><!--指定 Path-->
<resource path="vip"><!--指定 Subpath-->
<method id="vip" name="POST"><!--指定 HTTP Method -->
<request><representation mediaType="multipart/form-data"/></request><!--指定 Consumes (消化)資料型態 -->
<response><representation mediaType="text/plain"/></response><!--指定 Produces (產出)資料型態 -->
</method>
…
chrome套件:Postman