mysql_num_rows();返回结果集中行的数目。1 $sql1 = "select *
from movie";2 $result1 = mysql_query($sql1) or die(mysql_error());3 $count =
mysql_num_rows($result1);...
分类:
Web程序 时间:
2014-07-22 23:13:33
阅读次数:
354
1. //取得结果集中行的数目示例:$count =
mysql_num_rows($result1);2. //小括号里odd代表奇数,even代表偶数 示例:tr:nth-child(odd){
background: #cad9ea; }3.//Mysql数据库li...
分类:
其他好文 时间:
2014-07-22 23:11:33
阅读次数:
423
题目: 如数: 1 1 2 3 5 8 13 21 34 55 ......序号: 0 1 2
3 4 5 6 7 89 ...... 由用户输入序号,输出对应的数值。效果:实现代码:#include int bian(int num);//static
int shu[100]={1,1};int...
分类:
其他好文 时间:
2014-07-22 23:10:13
阅读次数:
353
题目:寻找最长上升自序列。
代码:
#include
#include
#include
#include
using namespace std;
struct node
{
int w,s; //重量,速度
int num; //编号
int t; //用来记录当前编号...
分类:
其他好文 时间:
2014-05-01 17:17:32
阅读次数:
285
这题就是 要你找出一个ASCII 的值x使得 :
x^e%n==num(当前输入的数,e条件已给出)zsd:1: ASCII0-255可以枚举2: =a^11 11=1011int pow2( int a,
int b ){ int r = 1, base = a; while( b...
分类:
其他好文 时间:
2014-05-01 16:22:43
阅读次数:
326
题意:给你一个大于4的整数m和一个真分数a/b,求最佳素数对p、q,使得a/b#includeusing namespace std; int main() {
int prime[2000],k; int num[10001]; int i,l; int ...
分类:
其他好文 时间:
2014-05-01 14:43:18
阅读次数:
325
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by
涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如:select id from
t where num is null可以在num...
分类:
数据库 时间:
2014-05-01 13:23:55
阅读次数:
443
C++中,申请字符串数组可用new实现:char ** list = new
char*[MAX_NUM];for (int i = 0; i,则通过 if (list[qid] != “”) 检测是否初始化。
分类:
编程语言 时间:
2014-05-01 11:46:12
阅读次数:
587
这个方法太厉害了
别人的记录一下#include#include#include#include#include#include#includeusing namespace
std;#define MAX_PRIME 31700#define PRIME_NUM 3500int Primes[ P...
分类:
其他好文 时间:
2014-05-01 03:48:49
阅读次数:
276
递归函数是在一个函数通过名字调用自身的情况下构成的。如下: function
self(num){ if(num<=1){ return 1; } else{ return num*self(num-1);
}}这是一个经典的求阶乘的函数。当在外面调用self(4)是可以得到24 ,...
分类:
编程语言 时间:
2014-04-30 14:41:43
阅读次数:
499