看别人代码看到void on_MyWidget_slotTest();就郁闷了,没看到他代码里有connect 却能把信号和槽可以连接起来。今日回顾书本发现该函所的nb之处。QMetaObject::connectSlotsByName(QObject * object)将递归的搜寻传入的Qt对象o...
分类:
Web程序 时间:
2015-08-03 20:38:41
阅读次数:
128
仍然有一些小bug,后续会发布OC完善版的图书馆管理系统,欢迎批评指正。 1 #include 2 void menu_choose(); 3 typedef struct 4 { 5 int Id; 6 int age; 7 char name[50]; ...
分类:
编程语言 时间:
2015-08-03 20:34:33
阅读次数:
119
login public?class?login?extends?Activity?{
????ImageView?iv3;
????@Override
????protected?void?onCreate(Bundle?savedInstanceState)?{
????????super.onCreate(savedInsta...
分类:
移动开发 时间:
2015-08-03 19:30:20
阅读次数:
109
1 Volley发送get请求: [java]?view plaincopy public?void?getJson()?{?? ????String?url?=?"http://"+host+":8080/web/json.jsp?username=xjs&password=123456";?? ????mQueue.add(new?Jso...
分类:
移动开发 时间:
2015-08-03 19:30:20
阅读次数:
266
1、一般情况,使用 self performSelector:SEL withObject:id方法
[self performSelectorOnMainThread:@selector(testAA:) withObject:[NSArray arrayWithObjects:@"1",@"2", nil] waitUntilDone:NO];
-(void) testAA:(NSArr...
分类:
移动开发 时间:
2015-08-03 19:24:19
阅读次数:
150
dfs的问题
需要注意的是在dfs的时候某个位置可以不放旗子
直接进行下一步dfs
#include
#include
#include
int x[10];
int tot,n,lol,sum;
char m[10][10];
void dfs(int row,int lol)
{
int i;
if(lol==tot)
...
分类:
其他好文 时间:
2015-08-03 19:20:40
阅读次数:
132
参考代码
#include
#include
using namespace std;
class father {
int id;
protected:
int tt;
public:
father():id(3){}
void print() {printf("this is father public function %d\n",id);}
void changeId() ...
分类:
编程语言 时间:
2015-08-03 19:19:39
阅读次数:
147
看到Logger可以打印json,当时就想能不能打印集合呢,现在通过学习了一些反射的东西,写了出来,仅供参考。
Log日志打印集合类型public static void list(List list) { if (IS_DDEBUG) { if (list == null || list.size() == 0) {...
分类:
其他好文 时间:
2015-08-03 19:18:33
阅读次数:
534
两个函数:malloc和free
需要头文件:stdlib.h
void *malloc(size_t size);
void free(void *ptr);
需要说明的是:
申请:
1)。参数是申请内存的字节数。
2)。申请的是一块连续的内存。
3)。返回值是void *类型,因此,要将他的返回值付给一个指针的时候,一定要类型转换。
释放:
1)。参数是...
分类:
其他好文 时间:
2015-08-03 19:14:11
阅读次数:
98
Block 传值
.h
typedef void(^CountBlock)(NSIntegerfigure);
-(void)CountWithFigureBlock:(CountBlock)figureBlock;
.m
CountBlock cBlock;
#pragma mark - 块传值调用的方法...
分类:
其他好文 时间:
2015-08-03 19:11:06
阅读次数:
100