04 2017 档案
摘要:代码图理解复杂代码 类图 1.抽象动物类Animal 2.牛类Cow 3.鸡类Chicken 4.主类Program,用到了数组和集合Array,ArrayList 两种效果差不多,细节略有区别! 再看下面,改造 定义Animals类,不需要通过ArrayList了。Animals就是ArrayLi
阅读全文
摘要:只要是同一个namespace,就可以当作是在一个文件中一样! Suit.cs Rank.cs Card.cs基础 Deck.cs核心 using System; using System.Collections.Generic; using System.Linq; using System.Te
阅读全文
摘要:一个类,如果继承了某个接口。那么它必须把接口的方法都实现了,哪怕是一个空的。
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo { public class MyCl
阅读全文
摘要:对象是引用类型,结构是值类型。 引用类型,操作同一个地址。 值类型,操作不同的地址。
阅读全文
摘要:一个namespace可以定义多种类与接口,有意思。
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Th...
阅读全文
摘要: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thr...
阅读全文
摘要:这两段代码效果一样,引用的都是同一个变量!
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo { class Program { s
阅读全文
摘要:params传参 out使用,类似于callback。
阅读全文
摘要:1.for using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo { class Progr
阅读全文
摘要:结构比枚举更复杂,可以保存多种类型的数据!
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Thr...
阅读全文
摘要:```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace Demo
{ class Program { static void Main(string[] args...
阅读全文
摘要:这些表情事先已经存在应用之中! 发送的消息其实还是文本消息! 每个表情对应一个文字标识,比如[微笑]、[发呆]、[衰]。 选择表情的时候,对应的标识就自动接入文本中了! 你好[微笑][微笑][微笑]。 哈哈哈[得意]。 最终显示到终端,其实是文字与图片的组合。 这个时候要做的就是把这里的标识,替换成
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo { class Program { s
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Th...
阅读全文
摘要:项目先是实现功能! 当项目越来越大的时候,发现维护起来就费劲了! 在这个过程中,开发,重构,测试! 有利于后期维护项目! 重构的作用是,写尽量少的代码,实现尽量多的功能! 重构还可以把一些垃圾的,效率低的代码,重新调整成效率更高的代码! 重构,就是提交重复的代码,为独立的函数! 这样就能避免代码重复
阅读全文
摘要:这个类是核心! 项目中有个刷小礼物的功能,如果同时有多个人刷,就会出现乱七八糟的效果,没有秩序! 通过队列,就能很好的解决! 先定义一个全局队列! 当有礼物刷的时候,就将其存入队列当中!刷第一个礼物的时候,锁死!等第一个礼物刷完的时候,解锁!然后查询队列中是否还有未刷完的礼物,继续刷! 刷礼物,锁上
阅读全文
摘要:``` / [Queue] @param {[Int]} size [队列大小] / function Queue(size) { var list = []; //向队列中添加数据 this.push = function(data) { if (data==null) { return fals
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo { class Program { s
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System....
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Th...
阅读全文
摘要:  ```
using S...
阅读全文
摘要: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Th...
阅读全文
摘要: ```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Th...
阅读全文
摘要:v if v for v bind v on 案例整合
阅读全文
摘要:1.src 2.class [] 这里数组中的数据是data中的变量。 方法论:熟练使用其中的常用几种,就可以了!可以进行单元测试!
阅读全文
摘要:应用实例html js 注意这里要用methods,不要忘记了s。
阅读全文
摘要:v bind:style 的对象语法十分直观——看着非常像 CSS ,其实它是一个 JavaScript 对象。 CSS 属性名可以用驼峰式(camelCase)或短横分隔命名(kebab case): 直接绑定到一个样式对象通常更好,让模板更清晰: 实践,有个div的属性中需要设置backgrou
阅读全文
摘要:1.引入vue.js 2.js脚本 3.html处理数据 经过这么简单的操作,json数据就显示到页面上了! 这只是简单应用!比之dot的加载,这种方式要好用,不用总是写script了! 方法论:项目中要敢于尝试,尝试新的技术,新的框架!把它们用到项目中去!
阅读全文