<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[RengarLee的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/RengarLee</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; RengarLee]]></copyright><item><title><![CDATA[Asp.Net使用ImgAreaSelect实现图片截取]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78788834</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78788834</guid><author>RengarLee</author><pubDate>Wed, 13 Dec 2017 10:17:28 +0800</pubDate><description><![CDATA[在ImgAreaSelect官网下载文件
解压文件，将下图中选择的文件导入到项目中  
 
导入后结果为 创建使用页面 这里创建的aspx
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="imgAreaselect.aspx.cs" Inherits="BookShop.Web.Test.imgAreaselect" %>]]></description><category></category></item><item><title><![CDATA[活动——启动活动的最佳写法]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78370296</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78370296</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 23:04:22 +0800</pubDate><description><![CDATA[目的：假设SecondActivity中需要用到两个字符串参数，在启动SecondActivity的时候必须传递过来。 
代码： 
修改SecondActivity中代码    public static void actionStart(Context context, String data1, String data2){
        Intent intent = new Intent(]]></description><category></category></item><item><title><![CDATA[活动——如何知晓当前在哪一个活动]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78370148</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78370148</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 22:46:08 +0800</pubDate><description><![CDATA[该代码在活动——活动的启动模式中所创建的项目下运行创建一个新类 
public class BaseActivity extends AppCompatActivity{
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstan]]></description><category></category></item><item><title><![CDATA[活动——活动的启动模式]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78369114</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78369114</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 21:02:05 +0800</pubDate><description><![CDATA[standard 
系统不会在乎这个活动是否已经在栈中存在，每次启动都会创建该活动。 
代码： 
修改FirstActivity中onCreate()方法    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d("FirstAct]]></description><category></category></item><item><title><![CDATA[活动——在活动回收时怎么保存数据]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78368618</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78368618</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 19:57:23 +0800</pubDate><description><![CDATA[该代码在活动——活动的生命周期所创建的项目下运行目的：如何解决活动被回收时数据得不到保存的问题。 
代码： 
MainActivity中添加代码    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        String tempData =]]></description><category></category></item><item><title><![CDATA[活动——活动的生命周期]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78367860</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78367860</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 18:43:21 +0800</pubDate><description><![CDATA[返回栈 
Android是使用任务（Task)来管理活动的，一个任务就是一组存放在栈里的活动的集合，这个栈被称为返回栈（Back Stack）。活动生存期 
 - onCreate()：在活动第一次被创建时调用，完成活动的初始化操作，比如加载布局，和绑定事件等。 
 - onStart()：在活动由不可见变为可见时调用。 
 - onResume()：在活动准备和用户交互的时候调用，此时活动一定位于]]></description><category></category></item><item><title><![CDATA[活动——向下一个或上一个活动传递数据]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78361308</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78361308</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 09:45:48 +0800</pubDate><description><![CDATA[该代码在活动——使用显式Intent所建立的项目下运行向下一个活动传递数据目的：  FirstActivity中有一个字符串，将字符串传递给SecondActivity中 
代码： 
修改FirstActivty中代码        button1.setOnClickListener(new View.OnClickListener() {
            @Override]]></description><category></category></item><item><title><![CDATA[活动——使用显式Intent]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78360579</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78360579</guid><author>RengarLee</author><pubDate>Fri, 27 Oct 2017 08:22:32 +0800</pubDate><description><![CDATA[该代码实现在活动——在活动中使用Toast所建立的项目下建立一个新的Empty Activity，取名为SecondActivity。添加一个button控件 
second_layout.xml：<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vert]]></description><category></category></item><item><title><![CDATA[活动——在活动使用Menu]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78359226</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78359226</guid><author>RengarLee</author><pubDate>Thu, 26 Oct 2017 21:54:19 +0800</pubDate><description><![CDATA[该代码实现在2.在活动中使用Toast所建立的项目下 在res目录下建立menu文件夹 
 在该文件下建立名为main的菜单文件，并在main.xml中添加如下代码<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item]]></description><category></category></item><item><title><![CDATA[活动——在活动中使用Toast]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78358339</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78358339</guid><author>RengarLee</author><pubDate>Thu, 26 Oct 2017 20:29:51 +0800</pubDate><description><![CDATA[布局文件:  
first_layout.xml<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_pa]]></description><category></category></item><item><title><![CDATA[活动——如何手动创建活动，布局，注册，并运行]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/78358132</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/78358132</guid><author>RengarLee</author><pubDate>Thu, 26 Oct 2017 20:13:14 +0800</pubDate><description><![CDATA[编程环境为Android Studio 2.3.3手动创建活动将项目模式改为Project模式，在app/src/main/java/com.example.administrator.activitytest右击创建新的活动。右击com.example.administrator.activitytest包->New->Activity->Empty Activity，弹出创建活动对话框，将活动命]]></description><category></category></item><item><title><![CDATA[希尔排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72629112</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72629112</guid><author>RengarLee</author><pubDate>Mon, 22 May 2017 19:09:23 +0800</pubDate><description><![CDATA[希尔排序
先取一个小于n的整数d1作为第一个增量，把文件的全部记录分组。所有距离为d1的倍数的记录放在同一个组中。先在各组内进行直接插入排序；然后，取第二个增量d2

  
=1(

  


  
…

# include 

void HillSort(int *num, int length){
	int i, j, temp, gap, t;
	
	for(gap ]]></description><category></category></item><item><title><![CDATA[堆排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72627524</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72627524</guid><author>RengarLee</author><pubDate>Mon, 22 May 2017 16:29:53 +0800</pubDate><description><![CDATA[堆排序
根结点（亦称为堆顶）的关键字是堆里所有结点关键字中最大者，称为大根堆，又称最大堆。



①建堆，建堆是不断调整堆的过程，从len/2处开始调整，一直到第一个节点，此处len是堆中元素的个数。建堆的过程是线性的过程，从len/2到0处一直调用调整堆的过程，相当于o(h1)+o(h2)…+o(hlen/2) 其中h表示节点的深度，len/2表示节点的个数，这是一个求和的过程，结果是]]></description><category></category></item><item><title><![CDATA[选择排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72621354</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72621354</guid><author>RengarLee</author><pubDate>Mon, 22 May 2017 09:49:05 +0800</pubDate><description><![CDATA[选择排序

选择排序（Selection sort）是一种简单直观的排序算法。它的工作原理是每一次从待排序的数据元素中选出最小（或最大）的一个元素，存放在序列的起始位置，直到全部待排序的数据元素排完。
# include 

void SelectionSort(int *a, int n){
    int i, j, min, temp;
    
    for(int i = 0 ;]]></description><category></category></item><item><title><![CDATA[2-路插入排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72621244</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72621244</guid><author>RengarLee</author><pubDate>Mon, 22 May 2017 09:35:03 +0800</pubDate><description><![CDATA[2-路插入排序

2路插入排序算法是在直接插入排序算法的基础上增加了一个辅助数组，其目的是减少排序过程中的移动次数，需要增加n个记录的辅助空间。并记录辅助空间内最大元素和最小元素的位置。将待插入的元素与最大元素和最小元素继续比较，从而决定然后排序；
# include 

void TwoInsertSort(int *Array, int Length){
    int TempArra]]></description><category></category></item><item><title><![CDATA[基数排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72488300</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72488300</guid><author>RengarLee</author><pubDate>Thu, 18 May 2017 19:38:11 +0800</pubDate><description><![CDATA[基数排序
实现原理:将所有待比较数值（正整数）统一为同样的数位长度，数位较短的数前面补零。然后，从最低位开始，依次进行一次排序。
这样从最低位排序一直到最高位排序完成以后, 数列就变成一个有序序列。


实验数据:
138,47, 65, 97, 13, 27, 49,76
 第一次1.将数据分到1-9中


2得到结果 其中 newtemp[i+1] = newtemp[i]]]></description><category></category></item><item><title><![CDATA[归并排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72476868</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72476868</guid><author>RengarLee</author><pubDate>Thu, 18 May 2017 17:18:31 +0800</pubDate><description><![CDATA[递归排序

基本思想:将两个或两个以上的的有序表组合成一个新的有序表

# include 
# include 
void Merge(int *a, int low, int mid, int high){
	//将有序的a[low-mid]和有序的a[mid+1,high]归并成有序的a[low-high] 
	int i = low, j = mid+1, k = 0;
	int]]></description><category></category></item><item><title><![CDATA[南阳理工ACM 5Binary String Matching]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72320692</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72320692</guid><author>RengarLee</author><pubDate>Tue, 16 May 2017 18:00:38 +0800</pubDate><description><![CDATA[Binary String Matching
时间限制：3000 ms  |           内存限制：65535 KB

难度：3
描述 Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear a]]></description><category></category></item><item><title><![CDATA[快速排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72229009</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72229009</guid><author>RengarLee</author><pubDate>Mon, 15 May 2017 21:17:25 +0800</pubDate><description><![CDATA[快速排序

快速排序（Quicksort）是对冒泡排序的一种改进。
基本思想：通过一趟排序将要排序的数据分割成独立的两部分，其中一部分的所有数据都比另外一部分的所有数据都要小，然后再按此方法对这两部分数据分别进行快速排序，整个排序过程可以递归进行，以此达到整个数据变成有序序列。




实验数据:   49, 38, 65, 97, 76, 13, 27, 49
下列表格是程序第]]></description><category></category></item><item><title><![CDATA[冒泡排序]]></title><link>https://blog.youkuaiyun.com/RengarLee/article/details/72087049</link><guid>https://blog.youkuaiyun.com/RengarLee/article/details/72087049</guid><author>RengarLee</author><pubDate>Mon, 15 May 2017 09:11:06 +0800</pubDate><description><![CDATA[冒泡排序

基本操作： 
重复走访要进行排序的数列，一次比较两个元素，如果他们的顺序错误就把他们交换过来。直到走访数列的工作中不再 出现交换，也就说明该数列已经排序完成。
排序思路：
原始数据             5 4 1 2 3
第一次排序开始 
4 5 1 2 3
                             
4 1 5 2 3
            ]]></description><category></category></item></channel></rss>