顯示具有 Open Source 標籤的文章。 顯示所有文章
顯示具有 Open Source 標籤的文章。 顯示所有文章

2015年11月18日 星期三

[Terminal] Write a basic terminal

1. Download lxterminal from github
git clone git@github.com:Jumbo88888/lxterminal.git
cd lxterminal/src
rm .h && rm .c

2. Write a basic terminal code under lxterminal/src
#include <vte/vte.h>
main(){
    gtk_init(0,0);
    GtkWidget *w=gtk_window_new(0);
    GtkWidget *t=vte_terminal_new();
    vte_terminal_fork_command(t,"sh",0,0,"/",0,0,0);
    gtk_container_add(w,t);
    gtk_widget_show_all(w);
    gtk_main();
}

3. Compile the code
cd lxterminal
./configure
make

Reference :

2014年12月2日 星期二

[SNMP][JAVA][Open Source] How to compile mibble

[SNMP][JAVA][Open Source] How to compile mibble

Install compiler tool in ubuntu 14.04
sudo apt-get install ant
sudo apt-get install openjdk-7-jdk

Under mibble-2.9.3 then run
ant -buildfile build.xml

... 

doc-html:                                                                                                                                                                  [0/1956]
     [copy] Copying 1 file to /home/freeman/Downloads/mibble-2.9.3/doc
     [xslt] Transforming into /home/freeman/Downloads/mibble-2.9.3/doc
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/authors.xml to /home/freeman/Downloads/mibble-2.9.3/doc/authors.html
     [xslt] Loading stylesheet /home/freeman/Downloads/mibble-2.9.3/src/doc/html.xsl
     [xslt] Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
     [xslt] Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/bugs.xml to /home/freeman/Downloads/mibble-2.9.3/doc/bugs.html
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/features.xml to /home/freeman/Downloads/mibble-2.9.3/doc/features.html
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/index.xml to /home/freeman/Downloads/mibble-2.9.3/doc/index.html
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/install.xml to /home/freeman/Downloads/mibble-2.9.3/doc/install.html
     [xslt] Processing /home/freeman/Downloads/mibble-2.9.3/src/doc/release/version.xml to /home/freeman/Downloads/mibble-2.9.3/doc/version.html

doc-java:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package net.percederberg.mibble...
  [javadoc] Loading source files for package net.percederberg.mibble.snmp...
  [javadoc] Loading source files for package net.percederberg.mibble.type...
  [javadoc] Loading source files for package net.percederberg.mibble.value...
  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.7.0_65
  [javadoc] Building tree for all the packages and classes...
  [javadoc] Building index for all the packages and classes...
  [javadoc] Building index for all classes...

doc:

all:

BUILD SUCCESSFUL
Total time: 22 seconds

Compile specific function
ant -buildfile build.xml doc-html

Buildfile: /home/freeman/Downloads/mibble-2.9.3/build.xml

doc-html:
     [xslt] Transforming into /home/freeman/Downloads/mibble-2.9.3/doc

BUILD SUCCESSFUL
Total time: 0 seconds

Reference :
1. mibble :: MIB Parser

[Snmp][JAVA][Open Source] usage - mibble


bash ./bin/MibbleValidator.sh /home/happy/Desktop/ubeeWifi4all-v0.1.mib 
Using environment variables:
  MIBBLE_HOME = .
  JAVA        = /usr/bin/java
  CLASSPATH   = ./lib/mibble-parser-2.9.3.jar:./lib/mibble-mibs-2.9.3.jar:./lib/snmp6_0.jar

0/1: Reading /home/happy/Desktop/ubeeWifi4all-v0.1.mib... [OK]

Files processed:  1
  with errors:    0
  with warnings:  0
bash ./bin/MibblePrinter.sh  --debug /home/freeman/Desktop/ubeeWifi4all-v0.1.mib 
Using environment variables:
  MIBBLE_HOME = .
  JAVA        = /usr/bin/java
  CLASSPATH   = ./lib/mibble-parser-2.9.3.jar:./lib/mibble-mibs-2.9.3.jar:./lib/snmp6_0.jar

