- 博客(296)
- 资源 (9)
- 收藏
- 关注
原创 Steam Api Demo
public class Dish { private final String name; private final boolean vegetarian; private final int calories; private final Type type; public Dish(String name, boolean vegetarian, int calories, Type type) { this.name =...
2021-06-10 14:50:16
342
转载 Java lamda 函数接口和谓词
import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.*;import java.util.function.Predicate;public class TestFile { public static void main(String[] args) throws IOException { String oneLine .
2021-06-10 14:47:06
206
原创 JS全栈开发知识点梳理-目录
js + es6node.js + express + rest + jsonegg.js / think.jsmysql + mongodb + redis + r
2021-06-07 14:00:02
280
原创 node.js ucloud ufileutil.js
/** * Created by chang on 2017/2/17. */var request = require('request');var fs = require('fs');var crypto = require('crypto');var utf8 = require('utf8');var uuidV1 = require('uuid/v1');var U
2017-06-26 17:11:04
748
原创 go channel waitgroup
package mainimport ( "fmt" "runtime")func main() { runtime.GOMAXPROCS(runtime.NumCPU()) c := make(chan bool,10) for i:=0; i<10; i++ { go Go(c,i) } for i:=0; i<10;i++ { <- c }}fun
2017-05-08 16:46:55
776
原创 GO defer panic recover
package mainimport ( "fmt")func main() { A() B() C()}func A() { fmt.Println("Func A()")}func B() { defer func() { if err:= recover();err != nil { fmt.Println("Panic B()") }
2017-05-08 13:45:57
614
原创 php 时间处理
function getCurMonthFirstDay($date) { return strtotime(date('Y-m-01 00:00:00', strtotime($date))); } function getCurMonthLastDay($date) { return strtotime(date('Y-m-d 23:59:59
2016-06-13 15:48:24
548
原创 查询自营店已经上架的商品3月份销售数据
select shop.vendor_code as '供应商编码', shop.shop_name as '供应商名称', item.bn as '产品编码', cat.cat_name as '产品类别', item.title as '产品名称', order_tmp.num as '销售数量', item.cost_
2016-04-14 22:49:05
974
原创 Laravel 修改 支持 提示 “用户 xxx 存在”
/vendor/laravel/framework/src/Illuminate/Validation/Validator.php /** * Replace all error message place-holders with actual values. * * @param string $message * @param str
2016-01-29 10:17:23
1182
转载 IDEA 启动优化
-server-Xms2g-Xmx2g-XX:NewRatio=3-Xss16m-XX:+UseConcMarkSweepGC-XX:+CMSParallelRemarkEnabled-XX:ConcGCThreads=4-XX:ReservedCodeCacheSize=240m-XX:+AlwaysPreTouch-XX:+TieredCompilation-XX:+Us
2016-01-20 14:45:18
1390
原创 C++ 工具类 [StrUtil] 和 工具方法
#pragma once#ifndef STRUTIL_H#define STRUTIL_H#include #include #include #include using namespace std;static const string tag = "[DaTiBao] ";namespace StrUtil{ inline std::wstring Ansi
2015-12-31 09:24:11
5774
原创 Poco 的通知和事件
1,Notification// POCOEvent.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "Poco/NotificationCenter.h"#include "Poco/Notification.h"#include "Poco/Observer.h"#include "Poco/NObserver.h
2015-12-04 14:32:01
4662
转载 laravel nginx 配置
server { listen 80; server_name sub.domain.com; set $root_path '/var/www/html/application_name/public'; root $root_path; index index.php index.html index.htm; try_files $ur
2015-04-16 16:53:22
7021
原创 LNMP 环境搭建
nginx 编译安装--------------------------------------------------------------------------------------------centos没有安装make编译器解决:yum -y install gcc automake autoconf libtool make一、安装nginx
2015-04-13 14:50:14
801
转载 推荐!国外程序员整理的 C++ 资源大全
关于 C++ 框架、库和资源的一些汇总列表,由 fffaraz 发起和维护。内容包括:标准库、Web应用框架、人工智能、数据库、图片处理、机器学习、日志、代码分析等。 标准库C++标准库,包括了STL容器,算法和函数等。C++ Standard Library:是一系列类和函数的集合,使用核心语言编写,也是C++ISO自身标准的一部分。Standard Template L
2015-02-09 13:33:22
2155
原创 PHP 数组 (前篇)-- 遍历
<?php/** * Created by PhpStorm. * User: W.J.Chang * Date: 2014/11/24 * Time: 16:28 *//* * php 数组相当灵活 * 1, 索引数组:和其他语言一样,用数字下标进行索引,但是下标可以不连续 * $demo = array('apple','orange','banana') dem
2014-11-24 18:46:07
814
原创 github git.exe位置
C:\Users\yourname\AppData\Local\GitHub\PortableGit_69703d1db91577f4c666e767a6ca5ec50a48d243\bin\git.exe
2014-11-17 19:09:26
10371
1
原创 javascript Deferred和递归次数限制
function runAsyncTTS(text,speecher,audiopath) { var def = jQuery.Deferred(); var args = {"SynthText": text, "VoiceSpeecher": speecher, "WordSpeed": "3", "UseCSSML": "0", "AudioPath": a
2014-10-21 12:53:37
1317
原创 Android API 文档 离线秒开方法
也是最近才看Android开发,但是,它的API文档无论是在线还是离线的,实在是慢得不敢恭维。今天调试了一下,发现它自己请求了几个在线的文件,那几因为谷歌被封的原因请求时间比较长。于是就查看了一下网页源码将,这些请求的路径全部置空,发现打开速度立马就上去了。其实替换的过程挺消耗电脑性能,大家就不用重复做了。直接在我的百度网盘下载就可以了。下载地址:http://pan.baidu.
2014-10-08 20:39:26
13624
1
原创 Android checkbox和radiobutton 以及Toast和AlertDialog的使用
package com.example.radiobutton_01;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.RadioButton;import android.wi
2014-10-04 10:48:02
2093
原创 Android 利用fastjson进行json解析
package com.example.FastJson.util;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.TypeReference;import java.util.List;import java.util.Map;/** * Created by chang on 14-10-3. */
2014-10-03 10:32:48
7347
1
原创 android 使用剪切板传递数据
ClipboardManager cb = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE); cb.setText("hello world"); Intent i = new Intent(MyActivity.this,OtherActivity.cla
2014-10-01 11:48:57
841
原创 Android 通过Application 传递数据
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.ApplicationTest" android:versionCode="1" android:versionName="1.0"> <a
2014-10-01 10:30:18
2221
原创 android menu事件
@Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0,1,1,R.string.exit); menu.add(0,2,2,R.string.about); return super.onCreateOptionsMenu(menu); }
2014-09-17 21:21:22
1234
原创 Android Activity之间通信
package com.example.myapp;import android.app.Activity;import android.content.DialogInterface;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.widge
2014-09-17 20:30:19
1093
1
原创 WPF 利用BackgroundWorker 动态加载UI
BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += (ee, se) => { //TODO 需要异步请求的操作 }; bw.RunWorkerCo
2014-09-12 11:40:32
4503
原创 WPF 依赖属性使用
1,在XML中绑定xmlns:toolbox="clr-namespace:EBookApp.Toolbox"<Image x:Name="imageShort" Stretch="Fill" Width="50" d:LayoutOverrides="HorizontalMargin" Source="{Binding RelativeSou
2014-09-12 11:31:35
1663
原创 进程权限提升
// TestEnum.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;int EnableDebugPri(const char* name) { HANDLE hToken; // 打开权限 if(!OpenProcessToken( GetCurrentP
2014-08-31 20:12:49
671
原创 VC++ 读写注册表,注册文件图标关联
#include #include #include #include using namespace std;//-------------------------------------------------------------------------// 注册文件图标关联//------------------------------------------------
2014-08-05 10:03:14
2757
原创 js 阻断网页选中和右键
$(document).bind("contextmenu", function () { return false; }); $(document).bind("selectstart", function () { return false; });
2014-07-31 19:01:49
1310
原创 javascritpt 原型链
// 基类var BaseCalculator = function(){ this.decimalDigits = 2;};// publicBaseCalculator.prototype.add = function(x, y) { return x + y;}// publicBaseCalculator.prototype.subtract = function(x
2014-07-22 14:48:00
1118
转载 javascript 字符串操作
JavaScript自带函数 l concat 将两个或多个字符的文本组合起来,返回一个新的字符串。 var a = "hello"; var b = ",world"; var c = a.concat(b); alert(c); //c = "hello,world" l indexOf 返回字符串中一个子串第一处
2014-07-21 15:44:22
550
原创 Sublime 脚本 配置 (lua 和 JavaScript篇)
{ "cmd" :["C:/Lua/Lua.exe","$file"], "file_regex" :"^(?:lua:)?[\t](...*?):([0-9]*):?([0-9]*)", "selector" :"source.lua"}{ "cmd" :["node","$file"], "file_regex" :"^(?:js:)?[\t](...*?):([0-9]*)
2014-07-11 09:54:00
1273
原创 Lua 与C交互 第二篇
使用静态链接的方式#include #include #include #ifdef __cplusplusextern "C" {#endif#include "lua/include/lua.h"#include "lua/include/lauxlib.h"#include "lua/include/lualib.h"#pragma comment (li
2014-06-30 13:51:10
1193
原创 Lua 与C 交换 第一篇
编译 windows上编译lua源码cl /MD /O2 /W3 /c /DLUA_BUILD_AS_DLL *.cdel *.oren lua.obj lua.oren luac.obj luac.oren print.obj print.olink /DLL /IMPLIB:lua5.1.lib /OUT:lua5.1.dll *.objlink /OUT:lua.ex
2014-06-30 13:49:34
813
原创 Jquery 大纲
1,核心核心函数对象访问数据缓存队列控制 插件机制多库共存2,选择器基本选择器层级基本内容可见性属性子元素表单表单对象属性3,文档处理内部插入外部插入包裹替换删除复制4,筛选过滤查找串联5,事件页面载入事件处理事件委派事件切换事件6,效果基本滑动淡入淡出自定义设置7,Ajax
2014-06-27 10:12:37
1022
原创 jquery 插件 起步代码
/** * Created by W.J.Chang on 2014/6/25. */;(function($) { var methods= { check: function() { return this.each(function() { this.checked = true; }); } }; $
2014-06-26 08:33:24
874
原创 js 数组,字符串,JSON,bind, Name
/** * Created by W.J.Chang on 2014/5/23. */// 判读是否是数组的方法console.log(Array.isArray(new Array));console.log(Array.isArray([]));var arr = [1,2,3];// 遍历方法arr.forEach(function (v){ console.log
2014-05-23 11:53:36
1221
原创 js Object.keys
/** * Created by W.J.Chang on 2014/5/23. */d = 1;var a = {a:'b',c:'d'};// 枚举Keysfor(var i in a) { console.log(i);}console.log("----");Object.prototype.d = 'e';for(var i in a ){ c
2014-05-23 11:24:42
5553
重构 改善既有代码的设计
2012-08-25
Winpcap 中文技术文档
2010-12-25
UDPdump 详解 UDP
2010-12-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人