随笔分类 -  program

摘要:#include <stdio.h> #include<stdlib.h> #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLF -1 #define OVERFLOW -2 typedef in 阅读全文
posted @ 2020-06-26 16:55 金色元年 阅读(867) 评论(0) 推荐(0)
摘要:-- 正整数相加 -- test 阅读全文
posted @ 2018-11-25 01:13 金色元年 阅读(350) 评论(0) 推荐(0)
摘要:1. 遇到一个麻烦的事情,展示详情的时候,有个字段是varchar类型,但是存储的是数组字符串。 类似‘["09","03","11","05","04","01"]’。 需要通过查询字符串的数据,获得相应的中文展示。 如: '['九','三','十一','五','四','一']' 2. 查询pos 阅读全文
posted @ 2018-03-05 15:37 金色元年 阅读(11436) 评论(2) 推荐(1)
摘要:var assert = require('assert'); describe('mocha', function() { describe('#indexOf()', function() { it('mocha test', function() { var EQUAL = '0', RIGHT = '1',... 阅读全文
posted @ 2017-12-07 16:59 金色元年 阅读(941) 评论(0) 推荐(0)
摘要:const str = ',,,,' + ',,,'; const reg = /|\s))/g; console.log(str.replace(reg, '<$1p')); 阅读全文
posted @ 2017-09-19 14:46 金色元年 阅读(130) 评论(0) 推荐(0)
摘要:1. 文件撤销 以提问中修改了两个文件a、b为例,假设需要撤销文件a的修改,则修改后的两个文件: a、如果没有被git add到索引区 git checkout a 便可撤销对文件a的修改 b、如果被git add到索引区,但没有做git commit提交 1)使用git reset将a从索引区移除 阅读全文
posted @ 2017-03-03 17:18 金色元年 阅读(180) 评论(0) 推荐(0)
摘要:1 const request = require('request'), 2 fs = require('fs'), 3 path = require('path'); 4 5 6 const image_url = 'http://animalonline.info/wp-content/uploads/2015/01000/white-cat-9kspvw8... 阅读全文
posted @ 2017-02-24 16:32 金色元年 阅读(352) 评论(0) 推荐(0)
摘要:环境: nodejs - v6.2.0 阅读全文
posted @ 2016-11-22 23:34 金色元年 阅读(611) 评论(0) 推荐(0)
摘要:1 var assert = require('assert'); 2 describe('test', function() { 3 it('coc', function() { 4 var testCard01 = checkHKIDcard("AB987654(2)"); 5 assert(testCard01, true); 6 7... 阅读全文
posted @ 2016-10-19 23:57 金色元年 阅读(933) 评论(0) 推荐(0)
摘要:代码运行环境: nodejs + mochajs 阅读全文
posted @ 2016-10-10 15:13 金色元年 阅读(153) 评论(0) 推荐(0)
摘要:前提: 数组已排序,且为正整数数组. 阅读全文
posted @ 2016-09-13 23:55 金色元年 阅读(325) 评论(0) 推荐(0)
摘要:1. 安装less $ npm install -g less 2. less文件编译成css文件 $ lessc styles.less styles.css /*此处为编译后的css文件*/ /*此处为编译前的less文件*/ 参考链接:1. http://www.ibm.com/develop 阅读全文
posted @ 2016-08-12 18:46 金色元年 阅读(135) 评论(0) 推荐(0)
摘要:1 var assert = require('chai').assert; 2 3 describe('Array', function() { 4 describe('#indexOf()', function() { 5 it('should return -1 when the value 阅读全文
posted @ 2016-08-04 23:53 金色元年 阅读(197) 评论(0) 推荐(0)
摘要:1 var arr = [10, 10, 3, 2, 5 , 4, 8, 3]; 2 3 function reSort(arr) { 4 var temp = 0; 5 var len = arr.length; 6 for(var i =0; i arr[j + 1]) { 24 temp = arr[j]; 25 ... 阅读全文
posted @ 2016-06-28 23:53 金色元年 阅读(182) 评论(0) 推荐(0)
摘要:Lisp - scheme方言 阅读全文
posted @ 2016-05-22 20:03 金色元年 阅读(188) 评论(0) 推荐(0)
摘要:有个小bug,懒得修了。 目的:增加一行的时候,td第一列排序。 删除一行的时候,td第一列排序 阅读全文
posted @ 2016-03-28 00:15 金色元年 阅读(1879) 评论(0) 推荐(0)
摘要:<!doctype html> <html> <head> <title>{{title}}</title> <meta charset="utf-8"> <link rel="stylesheet" href="stylesheets/framework7.ios.min.css"> <!-- P 阅读全文
posted @ 2016-02-05 16:32 金色元年 阅读(1232) 评论(0) 推荐(0)
摘要:var AAA = function(name, age) { this.name = name ; this.age = age;}AAA.prototype.getName = function() { console.log(this.name);}AAA.prototype.getAge =... 阅读全文
posted @ 2016-01-24 16:31 金色元年 阅读(199) 评论(0) 推荐(0)
摘要:1. 安装SVN -- 略过.2. 设置本地仓库 (1) 创建文件mkdir svnTest (2) 鼠标选中文件,右键选择TortoiseSVN -> craete repository here 。然后在弹出框点击OK。3. 导入文件到本地仓库. (1) 将f:\ccc文件夹下的内容上传到... 阅读全文
posted @ 2015-12-02 18:00 金色元年 阅读(954) 评论(0) 推荐(0)
摘要:下面是第一次上传文件的过程。系统:windows 7 home basic1.安装git (1) 网络下载后安装。 (2) 配置环境变量,将bin目录添加到系统变量path。 (3)https://github.com/ 申请账号2.github添加repository (1) github... 阅读全文
posted @ 2015-11-30 16:34 金色元年 阅读(517) 评论(0) 推荐(0)