VALUE vcm [UNIVERSAL 6] OBJECT IDENTIFIER
    ::= 1.3.6.1.4.1.4684.37

VALUE ubeeWifi4allMib MODULE-IDENTITY (
  Last Updated: 201212100000Z
  Organization: Ubee Interactive
  Contact Info: web site: http://www.ubeeinteractive.com/
  Description: This MIB module supplies the basic management objects for WiFi4All.
)
    ::= 1.3.6.1.4.1.4684.37.4

VALUE ubeeWifi4allMibObjects [UNIVERSAL 6] OBJECT IDENTIFIER
    ::= 1.3.6.1.4.1.4684.37.4.1

VALUE ubeeWifi4allTable OBJECT-TYPE (
  Syntax: [UNIVERSAL 16] SEQUENCE OF [UNIVERSAL 16] SEQUENCE [ubeeWifi4allIndex [UNIVERSAL 2] INTEGER, ubeeWifi4allSSIDName [UNIVERSAL 4] OCTET STRING, ubeeWifi4allStatus [UNIVERSAL 2] INTEGER, ubeeWifi4allSecurityMode [UNIVERSAL 2] INTEGER, ubeeWifi4allMACAddress [UNIVERSAL 4] OCTET STRING, ubeeWifi4allFrequencyBand [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingMode [UNIVERSAL 4] OCTET STRING, ubeeWifi4allChannelBandwidth [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingChannel [APPLICATION 2] INTEGER (0..4294967295), ubeeWifi4allNumOfConnectedDevices [APPLICATION 2] INTEGER (0..4294967295)]
  Access: not-accessible
  Status: current
  Description: This table presents WiFi4All network information.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1

VALUE ubeeWifi4allEntry OBJECT-TYPE (
  Syntax: [UNIVERSAL 16] SEQUENCE [ubeeWifi4allIndex [UNIVERSAL 2] INTEGER, ubeeWifi4allSSIDName [UNIVERSAL 4] OCTET STRING, ubeeWifi4allStatus [UNIVERSAL 2] INTEGER, ubeeWifi4allSecurityMode [UNIVERSAL 2] INTEGER, ubeeWifi4allMACAddress [UNIVERSAL 4] OCTET STRING, ubeeWifi4allFrequencyBand [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingMode [UNIVERSAL 4] OCTET STRING, ubeeWifi4allChannelBandwidth [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingChannel [APPLICATION 2] INTEGER (0..4294967295), ubeeWifi4allNumOfConnectedDevices [APPLICATION 2] INTEGER (0..4294967295)]
  Access: not-accessible
  Status: current
  Description: List of WiFi4All network parameters.
  Index: [1.3.6.1.4.1.4684.37.4.1.1.1.1]
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1

TYPE UbeeWifi4allEntry ::= [UNIVERSAL 16] SEQUENCE [ubeeWifi4allIndex [UNIVERSAL 2] INTEGER, ubeeWifi4allSSIDName [UNIVERSAL 4] OCTET STRING, ubeeWifi4allStatus [UNIVERSAL 2] INTEGER, ubeeWifi4allSecurityMode [UNIVERSAL 2] INTEGER, ubeeWifi4allMACAddress [UNIVERSAL 4] OCTET STRING, ubeeWifi4allFrequencyBand [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingMode [UNIVERSAL 4] OCTET STRING, ubeeWifi4allChannelBandwidth [UNIVERSAL 2] INTEGER, ubeeWifi4allOperatingChannel [APPLICATION 2] INTEGER (0..4294967295), ubeeWifi4allNumOfConnectedDevices [APPLICATION 2] INTEGER (0..4294967295)]

VALUE ubeeWifi4allIndex OBJECT-TYPE (
  Syntax: [UNIVERSAL 2] INTEGER
  Access: not-accessible
  Status: current
  Description: The key for a unique instance of this object.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.1

VALUE ubeeWifi4allSSIDName OBJECT-TYPE (
  Syntax: [UNIVERSAL 4] OCTET STRING (SIZE (0..32))
  Access: read-only
  Status: current
  Description: The WiFi4All network name.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.2

VALUE ubeeWifi4allStatus OBJECT-TYPE (
  Syntax: [UNIVERSAL 2] INTEGER { active(1), enabledInactive(2), disabled(3), error(4) }
  Access: read-only
  Status: current
  Description: Indicates the status of the WiFi4All network.
               active(1): all necessary parameters are provisioned in config file and the 
               WiFi4All network is up and running.
               enabledInactive(2): all necessary parameters are provisioned in config file 
               but the WiFi4All network is down.
               disabled(3): WiFi4All network is not provisioned in config file.
               error(4):  any errors in parsing config file or failed in enable the WiFi4All 
               network.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.3

VALUE ubeeWifi4allSecurityMode OBJECT-TYPE (
  Syntax: [UNIVERSAL 2] INTEGER { none(1), wep64(2), wep128(3), wpaPersonal(4), wpa2Personal(5), wpawpa2Personal(6), wpaEnterprise(7), wpa2Enterprise(8), wpawpa2Enterprise(9) }
  Access: read-only
  Status: current
  Description: Indicates the configured security mode.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.4

VALUE ubeeWifi4allMACAddress OBJECT-TYPE (
  Syntax: [UNIVERSAL 4] OCTET STRING (SIZE (6))
  Access: read-only
  Status: current
  Description: The MAC address of this WiFi4All network.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.5

VALUE ubeeWifi4allFrequencyBand OBJECT-TYPE (
  Syntax: [UNIVERSAL 2] INTEGER { n2dot4Ghz(1), n5Ghz(2) }
  Access: read-only
  Status: current
  Description: Indicates the frequency band at which the radio is operating.
               1=2.4G
               2=5G
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.6

VALUE ubeeWifi4allOperatingMode OBJECT-TYPE (
  Syntax: [UNIVERSAL 4] OCTET STRING (SIZE (0..64))
  Access: read-only
  Status: current
  Description: Comma-separated list of strings. List items indicate which IEEE 802.11
               standard this Radio instance is configured for.
               Each value indicates support for the indicated standard.
               Only values b, g, n are available for 2.4G. Only values of a, n are available for 5G.
               For example, a value of ('g,b') (or ('b,g') - order is not important) means that
               the 802.11g standard [802.11g-2003] is used with a backwards-compatible mode
               for 802.11b [802.11b-1999]. A value of ('g') means that only the 802.11g standard
               can be used.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.7

VALUE ubeeWifi4allChannelBandwidth OBJECT-TYPE (
  Syntax: [UNIVERSAL 2] INTEGER { n20MHz(1), n40MHz(2), auto(3) }
  Access: read-only
  Status: current
  Description: The channel bandwidth (applicable to 802.11n specifications only).
               1=20MHz
               2=40MHz
               3=auto (20MHz/40MHz co-existence)
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.8

VALUE ubeeWifi4allOperatingChannel OBJECT-TYPE (
  Syntax: [APPLICATION 2] INTEGER (0..4294967295)
  Access: read-only
  Status: current
  Description: The current running channel of the WiFi4All network.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.9

VALUE ubeeWifi4allNumOfConnectedDevices OBJECT-TYPE (
  Syntax: [APPLICATION 2] INTEGER (0..4294967295)
  Access: read-only
  Status: current
  Description: The number of devices connnected the WiFi4All network.
)
    ::= 1.3.6.1.4.1.4684.37.4.1.1.1.10
Reference :
1. mibble :: MIB Parser

2014年5月25日 星期日

[Gantt Chart] Use jQuery PHP Gantt Planner to plan your schedule


[Gantt Chart] Use jQuery PHP Gantt Planner to plan your schedule



1. Download jQuery-Php-Gantt.zip to your server.



2. Unzip jQuery-Php-Gantt.zip



3.  Login your web server

http://XXXXXX.biz/gantt/gantt.html



Have two account can login.



Account    : project1

Password : mypassword



Account    : project2

Password : mypassword2



Reference :