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

鍍金池/ 問答
厭遇 回答

你先給圖片壓縮,然后,設(shè)置圖片的顯示大小。

墨小白 回答

先把A1-A3的值在PY里面拼接好,再合并單元格,再把值賦給合并后的單元格

呆萌傻 回答

你都用mb_detect_encoding了,為啥不用mb_convert_encoding呢?

舊顏 回答

重新標記(Remark) 的作用在于:
之前在并發(fā)標記時,因為是 GC 和用戶程序是并發(fā)執(zhí)行的,可能導(dǎo)致一部分已經(jīng)標記為 從 GC Roots 不可達 的對象,因為用戶程序的(并發(fā))運行,又可達 了,Remark 的作用就是將這部分對象又標記為 可達對象


至于 “浮動垃圾”,因為 CMS并發(fā)標記 時是并發(fā)的,GC 線程和用戶線程并發(fā)執(zhí)行,這個過程當然可能會因為線程的交替執(zhí)行而導(dǎo)致新產(chǎn)生的垃圾(即浮動垃圾)沒有被標記到;而 重新標記 的作用只是修改之前 并發(fā)標記 所獲得的不可達對象,所以是沒有辦法處理 “浮動垃圾” 的。

生性 回答

原理說明

Converter<String, Date> 接口必然有一個sourceType和targetType,這里就是StringDate,然后這兩個類型組成一個key,邏輯上可以認為類似String_Date,而對應(yīng)的value就是你自定義的converter。因此只要是從String轉(zhuǎn)換為Date的變量,都會用這個converter進行轉(zhuǎn)換。

源碼

GenericConversionService.getConverter方法中:

    protected GenericConverter getConverter(TypeDescriptor sourceType, TypeDescriptor targetType) {
        ConverterCacheKey key = new ConverterCacheKey(sourceType, targetType);
        GenericConverter converter = this.converterCache.get(key);
        if (converter != null) {
            return (converter != NO_MATCH ? converter : null);
        }

        converter = this.converters.find(sourceType, targetType);
        if (converter == null) {
            converter = getDefaultConverter(sourceType, targetType);
        }

        if (converter != null) {
            this.converterCache.put(key, converter);
            return converter;
        }

        this.converterCache.put(key, NO_MATCH);
        return null;
    }

問題答題

傳輸過來的不都是string類型的么,那么轉(zhuǎn)換器會將每個字段都轉(zhuǎn)換一遍么

前半句沒錯,后半句稍加修改:轉(zhuǎn)換器會將所有Date類型的字段都轉(zhuǎn)換一遍

拓展

其實前端變量轉(zhuǎn)換并不一定是通過converter的方式,還有兩種方式推薦:

  • 使用@DateTimeFormat注解
public class Person {
    private String name;
    private Integer age;
    @DateTimeFormat(pattern = "yyyyMMdd")
    private Date birthDay;
    private Float salary;
    private Integer version;
}
  • 使用PropertyEditor
public class DemoController {

    @InitBinder
    public void intDate(WebDataBinder dataBinder) {
        dataBinder.addCustomFormatter(new DateFormatter("yyyyMMdd"));
    }
    
    ....

}

這種方式也可以指定轉(zhuǎn)換只應(yīng)用到某個指定field

墨染殤 回答

用vue寫了一個demo,能運行的,樣式自己調(diào)整吧

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
<div id="container">
  <table>
    <tr>
      <td v-for="name in keysNames">{{name}}</td>
      <td v-for="prop in props">{{prop}}</td>
    </tr>
    <tr v-for="(item, itemIndex) in list" :key="itemIndex">
      <td v-for="key in keys">{{item[key]}}</td>
      <td v-for="(prop, propIndex) in item.props" :key="propIndex" @click="toggleItem(itemIndex, propIndex)">{{prop}}</td>
    </tr>
  </table>
