在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ Java問答
尛憇藌 回答

問題已解決,出現(xiàn)這種情況其實(shí)是正常的,但為什么會(huì)啟動(dòng)5分鐘,是因?yàn)镈EBUG日志輸出,只要設(shè)置logback的輸出等級(jí)為INFO就沒問題了。

萌吟 回答
  
  把xml配置改成這樣就可以了
  <update id="updateByPrimaryKeySelective">
    update zzbizorder_#{tableIndex}
    <set>
      <if test="record.clickid != null">
        clickid = #{record.clickid,jdbcType=BIGINT},
      </if>
      <if test="record.xxxx != null">
        clickid = #{record.xxxx,jdbcType=BIGINT},
      </if>
      <if test="record.xxxx != null">
        clickid = #{record.xxxx,jdbcType=BIGINT},
      </if>
      <if test="record.xxxx != null">
        clickid = #{record.xxxx,jdbcType=BIGINT},
      </if>
      <if test="record.xxxx != null">
        clickid = #{record.xxxx,jdbcType=BIGINT},
      </if>
    </set>
    
    
    
笨笨噠 回答

字符: 春節(jié)
Unicode 碼點(diǎn)(十進(jìn)制): 26149 33410
Unicode 碼點(diǎn)(十六進(jìn)制): \u6625 \u8282
Unicode 碼點(diǎn)(二進(jìn)制): 0110 0110 0010 0101 1000 0010 1000 0010

Unicode - UTF-8 轉(zhuǎn)換規(guī)則

Unicode utf-8
U+ 0000 ~ U+ 007F 0XXXXXXX
U+ 0080 ~ U+ 07FF 110XXXXX 10XXXXXX
U+ 0800 ~ U+ FFFF 1110XXXX 10XXXXXX 10XXXXXX
U+ 10000 ~ U+ 1FFFF 11110XXX 10XXXXXX 10XXXXXX 10XXXXXX

十六進(jìn)制代入表格選擇對(duì)應(yīng)。
二進(jìn)制代入表格對(duì)應(yīng) XXX 位置。

得 UTF-8:

二進(jìn)制
11100110 10011000 10100101
11101000 10001010 10000010

十六進(jìn)制
E6 98 A5
E8 8A 82

最終編碼
%E6%98%A5%E8%8A%82

咕嚕嚕 回答

POI 中依賴了 poi-ooxml-schemas 這個(gè)jar 但是這個(gè)jar缺少方法。
所以需要再引用一個(gè) jar包 ooxml-schemas ,然后就可以了 版本用1.1的

舊螢火 回答

post 的參數(shù)不是json格式啊,postman都給你提示錯(cuò)誤了......

不將就 回答

查看了源碼發(fā)現(xiàn)pipe其實(shí)是做了上一個(gè)流結(jié)束會(huì)觸發(fā)下一個(gè)流結(jié)束的操作。

var endFn = doEnd ? onend : cleanup;
    if (state.endEmitted)
        process.nextTick(endFn);
    else
        src.once('end', endFn);

    dest.on('unpipe', onunpipe);

    function onunpipe(readable) {
        debug('onunpipe');
        if (readable === src) {
            cleanup();
        }
    }

    function onend() {
        debug('onend');
        dest.end();
    }
    function cleanup() {
        debug('cleanup');
        // cleanup event handlers once the pipe is broken
        dest.removeListener('close', onclose);
        dest.removeListener('finish', onfinish);
        dest.removeListener('drain', ondrain);
        dest.removeListener('error', onerror);
        dest.removeListener('unpipe', onunpipe);
        src.removeListener('end', onend);
        src.removeListener('end', cleanup);
        src.removeListener('data', ondata);

        cleanedUp = true;

        // if the reader is waiting for a drain event from this
        // specific writer, then it would cause it to never start
        // flowing again.
        // So, if this is awaiting a drain, then we just call it now.
        // If we don't know, then assume that we are waiting for one.
        if (state.awaitDrain &&
            (!dest._writableState || dest._writableState.needDrain))
            ondrain();
    }

