Archive

‘Uncategorized’ 分类存档

Auto check share memory utilization for IOX by Python

Introduction

In some scenario, we need to monitor some data in router/switch by automation. This article will show example that how to check share memory utilization. And you can easy to change the script base on your requirement/scenario.

Prepare

Due to “telnetlib” couldn’t exactly check expect messages by read_until() function (that couldn’t control exactly time when the info return to buffer), so I change to “expect”. And follow Bo’s example Python Expect Demo, and there is a good documents for expect demo from IBM too: 探索 Pexpect,第 2 部分:Pexpect 的实例分析
完整阅读

INSTALL CISCO WAE 6.4.5

Introduction

After installed Centos 6.7 for CISCO WAE, I found python version is 2.6 that is much older, and I need ansible1.9, but Centos default upgrade to ansible2.2… in order to easy management ansible1.9 that is python package, I plan to install PIP. From official website, suggest not use 2.6 under pip, so I need to upgrade python to 2.7 too.

But I found WAE use 2.6 after I succeed upgrade python to 2.7…Summarized the totally steps that will help me review in future.

Upgrade Python

After checked from follow link, python 2.7.9 integrate pip, so install this version 🙂
https://pip.pypa.io/en/latest/installing/

1. Install some package that require by python

python have multi dependencie

[root@wae ~]# yum install gcc
[root@wae ~]# yum install openssl-devel

2. Install python 2.7.9

[root@wae ~]# wget http://python.org/ftp/python/2.7.9/Python-2.7.9.tgz
[root@wae ~]# mv Python-2.7.9.tgz /opt/
[root@wae ~]# cd /opt/
[root@wae opt]# tar -xvf Python-2.7.9.tgz 
[root@wae opt]# cd Python-2.7.9
[root@wae Python-2.7.9]# ./configure --prefix=/usr/local/python2.7
[root@wae Python-2.7.9]# make
[root@wae Python-2.7.9]# make install

完整阅读

Building Citra in MacOS

Platform: MacBook Pro
Version: 10.12.3
Cpu: Core i7 2.2
Xcode: 8.2.1

1. Based on github release, install all component by brew:

https://github.com/citra-emu/citra/wiki/Building-for-macOS

2.Have alarm after cmake:

MacOS:Documents frank$ cd citra/
MacOS:citra frank$
MacOS:citra frank$
MacOS:citra frank$ export Qt5_DIR=$(brew --prefix)/opt/qt5
MacOS:citra frank$ export MACOSX_DEPLOYMENT_TARGET=10.9
MacOS:citra frank$ mkdir build
MacOS:citra frank$ cd build
MacOS:build frank$ cmake .. -GXcode
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:36 (project):
No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:36 (project):
No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeOutput.log".
See also "/Users/frank/Documents/citra/build/CMakeFiles/CMakeError.log".

完整阅读

Java Learning – Basic 02

1. 构造函数:

特殊的方法,名字跟类名一直,无返回值,也没有void,如果没有构造函数,JVM在编译时会自动加一个隐含的构造函数,下面文章详细介绍了构造函数和this的用法:
http://blog.csdn.net/nypone/article/details/4693509

2. 对象传递和变量传递:

变量传递数值,但不改变原始数据;而对象传递的是引用,也就是地址,如果改变了,那么原始对象也会改变。这里扩展一下,如果If中==常用于基本数据类型的相等性,如果判断的是String对象呢?他判断的是两个对象的内存地址是否相同,如果想确内容是否相等,需要用equals方法

3. Java类的成员变量:

主要有两种,静态变量和实例变量。静态变量也是类变量,两种变量的界限也是一个在类,一个在实例。实例变量必须创建实例对象(new),才会分配空间;而只要加载类,就会给静态变量分配空间。

class Person
{
    int age ;
    String name; //实例变量,也叫对象变量
    static int totalFee; //静态变量,也叫类变量
    //类变量是所有对象共有,一个对象将它改变,其他对象得到的就是改变后的
    //而实例变量则属对象私有,某一个对象将其值改变,不影响其他对象
    public void showName()
    {
        System.out.print(this.name);
    }
    public static void showTotalFee()
    //类方法是属于与类相关的,公共的方法
    {
        System.out.print(totalFee);
    }
}

完整阅读

Java Learning – Enterprise Architect for UML

跟据上一篇转的文章《面向接口编程详解(二)——编程实例》,我们的程序中有几个类,虽然不多,但要review一遍,还是要一个类一个类的看,然后弄清楚之间的关系,这种方法很麻烦,特别是我这种对JAVA不是特别熟的人来说,还有什么好方法么?Ok,在上文中,原作者画了一张UML图,用来表示类与类之间的关系。不知道大家记不记得,这种图可以很快弄清之间的关系。那么是否有好用的UML生成工具呢?

今天我会介绍两个工具:

1. Eclipse插件 UML Green
2. Enterprise Architect –> 强烈推荐,也是我们今天的主角
完整阅读

blonde teen swallows load.xxx videos