</div>
  <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.js"></script>
  <script type="text/javascript">
  var app = new Vue({
    el:"#container",
    data:{
      keys: [],
      props: [],
      list: [],
      keysNames: []
    },
    created() {
      this.foo(['紅色','黃色'],[36,37,38,39,40,41],['A','B','C','D'])
    },
    methods:{
      foo: function(colorOptions, sizeOptions, otherSizeOptions){
        let keys = ['order']
        let keysNames = ['序號']
        let list = []
        let hasOtherSize = false
        let order = 1
        if(colorOptions == null || colorOptions.length === 0){
          console.error('colorOptions is empty')
          return
        }

        if(sizeOptions == null || sizeOptions.length === 0){
          console.error('otherSizeOptions is empty')
          return
        }
        this.props = sizeOptions;

        keys.push('color')
        keysNames.push('顏色')
        
        if(otherSizeOptions != null && otherSizeOptions.length > 0){
          hasOtherSize = true
          keys.push('otherSize')
          keysNames.push('其他顏色')
        }

        colorOptions.forEach(color => {
          console.log('1111')
          if(hasOtherSize){
            otherSizeOptions.forEach(otherSize => {
              let obj = {}
              obj.color = color
              obj.otherSize = otherSize
              obj.props = new Array(sizeOptions.length).fill(true)
              obj.order = order
              order ++
              list.push(obj)
            })
          } else {
            let obj = {}
            obj.color = color
            obj.props = new Array(sizeOptions.length).fill(true)
            obj.order = order
            order ++
            list.push(obj)
          }
        })

        console.log(list)
        this.keys = keys;
        this.keysNames = keysNames
        this.list = list
      },
      toggleItem(itemIndex, propIndex){
        let list = this.list
        list[itemIndex].props[propIndex] = !list[itemIndex].props[propIndex] 
        this.$set(this.list[itemIndex].props, list[itemIndex].props,true )
      }
    }
  })
  </script>
</body>
</html>
真難過 回答
  1. git有個自動轉(zhuǎn)換換行符功能,在文件commit時會自動轉(zhuǎn)換換行符格式;

    不想使用,也可以通過 git config --global core.autocrlf false 關(guān)閉;

  2. 如果僅僅想要讓編輯器顯示LF,除了樓上說的 利用.eslintrc配置,然后ctrl+s 保存時一個個轉(zhuǎn)換;
  3. 另外一個方法是使用git-windows自帶有dos2unix.exe,
    執(zhí)行 find . -type f -exec dos2unix {} \; 批量轉(zhuǎn)換
選擇 回答

我在調(diào)式工具試了下,得出的結(jié)論是 返回一個類似數(shù)組的結(jié)構(gòu)
function String(str) {

let arr = []
for(let i=0;i<str.length;i++) {
     arr[i] = str.charAt(i)
}
return arr

}
個人見解是因為string具有遍歷器接口,是可以遍歷的

孤客 回答

直接open會被瀏覽器阻止的,location可以跳轉(zhuǎn)

echo ("<script>window.location = 'http://www.baidu.com';</script>");
放開她 回答

自習琢磨琢磨這個.
不要想得太麻煩. 繼承就是調(diào)用一個方法和屬性,自己在沒有,就會去原型鏈上去找.就這么簡單.

clipboard.png

熊出沒 回答

history.push(path, {query: {grade, id}})
獲取的時候在match中。請把props打印出來慢慢找。

陪妳哭 回答

折騰了一天,換了個瀏覽器居然好了?喵喵喵?然后重啟了谷歌瀏覽器,什么問題都沒有了,這臥槽

單眼皮 回答

哈哈 感謝 收藏了

伴謊 回答

const getType = target => Object.prototype.toString.call(target);

挽歌 回答

e1???el???
好奇你怎么寫成1的。
那個是elementel

枕邊人 回答

判斷城市是否全選,如果城市全選了,勾上全選復(fù)選框。如果至少選中一個城市或者沒有選中城市,全選這個checkbox為 indeterminate狀態(tài)。如果沒選城市,全選的checkbox 為沒選中的狀態(tài)