但是不知道duplex抽什么風(fēng)了。然后改用transiform就妥妥了

柒喵 回答

chroot_list_enable=FALSE
或者在chroot_list文件里添加ftpuser

墨小白 回答

JWT 是不需要存服務(wù)端的,我也很奇怪為什么有人會(huì)把token存服務(wù)端。而且即使存服務(wù)端,也應(yīng)該當(dāng)成密碼一樣加密存儲(chǔ)。不然數(shù)據(jù)庫被 hack 里,token 就都拿到了,不用密碼就可以冒充用戶發(fā)請(qǐng)求了。

薄荷綠 回答

修改下第一種封裝過的方法:

export function login(username, password) {
  return request({
       url: '...',
       method: '...',
       // 代碼區(qū)別在這里
       // axios post請(qǐng)求默認(rèn)的 Content-type 就是 x-www-form-urlencoded,此時(shí)是 data 選項(xiàng)
       // 如果是 get 請(qǐng)求的化,就是 params 選項(xiàng)
       data: {
           username,
           password
       } 
   })  
}
卟乖 回答

http://mvnrepository.com 中找到一個(gè)依賴后,就在當(dāng)前依賴版本頁面下面找關(guān)聯(lián)的其它依賴

不歸路 回答

$.get()不是獲取數(shù)據(jù)嗎

跳轉(zhuǎn)頁面你可以使用 location.href=... 或者 window.open()

淡墨 回答
    public static void main(String[] args) throws Exception {
        
        List<Float> labelList = new ArrayList<Float>();
        
        List<Float> dataList = new ArrayList<Float>();

        
         BufferedReader buff = new BufferedReader(new InputStreamReader(
                    (new FileInputStream(new File("D:/1.txt")))));
          String str = null;
            while (null  != (str = buff.readLine())) {
                str = str.trim();
                if("".equals(str)){
                    continue;
                }
                String[] arr = str.split("\\s+");
                System.out.println(arr[0]+"-"+arr[1]+"-"+arr[2]+"-"+arr[3]);
                labelList.add(Float.parseFloat(arr[3]));
                dataList.add(Float.parseFloat(arr[0]));
                dataList.add(Float.parseFloat(arr[1]));
                dataList.add(Float.parseFloat(arr[2]));
            }
            buff.close();
            System.out.println(labelList);
            System.out.println(dataList);
        
    }
情殺 回答

item不是個(gè)對(duì)象嗎?你為什么綁給value? 你應(yīng)該給value綁定gradeName啊!

執(zhí)念 回答

使用exchange提供的webservice
url使用域名,不用端口,就可以了
https://xxx.xxx.xxx/EWS/Excha...

鐧簞噯 回答
在多線程的環(huán)境下,如果某個(gè)線程首次讀取共享變量,則首先到主內(nèi)存中獲取該變量,然后存入工作內(nèi)存中,以后只需要在工作內(nèi)存中讀取該變量即可。同樣如果對(duì)該變量執(zhí)行了修改的操作,則先將新值寫入工作內(nèi)存中,然后再刷新至主內(nèi)存中。但是什么時(shí)候最新的值會(huì)被刷新至主內(nèi)存中是不太確定的,這也就解釋了為什么VolatileFoo中的Reader線程始終無法獲取到init_value最新的變化。
· 使用關(guān)鍵字volatile,當(dāng)一個(gè)變量被volatile關(guān)鍵字修飾時(shí),對(duì)于共享資源的讀操作會(huì)直接在主內(nèi)存中進(jìn)行(當(dāng)然也會(huì)緩存到工作內(nèi)存中,當(dāng)其他線程對(duì)該共享資源進(jìn)行了修改,則會(huì)導(dǎo)致當(dāng)前線程在工作內(nèi)存中的共享資源失效,所以必須從主內(nèi)存中再次獲?。瑢?duì)于共享資源的寫操作當(dāng)然是先要修改工作內(nèi)存,但是修改結(jié)束后會(huì)立刻將其刷新到主內(nèi)存中。
· 通過synchronized關(guān)鍵字能夠保證可見性,synchronized關(guān)鍵字能夠保證同一時(shí)刻只有一個(gè)線程獲得鎖,然后執(zhí)行同步方法,并且還會(huì)確保在鎖釋放之前,會(huì)將對(duì)變量的修改刷新到主內(nèi)存當(dāng)中。
· 通過JUC提供的顯式鎖Lock也能夠保證可見性,Lock的lock方法能夠保證在同一時(shí) 刻只有一個(gè)線程獲得鎖然后執(zhí)行同步方法,并且會(huì)確保在鎖釋放(Lock的unlock方法)之前會(huì)將對(duì)變量的修改刷新到主內(nèi)存當(dāng)中。

