Linux环境下使用python调用C的printf例子:#!/usr/bin/env
python2.7#-*- coding:utf-8 -*-from ctypes import *def test(): #libc =
cdll.LoadLibrary("libc.so.6") ...
分类:
编程语言 时间:
2014-05-09 19:51:59
阅读次数:
469
一、实验代码#include void print(char s[]);int main(){
print((char *)"abcdef"); return 0;}void print(char s[]){
printf("%s\n",s);}二、实验结果输出:abcdef三、调...
分类:
其他好文 时间:
2014-05-09 09:37:30
阅读次数:
414
1、validimg.jsp 1 4 255) 9 fc = 255;10 if (bc >
255)11 bc = 255;12 int r = fc + random.nextInt(bc - fc);13 ...
分类:
Web程序 时间:
2014-05-09 09:11:19
阅读次数:
487
hdu1179Ollivanders: Makers of Fine Wands since 382
BC.裸最大匹配 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7
#include 8 #include 9....
分类:
其他好文 时间:
2014-05-08 14:49:37
阅读次数:
511
十二平均律:如下图所示:第一行为唱名:do re mi fa
so。。。。第二行为音名:C#CD#DEF#FG#GA#ABC第三行为D调对应的音名,即1 = D第四行为E调对应的音名谨记:EF
BC之间为半音。其他为全音。音程:在乐理上,习惯以“度”来表示两音之间的距离。在五线谱中,每个“线”、每个...
分类:
其他好文 时间:
2014-05-08 12:49:25
阅读次数:
366
包括:i.任意进制转化为十进制((num=base#number))
【base和number必须一致,是同一种进制】ii.十进制转化为任意进制`echo "obase=进制;值"|bc` 和`echo "值 进制 o
p"|bc` 【这里的值代表十进制数字】iii.任意进制互转;有了i和ii就可以...
分类:
其他好文 时间:
2014-05-07 16:40:14
阅读次数:
272
数学知识太差,一点点积累,高手勿喷。
1. 先求出AB向量
a = ( x2-x1, y2-y1 )
2. 求AB向量的单位方向向量
b = √((x2-x1)^2 + (y2-y1)^2))
a1 = ( (x2-x1)/b, (y2-y1)/b )
3.求出CA的法向向量(或CB的法向向量)
c = ( y0-y1, -(x0-x1) )
4. 距离 = AC法向向量与BC向量...
分类:
其他好文 时间:
2014-05-07 05:37:05
阅读次数:
275
#include //* 方法一 time_t tt =
time(NULL);//这句返回的只是一个时间cuo tm* t= localtime(&tt); printf("%d-%02d-%02d
%02d:%02d:%02d\n", t->tm_year + 1900, t->tm_mon.....
分类:
编程语言 时间:
2014-05-07 02:02:51
阅读次数:
540
原文链接:http://www.xiaoyaochong.net/wordpress/index.php/2013/08/10/%E5%BC%95%E5%86%85%E5%AD%98%E7%AE%A1%E7%90%86%E4%B9%8B%E5%86%85%E5%AD%98%E6%B1%A0%E6%A...
分类:
其他好文 时间:
2014-05-07 01:21:01
阅读次数:
595
1,有几位数字
#include
int main_2_1_digit(){
int n;
while(scanf("%d",&n)){
int count = 0;
if(n==0)
count = 1;
while(n){
count++;
n/=10;
}
printf("%d\n",count);
}
return 0;
}
...
分类:
其他好文 时间:
2014-05-06 21:20:19
阅读次数:
374