- 博客(292)
- 资源 (3)
- 收藏
- 关注
原创 flutter methodchannel调用原生方法,实现原生插件
在获取手机电量,屏幕信息等,都需要flutter 调用原生实现,这部分flutter 官方已经帮我们实现好了,对于部分功能,需要自己实现, 步骤如下# 创建一个 flutter 应用,使用 as 打开 android 目录, MainActivity 代码如下package com.example.flutter_app;import android.content.Intent;i...
2019-05-28 20:23:51
2808
原创 flutter methodchannel调用原生方法,实现原生插件
在获取手机电量,屏幕信息等,都需要flutter 调用原生实现,这部分flutter 官方已经帮我们实现好了,对于部分功能,需要自己实现, 步骤如下# 创建一个 flutter 应用,使用 as 打开 android 目录, MainActivity 代码如下package com.example.flutter_app;import android.content.Intent;i...
2019-05-27 22:15:35
1802
原创 Android Jni , 不同 arm 架构 兼容
Jnijni 是一种 java 调用 c 语言的方式java 反编译比c容易参考文献:https://www.jianshu.com/p/87ce6f565d37https://blog.youkuaiyun.com/carson_ho/article/details/73250163微信arm微信是放在一个包里自动加载的,不是分文件夹https://blog.youkuaiyun.com/shb...
2019-02-10 23:15:11
1247
原创 Mac Sublime repl 插件配置
mac 下 默认安装 python2, 自己安装 python3 之后, sublimerepl 运行 py 文件后发现 使用依旧是 2.** 版本修改 Main.sublime-menuSublime -> perferences -> Browse packages -> SublimeRepl -> config -> python配置文件更改如...
2018-11-13 15:51:14
1003
原创 How to map ESC to jk in vimspf13
echo "imap jk <ESC>" >> ~/.vimrc.local # ESC is far far away jj is much bettersource ~/.vimrc.localRefer: https://gist.github.com/iamrahulroy/91ffadbeb412c38c9d66b8b669c90dcd...
2018-11-05 18:44:40
329
原创 Linux Common Command
find {path} -name {filename}cat /etc/*release*grep text -r folder |grep xx |grep xx // regex text# centos 7 up use firewall default# 查看防火墙状态firewall-cmd --statefirewall-cmd --reload #重...
2018-10-26 20:21:35
545
原创 composer update, & composer install
composer文档: https://docs.phpcomposer.com/03-cli.html#updateInstall, 如果没有 composer.lock 文件将会 按照 composer.json 安装最新版本, 并生成composer.lock如果有,有按照 composer.lock 文件安装composer update 将会安装最新版本,并更新 comp...
2018-07-05 18:37:08
378
原创 Nginx php 错误日志排查
遇到错误,通常解决流程如下比如一个php存储服务器的文件上传问题,px -ef |grep php-fpm // 查看fpm 是否启动// 查看 fpm 运行用户以及权限// 发现运行用户为 nobody 组 nobody, 文件写入权限为 rootchown nobody.nobodyGroup {fileName}1 查看nginx 访问日志,是否有访问信息2 查看...
2018-07-05 17:54:59
1873
原创 vim 寄存器, nerdTree, diff
Vim寄存器默认占用, 0, “” 位置 多行操作时,以 0 - 9 递进操作 // 复制寄存器中的 {0 - 9} "{n}p // insert 模式 C + r + n // 搜索时复制 /C+r{n} // 存入寄存器 // 命令模式下 "{1-9}{n}yy // 查看寄存器 ...
2018-06-19 17:32:09
325
原创 js copy text
document.execCommand('copy'); listenCopy() { document.addEventListener("copy", e => { let clipboardData = window.clipboardData; //for IE if (!clipboardData...
2018-05-22 19:50:25
1241
原创 Public URLs for testing on mobile devices. Ngrock
1 download ngrock 2 unzip ngrock 3 ./ngrok authtoken xxxxxxx 4 $ ./ngrok http {yourt local port}
2018-05-15 00:40:01
378
原创 php&nginx&php-fpm&mysql&redis&php simple server code
overviewnginx 本身不具备解析 php 的能力,通过,识别 *.php 的请求,将请求交给 php fpm 进行处理首先启动 php fpm 服务 location ~ \.php$ { root /Users/liyang/programmer/project/vpn-project/vpn_server/Open...
2018-05-07 02:36:45
271
原创 axios 进行文件上传
async uploadFile () { var config = { onUploadProgress: (progressEvent) => { let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) /...
2018-04-01 21:48:03
8395
原创 react native,实现android 应用编写
环境搭建 1 参照官网那个,将 android sdk, java sdk,官方脚手架等基础环境安装完成 2 下载夜神(其他也可) 模拟器 3 配置 java, android 环境变量(window下), 如果需要使用,keytool , adb 等命令,需要 在path 中配置到, java sdk,android sdktools,platroms tools 4 连接模拟器abd conne
2018-02-21 05:51:16
400
原创 Ethereum(ETH) Mining Pools
# 以太币框池搭建环境, mac os || linux Refer :https://github.com/sammy007/open-ethereum-pool## 1.1 交易信息,最终界面效果如下,采用 Node express 编写## 1.2 框池运行如下## 1.3 结算后台运行如下## 1.4 redis 服务# 2 安装依赖```go >= 1.9geth or parit...
2018-02-08 18:02:20
3876
原创 Web css named way BEM
For developing front end , BEM is a perfect way of name your dom css name .there is simple introduce :.1 .block-warp-name :represent advance or abstract parent dom ..2 .block--wrap-name__name : the
2017-08-20 22:13:09
372
原创 Video http dash mp4 box slice
There is three points introduce:dash overriew server slice video by mp4 box and ffpeghow to use dash at native or webDynamic Adaptive Streaming over HTTP (DASH), also known as MPEG-DASH, is an adap
2017-08-01 22:05:20
936
原创 For vue cli hot update no useful
today , when use vue cli , writing code by webstorm i have fonund a issue that vue can not compile after change code , so amazing thing , after get many infomation about this , at last , solve the issu
2017-05-04 12:26:56
597
原创 react-native 完整实现登录功能
React Native write login , UI framework , network , navagate, click event.Refer : http://blog.youkuaiyun.com/u012915455/article/details/52594091if the server is springmvc need as below configuration. <!--in
2017-04-28 12:43:59
1929
原创 Front and rear separation of security issues
登录验证以及安全问题: 1、请求接口全部用post方式,在后端判断请求方式是否为post 2、前后端代码放在同一服务器,在后端判断请求的来源是否与服务器同源:$source_url = parse_url($_SERVER['HTTP_REFERER']);$server_url = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['H
2017-04-26 11:36:31
633
原创 Activity has leaked window that was originally added
this error will not crash application . the way to solve issue :I meet this issue when activity destroy but dialog still show :so you can resolve it as below:@Override protected void onDestroy() {
2017-04-21 17:44:19
947
原创 Php Overrview
Php is more simple script language for developing server.The base refer: http://www.runoob.com/php/php-datatypes.htmls Maybe you need to learn base data type , class , simple programmer(the programm
2017-04-21 15:55:09
551
原创 css link @import
if you use in html :<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> @import url("css1.css"); </style></head><body> <script> d
2017-04-03 16:16:28
1087
原创 javascript for mvvm
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>mvvm</title> <input id="name" type="text" value="demo" onchange="nameChange(this)"></head><body><script> //s
2017-04-02 23:40:27
1000
原创 JS Array ...map ,reduce , filter..
Array共有九个方法Refer: http://www.cnblogs.com/webapi/p/5706348.htmlArray.prototype.indexOfArray.prototype.lastIndexOfArray.prototype.everyArray.prototype.someArray.prototype.forEachArray.prototype.map
2017-04-02 23:38:31
1344
原创 js object.create()、Object.defineproperty()、,Object.keys()...for..in,for..each
Speak of that how to create object in javascript , maybe you know:new Object();var obj = {};new function(){}; // var obj = new function(){}();Have you know Object.create()?//as the photo you needn’
2017-04-02 23:18:47
1246
原创 three way of waterfall flow
First the simple way , use css3 colum-width:<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initia
2017-04-02 01:58:33
1070
原创 nodejs koa framework overview
koa as nodejs server framework more simple than express , you should learn es6 ,javascript rather than know koa firstly.i wonder why that koa chinese document is different from english , may be chinse
2017-04-02 00:10:45
1055
原创 yarn
install refer : http://www.jackpu.com/yarn-facebook-kai-yuan-de-bao-guan-li-gong-ju/ yarn documention : https://yarnpkg.com/en/ yarn compare npm :https://yarnpkg.com/en/docs/migrating-from-npm:yarn
2017-03-25 08:23:33
1391
原创 Promise , fetch Api ,blueBird,Q,When
Promise which the solution of async programmer is the original obj presented by ecmaScript 6 , it’s better than the asynchronous callback was presented by community ;Promise is a object that can get
2017-03-20 01:13:33
1097
原创 Vue Lazy Loading Routes
When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route’s components into a separate c
2017-03-18 19:12:33
2578
原创 Docker,compose,kitematic Overview and build Php WordExpress
Docker 通常在服务器环境中使用较多,出于服务器端配置相对繁琐,前端使用Npm,yarn 等管理工具已经很方便了。下面开始介绍概念以及环境搭建首先介绍下docker的基本概念照抄一下:Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my
2017-03-07 21:15:46
1582
原创 js source map
Refer http://www.ruanyifeng.com/blog/2013/01/javascript_source_map.htmlsouce map 于jq 中1.9版本开始,目的为解决js 压缩等操作过后,调试位置的对应关系,通常会在开发模式下打开此模式.
2017-03-02 11:41:19
1174
原创 应用栏跳转,返回首页,tab 位置显示错误问题
问题描述 : 在类似You TuBe 那种应用, Tab 切换后进行其他页面跳转,在返回上一个界面时,tab 会默认为现实Index 为 0 的 tab由于页面采用vue 开发,解决方案基于vue 但原理都一样, vue 在路由到页面会执行生命周期方法,可以在destroed:function(){ //remark the Tab Index}mounted:function(){
2017-03-01 11:17:36
1185
原创 android 实现 bilili 动画播放效果
http://www.jianshu.com/p/06c0ae8d9a96状态栏透明: //设置状态栏透明 if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); window.clearFlags(W
2017-02-27 20:05:02
948
原创 Android 协调者布局title 字体大小颜色修改,设置布局为最上层
开发中遇到一个问题 布局事件无效 料想不是最上层布局 一试果真如此 // put the control to the view top playView.bringToFront(); 另一个问题 协调者布局中 title 字体过大遥记得,在google 提供的 切换tab中 需要在dimens 中定义字体大小方才生效,而在协调者布局中只需要在sty
2017-02-27 11:36:23
4259
原创 web 观察者模式
介绍一种观察者模式其实观察者模式是一个比较简单的 Publish,Subscribe过程,整个过程概括起来说就是对 对订阅者这个数组的操作,而消息的发布其实就是 遍历订阅者对象调用订阅者本身方法的一个过程,在实际中的应用的话,还需要用setter 方法做一下数据劫持 function Publisher(){ this.observers = [];
2017-02-27 08:34:46
1192
原创 macbook howto use usb 2.0 ethernet
use two hour make usb 2.0 ethernet adapter work , the adapter type is qts1081b , no 9700 , my solve way is :You’ll need to start by uninstalling any drivers you have previously installed. Depending on
2017-02-26 10:37:45
1899
原创 js callback , ajax call back can observer mvvm
do something other || like android network after the net work down do some thing by param but android only can pass the param by interface callBack just like click event android -- web {
2017-02-24 18:17:47
1018
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人