摘要: // 遇到相同元素级属性,以(minor)为准 // 不返还新Object,而是main改变 function mergeJSON(minor, main) { for(var key in minor) { if(main[key] === undefined) { // 不冲突的,直接赋值 ... 阅读全文
posted @ 2018-06-15 22:39 catgatp 阅读(3991) 评论(0) 推荐(0) 编辑
摘要: 方法2 阅读全文
posted @ 2018-05-27 14:58 catgatp 阅读(5311) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/perl # # Find a pattern in a the book's source collection (DOS/Windows version) # # (C) Copyright 2000-2002 Diomidis Spinellis # # Permission to use, copy, and distribute this software an... 阅读全文
posted @ 2018-05-20 20:57 catgatp 阅读(218) 评论(0) 推荐(0) 编辑
摘要: $(document).click(function(e){ var el = e.target; if (el.tagName == 'INPUT') { $(el).removeAttr('disabled'); } }) 阅读全文
posted @ 2018-04-24 20:36 catgatp 阅读(484) 评论(0) 推荐(0) 编辑
摘要: カタカナをひらがなに変換する関数 ひらがなをカタカナに変換する関数 function hiraganaToKatagana(src) {return src.replace(/[\u3041-\u3096]/g, function(match) {var chr = match.charCodeAt 阅读全文
posted @ 2018-03-19 22:33 catgatp 阅读(3350) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#define f(a,b) a##b#define g(a) #a#define h(a) g(a)int main(){ printf("%s/n",h(f(1,2))); printf("%s/n",g(f(1,2))); return 0;} 首先需要了解 阅读全文
posted @ 2018-03-19 19:39 catgatp 阅读(1738) 评论(1) 推荐(0) 编辑
摘要: 发信人: FenRagwort (泽), 信区: Perl标 题: Perl实用中文处理步骤(修改版)发信站: 水木社区 (Mon Feb 14 12:52:14 2011), 转信(修改版 感谢Invader)0、你至少得知道编码是怎么回事,utf-8、gbk是什么意思 你的文本编辑器能显示一个文 阅读全文
posted @ 2018-02-11 22:47 catgatp 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: Perl Unicode全攻略 耐心看完本文,相信你今后在unicode处理上不会再有什么问题。 本文内容适用于perl 5.8及其以上版本。 perl internal form 在Perl看来, 字符串只有两种形式。 一种是octets, 即8位序列, 也就是我们通常说的字节数组. 另一种utf 阅读全文
posted @ 2018-02-11 22:40 catgatp 阅读(428) 评论(0) 推荐(0) 编辑
摘要: =info 遍历目录树 支持 Unicode Code by 523066680@163.com 2017-03 V0.5 使用Win32API判断目录硬链接 =cut use utf8; use Encode; use Win32API::File qw(GetFileAttributesW FI 阅读全文
posted @ 2018-02-11 21:55 catgatp 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 环境 XP/WIN7 Perl v5.16 编辑整理:523066680 常见的那些文件操作函数都不支持,于是为了达到目的,需要各种方法配合,应该是不如其他语言方便。 我只是想看看Perl到底是否适合做这件事,于是折腾了一回。 文件的建立: 模块:Win32 模块:Win32 use Win32; 阅读全文
posted @ 2018-02-11 21:51 catgatp 阅读(826) 评论(0) 推荐(0) 编辑