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

鍍金池/ 問答/ Java問答
紓惘 回答

(?![0-9A-Z]+$)(?![0-9a-z]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,20}$

乞許 回答

看起來前幾位是對的,然后后面幾位有問題,估計(jì)是某些編碼要求后面補(bǔ)0,保證最后的總長度是8的倍數(shù),可以往這個(gè)方向試試,不用寫代碼,直接用一些在線的轉(zhuǎn)碼工具試幾下就有了。

吢涼 回答
p = re.compile('(里程)?.*?(?P<data>\d+(?:公里|km))(?(1).*?|.*?里程)')
print(p.search(line).group('data'))
冷咖啡 回答

創(chuàng)建好你git的存儲(chǔ)空間,然后pull到你的IDE中,把你的代碼粘貼進(jìn)去,最后Commit and Push

祈歡 回答

這種情況,應(yīng)該是頁面解析問題,你檢查下是否引入了s標(biāo)簽。

<%@ taglib prefix="s" uri="/struts-tags" %>  
雅痞 回答

這不是css就能寫的么

    body{
      -webkit-user-select: none;
    }
    .box {
      display: inline-block;
      border-bottom: 2px solid red;
    }
    .cont{
      width:150px;
      height: 8px;
      resize:vertical;
      overflow: hidden;
      margin-right: 150px;    
    }
    
    
    
    <div class="box">
  <div class="cont"></div>
</div>
<p>wwwwwwwwwwwwwwwwwww</p>
墨沫 回答
.wrapper {
  display: flex;
  justify-content: space-between;
}
.left{
  width: 100%; // 這個(gè)塊想內(nèi)容撐開的話就把width去掉。
}
.right{
  margin-left: 20px;
  min-width: 30px;
  flex:none;
}
.border {
  border: 1px solid black;
  box-sizing: border-box;
}
<div class="wrapper border">
    <div class="left border">123</div>
    <div class="right border">4</div>
</div>
哎呦喂 回答

你只要收集到某個(gè)服務(wù)器,假設(shè)你又不考慮實(shí)時(shí)性的話,你可以這樣:

  1. 程序生成的日志根據(jù)日期做rotate,生成log-2018-01-01,log-2018-01-02這樣的文件
  2. 寫個(gè)cron定時(shí)任務(wù),把日志文件scp到一個(gè)統(tǒng)一的服務(wù)器
歆久 回答

在資源文件夾下建三個(gè)文件夾, 分別對應(yīng)放置各自的application.properties文件

src/main/resources/dev/application.properties
src/main/resources/test/application.properties
src/main/resources/pro/application.properties

在pom.xml里先定義三個(gè)profile

    <profiles>
        <profile>
            <!-- 本地開發(fā)環(huán)境 -->
            <id>dev</id>
            <properties>
                <profiles.active>dev</profiles.active>
                <modifier></modifier>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>       <!-- 默認(rèn)的,不加參數(shù)時(shí)執(zhí)行這個(gè)profile -->         
            </activation>
        </profile>
        <profile>
            <!-- 測試環(huán)境 -->
            <id>test</id>
            <properties>
                <profiles.active>test</profiles.active>
                <modifier>-test</modifier>        
            </properties>
        </profile>
        <profile>
            <!-- 生產(chǎn)環(huán)境 -->
            <id>pro</id>
            <properties>
                <profiles.active>pro</profiles.active>                
                <modifier>-pro</modifier>                
            </properties>
        </profile>
    </profiles>

在build的標(biāo)簽下, 先排除全部,再添加當(dāng)前通過-P參數(shù)激活的profile:

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <!-- 資源根目錄排除各環(huán)境的配置,防止在生成目錄中多余其它目錄 -->
                <excludes>
                    <exclude>test/*</exclude>
                    <exclude>pro/*</exclude>
                    <exclude>dev/*</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources/${profiles.active}</directory>
            </resource>
        </resources>

最后,編譯時(shí)加-P參數(shù)即可, 如:

mvn -Ppro package
蟲児飛 回答

匹配情況

正則如下:

[a-zA-Z]+\d+|(?<=\d)[a-zA-Z]+

代碼如下:

# -*- coding: UTF-8 -*-
import re
str = '新發(fā)布的三星蓋樂世S9采用Exynos9810處理器,RAM為4GB,電池容量為3000mAh。'
pattern = re.compile(r'[a-zA-Z]+\d+|(?<=\d)[a-zA-Z]+')
someChars = pattern.findall(str)
print someChars
笨笨噠 回答

微信瀏覽器提示嗎?如果是的話那是因?yàn)槟銈兊木W(wǎng)站需要在微信里面?zhèn)浒福唧w方法可自行百度

墨小羽 回答

ngram分詞是個(gè)好東西

可以看看。原生自帶的

{
    "settings": {
        "number_of_shards": 3,
        "number_of_replicas": 0, 
        "analysis": {
            "filter": {
                "autocomplete_filter": { 
                    "type":     "edge_ngram",
                    "min_gram": 1,
                    "max_gram": 20
                }
            },
            "analyzer": {
                "autocomplete": {
                    "type":      "custom",
                    "tokenizer": "standard",
                    "filter": [
                        "lowercase",
                        "autocomplete_filter" 
                    ]
                }
            }
        }
    }
}

如上設(shè)置就OK

久不遇 回答

正則改成/\d+/g
/\d*/g可以匹配0個(gè)數(shù)字,所以就不會(huì)停止,死循環(huán)了


