hostname
: this command can get or set the host name or the NIS domain name. You can
also get the DNS domain or the FQDN (fully qualified domain name).
Monthly Archives: November 2015
รวมโค๊ดภาษาซี
Control statements
คำนวณผลรวมของ 1-10
รับตัวเลขจากผู้ใช้ แล้วตรวจสอบว่าเป็นเลขคู่ (แสดงคำว่า Even ) หรือเลขคี่ (แสดงคำว่า Odd)
ฟังก์ชันหาค่าเฉลี่ยของเลขจำนวนเต็ม 2 จำนวน (คืนค่าเป็นทศนิยม)
คำนวณหาพื้นที่ของสามเหลี่ยม โดยรับค่าความสูงของสามเหลี่ยม (Height) และค่าของฐานสามเหลี่ยม (Base)
คำนวณหาพื้นที่ของวงกลม โดยรับค่ารัศมี (Radius) และกำหนดให้ค่าพายเท่ากับ 3.14
โปรแกรมรับตัวเลขทางแป้นพิมพ์เป็นเลขฐานสิบ (0-7) จากนั้นแสดงผลเป็นเลขฐานสองแบบสามหลัก
พิมพ์แม่สูตรคูณ แม่ 2 ถึง 25
ตัดเกรด A – F ด้วยคำสั่ง if
ตัดเกรด A – F ด้วยคำสั่ง switch … case
รับวันที่ (1-30) ของเดือนกันยายน พ.ศ. 2558 แล้วแสดงวัน (อาทิตย์ จันทร์ อังคาร พุธ พฤหัส ศุกร์ เสาร์)
Display Character from A to Z Using Loop
checking is Prime or not
Prime Numbers Between two Interval number
Fibonacci series
Floyd’s Triangle
Display all factors of a number
Recursive
ผลรวม
Factorial
Fibonacci at n (terms)
Other
Display its own source code
Install Ambari
Apache Ambari
https://ambari.apache.org/
test on
- ubuntu-14.04.3-desktop-amd64
- Ambari 2.1.2
1. Download
2. Install, Setup, and Start Ambari Server
2.1 Install Ambari Server
2.2 Setup Ambari Server
2.3 Start Ambari Server
3. Deploy Cluster using Ambari Web UI
vi
vi
The default editor that comes with the UNIX operating system is called vi (visual editor).
The UNIX vi editor is a full screen editor and has two modes of operation:
- Command mode commands which cause action to be taken on the file.
- Insert mode in which entered text is inserted into the file.
Open Journal Systems (OJS)
Open Journal Systems (OJS)
https://pkp.sfu.ca/ojs/
1. Download
2. Installation
2.1 กำหนดสิทธิ์การเข้าถึง
2.2 กำหนดการเข้ารหัสตัวอักษร
2.3 กำหนดที่เก็บไฟล์
2.4 กำหนดความปลอดภัย
2.5 กำหนดชื่อผู้ใช้ Admin
Java Native Interface (JNI)
Java supports native codes via the Java Native Interface (JNI).
1. JNI with C
1.1: Write a Java Class that uses C Codes – hello.java 1
1.2: Create the C/C++ Header file – hello.h 2
1.3: C Implementation – HelloJNI.c 2
1.4: Run the Java Program 3
Benchmarking
Hadoop distribution includes a number of benchmarks we can use.
1. Preparation
2. TestDFSIO
2.1 Run TestDFSIO in write mode and create data.
2.2 Run TestDFSIO in read mode.
2.3 Clean up the TestDFSIO data.
คำสั่ง df: Checking Free Disk Space
df – report file system disk space usage
Options
- –help: Display Information of df Command.
- -h: Show Disk Space Usage in Human Readable Format.
- -T: Display File System Type.
MapReduce: WordCount Example
WordCount v1.0
This works with a local-standalone, pseudo-distributed or fully-distributed Hadoop installation.
Using JAR Files: The Basics
Using JAR Files: The Basics
Operation | Command |
---|---|
To create a JAR file | jar cf jar-file input-file(s) |
To view the contents of a JAR file | jar tf jar-file |
To extract the contents of a JAR file | jar xf jar-file |
To extract specific files from a JAR file | jar xf jar-file archived-file(s) |
To run an application packaged as a JAR file (requires the Main-class manifest header) |
java -jar app.jar |