排序

插入排序代码: /*插入排序*/ void insertionsort(int *arr,int n){ int i,j; for(j = 1;j < n;j++){ int k = arr[j]; i = j-1; while(i >-1 &amp;&amp; arr[i] < k){ arr[i+1] = arr[i]; i--; } arr[i+1] = k; } } /* *归并排序 */ void merge_sort(int *arr,int fi,int la){ if(fi < l...
i56j87 发布于 2015-11-06 23:51 | 阅读 2246 次 | 评论 0 条

提取字符串中的数字并求出平均值

clear cstr="abc32skfkj262ksf8k99kfsk24kf" cstr1="" ncount=0 nsum=0 ok=.f. for i=1 to len(cstr) a=substr(cstr,i,1) if isdigit(a)=.t. cstr1=cstr1+a ok=.t. else if ok=.t. nsum=nsum+val(cstr1) cstr1="" ok=.f. ...
sdta 发布于 2015-11-04 22:58 | 阅读 2781 次 | 评论 0 条

猜数字游戏(限制了猜的次数)

#include <stdlib.h> #include <stdio.h> #include <time.h> int main( void ) { int num; int n ; int times = 0; srand(time(NULL)); num = rand()%100+1; for(times=1;times<=10;times++) { printf("Please input a number:\n"); scanf("%d",&amp;n); if...
奔跑的少年 发布于 2015-11-04 12:51 | 阅读 4149 次 | 评论 0 条

c++

#include<time.h> #include<cstdio> #include<stdlib.h> using namespace std; int main() { freopen("random.txt","w",stdout); long long a,b,n,cou;//cou:数据个数; cin>>a>>b>>cou; srand(time(NULL)); for(long long i=1;i<=cou;i++) { n=rand()%(b-a+1)+a; cout<<n<<' '; } return 0; }
tjtzgby 发布于 2015-11-01 22:36 | 阅读 2196 次 | 评论 0 条

随机数据生成器-DEVC++

#include<iostream> #include<time.h> #include<cstdio> #include<stdlib.h> using namespace std; int main() { freopen("random.txt","w",stdout); long long a,b,n,cou;//cou:数据个数; cin>>a>>b>>cou; srand(time(NULL)); for(long long i=1;i<=cou;i++) { n=rand()%(b-a+1)+a; cout<<n<<' '; } retur...
tjtzgby 发布于 2015-10-31 23:06 | 阅读 1897 次 | 评论 0 条

ubuntu openwrt

1 sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl $ mkdir openwrt $ cd openwrt $ svn co svn://svn.openwrt.org/openwrt/trunk@35407 trunk35407 $ ./scripts/feeds update -a ...
sdwenyliu 发布于 2015-10-29 16:15 | 阅读 2762 次 | 评论 0 条

RT5350 openwrt

mkdir openwrt cd openwrt svn co svn://svn.openwrt.org/openwrt/trunk git clone https://github.com/Squonk42/OpenWrt-RT5350.git cd trunk patch -p0 <../OpenWrt-RT5350/openwrt_add_pm25lq032_flash_support.patch patch -p0 <../OpenWrt-RT5...
sdwenyliu 发布于 2015-10-29 15:57 | 阅读 4182 次 | 评论 0 条

BMP 转JPG 的代码

DECLARE INTEGER GdipLoadImageFromFile IN Gdiplus.dll STRING, INTEGER @ DECLARE INTEGER GdipSaveImageToFile IN Gdiplus.dll INTEGER, STRING, STRING, INTEGER DECLARE INTEGER GdipDisposeImage IN Gdiplus.dll INTEGER lcBMPFile = GETPICT("BMP") lcJPGFile = FORCEEXT(lcBMPFile,"JPG") lnImage =0 =G...
sdta 发布于 2015-10-29 14:32 | 阅读 2648 次 | 评论 0 条

KeyStone 架构DSP C66x系列高端研发平台

革命性的新架构 TI推出的TMS320C665x系列,采用KeyStone 架构,使用灵活,可以混合使用单核或多核 DSP(定点和浮点),可实现有针对性的协处理和硬件加速以及优化的内核间/元件间通信。TI称C665x为“高斯”,由数学家高斯的名字而来。该多核平台的处理和低功耗能力特别适用于市场上的工业自动化、高性能计算、关键任务、视频基础架构和高端成像等应用。 小封装、高性能与低功耗 C66系列相当于TI C6000系列中一个新的DSP平台核心,其最大特点是多内核DSP,在最小封装中将高性能与低功耗结合。与C67x相比,C66x不...
cnbcbs 发布于 2015-10-28 10:03 | 阅读 2633 次 | 评论 0 条

Virtools

Virtools如何使用? 现在已经有些书出版了 而且都比较好, 这样的话 就可以就用这些学习了 只是没有软件 来使用
爰耒 发布于 2015-10-27 18:53 | 阅读 3003 次 | 评论 0 条

C++

Virsual Microsoft C++语言
爰耒 发布于 2015-10-27 18:49 | 阅读 2997 次 | 评论 1 条

office visio 2007密钥 W2JJW-4KYDP-2YMKW-FX36H-QYVD8

office visio 2007密钥 W2JJW-4KYDP-2YMKW-FX36H-QYVD8
liYX9553 发布于 2015-10-27 16:10 | 阅读 10174 次 | 评论 0 条

百度地图定位

public class MainActivity extends Activity { private MapView mMapView; private LocationClient locationClient; private BaiduMap baiduMap; private boolean firstLocation; private BitmapDescriptor mCurrentMarker; private MyLocationConfige...
qunxingw 发布于 2015-10-27 11:17 | 阅读 2734 次 | 评论 0 条

白文白鸡问题

#include<stdio.h> int main() { int x, y, z, M, N, a, b; int c = 0; scanf("%d %d", &amp;M, &amp;N); a = M/5; b = M/3; for (x = a; x >= 0; x--) { for (y = b; y >= 0; y--) { for (z = N-1; z >=1; z--) { if ((5*x+3*y+z/3==M)&amp;&amp;(x+y+z==N)) { if (z%3 =...
pora 发布于 2015-10-25 17:03 | 阅读 2287 次 | 评论 0 条

静夜思

编程就是一个不断地过程,只要有滴水穿石的毅力,再难的程序问题都可以被解决。
静思2015 发布于 2015-10-24 00:25 | 阅读 2390 次 | 评论 0 条

输入一个正整数 repeat (0<repeat<10),做repeat 次下列运算: 读入一批正整数(以零或负数为结束标志),求其中的奇数和

#include<stdio.h> int main() { int repeat,i; int a,sum; scanf("%d",&amp;repeat); for(i=1;i<=repeat;i++) { scanf("%d",&amp;a); sum=0; while(a>0) { if(a%2==1) sum=sum+a; } printf("%d\n",sum); } return 0; } 不知道自己错在哪里了~~~
柚子。 发布于 2015-10-23 23:20 | 阅读 19318 次 | 评论 1 条

化简分数题(C语言)

#include<stdio.h> int main() { int a, b, c, m, n, f, h, gcd; scanf("%d %d", &amp;a, &amp;b); if (0 <= a &amp;&amp; a <= 10000, 0 <= b &amp;&amp; b <= 10000) { m = a; n = b; f = m/gcd; h = n/gcd; if (a < b) a ^= b ^= a ^= b; while (b != 0) { c = a%b; a = b;...
pora 发布于 2015-10-22 20:12 | 阅读 5157 次 | 评论 0 条

关于EMF插件的学习问题

大家好,想想大家请教一个问题:我是刚到公司实习的学生,现在需要自学EMF,GEF,VE等插件来系统建模。现在老板要求我自己学会如何使用EMF的源代码,并且还要找到XML等文件在emf中作为入口输入进去,并输出,生成UML文件,请问大家能帮助我学习一下么,我有好多方面都不懂,也许描述的也不正确,希望大神们看到能帮助我一下,谢谢啦先,
风信子LALA 发布于 2015-10-21 10:18 | 阅读 831 次 | 评论 0 条

matlab关于CAD的仿真

大家好 我是新生,初来乍到,方便与大家交个朋友,也希望通过交流有所学习。编程是我的弱项,现在我的论文进展到编程仿真环节,让我很是犯难,首要解决的问题是,需要实现偏置曲线、曲面的自交问题,等距偏置与变距偏置曲线我认为是雷同的,就是偏置函数的区别。普通画的代码是拟合、求值、求切线斜率、求切线偏置角度、进而带入偏置距离求偏置新坐标点。有个问题是polyval 函数与两点求斜率,再求截距 是一样的吗?谁有这方面的代码 可以帮忙传下吗?尤其是曲面的问题。 谢谢!
bqy442706146 发布于 2015-10-20 19:42 | 阅读 1171 次 | 评论 0 条

函数_基础篇note

函数大体上就是:分离问题复杂度,让数据之间隔离。每个函数拥有独立内存区域。 函数定义:确切指定该函数的具体功能。 语法: 类型 函数名(形式参数) 代码块 函数原型(函数声明):告知编译器其函数类型 eg:Void show_n_char(char n,int num); //带参数 int *func(void)l; //不带任何参数 PS:在其中可根据喜好省略变量名,但建议加入描述性的...
VichyTang 发布于 2015-10-19 23:27 | 阅读 1345 次 | 评论 0 条