自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 资源 (6)
  • 收藏
  • 关注

原创 flutter map对象转 json 字符串,格式化输出

String fmt(dynamic o, int lv, {String sp = ' '}) {String str = '';String pre = sp * lv;if (o is Map) {str += '{\n';for (var item in o.keys) {str += pre + '$sp\"$item\":${fmt(o[item], lv + 1)},\n';}str = str.replaceRange(str.length - 2, str.

2020-10-29 14:45:03 2424

原创 python 迷宫生成路线

#!/usr/bin/python# -*- coding: UTF-8 -*-import randomimport sysimport osimport timeimport turtleturtle.screensize(800,600, "seashell")turtle.pensize(16)turtle.pencolor('tomato')points = ...

2019-10-03 10:07:00 485

原创 图片组合生成最优正方形

任意数量的图片,通过等比例缩放,重新排列生成最接近的正方形。interface Item { w: number, h: number, s?: Item[]}function getIndex(len: number) { let x = 0; let y = 0; const arrat: Array<{ x: number, y: numbe...

2019-06-13 11:01:08 352

原创 正则表达式基本语法记录

基本语法查询笔记匹配字符. 匹配除换行符以外的任意字符 <====> \n 匹配换行\w 匹配字母或数字或下划线或汉字 <====> \W 匹配任意不是字母,数字,下划线,汉字的字符\s 匹配任意的空白符 <====> \S 匹配任意不是空白符的字符\d 匹配数字 <====> \D 匹配任意非数字的字符\b 匹配单词的开始或结束...

2019-06-05 10:19:56 131

原创 Canvas图片跨域问题

解决JS操作图片 跨域错误问题,Canvas 图片裁剪保存跨域错误const ctx = document.getElementById('canvas').getContext('2d'); const img = new Image(); img.onload = () => { ctx!.dra...

2019-06-05 10:11:33 1102

原创 关于连连看随机排列的算法

typedef struct{int x1, y1, x2, y2;}Pt;void fun(Pt pt[], int x, int y) //x列数,y行数{if (x*y % 2 == 1)//如果都是奇数,无解return;int i, j, m, n, k = 0, l = x * y / 2;char **num = new char

2014-04-07 18:45:53 1038

原创 九宫格拼图游戏

int GetPosX(int);int GetPosY(int);int GetPosX(int n){switch (n){case 1: return 0;case 4: return 0;case 7: return 0;case 2: return 1;case 5: return 1;case 8: return 1;case 3:

2014-04-05 11:19:56 1073

原创 C++速算24点原创代码

#includeusing namespace std;bool fun(int n1, int n2, int n, int opt, float num1[], float num2[])//n1,n2为选择num1数组的下标,opt是运算num2是结果数组,n为数组num1的长度{if (n1 == n2)return false;switch (opt)//

2014-04-02 22:15:01 1557

原创 题目:输入一个字符串,输出该字符串中字符的所有组合

//题目:输入一个字符串,输出该字符串中字符的所有组合//举个例子,如果输入abc,它的组合有a、b、c、ab、ac、bc、abc。#includeusing namespace std;int main(){char ch[] = "abc";unsigned  n = 1,m = 1for (n = 1; n {for (unsi

2014-03-30 16:14:36 2344

原创 题目:在数组中,数字减去它右边的数字得到一个数对之差。

//题目:在数组中,数字减去它右边的数字得到一个数对之差。//求所有数对之差的最大值。例如在数组{ 2, 4, 1, 16, 7, 5, 11, 9 }中//数对之差的最大值是11,是16减去5的结果。#includeusing namespace std;int main(){int num[] = { 2, 4, 1, 16, 7, 11,5,  9 };

2014-03-30 16:12:54 3246

原创 把n个骰子扔在地上,所有骰子朝上一面的点数之和为S。输入n,打印出S的所有可能的值出现的概率

//题目:把n个骰子扔在地上,所有骰子朝上一面的点数之和为S。//输入n,打印出S的所有可能的值出现的概率#includeint main(){const double K = 0.16666666666666666666667;//常数 1/6int n; //输入色子数目std::cin >> n;double *num = new

2014-03-30 12:05:59 1833

原创 21点扑克游戏

#include#include#include#includeusing namespace std;class Game{public:Game() :nPair(4), nComputer(0), nPeople(0){}void Start();private:void ShowResWin(){cout cout

2014-03-27 14:16:23 1133

原创 表达式求值

#include #include#includeusing namespace std;class cal{public:cal(){}cal(string s) :str(s), res(0), IsRight(true){}void PutStr(string s){ str = s; }void ShowResult();private:

2014-03-26 15:49:21 485

原创 自己写的栈类,stack(*^__^*) 嘻嘻……

#include#includeusing namespace std;templateclass MyData{public:MyData(){};MyData(Type my) :item(my){};Type     item;MyData* pNext;};templateclass MySta

2014-03-22 13:23:48 619

android列表当中播放视频以及实现全屏(类似网易,头条)

android列表当中播放视频以及实现全屏(类似网易,头条)

2018-10-18

VC++ 游戏开发编程第二部分

VC++ 游戏开发编程第二部分

2014-05-09

浅墨游戏开发笔记完整版

浅墨游戏开发笔记完整版 本系列文章由zhmxy555(毛星云)编写,转载请注明出处。 文章链接: http://blog.csdn.net/zhmxy555/article/details/8223965 作者:毛星云(浅墨) 邮箱: [email protected]

2014-05-09

拼图小游戏原代码

拼图游戏原代码

2014-05-01

C++栈模板

C++栈模板,自写,欢迎提出建议

2014-03-22

flashplayer

五道口缴费历史的积分撒旦假了多的地方 啊放到了空间了

2013-09-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除