MDN 正則表達(dá)式
正則表達(dá)式用于匹配符合一定模式的字符串
*表示匹配前一個(gè)表達(dá)式0次或多次。
所以/c/g.test("a string")表示字符串"a string"是否有一個(gè)c,而/c*/g.test("a string")表示字符串"a string"是否至少有0個(gè)c。顯然至少有0個(gè)是絕對絕對會(huì)成立的。所以/c*/g.exec("a string")在一開始就會(huì)匹配成功(因?yàn)槟阈枰辽?個(gè),就算我開頭是a,我返回給你0個(gè)c`也就是空字符串也符合你要求,如果你用while來循環(huán),我就一直給你空字符串)。


正則用于匹配符合一定模式的字符串。
比如/b表示單詞邊界,/string\b/g.test("strings")false,是因?yàn)樽址?code>strings在g后還有s所以不是單詞邊界。/string\b/g.test("string~~~")true因?yàn)?code>g后面接~,單詞已經(jīng)結(jié)束了。
但是這不能說g~間有一個(gè)單詞邊界/b這樣的東西。字符串只是簡單的一串字符,string~~~只是st、r...~這樣一串字符在一起。 /b是否存在是正則表達(dá)式解析程序發(fā)現(xiàn)你的string~~~string~~~,在string就已經(jīng)結(jié)束了一個(gè)單詞,所以它判定你這個(gè)字符串符合/string\b/g這樣的模式。

情皺 回答

你可以把事件處理放到一個(gè)單獨(dú)的 js文件中. page里的事件回調(diào) 統(tǒng)一調(diào)這個(gè) 事件處理

練命 回答

@"((?![^\\]").)*[^"\\n]+"
((?!xx).)* 是不包含xx的意思,這里((?![^\\]").)*就是不包含非\"之外的"。

巫婆 回答

已解決:
出現(xiàn)上面問題的原因是沒有弄懂ts類型聲明文件的作用。
如果要在ts文件里引入第三方的js庫(比如Jquery或者自己寫的js模塊),那么該js沒有類型約束,怎么辦?這時(shí)候就可以引入該文件的.d.ts,然后typescript就會(huì)根據(jù)這個(gè)類型申明文件對該js進(jìn)行類型驗(yàn)證。
下面引用一下stackoverflow的一段話:
The "d.ts" file is used to provide typescript type information about an API that's written in JavaScript. The idea is that you're using something like jQuery or underscore, an existing javascript library. You want to consume those from your typescript code.

Rather than rewriting jquery or underscore or whatever in typescript, you can instead write the d.ts file, which contains only the type annotations. Then from your typescript code you get the typescript benefits of static type checking while still using a pure JS library.

薄荷綠 回答

從樓主寫文件寫入部分開始

try...except...結(jié)構(gòu) 其實(shí)與with as結(jié)構(gòu)重復(fù)了

try:
    f=open('test.txt')
except:
    print("error")
   
#等價(jià)于
with open('test.txt', mode='w') as f:

文本文件是可以直接用文本方式寫入吧,諸如txt,csv文件都可以
格式指定錯(cuò)誤出現(xiàn)亂碼情況很正常

文本寫入是不能用二進(jìn)制和指定編碼的

用同樣的方法親測了一波代碼,vsCode出錯(cuò),便宜charm正常
目測樓主用的vsCode,如果樓主是這種情況,我笑笑。

毀了心 回答

list是表,map是記錄。那? list.getindex(?).get(K) 是不是你想要得?

亮瞎她 回答

可以理解此處的枚舉在mysql中就是一個(gè)字符串。
手動(dòng)轉(zhuǎn)就行。

pm.setCategory(Category.valueof(rs.getString(3)));