ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ example

Derby Database Installation on ubuntu

Installation 1. download bin installation from derby's download page 2. set environment variable in /etc/environment or ~/.bashrc or ~/.bash_aliase export JAVA_HOME=/usr/lib/jvm/java-6-sun export PATH=$PATH:$JAVA_HOME/bin export DERBY_INSTALL=/mnt/disk/AIT/Quality/db-derby-10.5.1.1-bin // change this into your derby installation path export CLASSPATH=$DERBY_INSTALL/lib/derby.jar:$DERBY_INSTALL/lib/derbytools.jar:. 3. run $ cd $DERBY_INSTALL/bin $ . setEmbeddedCP and terminal will close, don't be panic. go on to next steps. 4. Testing if installation is correct $ java org.apache.derby.tools.sysinfo Result should be something like this. ------------------ Java Information ------------------ Java Version: 1.6.0_13 Java Vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-sun-1.6.0.13/jre Java classpath: /mnt/disk/AIT/Quality/db-derby-10.5.1.1-bin/lib/derby.jar:/mnt/disk/AIT/Quality/db-derby-10.5.1.1-bin/lib/derbytools.jar:. OS name: Linux OS archi...

สรุป creative commons ครีเอทีฟคอมมอนส์ 3.0 แบบเข้าใจง่ายๆ

1 แผ่น เข้าใจได้ทันที ตามนี้เลย มันมี 6 อย่างให้เลือกใช้ เวลาเลือกใช้ก็เลือกจาก 6 อย่างนั่นแหละ รูปใน flickr ของเรา cc มาตั้งนานแล้ว มีคนเอาไปใช้ ช่วยการท่องเที่ยวได้อีก เป็นปลื้ม ^^ ไปดูหน้าจริงที่ http://hubpages.com/hub/Stylish-Thailand-Holidays

[ ServiceMix ] BPEL Tutorial

1. Download servicemix-example-3.zip from here or 2. Put ant-contrib.jar, bcel.jar, and jibx-*.jar in ESB/libraries/. 3. Download apache-ode-jbi-1.2.zip from here , unpack in ESB/, and copy apache-ode-jbi-1.2/ode-jbi-1.2.zip to apache-servicemix-3.3/hotdeploy/. 4. Make a new Eclipse project osesb-example3 Add external JARs: From /ESP/apache-servicemix-3.3/lib, add - log4j-1.2.13.jar - org.apache.servicemix.specs. jbi-api -1.0-1.1.0.jar - servicemix-core-3.3.jar - servicemix-utils-1.0.0.jar - geronimo-jms - activemq-core From libraries/, add 3 files, - bcel.jar and jibx-*.jar From /eclipse/plugins/org.junit4, add junit.jar. 5. Copy src/ and resources/ from the tutorial archive to the project workspace. 6. Use Eclipse to create a new source folder called src-test/ then copy src-test/ from the tutorial archive to the project workspace. 7. delete 'default="start"' in example3-build.xml 8. see ... ScubaDivingProcess.wsdl ScubaDivingProcess.bpel 9. Run the Ant target deplo...

[ ServiceMix ] SOAP provider example

example files exists here or ServiceMix can act as a SOAP server/provider of Chamber of Commerce. Client --- SOAP -------> Server --- XML --> Server Stub unmarshal ( same interface as biz logic ) -----> Biz Logic Implementation ( Simple JavaCode ) Client message <findCompanies> <city>city name</city> <streetName>street name</streetName> </findCompanies> XMLSchema of message <xsd:element name="findCompanies"> <xsd:complexType> <xsd:sequence> <xsd:element name="city" type="xsd:string" /> <xsd:element name="streetName" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> resources/cfx/wsdl/CoC.wsdl <?xml version="1.0" encoding="UTF-8" standalone="no"?> <wsdl:definitions xmlns:osesb="http://opensource.esb.org/CoC/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:w...

[ ServiceMix ] File, JMS, Bean Tutorial

ServiceMix Tutorial SM-File, SM-JMS, SM-Bean -------------------------------------------------------------------------------------------------------- File --> JMS Msg CH --> B ean:SimpleTransformBean.java --> JMS Msg CH --> File in other place Installation 1. download apache-servicemix-3.3.tar.gz , extract into ESB/ 2. download servicemix-example-1.zip or you can get it from here 3. Create a directory ESB/libraries , place the JAR files ant-contrib.jar , bcel.jar , jibx-bind.jar , and jibx-run.jar , in that directory. - JiBX is a library for Java objects --> XML, XML --> Java objects We use JiBX to transform Java Obj. to XML to send to NMR. ( NMR only accept XML ) - Spring component framework implementations MVC, DAO, and other important patterns. We use it for configuring POJOs (SM-Beans) using Dependency Injection (plug sys. capabilities into biz logic component) . Basic lv. of dependency, C program making sys call. Your program depends on OS. POSIX -- make it in...

[ notepad++ ] how to replace tab with space

Settings > Preferences... You can replace the existing one with ... ref : acdcjunior

JMS tutorial

