#include
#include
typedef int elemType;
typedef struct Node{//定义单链表节点类型
elemType data;
Node *next;
}Node,*linkList;
//初始化链表,单链表的头指针为空
int initList(linkList &L)
{
L= (Node *)malloc(sizeof(Node));...
分类:
其他好文 时间:
2014-05-21 11:19:08
阅读次数:
228
Problem Description
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the follow...
分类:
其他好文 时间:
2014-05-21 10:55:57
阅读次数:
325
最近编写Python程序时经常遇见中文相关的问题,这里说一个问题的解决方法。
我在使用json模块的dumps()函数时,因为涉及到中文,报出如下错误:
ascii codec can't decode byte 0xe8 in position 0:ordinal not in range(128)
这是编码相关的问题,在该程序中加入如下代码:
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
这样就可以解决该问题了,希望对大家有所帮助。...
分类:
编程语言 时间:
2014-05-21 09:47:21
阅读次数:
323
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
us...
分类:
其他好文 时间:
2014-05-21 09:36:30
阅读次数:
302
最近在程序中需要取一个列表的top 3元素,就是去一个列表中数值最大的3个元素。这可以用Python的heapq模块来处理。
1、对列表取top N:
现在有一个列表myList,需要取出该列表的最大3个元素和最小3个元素,按如下代码所述的简单例子:
test.py
import heapq
myList = [5, 2, 6, 12, 7, 3, 4, 9]
topNum = 3
n...
分类:
编程语言 时间:
2014-05-21 08:18:57
阅读次数:
335
条件、循环、其它语句
print和import
随着更加深入地学习python,可能会出现这种感觉:有些自以为已经掌握的知识点,还隐藏着一些让人惊讶的特性。
使用逗号输出
打印多个表达式,只要将这些表达式用逗号隔开即可:
>>> print "age:",28
age: 28
参数之间都插入了一个空格符。
如果在结尾加上逗号,那么接下来的语句会与前一条语句在同一行打印:...
分类:
编程语言 时间:
2014-05-21 08:06:46
阅读次数:
424
利用PowerDesigner15在win7系统下对MySQL 进行反向工程
1、打开PowerDesigner,建立新模型,选择Physical Data Model中的Physical Da..
2、DBMS选择“MySQL5.0”,单击“OK”;选择“数据库--》Connect...”
3、选择(一)中配置的数据源,输入用户名和密码,单击“Con...
分类:
数据库 时间:
2014-05-21 07:34:16
阅读次数:
329
本文是本人在学习网络视屏springMVC的过程中的学习笔记。
为了更便于理解我决定从实际使用的角度解释。
我们在浏览器输入地址
http://localhost:8080/springMVC6/user/data/toUser
界面如下:
此时后台是跳转到下面class的toUser方法的
package com.tgb.web.controller.an...
分类:
编程语言 时间:
2014-05-21 06:27:05
阅读次数:
295
using System.Data.SqlClient;static void
Main(string[] args) { string connString = @"Data Source=.; Initial
Catalog=lh0216; User ID=s...
分类:
数据库 时间:
2014-05-21 04:18:08
阅读次数:
388
DescriptionA rooted tree is a well-known data
structure in computer science and engineering. An example is shown below:In the
figure, each node is lab...
分类:
其他好文 时间:
2014-05-21 03:23:51
阅读次数:
296