`
文章列表

折半查找法

    博客分类:
  • java
public static void main(String[] args) {         int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, top, bot, mid=-1, m = 3;         top = 0;         bot = 9;         while (top <= bot) {             mid = (top + bot) / 2;             if (a[mid] == m) {                 break;             } else if (a[mid] ...
powerDesigner默认显示的列是Name及类型,如下图示: 现在需要显示注释列,以便使得ER图更加清晰。但是PowerDesigner勾选Comment显示没有效果,所以通过以下几步来处理: 双击表,弹出表属性对话框,切到ColumnTab,默认是没显示Comment的,显示Comment列,这么做 设置显示Comment 有了Comment列,并补充Comment信息 确定保存,打开菜单 Tools>Display Perferences.. 调整显示的Attribute OK,保存,确定,退出设置页,应用到所有标识,可以看到表变化 接 ...

ssh_key授权

生成rsa_key , 并添加公钥到服务器 windows: 下载XSHELL,在登陆的时候可以选择用密钥登陆, 然后直接生成,保存可以得到rsa_key.pub。 linux or Mac: 1、生成SSH密钥对 ssh-keygen -t rsa 1 2、建议直接回车使用默认路径 Enter file in which to save the key (/root/.ssh/id_rsa): 1 3、输入密码短语(留空则直接回车) Enter passphrase (empty forno passphrase): 1 4、重复密码短语 Enter same passphrase agai ...
local ngx = require("ngx") local resty_redis = require("resty.redis") local resty_cookie = require("resty.cookie") local cjson = require("cjson") local notFilterUrlMap={ ['/mimosaui/login.html'] ="login"--not check url } local redis=resty_redis:new( ...

js 加密 java解密

https://github.com/noisyle/cryptodemo
WAF和openResty配置开机启动 docker
jasypt-spring-boot使用说明 加密密码 命令: java -cp F://.m2/repository/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input="test123" password=e9fbdb2d3b213c28575c095ae0029e05f40f77ee53ecd24af815bdff5479dd2a algorithm=PBEWithMD5AndDES 红色部分代表需要加密的密码。命令 ...

verynginx

实现md5 前端加签,后端验签    参考 https://github.com/alexazhou/VeryNginx/wiki/%E7%9B%AE%E5%BD%95

简单网址缩短short

nginx 配置 location /_z/ {             lua_socket_keepalive_timeout 30s;             content_by_lua_file /usr/local/openresty/lualib/short/index.lua;         }         location /short {                 lua_socket_keepalive_timeout 30s;                 content_by_lua_file /usr/local/openresty/lu ...
新版tulip实施方案 背景: 基于《新版推广运营方案》的内容设计出新版的运营推广系统,针对里面涉及到各种业务场景提出各种解决方案,而目前最大的问题在于系统的边界划分,主要存在两种情况: 业务数据在业务系统(mimosa)和运营推广系统(tulip)都存一份, 通过事件监听(也就是代码埋点),但是这样做出现: 1.这样tulip系统存在业务数据, 导致tulip系统的职责不够单一明确。2.也正因为如此与其他系统耦合度太高,如将来对接借贷等其他系统还得修改代码埋点,不利于tulip系统的可扩展性。3.另外人工干预的异常处理导致数据不同步,如对账定单处理、数据修复等。 基于以上问题 ...

linux使用rpm重装jdk

linux使用rpm重装jdk 1、卸载jdk #rpm -qa | grep gcj 如果输出没有内容,说明没有jdk,如果输出有内容,要把搜索到的文件卸载掉,命令为: #rpm -e --nodeps [上步操作输出的文件] 然后使用 #whereis java  直接删除java相关的文件或文件夹   2、下载你需要的jdk 到oracle官网http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html找下载链接 然后使用wget下载,由于oracle ...
rinetd,实现端口映射/转发/重定向官网地址http://www.boutell.com/rinetd 软件下载wget http://www.boutell.com/rinetd/http/rinetd.tar.gz 解压安装tar zxvf rinetd.tar.gzmakemake install 编辑配置vi /etc/rinetd.conf0.0.0.0 8080 172.19.94.3 80800.0.0.0 2222 192.168.0.103 33891.2.3.4 80     192.168.0.10 80 说明一下(0.0.0.0表示本机绑定所有可用地址)将所 ...

查看文件大小

查看盘空间  df -h   先看看根目录下面 du -sh /*  按字节排序 du -sm * | sort -rn

Redis 3.2.1集群搭建

一、概述     Redis3.0版本之后支持Cluster. 1.1、redis cluster的现状    目前redis支持的cluster特性:   1):节点自动发现   2):slave->master 选举,集群容错   3):Hot resharding:在线分片   4):进群管理:cluster xxx   5):基于配置(nodes-port.conf)的集群管理   6):ASK 转向/MOVED 转向机制. 1.2、redis cluster 架构   1)redis-cluster架构图   架构细节:   (1)所有的red ...

Git命令速查表

    博客分类:
  • git
Git命令速查表 [html] view plain copy    
Global site tag (gtag.js) - Google Analytics