2011年4月11日

C++ explicit 关键字

摘要: 1 /* 2 *C++ explicit 关键字 3 * 4 *It prevents constructor class from being used to perform implicit type conversion 5 * 6 *Author: MagicYun star3012@qq.com 7 * 8 */ 9 10 11 #include <iostream>12 using namespace std;13 14 class Student15 {16 public:17 Student(int age){};18 ~Student(){};19 };20 21 阅读全文

posted @ 2011-04-11 22:37 MagicYun 阅读(141) 评论(0) 推荐(0)

2011年3月17日

InsertSort(插入排序)

摘要: 1 /* 2 * InsertSort.c 3 * 4 * Author: MagicYun 5 * 6 * 7 */ 8 9 #include <stdio.h>10 #include <stdlib.h>11 12 void Show(int *list, int n)13 {14 int i;15 for(i = 0; i < n; i++)16 {17 printf("%d ", *(list + i));18 }19 printf("\n");20 }21 22 void InsertSort(int *list, 阅读全文

posted @ 2011-03-17 19:45 MagicYun 阅读(221) 评论(0) 推荐(0)

ShellSort(希尔排序)

摘要: /** ShellSort.c** Author: MagicYun** O(n^1.5) key: f(n) = 3 * f(n - 1) + 1**/#include <stdio.h>#include <stdlib.h>void Show(int *list, int n) //show the list{ int i; for(i = 0; i < n; i++) { printf("%d ",*(list + i)); } printf("\n");}void ShellInsert(int *list, int 阅读全文

posted @ 2011-03-17 19:32 MagicYun 阅读(207) 评论(0) 推荐(0)

2011年2月27日

Android 图像缩放,圆角处理

摘要: package com.MagicYun.ImagePower;import android.graphics.Bitmap;import android.graphics.Canvas;import android.graphics.Matrix;import android.graphics.Paint;import android.graphics.PixelFormat;import android.graphics.PorterDuffXfermode;import android.graphics.Rect;import android.graphics.RectF;import 阅读全文

posted @ 2011-02-27 18:48 MagicYun 阅读(1774) 评论(0) 推荐(0)

2010年11月13日

C 语言 文件操作

摘要: 程序中有时候,我们需要生成多个文件名连续的文件,那么我们就需要用到函数sprintf, swprintfint sprintf( char *buffer, const char *format [, argument] ... );int swprintf( wchar_t *buffer, const wchar_t *format [, argument] ... );RoutineRequ... 阅读全文

posted @ 2010-11-13 00:18 MagicYun 阅读(254) 评论(0) 推荐(1)

2010年11月12日

Android 屏幕显示方向以及消除重力感应影响

摘要: 在manifest中添加设置//设置游戏显示方向android:screenOrientation="portrait" //消除重力感应影响,可以解决手机换方向后导致Activity重启的问题android:configChanges="orientation|keyboardHidden|navigation" 阅读全文

posted @ 2010-11-12 12:13 MagicYun 阅读(564) 评论(0) 推荐(1)

2010年10月29日

ACM 简单并查集

摘要: ------------Snowbee3012并查集是一种树型的数据结构,用于处理一些不相交集合(Disjoint Sets)的合并及查询问题。常常在使用中以森林来表示。基本操作:Father[x]; //表示x的父亲初始化: Father[i]=i; // i = 0 ----n合并两个不相交集合:操作很简单:先设置一个数组Father[x],表示x的“父亲”的编号。 那... 阅读全文

posted @ 2010-10-29 23:43 MagicYun 阅读(200) 评论(0) 推荐(1)

2010年10月14日

C语言 EAN13 条形码生成【bmp生成】

摘要: 废话不多说直接上代码[代码][代码][代码] 阅读全文

posted @ 2010-10-14 18:39 MagicYun 阅读(1537) 评论(1) 推荐(2)

导航