随笔分类 - 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
阅读全文
摘要:1. 遇到一个麻烦的事情,展示详情的时候,有个字段是varchar类型,但是存储的是数组字符串。 类似‘["09","03","11","05","04","01"]’。 需要通过查询字符串的数据,获得相应的中文展示。 如: '['九','三','十一','五','四','一']' 2. 查询pos
阅读全文
摘要:var assert = require('assert'); describe('mocha', function() { describe('#indexOf()', function() { it('mocha test', function() { var EQUAL = '0', RIGHT = '1',...
阅读全文
摘要:const str = ',,,,' + ',,,'; const reg = /|\s))/g; console.log(str.replace(reg, '<$1p'));
阅读全文
摘要:1. 文件撤销 以提问中修改了两个文件a、b为例,假设需要撤销文件a的修改,则修改后的两个文件: a、如果没有被git add到索引区 git checkout a 便可撤销对文件a的修改 b、如果被git add到索引区,但没有做git commit提交 1)使用git reset将a从索引区移除
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:前提: 数组已排序,且为正整数数组.
阅读全文
摘要:1. 安装less $ npm install -g less 2. less文件编译成css文件 $ lessc styles.less styles.css /*此处为编译后的css文件*/ /*此处为编译前的less文件*/ 参考链接:1. http://www.ibm.com/develop
阅读全文
摘要:1 var assert = require('chai').assert; 2 3 describe('Array', function() { 4 describe('#indexOf()', function() { 5 it('should return -1 when the value
阅读全文
摘要: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 ...
阅读全文
摘要:有个小bug,懒得修了。 目的:增加一行的时候,td第一列排序。 删除一行的时候,td第一列排序
阅读全文
摘要:<!doctype html> <html> <head> <title>{{title}}</title> <meta charset="utf-8"> <link rel="stylesheet" href="stylesheets/framework7.ios.min.css"> <!-- P
阅读全文
摘要:var AAA = function(name, age) { this.name = name ; this.age = age;}AAA.prototype.getName = function() { console.log(this.name);}AAA.prototype.getAge =...
阅读全文
摘要:1. 安装SVN -- 略过.2. 设置本地仓库 (1) 创建文件mkdir svnTest (2) 鼠标选中文件,右键选择TortoiseSVN -> craete repository here 。然后在弹出框点击OK。3. 导入文件到本地仓库. (1) 将f:\ccc文件夹下的内容上传到...
阅读全文
摘要:下面是第一次上传文件的过程。系统:windows 7 home basic1.安装git (1) 网络下载后安装。 (2) 配置环境变量,将bin目录添加到系统变量path。 (3)https://github.com/ 申请账号2.github添加repository (1) github...
阅读全文

浙公网安备 33010602011771号