摘自:《Java高并發(fā)編程詳解:多線程與架構(gòu)設(shè)計(jì)》 — 汪文君

關(guān)于這本書的東西我寫了一些代碼,用于理解 echobai/thread,包括自己動(dòng)手寫一個(gè)可見鎖和讀寫分離鎖等


更新一:

public class Task implements Runnable {

  public boolean flag = true;

  @Override
  public void run() {
    while (flag) {
      try {
        TimeUnit.SECONDS.sleep(2);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
    System.out.println(Thread.currentThread().getName() + "exit.");
  }

  public static void main(String[] args) throws InterruptedException{
    Task task = new Task();
    Thread t = new Thread(task, "task");
    t.start();
    TimeUnit.MILLISECONDS.sleep(10);
    task.flag = false;
  }
}

正常結(jié)束(連續(xù)5次測(cè)試都可以退出)

taskexit.

Process finished with exit code 0
public class Task implements Runnable {

  public boolean flag = true;

  @Override
  public void run() {
    while (flag) {
      /*try {
        TimeUnit.SECONDS.sleep(2);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }*/
      System.out.println("working...");
    }
    System.out.println(Thread.currentThread().getName() + "exit.");
  }

  public static void main(String[] args) throws InterruptedException{
    Task task = new Task();
    Thread t = new Thread(task, "task");
    t.start();
    TimeUnit.MILLISECONDS.sleep(10);
    task.flag = false;
  }
}

也是正常退出(連續(xù)測(cè)試5次):

working...
working...
working...
working...
working...
working...
working...
working...
working...
working...
working...
working...
working...
working...
taskexit.

Process finished with exit code 0

不明白,你是哪里有問題,主線程退出時(shí)候,主線程寫入主內(nèi)存了就,但是如果主線程不退出,也不加鎖,就以一定了


更新二:

確實(shí)是我錯(cuò)了,非常抱歉,再次改下代碼,再看結(jié)果

public class Task implements Runnable {

  public boolean flag = true;

  @Override
  public void run() {
    boolean  f = flag;
    while (f) {
      f = flag;
    }
    System.out.println(Thread.currentThread().getName() + "exit.");
  }

  public static void main(String[] args) throws InterruptedException{
    Task task = new Task();
    Thread t = new Thread(task, "task");
    t.start();
    TimeUnit.MILLISECONDS.sleep(10);
    task.flag = false;
  }
}

控制臺(tái)不會(huì)退出,用jconsole工具,看線程,main退出,task線程一直running
圖片描述

分析:某一線程只是對(duì)共享變量做讀操作的話,在本地運(yùn)行棧中做了緩存?zhèn)浞?其實(shí)此時(shí)main線程已將變量寫入主內(nèi)存),加了鎖或者volatile以后,可以將緩存置空(或者無效),從而增加可見性,可以理解為不是寫線程的問題,而是讀線程的問題

陌璃 回答

Person類缺少無參構(gòu)造方法;