- 博客(22)
- 收藏
- 关注
转载 android第三方包
BaseRecyclerViewAdapterHelper[https://github.com/CymChad/BaseRecyclerViewAdapterHelper]ImmersionBar -- android 4.4以上沉浸式实现[https://github.com/gyf-dev/ImmersionBar]转载于:https://www.cnblogs.com...
2019-07-18 12:07:00
118
转载 修正needle在摘要认证时第二次请求仍返回401错误
不知理论上是否正确,但是解决问题了。原因是:needle在第一次收到需要验证信息时,确实是计算出验证信息并将authorization添加到headers里直接返回给服务器,这样服务器就能返回数据。当再次请求服务器时needle就没有往headers里添加authorization了。处理方法:needle.js//添加全局变量authInfo,用来保存authorization...
2019-06-20 14:18:00
391
转载 js笔记
1 configuring Webpack with Babel in 26 lines[http://jamesknelson.com/webpack-made-simple-build-es6-less-with-autorefresh-in-26-lines/]var path = require('path');var webpack = require('webpack'...
2019-06-13 14:06:00
105
转载 Ntp客户端
function parseMsg (buffer) { if (buffer.length !== 48) return; const pkt = {}, now = new Date().getTime(); pkt.leapIndicator = buffer[0] >> 6; pkt.version = (buffer[...
2019-04-30 12:17:00
172
转载 c# 笔记
SC命令---安装、开启、配置、关闭 cmd命令行和bat批处理操作windows服务更新数据出现闪烁解决办法namespace System.Windows.Forms { public partial class ListViewEx : ListView { public ListViewEx() { SetStyle(Con...
2019-02-21 16:58:00
86
转载 android笔记
根据uri获取文件真实路径 /** * 根据uri获取文件真实路径 */ private fun getPathFromUri(ctx: Context, uri: Uri): String? { if (DocumentsContract.isDocumentUri(ctx, uri)) { val do...
2019-02-13 16:40:00
73
转载 nodejs笔记
获取客户端IP地址req.headers['x-forwarded-for'] || req.connection.remoteAddress删除url中多余的/符号req.url.replace(/(\/)\1+/g,'$1').replace(/^\/|\/$/g,'')转载于:https://www.cnblogs.com/zh33gl/p/10369223.h...
2019-02-13 12:53:00
62
转载 js 常用基本知识
Object.isObject = function(obj){ return obj != null && typeof obj === 'object' && Array.isArray(obj) === false; }Number.isNumber = function(num){ return typeof ...
2018-03-02 16:06:00
62
转载 nodejs的process.on('message')转promise
// main.jsconst cp = require('child_process');const child = cp.fork('./child.js');const callbackPool = {};child.on('message', msg => { let msgId = msg._id, cb = cal...
2018-02-06 15:39:00
975
转载 C#枚举绑定到combobox
判断某个整型是否定义在枚举中:Enum.IsDefined(typeof(SyncTimeMethod), i));绑定到ComboBox控件:cmbSyncMethod.DataSource = System.Enum.GetNames(typeof(SyncTimeMethod));获取:(int)Enum.Parse(typeof(SyncTimeMethod), cmbSyncM...
2017-09-16 17:10:00
222
转载 C#嵌入字体
1:将字体文件(*.ttf)添加到资源文件里,注意资源的名称2:在Program.cs文件里声明using System;using System.Collections.Generic;using System.Drawing.Text;using System.Windows.Forms;namespace SyncTime { stati...
2017-09-16 10:03:00
441
转载 css3 实现 tooltip
/* START TOOLTIP STYLES */[tooltip] { position: relative; /* opinion 1 */}/* Applies to all tooltips */[tooltip]::before,[tooltip]::after { text-transform: none; /* opinion 2 ...
2017-07-03 15:23:00
141
转载 jquery加载单文件vue组件
/**注册组件 */ function registerComponent(name){ dm[name] = {}; Vue.component(name + '-component', function(resolve, reject){ $.get('./modules/' + name + '.vue')...
2017-06-20 08:52:00
132
转载 js IP 正则表达式
//^((25[0-5]|2[0-4]\d|[01]?\d\d?)($|(?!\.$)\.)){4}$//((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))///^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]...
2015-12-24 14:10:00
102
转载 xmanager 在 Windows 下远程桌面连接 麒麟
编辑/etc/gdm/custom.conf,添加如下内容:[daemon]RemoteGreeter=/usr/libexec/gdmgreeter注:“远程登录界面与本地登录界面相同”功能,若没有此项及[greeter]项则登录界面为简洁型[security]AllowRemoteRoot=true注:允许root用户远程登录[xdmcp]Enable...
2015-12-19 10:51:00
3398
转载 SVG Loading
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="64" height="64" fill="red"> <circle cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0"...
2015-12-04 22:57:00
87
转载 XML.ObjTree -- XML source code from/to JavaScript object like E4X
转载于:http://www.kawa.net/works/js/xml/objtree-try-e.html// ========================================================================// XML.ObjTree -- XML source code from/to JavaScript objec...
2015-12-04 15:29:00
594
转载 为net-snmp添加读readTimeTicks
function readTimeTicks(time){ if(time === 0) return ''; var d = 0, h = 0, m = 0, s = 0; d = parseInt(time / (24 * 3600 * 100)); time = d > 0 ? time % (24 * 3600 * 100) : time; h = ...
2015-11-16 12:35:00
232
转载 nodejs 计算内存使用率
//计算内存使用率function calcMem(){ let mem_total = os.totalmem(), mem_free = os.freemem(), mem_used = mem_total - mem_free, mem_ratio = 0; mem_total = (mem_total / (1024 * 1024 * 1024)...
2015-10-17 00:25:00
450
转载 解决net-snmp正确输出MAC地址和判断空的IP地址
function readVarbinds (buffer, varbinds) { buffer.readSequence (); while (1) { buffer.readSequence (); var oid = buffer.readOID (); var type = buffer.peek...
2015-09-23 12:01:00
383
转载 nodejs实现接收Snmp的Trap消息
var assert = require('assert');var ASN1 = { EOC: 0, Boolean: 1, Integer: 2, BitString: 3, OctetString: 4, Null: 5, OID: 6, ObjectDescriptor: 7, External: 8, Real: 9, // ...
2015-08-27 14:28:00
507
转载 EF MySQL 提示 Specified key was too long; max key length is 767 bytes错误
在用EF的CodeFirst操作MySql时,提示 Specified key was too long; max key length is 767 bytes错误,但数据库和表也建成功了。有高人知道怎么解决吗?转载于:https://www.cnblogs.com/zh33gl/p/4184243.html...
2014-12-25 11:23:00
137
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人