`
文章列表
UCenter 分为 MySQL 和远程两种接口连接方式,MySQL 方式是直接连接数据库因此速度较快,但当 UCenter 的服务端和客户端不在同一主机中且没有远程 MySQL 帐号的情况下,则只能使用远程连接方式。使用 UCenter 接口函数前请根据应用程序的需求定义以下相关常量:(此部分的配置可参看config_ucenter.php文件) UC_CONNECT 连接 UCenter 的方式 mysql:MySQL 方式 空:远程方式 UC_DBHOST UCenter 数据库主机 UC_DBUSER UCen ...
Are you running Snow Leopard on Intel or AMD Computers by any of the desktop virtualization software VMware or VirtualBox? Then this post will be helpful to increase screen resolution size of Snow Leopard Virtual Machine to get full screen. Adjusting screen size including wide screen on VMwar ...

Nil

关于scala中的Nil:   关于函数当参数:
In Scala, every defined variable has to be initialized at the point of its definition. For instance, the statement var x: Int; is not regarded as a variable definition, because the initializer ismissing

scala中的case class

scala中的case class中的字段不需要显式声明即可直接使用。 在创建一个case class时也无需new关键字。

scala中将doule转换为int

 
(100.12).toInt (100.12).asInstanceOf[Int]
一般都是编码的问题了. PHP输出XML到页面的方式3种,记录一下: 1: <?php header("Content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; echo "<users>"; echo "<user>"; echo "<name>"; echo "小小菜鸟 ...
SocketServer.StreamRequestHandler中对客户端发过来的数据是用rfile属性来处理的,rfile是一个类file对象.有缓冲.可以按行分次读取;发往客户端的数据通过wfile属性来处理,wfile不缓冲数据,对客户端发送的数据需一次性写入. 如下代码: #! /usr/bin/env python #coding=utf-8 ''' 单线程服务器程序 ''' from SocketServer import TCPServer as TCP, StreamRequestHandler as SRH class MyTCPHandler(SRH): ...
input([prompt]) 等同于 eval(raw_input(prompt)). 警告:input的输入要求是一个有效的python表达式. 文档原文: This function is not safe from user errors! It expects a valid Python expression as input; if the input is not syntactically valid, a SyntaxError will be raised. Other exceptions may be raised if there is an error dur ...

wxwidget程序注释

#include "wx/wx.h" /*声明app*/ class MyApp: public wxApp { virtual bool OnInit(); }; /*声明frame*/ class MyFrame: public wxFrame { public: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); void OnQuit(wxCommandEvent& event); ...
This mini tutorial aims to help people make quick judgements concerning syntax and basic principles. The complete Hello World program is here You have to include wxWidgets's header files, of course. This can be done on a file by file basis (such as #include "wx/window.h") or using one glob ...
trait Queue[+T] { ... } Prefixing a formal type parameter with a + indicates that subtyping is covariant (flexible) in that parameter. By adding this single character, you are telling Scala that you want Queue[String], for example, to be considered a subtype of Queue[AnyRef]. The compiler will check th ...

scala中的for表达式

通常,scala中for表达式有如下形式: for ( seq ) yield expr seq是一个生成器,变量定义,过虑器的序列,序列元素用分号分隔,下面是一个for表达式的例子: for (p <- persons; n = p.name; if (n startsWith "To")) yield n 也可以使用大括号来代替圆括号,那么分号就变成了可选项: for { p <- persons // a generator n = p.name // a definition if (n startsWith "To&qu ...
   GridView: A view that shows items in two-dimensional scrolling grid. The items in the grid come from the ListAdapter associated with this view. 简单说,GridView就是我们资源管理器平常见到的一个个文件的icon显示方式。     上面提及到了,GridView的Item是来 ...
1. 安装Maven,配置好环境变量。 2. 使用Maven生成一个Lift项目,如以下命令可生成一个使用Scala 2.8.1、Lift 2.3的HelloWorld项目: mvn archetype:generate ^ -DarchetypeGroupId=net.liftweb ^ -DarchetypeArtifactId=lift-archetype-basic_2.8.1 ^ -DarchetypeVersion=2.3 ^ ...
Global site tag (gtag.js) - Google Analytics