开放服务网关倡议(OSGi)定义了开发和部署模块应用程序和库的体系结构。作为介绍OSGi的第一篇文章,本文旨在让你了解OSGi开发的一些概念,并向你展示了如何使用Eclipse的OSGi容器(Equinox)实现建立一个简单的Hello World应用。此外还简要介绍了使用OSGi构建面向服务的应用程序以及OSGi的servicefactory和servicetracker类。
OSGI(Open Services Gateway Initiative),也叫JAVA动态模块系统,定义了一套模块应用开发的...
分类:
其他好文 时间:
2014-06-05 12:33:11
阅读次数:
379
【开胃小菜】
当提到python中strip方法,想必凡接触过python的同行都知道它主要用来切除空格。有以下两种方法来实现。
方法一:用内置函数
#
if __name__ == '__main__':
str = ' Hello world '
print '[%s]' %str.strip()
#
方法二:调用string模块中方法
#
import s...
分类:
编程语言 时间:
2014-06-05 09:27:48
阅读次数:
330
----------------------------------------------------hello world-------------------------------------------
linux 创建如下文件 vim hello
#! /bin/bash //告诉Shell 使用哪个Shell 程序
#Display a line //#表示...
分类:
其他好文 时间:
2014-06-05 02:41:41
阅读次数:
393
下面开始用D3.js处理第一个简单问题,先看下面的代码:
HelloWorld
Hello World 1
Hello World 2
如果你学习过HTML,应该知道会在屏幕中输出两行文字,如下图:
如果想用...
分类:
Web程序 时间:
2014-06-04 21:50:32
阅读次数:
361
“helloworld”驱动实现过程(ARM板上)
1、 在/home/sxy/目录下新建hello_1文件夹,在此文件夹下编写hello.c和Makefile文件(假设已经编写好了),make生成模块文件;
PS:hello.ko就是用于需要使用的驱动模块。
hello.c代码:
Makefile代码:
注意Makefile文件中的黑色填充部分:
①选择交叉编译器...
分类:
其他好文 时间:
2014-06-03 04:45:00
阅读次数:
238
perl重点基础知识整理#若无特殊说明,以下都是基于ubuntu
13.04版本1:终端下运行perl脚本:step1:在桌面新建一个perl脚本,输入:#! /usr/bin/perlprint "hello
world!";step2:打开终端:hqh@ubuntu:~$ cd ~/...
分类:
其他好文 时间:
2014-05-31 04:29:18
阅读次数:
331
不能免俗,先打印个helloworld出来,c代码的函数hello.c#include int
helloworld(){ printf("hello world!"); return 0;}然后编译成动态链接库 gcc hello.c -fPIC
-shared -o libhello...
分类:
编程语言 时间:
2014-05-30 02:08:52
阅读次数:
467
一、if判断数字: $A=12 $B=15 if(("$A"<"$B"))
if(("$A"=="$B"))字符串: $A="HELLO" $B="WORLD" if [ "$A" = "FACT_LOGIN_USER" ] if [
"$A" = "$B" ]PS:字符串比较的时候...
分类:
其他好文 时间:
2014-05-28 09:32:44
阅读次数:
347
前提条件是已经安装了g++要是没有安装,就yum install
g++1,编写Hello.cpp1>vim2>#include int main(){ printf("Hello,the world!");
return 0;}3>:w hello.cpp2,退出vim !q3,编译#g++ .....
分类:
编程语言 时间:
2014-05-25 22:19:17
阅读次数:
468
package chapter1;public class Demo1 { public
static void main(String[] args) { System.out.println("Hello World!"); /*...
分类:
编程语言 时间:
2014-05-25 13:56:17
阅读次数:
229