<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-204  評(píng)論-90  文章-8  trackbacks-0
      2014年11月24日
    此問(wèn)題是由于升級(jí) macos sonoma 14.2.1 引起的
    解決辦法,重新安裝xcode  
    rm -rf /Library/Developer/CommandLineTools
    xcode
    -select --install
    posted @ 2024-02-04 13:57 一凡 閱讀(52) | 評(píng)論 (0)編輯 收藏
    # Springboot整合activiti
    源代碼:https://gitee.com/yifan88899/acttest

    ## 版本說(shuō)明
    - springboot 2.4.2
    - activiti 7.1.0.M6
    - mysql 8.0.28
    ## 插件安裝
    - Activiti BPMN visualizer
    ## Bpmn流程圖位置
    - 流程圖xmlpng需放在resources/processes
    ## Test
    - Test Case 都可執(zhí)行,包括:
    - 流程查詢
    - 流程部署
    - 流程啟動(dòng)
    - 流程拾取、完成操作
    ## Mysql
    - 需要啟動(dòng)Mysql8
    - 數(shù)據(jù)庫(kù)名Activiti7
    - activiti會(huì)版建表

    posted @ 2023-11-10 15:56 一凡 閱讀(97) | 評(píng)論 (0)編輯 收藏
    1、打開(kāi)my.cnf 加入 skip-grant-tables
    2、mysql.service stop && mysql.service start
    3、清空root密碼 并 退出
        update mysql.user set authentication_string='' where user='root';  
    4、mysql.service stop && mysql.service start
    5、mysql -root   免密登錄并修改root密碼
        alter user 'root'@'%' identified by 'pass$123';
        alter user 'root'@'localhost' identified by 'pass$123';

    確定是否支持遠(yuǎn)程登錄,host中有%的記錄即支持
    select host, user, authentication_string, plugin from user;
    posted @ 2021-08-05 18:06 一凡 閱讀(203) | 評(píng)論 (0)編輯 收藏

    64e696 綠色
    5a97ff 藍(lán)色
    ffdb5a 黃色
    ff8b64 橙色
    ff5a65 紅色
    e00b5d 粉紅
    666666 深灰
    3cc7f5 淺藍(lán)
    f5863c 淺橙
    b00072 枚紅
    674ea7 紫色
    999999 灰色
    posted @ 2021-06-22 17:46 一凡 閱讀(84) | 評(píng)論 (0)編輯 收藏
    #!/usr/bin/expect
    ####################
    set pass xxxx
    set user yyyy
    ####################
    spawn ssh -p 35000 -o StrictHostKeyChecking=no "${user}@xgrelay.xxxx.com"
    expect {
      -re ".*Dkey.*" { gets stdin dkey; send "$dkey\r"; exp_continue}
      -re "Option>:"  { send "1\r" ;}
      -re "Password>:" { send "$pass\r" ; exp_continue }
      -re "password:" { send "$pass\r" ; exp_continue }
    }
    posted @ 2021-01-18 11:35 一凡 閱讀(163) | 評(píng)論 (0)編輯 收藏
    -- data export csv   其中 $1=$1 如果不加指定分隔符不生效
    mysql -uadmin -ptest -h127.0.0.1 -P3306 -e "select * from test where create_time > unix_timestamp('2020-09-10 00:00:00'and status = 99| awk '{OFS=","}{$1=$1;print $0}'

    #csv中文轉(zhuǎn)碼
    tmpfn="exempt-update-3.30.csv";iconv -c -s -f UTF-8 -t GBK $tmpfn > /tmp/$tmpfn && mv /tmp/$tmpfn .
    posted @ 2020-09-10 22:08 一凡 閱讀(187) | 評(píng)論 (0)編輯 收藏
    #!/bin/bash

    for f in "$@"do
        if [ -f "$f" ]; then
            iconv -s -c -f UTF8 -t GBK "$f" > /tmp/$f.tmp
            mv /tmp/$f.tmp "$f"
        fi
    done
    posted @ 2020-04-20 10:03 一凡 閱讀(186) | 評(píng)論 (0)編輯 收藏
    # -*- coding: utf-8 -*-
    #
    !/usr/bin/python

    import re
    import io
    import sys

    # obj = re.compile(r'(?P<ip>.*?)- - \[(?P<time>.*?)\] "(?P<request>.*?)" (?P<status>.*?) (?P<bytes>.*?) "(?P<referer>.*?)" "(?P<ua>.*?)"')
    #
     example:xxxx"id":2640914,"orderId":144115188137125591xxxx"state":10xxxxx"
    # 日志整行都需要匹配,需要用的用具體正則匹配,如(\d{7}),不需要的用(.*)匹配,總之所有需要或不需要部分都用()括起來(lái)
    obj = re.compile(r'(.*"id":)(\d{7})(.*"orderId":)(\d{18})(.*"state":)(\d{2})(.*)')

    def load_log(path):
    # 讀取文件
        with io.open(path, mode="r", encoding="utf-8") as f:
            for line in f:
                line = line.strip()
                parse(line)

    def stdin():
    # 讀取管道輸入
        for line in sys.stdin:
            parse(line)

    def parse(line):
    # 解析單行nginx日志
        try:
            result = obj.match(line)
            print(result.group(2,4,6))
        except:
            pass

    if __name__ == '__main__':
        # load_log("/tmp/227.log")
        stdin()
    posted @ 2020-02-29 02:10 一凡 閱讀(295) | 評(píng)論 (0)編輯 收藏
    1. 新增中間件cors
    2. func Cors() gin.HandlerFunc {
      return func(c *gin.Context) {
      method := c.Request.Method

      c.Header("Access-Control-Allow-Origin", "*") //必選
           c.Header("Access-Control-Allow-Headers", "*") //可選 如果request有header, 必選
           //c.Header("Access-Control-Allow-Credentials", "true") //可選
      //c.Header("Access-Control-Allow-Methods", "*") //可選
      //c.Header("Access-Control-Expose-Headers", "*") //可選

      //放行所有OPTIONS方法
      if method == "OPTIONS" {
      c.AbortWithStatus(http.StatusOK)
      }
      // 處理請(qǐng)求
      c.Next()
      }
      }
    3. 在router里增加cors,必須在group之前,全局設(shè)置
      r.Use(gin.Logger(), gin.Recovery(), cors.Cors())
    4. 測(cè)試代碼,header設(shè)置不能多于cors設(shè)置
      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="UTF-8">
      <title>Title</title>
      </head>
      <link type="test/css" href="css/style.css" rel="stylesheet">
      <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
      <script type="text/javascript">
      $(function(){
      $("#cors").click(
      function(){
      $.ajax({
      headers:{
      "Content-Type":"application/json;charset=UTF-8",
      "Access":"adsad",
      "Access-Token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3QiLCJwYXNzd29yZCI6InRlc3QxMjM0NTYiLCJleHAiOjE1NzczMzY3MTIsImlzcyI6Imdpbi1ibG9nIn0.wMlQXqZO2V0LR-FIgDh45LWI0OYMYi6an_NvRmF0Nug"
      },
      url:"http://127.0.0.1:8000/api/v1/articles",
      success:function(data){
      console.log("start");
      console.log(data);
      }
      })
      });
      });
      </script>
      <body>
      <input type="button" id="cors" value="core跨域測(cè)試">
      </body>
      </html>
    5. 請(qǐng)求的headers數(shù)量、名稱(chēng)與cors里的設(shè)置需要嚴(yán)格對(duì)應(yīng),不然報(bào)錯(cuò)如下
      Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/v1/articles' from origin 'http://localhost:9999' has been blocked by CORS policy: Request header field access is not allowed by Access-Control-Allow-Headers in preflight response.
    posted @ 2019-12-26 11:17 一凡 閱讀(326) | 評(píng)論 (0)編輯 收藏
    1、在main函數(shù)中增加全局配置,其中@name就是你確定的鑒權(quán)參數(shù)名,我的是token,    @in header 說(shuō)明參數(shù)放在header,你的鑒權(quán)代碼需要從header中獲取

    // @title gin-blog API
    // @version 0.0.1
    // @description This is a gin blog example
    // @securityDefinitions.apikey ApiKeyAuth
    // @in header
    // @name token
    // @BasePath /

    2、在具體的handler里添加如下注釋?zhuān)颂幍腁piKeyAuth和main中的apike對(duì)應(yīng),切記不要修改
    // @Security ApiKeyAuth

    3、swagger頁(yè)面如下:


    4、添加token后,后續(xù)所有有鑒權(quán)接口的header里自動(dòng)攜帶token
    posted @ 2019-12-23 16:08 一凡 閱讀(1992) | 評(píng)論 (0)編輯 收藏
    posted @ 2019-11-19 16:41 一凡 閱讀(146) | 評(píng)論 (0)編輯 收藏
     處理1W條復(fù)雜json數(shù)據(jù)性能對(duì)比

    1. golang

      ./go_extract_json  0.95s user 0.12s system 99% cpu 1.081 total    
    2. shell
      bash segment.sh  0.64s user 0.07s system 101% cpu 0.695 total
    3. perl
      perl extract.pl  39.57s user 0.54s system 98% cpu 40.579 total
    posted @ 2019-09-20 18:13 一凡 閱讀(221) | 評(píng)論 (0)編輯 收藏
    1.  Invalid bound statement (not found)
      在接口名稱(chēng)及方法名稱(chēng)對(duì)應(yīng)OK的情況下,在application.properties中添加:
    mybatis.mapperLocations=classpath:mapper/*Mapper.xml   
    mybatis.typeAliasesPackage=com.willpower.entity
    posted @ 2019-04-03 21:41 一凡 閱讀(130) | 評(píng)論 (0)編輯 收藏
    推薦:
    https://github.com/wming3/.vimToIDE
    posted @ 2017-05-08 16:33 一凡 閱讀(224) | 評(píng)論 (0)編輯 收藏

    http://www.iteye.com/news/32170

    Guice OKHttp Retrofit 
    posted @ 2017-03-02 17:36 一凡 閱讀(135) | 評(píng)論 (0)編輯 收藏
    http://www.iteye.com/news/32119
    posted @ 2017-02-10 18:57 一凡 閱讀(142) | 評(píng)論 (0)編輯 收藏
    http://www.iteye.com/news/31877
    posted @ 2016-10-11 15:26 一凡 閱讀(168) | 評(píng)論 (0)編輯 收藏
     //mysql
     mysql -uroot -proot -h127.0.0.1 testdb -e " select a, b, c, d from t_test where a='xxxx'" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > /tmp/xxxxx.csv
    posted @ 2015-01-22 18:55 一凡 閱讀(354) | 評(píng)論 (0)編輯 收藏

        http://www.oracle.com/

        wget下載方法:
        1、在打開(kāi)瀏覽器的開(kāi)發(fā)者工具
        2、在network里找到類(lèi)似http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1416809306_8aff16bf46c832f44260abcc951c58ea


    wget http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin\?AuthParam=1416809306_8aff16bf46c832f44260abcc951c58ea
    注意:紅色,由于?是通配符,需要轉(zhuǎn)義一下。
    posted @ 2014-11-24 14:09 一凡 閱讀(226) | 評(píng)論 (0)編輯 收藏
    主站蜘蛛池模板: 亚洲精品在线视频观看| 国产av无码专区亚洲av果冻传媒 | 日韩视频在线免费观看| 成人黄18免费视频| 亚洲高清偷拍一区二区三区| 亚洲性猛交XXXX| 亚洲精品电影天堂网| 亚洲中文字幕久久无码| 特级毛片免费播放| 国内精品久久久久影院免费| 精品久久8x国产免费观看| 蜜桃精品免费久久久久影院| 中文字幕亚洲无线码| 亚洲精品在线播放视频| 亚洲av日韩综合一区久热| 久久毛片免费看一区二区三区| 6080午夜一级毛片免费看6080夜福利| 性色av免费观看| 亚洲中文字幕久久精品无码APP| 亚洲高清视频在线播放| 亚洲AV无码国产精品永久一区| 中文字幕在线视频免费观看| 和日本免费不卡在线v| 免费人成激情视频| 亚洲视频网站在线观看| 国产精品亚洲一区二区三区| 日韩电影免费观看| 蜜臀91精品国产免费观看| 国产V亚洲V天堂A无码| 亚洲国产精品无码中文lv| 免费看黄的成人APP| 免费看片A级毛片免费看| 亚洲av鲁丝一区二区三区| 亚洲精品精华液一区二区| 欧洲人免费视频网站在线| 国产精品免费视频播放器| 久久亚洲精品无码| 高h视频在线免费观看| 在线人成精品免费视频| 亚洲精品成a人在线观看| 国产精品亚洲片在线va|