在很久很久以前,就已经看过 60行Js的俄罗斯方块源码.无奈当时能力不够看明白,当时觉得就是个神作. 现在总算有空再看了,顺便用c#实现一遍(超过60行),顺道熟悉下Js API. 网上其他博客也有分析:教你看懂网上流传的60行JavaScript代码俄罗斯方块游戏 60行JS实现俄罗斯方块,这里就不再详述了,直接上代码. Tetris.cs using System; using System.Collections.Generic; using System.Linq; using Sy…
什么是SPI? 在Java中,SPI全称为 Service Provider Interface,是一种典型的面向接口编程机制.定义通用接口,然后具体实现可以动态替换,和 IoC 有异曲同工之妙. Java SPI 实现DEMO 定义一个接口 public interface Human { String sayHello(); } 定义两个实现类 public class American implements Human { @Override public String sayHell…
约定优于配置 Build Anything with Spring Boot:Spring Boot is the starting point for building all Spring-based applications. Spring Boot is designed to get you up and running as quickly as possible, with minimal upfront configuration of Spring. 上面是引自官网的一段话,大…
SELECT PARTITION_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 'xw_user_applyloan_baoxian'; SELECT count(id) as sum ,FROM_UNIXTIME(time, '%Y-%m') as date FROM `xw_user_applyloan_baoxian` GROUP BY date ORDER BY date desc ; …