CSDN向来是以娱乐精神出名的。有网友曾笑谈:“当我无聊,当我猥琐的时候,上CSDN,总是能找到组织。”这话基本没错。
曾经数次导演编程语言PK的CSDN,今天又发表了篇很娱乐很有导火索的文章
作者很娱乐地写了堆代码来验证Java不比C语言快,留言的高手们也很娱乐地来继续声讨。
孰是孰非我也不关心,Java和C的快慢以前也层写过一些所谓的计算程序比较过,JVM的Hostspot机制,在这种小打小闹的“测试”下确实威力巨大。有时还真的会比完成相同计算任务的C程序快。但是不要忘了真刀真枪的环境,大型应用光一个GC就足可让Java落后C写的本地代码一大截!
无聊无聊
posted @
2007-06-06 22:39 murainwood 阅读(258) |
评论 (0) |
编辑 收藏
高级接口封装变成了底层接口,需求几天之内就能完全变个样,真是奇迹!
剩下一个月不到了,咬咬牙,边干活边写论文吧。
Dido这几天也很累,每天短信哄她睡觉,很让人心疼的女孩儿。
posted @
2007-06-06 20:08 murainwood 阅读(206) |
评论 (0) |
编辑 收藏
口袋里仅剩下20块零五毛的时候,突然发现了钱的重要。
于是给人做了两个小程序,前后总共大概花了三天,拿了1000块到手。学院还欠自己600块的项目补助。不知道何时才能到账上。一向不愿意计算口袋里的钱,这回终于窘迫起来。
赚了点小米,毕业还有一个月不到,先撑过去。晚上和人吃饭,笑谈一个局域网流量计费的活儿。开玩笑说一周时间,优惠价2000。怕要真有活儿,一周时间搞不定吧。说大话容易,做起来是另外回事。Dido说我有时喜欢说大话,我承认。
论文写了七千字,继续努力。
上海,我来了。虽然第一份工作并没有想象中的好,但是,会硬着头皮撑下去。生活给的是挑战,喜欢挑战。
posted @
2007-06-05 01:25 murainwood 阅读(217) |
评论 (0) |
编辑 收藏
631所的项目已经开始了两个月了.现在还是在做运行代理这一模块.我算是搞核心编码吧.被JNI,Socket,Thread,RMI整得晕乎着呢.
没有考试压力,没有就业压力.一切都平静得很.每天睡六小时.两杯咖啡(早晨中午各一杯).三天一包烟.中午是两节玉米外加一大片菠萝.两天BT一部电影.
一天上班7个半小时,晚上看书3小时.喜欢现在的宁静.宁静得如水一样.
posted @
2007-01-13 12:58 murainwood 阅读(223) |
评论 (0) |
编辑 收藏
三方协议寄出去了,没正式回到手里,学院没盖章之前,还是有些小小的不放心.^_^,毕竟回上海的机会太难得了.
上海不是我家,可对我而言,对于一个远在西北求学的人而言,至少是家门口了那天打电话告诉妈妈,听得出来,她非常高兴.
现在才发现自己没有想象中那么豁达,以为很多事情能放得开.以为天下之大,到处可以容身.是的,天下是很大,可是我能容身的地方却不是如此.总有张网,心里一张网把我网住. 记得有人说过,牢笼是自己造的. 很有道理,但是我却愿意囚禁在这笼子里.
一片没边际的天,有几个人真正敢去接受?
打定主意回去,未来怎么样,我没法去想. 最起码,回去,能给未来一个模糊可能性,我的要求不高.知足了.
看着办吧,一切都如田野里的百合,自然就会开的.
我所要做的,只是去呼吸,去汲取,去晒太阳!
posted @
2006-11-19 06:09 murainwood|
编辑 收藏
今天开始复习专业课,无聊的宣讲会或招聘会一律不参加!
posted @
2006-10-21 06:19 murainwood 阅读(249) |
评论 (0) |
编辑 收藏
编程求解: 运动员打靶,10发子弹命中90环(每分成绩为0到10环不等)
求可能情况的总数
解法一:
#include <stdio.h>
#include <stdlib.h>
int f(int n, int m)
{
int fn=0,i;
if(m<0||m>10*n) return 0;
if(n==1) return 1;
for(i=0;i<=10;i++)
fn+=f(n-1,m-i);
return fn;
}
int main()
{
int n,m;
printf("Please enter n and m:");
scanf("%d%d",&n,&m);
printf("\n%d发打中%d环有%d种可能.\n",n,m,f(n,m));
system("PAUSE");
return 0;
}
解法二:
#include"stdio.h"
int main(){
int num =1,i;
for(i=1;i<=10;i++)
num = num *(9+i)/i;
printf("%d",num);
}
个人观点:
计算机是一门和数学相关的学科,随着这门学科的发展,这种"本质"似乎被弱化了.解法1是很普通的方法,一般人都是这种思路.而解法二则是从数学角度考虑.简洁,快速.
上次去神码笔试,碰到一题
:给定一个数,如7899,把各位数值相加7+8+9+9=33,3+3=6,用这种方法计算机下去,求最后得到的个位数
我给出的解法:
#include "stdio.h"
int main(){
int i;
scanf("%d",&i);
printf("%d",i%9==0?9:i%9);
return 0
}//~end
posted @
2006-10-15 18:15 murainwood 阅读(302) |
评论 (1) |
编辑 收藏
有6个英文字母,a,b,c ,d,e,f
从中任意取N个(N<=6)来排列.
已知 a 只能与 b 相连,
b不能和e,f相连
c不能和a相连
d不能和 a ,e相连
f 不能和 a,b相连
请打印出字母f或b 在末尾的组合顺序,用Java实现
我的解答:
import java.util.*;
/**
*
* @author ShenXiaoliang
*
*/
public class DemoGraph {
final static int VERTICE=6;
private ArrayList<String> patheSet=new ArrayList<String>();
private String[] ver={"a","b","c","d","e","f"};
private int[][] graph=new int[6][6];
private String path="";
private boolean[] isVisit=new boolean[VERTICE];
public DemoGraph() {
initiGraph();
for(int index=0;index<VERTICE;index++)
depthSearch(index);
show();
}
private void initiGraph(){
graph[0][1]=1;
graph[1][0]=1;
graph[1][2]=1;
graph[1][3]=1;
graph[2][1]=1;
graph[2][3]=1;
graph[2][4]=1;
graph[2][5]=1;
graph[3][1]=1;
graph[3][2]=1;
graph[3][5]=1;
graph[4][2]=1;
graph[4][5]=1;
graph[5][2]=1;
graph[5][3]=1;
graph[5][4]=1;
}
private void depthSearch(int start){
isVisit[start]=true;
path+=ver[start];
if(path.charAt(path.length()-1)=='f'||path.charAt(path.length()-1)=='b') patheSet.add(path);
for(int index=0;index<VERTICE;index++)
if(graph[start][index]==1&&isVisit[index]==false)
depthSearch(index);
else continue;
path=path.substring(0,path.length()-1);
isVisit[start]=false;
}
private void show(){
for(String pa:patheSet)
System.out.println(pa);
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new DemoGraph();
}
}
posted @
2006-10-12 00:43 murainwood 阅读(209) |
评论 (0) |
编辑 收藏
i bought a durain in the supermarket,smelling terrible.
i thought about durain for time,not because i miss the test of it .just for curiosity。so ugly ,so smelly and so expensive.why so many persons love this strange fruit? is it really do delicious ?
today, i bought one.hehe.
well,i've no idea to deal the prickly,hard "stone".so it is reasonable to ask the worker of the supermark to get it . The flesh of durain is milk white with a little yellow,just like the ice cream for its softness. the feeling is good.
i put a piece of the "cream" into my mouth,so carefully and nervous . wow ,the smell is still terrible,but the taste is unexpected delicious. soft,sweet,smooth.
really good!
posted @
2006-10-04 01:39 murainwood|
编辑 收藏
Ubuntu is really a charming distribution of GUN/Linux . I've noticed it two months ago. The live CD instaills very easily and the "face" is beautiful . it is interesting that the X of Linux abroad is mostly Gnome while the domestic is KDE .well ,KDE looks more flamboyance for its class-style look . Gnome is simplicity comparatively. Why ? May be the people who use Linux aborad miss their Unix ,Hehe . Unix looks simplicity as well .
Kubuntu is based on KDE ,it is the extending project of the Ubuntu ,seems less important than Dubuntu . But frankly speaking ,Kubuntu looks more lovely
posted @
2006-10-02 03:22 murainwood|
编辑 收藏
i feel a lot about the importance of English these days.The foreign corporations and the top domestic companies ask for excellent skill of English. i am so soory now and i should learn my English well .
last weekend , we talked ablout if time back up for four years ,what we would do in the future 4 years .it is the very topic .some guy said he would find a girl firend ,while the other said he would not touch the on-line game . for me ,i said i would keep away from the C++ and devote myself to learing English .and i said i had wasted a lot time on some courses .
most of us will regret something in the past four years . we can not catch the gone time .but i can try my best to make good use time nowaday .
posted @
2006-10-01 00:12 murainwood|
编辑 收藏
华为笔试题:计算字符串“010111001100....”中‘0’和‘1’连续出现的次数。
#include<iostream>;
void main() {
char *charArray="01000111100011100111100001";
int max[2] ={0,0};
int count[2] ={0,0};
while(*charArray){
int index =*charArray-'0';
count[index]++;
count[index^1] =0;
if(count[index]>max[index])
max[index]=count[index];
charArray++;
}
std:cout<<"Max times of 0 is"<<max[0]<<std:endl;
std:cout<<"Max times of 1 is"<<max[1]<<std:endl;
}
//~:end the codes
程序代码的艺术化,呵呵
posted @
2006-09-26 03:57 murainwood 阅读(352) |
评论 (0) |
编辑 收藏