场景错误 1 errorC2039:“bind2nd”:不是“std”的成员错误 2 errorC2039:“mem_fun”:不是“std”的成员错误 6 errorC2039:“ptr_fun”:不是“std”的成员错误 16 errorC3861:“bind1st”:找不到标识符解决#include<functional>说明在VS2005下可以不包含该文件,但是在V..
分类:
其他好文 时间:
2017-08-04 16:11:49
阅读次数:
360
$.fn.setCursorPosition = function(position){ if(this.lengh == 0) return this; return $(this).setSelection(position, position);}$.fn.setSelection = fun ...
分类:
其他好文 时间:
2017-08-03 18:53:01
阅读次数:
117
Python语言特性 1 Python的函数参数传递 看两个例子: Python 1 2 3 4 5 a = 1 def fun(a): a = 2 fun(a) print a # 1 Python 1 2 3 4 5 a = [] def fun(a): a.append(1) fun(a) p ...
分类:
编程语言 时间:
2017-08-01 12:42:59
阅读次数:
315
import tensorflow as tf import numpy as np #添加一层inputs输入的数据,in_size为输入节点数,out_size为输出节点数,下一个为激励函数 def add_layer(inputs,in_size,out_size,activation_fun... ...
分类:
其他好文 时间:
2017-07-31 20:01:11
阅读次数:
152
以下代码有什么问题? A b.fun()会出错 B Test结构的定义中应该加上public修饰符,才能main函数值调用该类的方法 C Test(int) {}改成Test(int a) {} D 以上说法都错误 解答: b.fun(); //b不是Test的实例对象 类是结构体的扩展,在类中封装 ...
分类:
其他好文 时间:
2017-07-30 13:51:40
阅读次数:
131
1 定义一个字典看用户登录状态 2 auth_status={ 3 'user':None, 4 'status':False#状态是没有登录 5 } 6 def wrapper(fun): 7 def inner(*args,**kwargs): 8 if auth_status['status' ...
分类:
编程语言 时间:
2017-07-28 20:05:40
阅读次数:
179
转:http://www.cnblogs.com/dolphin0520/p/3811437.html 一.抽象类 在了解抽象类之前,先来了解一下抽象方法。抽象方法是一种特殊的方法:它只有声明,而没有具体的实现。抽象方法的声明格式为: 1 abstract void fun(); 1 abstrac ...
分类:
编程语言 时间:
2017-07-27 10:44:02
阅读次数:
177
1.定义一个函数fun(*args),该函数的效果如下:fun(222,111,‘xian‘,‘hahahha‘)--》‘xian‘fun(7,‘name‘,‘fensi‘)-->‘fensi‘fun(1,2,3,4)-->None做法如下:deffun(*args):a=args[2]iftype(a)==int:returnNoneelse:returnali=222,111,‘xian‘,‘hahahah‘lin=[1,2,3]zhang=[..
分类:
编程语言 时间:
2017-07-26 22:14:09
阅读次数:
165
import smtplibfrom email.mime.text import MIMETextfrom email.utils import formataddr def mail(): ret = 123 try: msg = MIMEText('the mail contents', 'p ...
分类:
其他好文 时间:
2017-07-24 16:19:17
阅读次数:
206
https://leetcode.com/problems/h-index/#/description Given an array of citations (each citation is a non-negative integer) of a researcher, write a fun ...
分类:
其他好文 时间:
2017-07-24 13:29:14
阅读次数:
163