现在位置: 首页 > BrookeLangridge发表的所有文章
  • 05月
  • 24日
综合 ⁄ 共 556字 评论关闭
(1)scala中;是不是必须的? (2)在scala中  _ 为spacehandler (3) 在主构造函数中的变量,如果没有使用var或者val,则默认为private[this]级别的 (4)附属构造方法(一张图说明问题): (5)无参数的方法可以这样定义: (6)scala中的apply方法和单例对象: (7)怎么触发apply()方法(一般用来实例化对象):(1)val  a= ObjectName()    而apply方法一般是返回class对象的实例                                                                 (2)var  a= new Class     print(a()) 这样会触发class中的apply() 方法   (8) 返回方......
阅读全文
  • 09月
  • 28日
综合 ⁄ 共 67字 评论关闭
原文地址:http://blog.csdn.net/qpyong/article/details/2933896 自己感觉是很不错的分页
阅读全文
  • 08月
  • 04日
综合 ⁄ 共 1787字 评论关闭
CDC::DrawText 这个函数是在某个位置按某个格式输出一个文本。它有两个格式:如下 virtual int DrawText(LPCTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat);int DrawText(const CString& str, LPRECT lpRect, UNIT nFormat); 返回值:如果成功,则返回文本高度。 参数: lpszString 指向要绘制的文本的指针。如果nCount是-1,该字符串必须是空终止的。 nCount 字符串中字符数目。如果为-1,lpszString被认为是一个指向空终止的字符串的长指针。DrawText自动计算字符数目。 lpRect 指向RECT结构或CRe......
阅读全文
  • 05月
  • 21日
综合 ⁄ 共 34字 评论关闭
myeclipse10+axis2开发webservice 分享到:1
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 672字 评论关闭
有时写的程序因为资源等等原因,应该只启动一份。利用指定的文件锁,可以实现这样的功能。 import osimport fcntlimport errnodef lock_file(filename): fd = os.open(filename, os.O_CREAT | os.O_WRONLY, 0666) try: fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) return True except IOError, e: if e.errno in (errno.EACCES, errno.EAGAIN): return Falseif not lock_file('/tmp/test.lock'): print "another instance is running"lock_file('/tmp/test.lock') 再附上一份per......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1912字 评论关闭
Pierre is recently obsessed with an online game. To encourage users to log in, this game will give users a continuous login reward. The mechanism of continuous login reward is as follows: If you have not logged in on a certain day, the reward of that day is 0, otherwise the reward is the previous day's plus 1. On the other hand, Pierre is very fond of the number N. He wants to get exactly N points reward with the least possible interruption of continuous login. Input There are multiple......
阅读全文
  • 02月
  • 12日
综合 ⁄ 共 12613字 评论关闭
Matlab有着编程方便,工具丰富等优点,但同时也有着实时性比较差,通过与其他语言结合使用便可以达到很好的效果。 Matlab, C/C++,OpenCV之间的混合编程。 配置环境: 1)本程序只需要建立win32控制台空项目 2)调用的是Matlab计算引擎,故需要有Matlab环境 3)VS2008中需要在“包含文件”中加入D:\ProgramFiles\MATLAB\R2009b\extern\include(以后本人的Matlab与C混合编程例子中将不再给出此注意点) 4)VS2008中需要在“库文件”中加入D:\ProgramFiles\MATLAB\R2009b\extern\lib\win32\microsoft(以后本人的Matlab与C混合编程例子中将不再......
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 793字 评论关闭
String nowPath = @"taxi.db";         void SelectStu()         {             using (SQLiteConnection cn = new SQLiteConnection(@"data source=" + nowPath + ";pooling=true;failifmissing=false"))             {                 cn.Open();                 using (SQLiteCommand cmd = new SQLiteCommand())                 {                     cmd.Connection = cn;                     cmd.CommandText = "select  from Student";                     using (SQLiteDataReader dr = cmd.ExecuteReader())    ......
阅读全文
  • 01月
  • 19日
综合 ⁄ 共 3053字 评论关闭
二叉搜索树,详情见算法导论,直接代码。 /* 二叉查找树,实现了以下操作:插入结点、构造二叉树、删除结点、 查找、查找最大值、查找最小值、查找指定结点的前驱和后继。 所有操作时间复杂度 均为o(h),其中h是树的高度 改变二叉树 ,用二级指针 */ #include<iostream> #include<stdio.h> #include<stdlib.h> using namespace std; struct node { int key; //关键字 struct node *left; //左孩子指针 struct node *right; //右孩子指针 struct node *p; //指......
阅读全文
  • 01月
  • 15日
综合 ⁄ 共 2144字 评论关闭
病毒侵袭持续中 小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有准备的战争。知己知彼,百战不殆,小t首先要做的是知道这个病毒网站特征:包含多少不同的病毒,每种病毒出现了多少次。大家能再帮帮他吗?   Input 第一行,一个整数N(1<=N<=1000),表示病毒特征码的个数。......
阅读全文
  • 11月
  • 26日
综合 ⁄ 共 2764字 评论关闭
例子如下: 假设有张学生成绩表(tb)如下:姓名           课程            分数 ---------------------------------------张三           语文            74张三           数学            83张三           物理            93李四           语文            74李四           数学            84李四           物理            94 --------------------------------------想变成(得到如下结果):姓名       语文       数学      物理--------------------------------------------李四         74          84         94张......
阅读全文
  • 11月
  • 14日
综合 ⁄ 共 10字 评论关闭
参考“:点击打开链接
阅读全文