1. ให้ JMS ใช้คนละ thread กับ glassfish Configuration -> Java Message Service, set JMS service to "LOCAL" rather than "EMBEDDED." restart glassfish server. ลอง ping เด๊ะ dsin@dsin-laptop:~/glassfish$ ~/glassfish/bin/asadmin jms-ping JMS Ping Status = RUNNING Command jms-ping executed successfully. 2. create new CF - JNDI name - type javax.jms.ConnectionFactory คือ อะไรก็ได้ create new DS - JNDI name - Physical destination name - type javax.jms.Queue : point-to-point Test first create new java project - project name Add external JARs glassfish/lib/javaee.jar glassfish/lib/appserv-rt.jar glassfish/lib/appserv-admin.jar glassfish/lib/install/applications/jmsra/imqjmsra.jar สร้าง jUnit test - JUnit 4 test - package - name public class ReqReplyTest extends TestCase { private static final String CONNECTION_FACTORY_NAME = "jms/ConnectionFactory"; private static final String REQUEST_QUEUE_NAME = "jms/RequestQueue"; // ที่ config ใน jndi private stat...

ลองเล่น Altova XMLSpy 2007

This program is in Altova Enterprise XML Suite 2007 New .. xml dtd select different view แท็บ browser จะได้ผลเหมือน เราเปิดดูบน web browser Check Well-formedness และ Validate ซึ่งปกติถ้าไม่ Well-formed มันจะเช็คให้ auto แล้วด่าตรง Console อยู่ดี Assign DTD DTD/Schema > Assign DTD… มันจะ add tag ที่ประกาศ DTD ให้เอง

ลองสร้าง documentation diagram ด้วย BoUML

ลองเขียน Use case diagram ตอนแรก ต้องสร้าง UseCaseView ก่อน แล้วค่อยสร้าง UseCaseDiagram โดยคลิกขวา ตรงแท็บ browser แล้วเลือก New ... Tips : - วิธีเปลี่ยน Actor จากตัวคน เป็นกล่อง คือ คลิกขวาที่ตัวคน แล้วเลือก Edit drawing settings เลือก drawing mode : class - ถ้าลากเส้นไม่ได้ ให้ดูว่ากล่องนั้นอยู่บนหรือเปล่า อย่างเช่น ถ้า subject dialog ( กล่อง boundary ) ทับ use case dialog อยู่มันจะลากไปที่ use case dialog ไม่ได้ ให้คลิกขวาแล้ว Upper, Lower, Go up, Go down ตามสะดวก - ถ้าจะเซฟ เป็นรูป ให้คลิกขวาตรงที่สร้าง diagram ทางขวา แล้ว Save optimal picture part (png) หรือ Save visible picture part (png) ก็ได้ - class ที่แสดงปกติ ก็ configure ประมาณนี้ ลองสร้างอันอื่นสิ UseCaseView > SequenceDiagram ClassView > ClassDiagram Class diagram Tips : - คลิกขวา ที่ตัว diagram เลือก Add attribute หรือ Add operation ได้ - คลิกขวา Edit drawing settings แล้ว show members full definition ตั้งเป็น yes ได้นะ จะทำให้มันโชว์ type ใน diagram ด้วย

basic lambda calculus - Part 1

basic definition ของ lambda calculus เหมือนเอาเรื่องเก่ามาเล่าใหม่ ตามความเห็นส่วนตัว เหมือน เรื่องฟังก์ชั่น ที่เปลี่ยน annotation เท่านั้นเอง ดูตัวอย่างก่อน แล้วค่อยดู definition จะเข้าใจง่าย Basic - f ( x ) = x + 2 เขียนได้เป็น λ x . x + 2 เนื่องจากในฟังก์ชั่น อาจจะไม่ใช้ชื่อตัวแปรเป็น x ก็ได้ เช่น f(y) = y + 2 ดังนั้นเราอาจเขียนเป็น λ y . y + 2 ; - f (3) เขียนได้เป็น (λ x . x + 2) 3 หรือ ( λ x . x + 2 )(3) - มาดูพวกฟังก์ชั่นสองตัวแปรกันบ้าง f ( x , y ) = x - y เขียนได้เป็น λ x . λ y . x - y หรือจะเขียนย่อๆ ก็ได้ λ x y . x - y - argument นอกจากจะเป็นตัวเลขแล้วยังสามารถส่งเป็นฟังก์ชั่น ได้ด้วย เช่น λ f . f 3 รับพารามิเตอร์เป็นฟังก์ชั่น แล้วหา f(3) ประโยคข้างล่างนี้เราส่ง f(x) = x + 2 เข้าไป ทั้งสามประโยคนี้ เหมือนกัน (λ f . f 3) (λ x . x + 2) (λ x . x + 2) 3 3 + 2 ------------------------ Definition Lambda expressions ประกอบด้วย ตัวแปร v 1 , v 2 , . . . v n λ และ . วงเล็บ ( ) ให้ Λ = เซตของ lambda expressions ซึ่งมีสมาชิกดังนี้ ตัวแปร v ( v ∈ Λ ) λ ...