快乐着飞舞着

---Nothing to do is doing nothing
随笔 - 87, 文章 - 5, 评论 - 40, 引用 - 0
数据加载中……

2007年11月30日

Framework VS Library

A library is about reusable functionalities, but a framework is about reusable behaviors.
A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code.
A library is a collection of components and classes, where framwork is how abstract classes and components interact with each others.

I can explain the framework by this definition:
Framework is an abstract design that embodies how the application works, and it has "hooks" where you can "inject" your module, or component.

http://techembassy.blogspot.com/2006/05/library-vs-framework.html

posted @ 2007-11-30 14:08 快乐着飞舞着 阅读(78) | 评论 (0)编辑 收藏

2007年10月22日

笔试整理

power of 2
sizeof(void*)

Array List 。
calloc malloc
heap sort
在n个数中 第m大的
广度优先遍历
兄弟节点。

求两个数组 的交集 。
n的排列问题 。

字符串 逆序

posted @ 2007-10-22 15:06 快乐着飞舞着 阅读(99) | 评论 (0)编辑 收藏

2007年8月29日

转载 Virtual PC 2007虚拟机中安装ubuntu的问题

本人在Virtual PC 2007虚拟机中安装ubuntu是,出现屏幕拉长的现象,去图像模糊不清,不能继续安装,经过调查发现,原来在显示配置文件中有一处对虚拟机不太合适。经过调整,问题得以解决。如下所示。
1.在开始安装画面,用F4键调整分辨率为800*600*16。
2.在出现安装画面拉长时,按下ctrl+alt+f1,进入文本模式,输入:LANG=C sudo vi /etc/X11/xorg.conf ,编辑DefaultDepth 24为DefaultDepth 16。
3.保存后退出,按下ctrl+alt+f7回到图像安装模式,按下ctrl+alt+backspace重起图像安装窗体。就可以进入正常图像安装模式。以后按照自己的要求安装就可以了。 Very Happy Very Happy
有不明白或其他问题,欢迎大家探讨。
Laughing

原文地址 http://forum.ubuntu.org.cn/post-403315.html

posted @ 2007-08-29 14:54 快乐着飞舞着 阅读(578) | 评论 (0)编辑 收藏

2007年7月1日

C# 调用 java webservice 的问题

Technorati 标记: , , ,

前一段时间一直被一个 c#调用 Java web service的问题困扰。

http://www.cnitblog.com/reene/archive/2007/06/29/29217.html

在网上一直找不到答案,后来在国外的一个论坛上有人提醒可能是命名空间的原因,摸索以后终于顺利解决这个问题。特别把它记下以后方便。

问题:

如果用c#调用java 的 webservice 时,发现调用返回值为基本类型(如 xsd:string xsd:int)的服务能过正常返回,而调用返回复杂类型如自定义对象时却返回 null,同时抓包发现服务器段明明已经正常答复soap消息。 就需要考虑命名空间的问题。

在我碰到的问题中,由于我把用来返回结果的bean 单独放到一个 xxx.xxx.bean 包中,而把webservice 的文件放在 xxx.xxx.service包中,在用wtp生成 webservice 服务时就把它们放到不同的命名空间中去了。

解决方案:

把用来的bean文件放置到与service同一个package中,这样用wtp lomboz之类工具生成时就直接会在一个命名空间中。

posted @ 2007-07-01 15:19 快乐着飞舞着 阅读(872) | 评论 (3)编辑 收藏

2007年6月29日

test

test

posted @ 2007-06-29 17:09 快乐着飞舞着 阅读(115) | 评论 (0)编辑 收藏

java 和 c# 的webservice 互操作的问题

     摘要: 使用java 写了一个web service ,在c#中调用。如果返回 string int 这种基本类型没有任何问题,但是如果如下的一个bean public class UserBean {    int userid;    String username;&n...  阅读全文

posted @ 2007-06-29 14:54 快乐着飞舞着 阅读(777) | 评论 (0)编辑 收藏

2007年6月1日

mysql 在 jboss 4.+ 上的数据源配置

只需要 把\docs\examples\jca\mysql-ds.xml 修改后拷贝到 \server\default\deploy 下即可

posted @ 2007-06-01 16:28 快乐着飞舞着 阅读(161) | 评论 (0)编辑 收藏

2007年5月18日

[转载]Java平台版本号的演变

http://tb.blog.csdn.net/TrackBack.aspx?PostId=1608308
http://blog.csdn.net/danny_xcz/archive/2007/05/14/1608308.aspx

Java Platform
    Java Java 2
