
代码库
IT开发者
云代码的专栏 http://yuncode.net/guojianfeng
展开
-
c++快速排序
完整代码:http://yuncode.net/code/c_503e1e448ba7745 核心代码:08 int partition ( int a[], int low, int high ) 09 { 10 //选择第一个a[low]作为划分的临界值 11 while ( low 12 { 13 while (转载 2012-10-09 21:22:26 · 540 阅读 · 0 评论 -
简单的网站页面计数器(防刷新)
完整代码:http://yuncode.net/code/c_50743607deee056核心代码: 26 //判断cookie,第一次登陆时加1,刷新时不累计计数 27 else if (request.getHeader("Cookie")==null) 28 { writeStr = Integer.parseInt(readStr)原创 2012-10-11 16:56:36 · 3074 阅读 · 1 评论 -
C++ 银行家算法
完整源代码:http://yuncode.net/code/c_50797f9ec7ad094 算法:1.试分配2.安全性测试3.如果找到一个安全序列,过安全检测,分配完成; 否则不能过安全检测,系统已恢复试分配前状态 #includeusing namespace std;int avaResour[3]={3,3,2};int allocatio原创 2012-10-14 10:53:55 · 925 阅读 · 0 评论 -
3D效果Android相册 倒影效果
完整源代码:3D相册(Gallery 3D + 倒影效果) GalleryFlow - 云代码 部分代码:package com.image.galleryFlow;import android.app.Activity;import android.os.Bundle;import android.view.GestureDetector;im原创 2012-10-16 12:46:07 · 1071 阅读 · 0 评论 -
Android 更换桌面壁纸 代码
setWallpaper 更换桌面壁纸 setWallpaper 更换桌面壁纸 - 云代码 http://yuncode.net/code/c_50474dfaa68564 protected static InputStream is;Resources resources = getBaseContext().getResources();is = resourc转载 2012-10-21 21:36:25 · 1692 阅读 · 0 评论 -
用java执行shell命令
public static String getPhysicalAddress() { Process p = null; try { // 执行ipconfig /all命令 p = new ProcessBuilder("ipconfig", "/all").start(); } catch (原创 2013-02-22 21:18:30 · 727 阅读 · 0 评论