python解释器将__init__函数里的__z变量转成 _classname__z了,明白规则后外部依然可以通过实力对象来访问。
In [1]: class aa:
...: def __init__(self):
...: self.x = 10
...: self.y = 11
...: self.__z =...
分类:
编程语言 时间:
2014-06-05 10:25:10
阅读次数:
346
数据库中导出某一个表中需要的字段到文件中是公司中经常要做到的事,那怎么实现呢?
比如你要查询enterpriseaics中的所有字段的值到d盘的aa.txt中去,注:aa.txt不能存在,否则会报错。
select * from enterpriseaics into outfile 'd:\\aa.txt' ;
当然如果你想规范一下格式,例如:每个字段的值之间以逗号分开,每一行换行,每个字...
分类:
数据库 时间:
2014-06-05 06:53:15
阅读次数:
274
索引不含查询列可以考虑联合索引如果我们想读取索引列和非索引列的值,但是不想发生索引回表读,怎么办如我们想查询id列和name列的值create index aa
on t(id,name)性能比回表高效但是联合索引的索引列最多不能超过3列,如果索引列太多,那么索引块势必会多,就会遍历更多的所以块
分类:
其他好文 时间:
2014-06-03 09:20:14
阅读次数:
241
/*Linq JS*/ //range var aa = Enumerable.range(1,
10).toArray(); var kk = Enumerable.range(1, 10, 3).toArray(); //select kk =
Enumerabl...
分类:
Web程序 时间:
2014-06-03 08:13:47
阅读次数:
255
boolhandle(constosgGA::GUIEventAdapter& ea,
osgGA::GUIActionAdapter& aa){osgViewer::Viewer* viewer
=dynamic_cast(&aa);}bool ControlMan::handle(const o...
分类:
其他好文 时间:
2014-05-28 21:26:06
阅读次数:
670
function aa() { var defer = $.Deferred(); $.ajax({
url: "/Handler1.ashx", type: "post", ...
分类:
Web程序 时间:
2014-05-26 23:49:24
阅读次数:
431
代码1[cpp]view
plaincopy#include#includeclassA{public:A(){printf("A()/n");}~A(){printf("~A()/n");}A(constA&other){printf("other/n");}};intmain(){Aa;Ab(....
分类:
其他好文 时间:
2014-05-26 22:18:50
阅读次数:
382
1. 变量赋值时 = 两边不能有空格.2. if比较时 = 两遍有空格.3. [ 的左右两边 和 ]
的左边有空格, 1 #!/bin/sh 2 # 字符串比较 3 aa= 4 bb="hello" 5 cc="world" 6 7 #
1.注意判断中的字符串变量用双引号括起来(不括起来在某些情况....
分类:
其他好文 时间:
2014-05-25 22:01:11
阅读次数:
298
=====================================声明对象的两种方式第一种:varobj=newObject();第二种:varobj={}=====================================对象中的方法属性第一种:varobj=newObject();obj.aa=function(){alert("我是方法")};obj.bb="我是属性";第二种:varobj={aa:func..
分类:
Web程序 时间:
2014-05-25 05:49:52
阅读次数:
258
public class ArrayUtils{
/**
* 返回数组最大值
*
* @param a
* @return
*/
public static int max(int[] a){
// 返回数组最大值
int x;
int aa[]=new int[a.leng...
分类:
编程语言 时间:
2014-05-21 13:31:26
阅读次数:
373