Standard Edition (Java SE) developer version 1.1 1.2 1.3 1.4 1.5 1.6 1.7
product version 1.1 1.2 1.3 1.4 5.0 6.0 7.0
Platform name Java Platform 1.1  Java 2 Platform Standard Edition 1.2(J2SE 1.2) Java 2 Platform Standard Edition 1.3(J2SE 1.3) Java 2 Platform Standard Edition 1.4(J2SE 1.4) Java 2 Platform Standard Edition 5.0(J2SE 5.0) Java Platform Standard Edition 6(Java SE 6) Java Platform Standard Edition 7(Java SE 7)
Software Development Kit(SDK)  Java Development Kit 1.1(JDK 1.1) Java 2 SDK Standard Edition/J2SE SDK 1.2(J2SDK 1.2) Java 2 SDK Standard Edition/J2SE SDK 1.3(J2SDK 1.3) Java 2 SDK Standard Edition/J2SE SDK 1.4 (J2SDK 1.4) J2SE Development Kit 5.0(JDK 5.0) Java SE Development Kit 6(JDK 6) Java SE Development Kit 6(JDK 7)
Java Runtime Environment(JRE) Java Runtime Environment 1.1 (JRE 1.1) J2SE Java Runtime Environment 1.2 (J2RE 1.2) J2SE Java Runtime Environment 1.3 (J2RE 1.3) J2SE Java Runtime Environment  1.4 (J2RE 1.4) J2SE Runtime Environment 5.0 (JRE 5.0) Java Runtime Environment 6(JRE 6) Java Runtime Environment 7(JRE 7)
Enterprise Edition (Java EE) Platform name   Java 2 Platform Enterprise Edition 1.2 (J2EE 1.2)  Java 2 Platform Enterprise Edition 1.3 (J2EE 1.3)  Java 2 Platform Enterprise Edition 1.4 (J2EE 1.4)  Java Platform Enterprise Edition 5 (Java EE 5)  Java Platform Enterprise Edition 6 (Java EE 6)  Java Platform Enterprise Edition 7 (Java EE 7) 
Software Development Kit(SDK)    Java 2 SDK Enterprise Edition 1.2 (J2EE SDK 1.2) Java 2 SDK Enterprise Edition 1.3 (J2EE SDK 1.3) Java 2 SDK Enterprise Edition 1.4 (J2EE SDK 1.4) Java SDK Enterprise Edition 5(Java EE SDK 5) Java SDK Enterprise Edition 6(Java EE SDK 6) Java SDK Enterprise Edition 7(Java EE SDK 7)
Micro Edition (Java ME) Platform name   Java 2 Platform Micro Edition (J2ME) Java Platform Micro Edition (Java ME)
 

posted @ 2007-05-18 10:01 快乐着飞舞着 阅读(253) | 评论 (0)编辑 收藏

2006年11月10日

"Hello World"

1)High School Student
10  PRINT "HELLO WORLD"
20  END

---------------------------------------------------------------------------
2)College Student
program Hell(input, output)
begin
  writeln("Hello World")
end.

---------------------------------------------------------------------------
3)New Professional
#include ...

void main(void)
{
  char *message[] = {"Hello", "World"};
  int i;
  for(i = 0; i < 2; ++i)
    printf("%s", message[i]);
  printf("\n");
}

---------------------------------------------------------------------------
4)Seasoned Professional
#include ...

class string{
private:
  int size;
  char *ptr;

public:
  string() : size(0), ptr(new char('\0')) {}
  string(const string &s) : size(s.size){
    ptr = new char[size + 1];
    strcpy(ptr, s.ptr);
  }
  ~string() {delete []ptr;}
  friend ostream& operator <<(ostream &, const string &);
  string &operator =(const char *);
};

ostream& string::operator <<(ostream &os, const string&s){
  return (os << s.ptr);
}

string& string::operator =(const char *chrs){
  if(this != &chrs){
    delete []ptr;
    size = strlen(chrs);
    ptr = new char[size + 1];
    strcpy(ptr, chrs);
  }
  return (*this);
}

int main(){
  string str;
  str = "Hello World";
  cout << str << endl;
  return 0;
}

---------------------------------------------------------------------------
5)New Manager
10 PRINT "HELLO WORLD"
20 END

---------------------------------------------------------------------------
6)Middle Manager
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D

---------------------------------------------------------------------------
7)Senior Manager
% zmail jim
I need a "Hello, world." program by this afternoon.

---------------------------------------------------------------------------
8)Chief Manager
% letter
letter: Command not found.
% mail
To:^X^F^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized.
% logout


posted @ 2006-11-10 22:11 快乐着飞舞着 阅读(215) | 评论 (0)编辑 收藏

2006年10月11日

Linux 下java 乱码的 解决 [转载 ]

假设用的字体是 /usr/share/fonts/truetype/fireflysung.ttf

cd /path/to/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo ln -s /usr/share/fonts/truetype/fireflysung.ttf .
sudo mkfontdir
sudo mkfontscale

这是最简单的方法,其他方法也有,不过都很麻烦。


http://www.vikee.net/article.asp?id=74

http://www.vikee.net/trackback.asp?tbID=74

原文是

Ubuntu Linux下Java中文乱码解决办法!

经我测试 在 fc5下也是有用的 ,
估计其他linux的 发行版本也是有效的。



posted @ 2006-10-11 10:42 快乐着飞舞着 阅读(941) | 评论 (0)编辑 收藏

Clicky