下面是代码,注释也写得比较清楚:
//
// HttpDemo.h
// MyAddressBook
//
// Created by hherima on 14-6-23.
// Copyright (c) 2014年 chinasofti. All rights reserved.
//
#import
#import
@interface HttpDemo : NSObjec...
分类:
其他好文 时间:
2014-06-25 00:07:58
阅读次数:
190
//加入收藏
function AddFavorite(){
if (document.all) {
addToBookMark(window.location.href, document.title);
} else if (window.sidebar) {
addToBookMark(document.title, window.location.href);
}
}
func...
分类:
其他好文 时间:
2014-06-24 23:21:37
阅读次数:
200
题目
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl...
分类:
其他好文 时间:
2014-06-24 23:14:28
阅读次数:
238
一、什么是优先队列?
看一情景:我们去KTV唱歌,点歌的时候,可以发现所点的歌就是一个队列。
这时候,一个MM突然不玩手机了想唱歌,于是她来点歌,并且想尽早轮到她。
于是她可以选择“插歌”这个功能插到前排队列里。
这种具备可以插入优先权元素的队列,就叫优先队列。但是,这个定义不是严谨的。
优先队列的基本模型是这样的——
具备两个功能:
insert插入;
dele...
分类:
其他好文 时间:
2014-06-24 21:41:44
阅读次数:
182
%%% Fragment
%%% 对原图做四个方向的平移,然后对平移的结果取平均
%%% 碎片效果
clc;
clear all;
addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm');
Image=imread('4.jpg');
Image=double(Image)/255;...
分类:
其他好文 时间:
2014-06-24 21:06:24
阅读次数:
226
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplica...
分类:
其他好文 时间:
2014-06-24 20:58:32
阅读次数:
230
25.2.3.1. mysql_affected_rows()
my_ulonglong mysql_affected_rows(MYSQL *mysql)
描述
返回上次UPDATE更改的行数,上次DELETE删除的行数,或上次INSERT语句插入的行数。对于UPDATE、DELETE或INSERT语句,可在mysql_query()后立刻调用。对于SELECT语句,mysql_aff...
REPLICAT RORA_1保持 ABENDED状态,无法启动问题
GGSCI (gc1) 12> info all
Program Status Group Lag Time Since Chkpt
MANAGER RUNNING
E...
分类:
其他好文 时间:
2014-06-24 17:37:19
阅读次数:
305
本文是利用蒙特卡罗算法对马氏链过程的模拟。假设有10个状态,从每个状态到与之相邻状态的概率是相同的,仿真次数为1000,及进行了1000次状态转移。我们以动画的形式再现了状态转移的过程,并记录了到达每个状态的次数,具体实现如下:
close all;clc;clear;
figure;
s=1;
n=1000;
r=1; % 圆圈的半径
title('等概率情况的计算机模拟')
set(gc...
分类:
其他好文 时间:
2014-06-24 17:35:28
阅读次数:
186
If you feel like crying you shouldn’t hold back your tears. You should let it all out while you still can, because when you get bigger sometimes you ....
分类:
其他好文 时间:
2014-06-24 14:53:38
阅读次数:
255