- 博客(11)
- 收藏
- 关注
原创 Windows环境下手工配置Lua5.3
1、下载lua5.3的源码:http://www.lua.org/ftp/lua-5.3.0.tar.gz,解压到本地;2、需要安装有VS,路径如下Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts,打开Developer Command Prompt for VS2013, 定位到lua-5.3.0\src文件夹,输入如下命
2015-03-04 11:26:03
5666
原创 A*算法的C#实现(纯代码)
#regionusing System.Collections.Generic;using System.Diagnostics;using System.Runtime.InteropServices;using UnityEngine;using Debug = UnityEngine.Debug;#endregionpublic class VAStar : Mono
2014-03-21 10:12:27
1249
原创 《深入理解C#》学习笔记之第一章
1、命名实参调用构造函数时指定实参的名称Product product = new Product(name : "aaa", price : 1);2、Lambda表达式排序: productList.Sort( (x,y) => x.name.CompareTo(y.name));查找遍历:productList.FindAll( p => p.price > 2 ).Fo
2014-03-20 20:37:48
719
原创 算法学习笔记之计数排序
计数排序属于线性排序的一种,时间复杂度为Θ(n),但不是原址排序,牺牲了一定的空间复杂度C#实现如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace AlgorithmTest{
2013-08-27 14:58:16
605
原创 算法学习笔记之快速排序
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace AlgorithmTest{ class QuickSort { private int Partition (
2013-08-27 12:02:27
491
原创 算法学习笔记之堆排序
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace AlgorithmTest{ class HeapSort { private void Max_Heapify
2013-08-27 10:28:43
540
原创 算法学习笔记之冒泡排序
原理:相邻的两个元素进行比较,如果左边的大于右边,则互换位置,以此类推C#实现:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace AlgorithmTest{ class Bu
2013-08-22 20:32:06
557
原创 算法学习笔记之合并排序
原理:采用分治策略,将整个数组划分成小的数组进行排序,之后再进行合并,通常结合递归来实现适用于大数据排序C#实现:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Algorithm
2013-08-22 18:03:28
578
原创 Unity项目中使用Git管理代码的设置步骤
1、选择Edit → Project Settings → Editor,设置Version Control Mode为 Meta Files2、设置Asset Serialization Mode 为 Force Text3、保存并退出Unity,然后在项目文件夹下删除Library和Temp文件夹(如果有的话),同时删除.cs
2013-08-22 10:32:37
2140
原创 Unity 2D Toolkit中动态改变Animated Sprite的Shader
修改tk2dsprite.csIn tk2dSprite.cs - do something like thisstatic bool ignoreMaterialChange = false;protected override void UpdateMaterial(){ if (ignoreMaterialChange) { if
2013-08-22 10:28:26
1388
原创 算法学习笔记之插入排序
原理:就像打扑克牌一样,手中的牌永远是排好序的,再从牌堆最上面取过来一张,此时从右往左,依次比较手中的牌与刚取的牌的大小,如果发现比刚取的牌大的话,就将其往右移动一个位置,依次类推,直到找到合适的位置,将此牌插入进去适用范围:小规模的排序C#实现: int[] nums = new int[] { 23, 4, 63, 14, 34, 21, 391, 124,
2013-08-22 10:24:56
707
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人