`
duoerbasilu
  • 浏览: 1482595 次
文章分类
社区版块
存档分类
最新评论
文章列表
一、JAVA程序员之路(转): 很多网友问我学习Java有没有什么捷径,我说“无他,唯手熟尔”。但是我却很愿意将自己学习的一些经验写出来,以便后来者少走弯路,帮助别人是最大的快乐嘛! 要想学好Java,首先要知道Java的大致分类。我们知道,自从Sun推出Java以来,就力图使之无所不包,所以Java发展到现在,按应用来分主要分为三大块:J2SE,J2ME和J2EE,这也就是SunONE(Open Net Environment)体系。J2SE就是Java2的标准版,主要用于桌面应用软件的编程;J2ME主要应用于嵌入是系统开发,如手机和PDA的编程;J2EE是Java2的企业版,主要用于分 ...
在Ubuntu 12.04 LTS默认的文本编辑器是GEDIT。英文版本的Ubuntu中的文本编辑器由于不能识别文件中字符编码方式,中文通常会显示乱码。 通过在网上搜索解答方法,并自己亲自实验,发现以下方法有效: Ctrl+Alt+t 打开命令终端, 在终端输入以下命令: gsettings set org.gnome.gedit.preferences.encodings auto-detected "['GB18030','GB2312','GBK','UTF-8','BIG5','CURRENT','UTF-16']" gsettings set org. ...
public class PlayerCharacter : BaseCharacter { }
public class Vital : ModifiedStat { private int _curValue; public Vital () { _curValue = 0; ExpToLevel = 40; LevelModifier = 1.1f; } public int CurValue { get{ if (_curValue > AdjustedBaseValue) _curValue = AdjustedBaseValue; return _curValue; } set{_curValue = va ...
public class Skill : ModifiedStat { private bool _known; public Skill () { _known = false; ExpToLevel = 25; LevelModifier = 1.1f; } public bool Known { get{return _known;} set{_known = value;} } } public enum SkillName { Melee_Offence, Melee_Defence, Ranged_Offence, Ranged_Def ...
using UnityEngine; using System.Collections; using System; public class CharacterGenerator : MonoBehaviour { private PlayerCharacter _toon; private const int START_POINTS = 350; private const int MIN_STARTING_ATTRIBUTE_VALUE = 10; private const int STARTING_VALUE = 50; private int pointsLeft; ...
/// <summary> /// ModifiedStat.cs /// High Sword /// July 27, 2012 /// /// This is the base class for all stats that will be modifiable by attributes /// </summary> using System.Collections.Generic; // Generic was added so we can use the List<> public class ModifiedStat : Base ...
/// <summary> /// BaseStat.cs /// High Sword /// July 27, 2012 /// /// This is the base class for a stats in game /// </summary> public class BaseStat { public const int STARTING_EXP_COST = 100; // publicly accessable value for all base stats to start at private int _baseValue; ...
这个题目的思想如下: ①可以假设栈A和栈B,并且都为空 ②栈A提供入栈的功能,栈B提供出栈的 ③如果栈B不为空,直接弹出栈B的数据,如果栈B为空,则依次弹出栈A的元素,然后将栈A弹出的元素放入到栈B中,再弹出栈B 的数据 代码如下: // MyQueue.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <stack> using namespace std; template<class T> struct MyQueu ...
/// <summary> /// Attribute.cs /// High Sword /// July 27, 2012 /// /// This is the class for all of the character attributes in-game /// </summary> public class Attribute : BaseStat { new public const int STARTING_EXP_COST = 50; // this is starting cost for all of our attributes pr ...
Tip #1 Take a break. Tip #2 Get another human being involved. Tip #3 Simplify. Tip #4 println() is your friend.
参考:http://www.cnblogs.com/huihui-gohay/archive/2009/12/13/1623070.html 在实践过程中,抽象类和接口都经常用到。但是,对于什么情况下该用抽象类,什么情况下该用接口,总是有点搞不清楚。 于是,在阅读别人对着两者理解之后,终于 ...
一、心得体会: 如果你愿意利用五年时间来成为高手,那么你只要两三年就会成为高手,如果你想一年就成为高手,那么你五年都成为不了高手。其实学习任何东西都一样,切忌浮躁,欲速则不达。 看书注意:一切中国大陆作者的书,一概不要看。一切VC++或讲特定的编译器的书,一概不要看。 二、学好C++应该读那些书 推荐图书1: 第一本书因人而异,基础好一些的,可以看StanleyB. Lippman的C++ Primer,这本书非常地巨大,你打星号的部分可以不要看。基础不太好的,可以看StanleyB. Lippman的Essential C++,这本书份量要轻得多,不过四个C++的范型都讲了, ...
首先是用java来实现简单的Server端(http的请求内容格式可以参考msdn:http://msdn.microsoft.com/zh-cn/library/hh202945(v=vs.92)): /** * 推送toast通知 * @param uriString 推送服务通知uri * @param title toast标题 * @param content toast内容 * @param param 页面跳转参数 * @return 推送通知服务响应码 * @throws IOException */ ...
这些天学习网络流,总结了一下用到的主要算法,主要从下面几个方面来介绍 一、常见的几种算法 二、这些算法的复杂度 三、这些算法适合处理的问题 四、算法模板 FF方法(Ford_Fulkerson): 所有增广路径问题都是以Ford_Fulkerson方法为基础,之所以称为方法而不是算法,因为它提供的是一种思想。 Ford_Fulkerson(s,t) f = 0,对自定义流f进行初始化 while 存在增广路径p do 沿p对流f进行增广 //f += MaxFlow,MaxFlow为增广路径中最大流 return p; //p即为整个图中最大流我原来这个方法一直 ...
Global site tag (gtag.js) - Google Analytics