自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 资源 (6)
  • 收藏
  • 关注

原创 python遍历字典所有的字段

def visit_dict(dt): if isinstance(dt, dict): for k in dt.keys(): if isinstance(dt[k], dict) or isinstance(dt[k], list): visit_dict(dt[k]) else:

2016-05-09 17:31:00 611

原创 二叉树C++实现

//============================================================================// Name : TreeNodeCPP.cpp// Author : zhouqinmin// Version :// Copyright : baidu// Description : Hel

2015-05-15 15:11:04 343

原创 二叉树的遍历java实现

package com.main;public interface ICollectionInterface { final int INITIAL_SIZE = 32; public boolean isEmpty(); public boolean add(T node); public T pop();}package com.main;imp

2015-05-14 16:34:06 341

原创 python基础

1.打印hello world#coding:gbkdef main(): print("hello world")if __name__ == '__main__': main()2.计算从1到100的和#coding:gbkdef calc(n): total = 0 for i in range(n): total += i return tota

2015-04-22 16:54:17 615

原创 libevent使用ndk-r8d编译

使用的是android-ndk-r8d库,使用的libevent版本号为libevent-2.0.21-stable稳定版然后是调整宏参数在event2/event-config.h中添加如下宏定义#define _EVENT_HAVE_SA_FAMILY_T 1#define _EVENT_HAVE_SYS_SOCKET_H 1#define _EVENT_HAVE_NETINE

2014-01-15 20:43:49 3588 5

转载 Android模拟器上使用NIO编写客户端中,使用select超时,立马返回0的问题

http://stackoverflow.com/questions/7450758/selector-on-android-sockets-behaves-strangely主要原因是android模拟器不支持ipv6

2013-12-19 12:04:24 595

原创 用python写的一个mp3的tag解析

最近在研究mp3的tag解析,由于涉及到编码的问题,我使用了python作为开发语言,解析了id3v2和id3v1格式的Mp3,计算时长对于定码率的mp3管用

2013-08-16 19:13:29 2056

原创 反转链表(递归和非递归实现)

// ReverseLink.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include struct Node { int data; Node* next;};void CreateLink(Node* &head,int data);

2012-09-19 10:21:56 364

原创 螺旋打印(由内向外旋)

// SpinPrint.cpp : Defines the entry point for the console application.////螺旋打印#include "stdafx.h"#include #include #include int** getCreateMatrix(int nVectors);void SpinnerPrint(int** Matrix

2012-09-19 00:59:10 905

原创 螺旋打印数组

// SpinPrint.cpp : Defines the entry point for the console application.////螺旋打印#include "stdafx.h"#include #include #include int** getCreateMatrix(int nVectors);void SpinnerPrint(int** Matrix

2012-09-18 22:48:17 436

原创 二元树中找出和为某一值的所有路径

在二元树中找出和为某一值的所有路径题目:输入一个整数和一棵二元树。从树的根结点开始往下访问一直到叶结点所经过的所有结点形成一条路径。打印出和与输入整数相等的所有路径。例如 输入整数22和如下二元树 10 / \ 5 12 / \ 4 7则打印出两条路径:10, 12和10, 5, 7。// MatrixMaxValue.cpp : Defin

2012-09-18 11:20:27 778

原创 把二元查找树转变成排序的双向链表

把二元查找树转变成排序的双向链表题目:输入一棵二元查找树,将该二元查找树转换成一个排序的双向链表。要求不能创建任何新的结点,只调整指针的指向。 10 / / 6 14/ / / /4 8 12 16 转换成双向链表4=6=8=10=12=14=16。#include using namespace std;class Node{public:

2012-09-18 00:12:33 576

原创 求一颗二叉树中叶子节点间最大的路径长度

int LongestPath(BitTree* node, int curIndex){ int m,n; if(!node) return 0; m = LongestPath(node->lChild,curIndex+1); n = LongestPath(node->rChild,curIndex+1); if(curIndex == 0) return (m+n);

2012-09-16 13:13:48 1422

原创 人人笔试1:一个人上台阶可以一次上1个,2个,或者3个,问这个人上n层的台阶,总共有几种走法?

#include #define MAXSIZE 200int Stack[MAXSIZE];int Step[] = {1,2,3};void UpStairs(int TotalSteps,int Step[],int size);int main(){ UpStairs(10,Step,sizeof(Step)/sizeof(Step[0])); return 0;

2012-09-15 21:46:25 2614 1

原创 自己实现的非递归组合

#include #include #define MAXSIZE 100#define INVALID -1int Stack[MAXSIZE];void Combination(const char ch[],int nSize,int path);int main(int argc, char* argv[]){ int i = 0; int len = 0; co

2012-09-12 00:10:01 513

原创 全排列的非递归实现

#include #include #define MAXSIZE 100#define INVALID -1int Stack[MAXSIZE];int main(int argc, char* argv[]){ int i = 0; int j = 0; int len = 0; int curIndex = 0; int findit = 0; int begi

2012-09-11 23:37:18 572

原创 自己写的非递归背包问题

#include #define N 10#define W 34int Index[N] = {0};int Stack[N] = {0};int MaxWeight = 0;int main(int argc, char* argv[]){ int weight[] = {3,2,4,5,7,8,2,4,3,2}; int Valid = -1; int top =

2012-09-11 22:18:49 334

原创 自己实现的递归背包算法

#include #define N 10#define W 19int Index[N] = {0};int Stack[N] = {0};int MaxWeight = 0;int CurrentWeight = 0;int BeiBao(int weights[],int Stack[],int nStart,int nSize,int nCount,int TotalW

2012-09-11 21:40:44 382

原创 全排列和组合的实现

#include "stdafx.h"#include #include #define MAX 100int nCount = 0;void Perm(char s[],int index[],int count,int currentCount);void Combination(char s[],int index[],int count,int currentCount,in

2012-09-09 23:08:09 720

原创 一个加减乘除的词法分析器

using System;using System.Collections.Generic;using System.Text;using System.Data;namespace SalaryCalculationProject{ /// /// 薪酬集合 /// public class SalaryItems { pr

2012-09-03 23:10:35 650

原创 具体的数据库操作类,Model类和DB类

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;namespace DBModels{ public class StudentModel { public StudentModel()

2012-08-08 20:08:54 3024

原创 数据库的逻辑层类,用一个基类进行实现

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Xml;using UtilityConsole

2012-08-08 20:02:05 1102

原创 Java中的文件操作类

import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.Objec

2012-07-29 20:55:56 289

原创 我自己的一个数据库连接类,献丑了

using System;using System.Collections.Generic;using System.Text;using System.Data.Sql;using System.Data;using System.Data.SqlClient;namespace UtilityConsole{ public delegate void ReadDataF

2012-07-29 20:46:57 306

Lucene 3.0 原理与代码分析完整版

Lucene 3.0 原理与代码分析完整版 讲得挺好的,由浅入深的讲检索技术层次剥开,值得好好学习

2015-04-13

libjson fro android

android的jni下使用libjson库 编译和使用

2015-01-09

libghttp-1.0.9 for android

为android平台下移植libghttp-1.0.9

2014-02-08

libevent for android

修改好配置的android平台下libevent库

2014-01-15

Android模拟器root资源

Android模拟器下提权的工具,经测试,在Android 2.2模拟器下可以使用

2012-12-11

学习makefile

作为一个c,c++程序开发人员,学习makefile是一件很重要的事情

2012-11-25

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除