鍍金池/ 問答/ 網(wǎng)絡(luò)安全問答
久礙你 回答

zepto早該棄用了?,F(xiàn)在的網(wǎng)絡(luò)環(huán)境,直接用jq3就可以了

慢半拍 回答

解決了, 這里報錯

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf-org.apache.cxf.spring.boot.autoconfigure.CxfProperties': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/el/ELManager

然后我在項(xiàng)目的pom文件添加如下

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
            <version>3.0.0</version>
        </dependency>

然后還是不行, 之后找到了原因,由于使用tomcat版本是tomcat7, 所以需要在tomcat的lib下放入javax.el-api-3.0.0.jar這個jar包, 或者直接使用tomcat8及以上的版本

雨萌萌 回答

我定義的類和你的不同:

class User
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Class { get; set; }
    public int Age { get; set; }
}

class Score
{
    public int Id { get; set; }
    public int UserId { get; set; }
    public string Course { get; set; }
    public int Value { get; set; }
}

思路是先對分?jǐn)?shù)按照 UserId 進(jìn)行分組,然后再與 User 進(jìn)行連接操作。

from user in users
join scoreList in from score in scores
                  group score by score.UserId into scoreGroup
                  select new
                  {
                      UserId = scoreGroup.Key,
                      Scores = scoreGroup
                  } on user.Id equals scoreList.UserId
select new
{
    user.Name,
    user.Class,
    user.Age,
    scoreList.Scores
}

輸出為:

[
  {
    "Name": "Young",
    "Class": "一班",
    "Age": 15,
    "Scores": [
      {
        "Id": 10,
        "UserId": 1,
        "Course": "數(shù)據(jù)結(jié)構(gòu)",
        "Value": 100
      },
      {
        "Id": 11,
        "UserId": 1,
        "Course": "高等數(shù)學(xué)",
        "Value": 90
      }
    ]
  },
  {
    "Name": "Hong",
    "Class": "二班",
    "Age": 24,
    "Scores": [
      {
        "Id": 12,
        "UserId": 2,
        "Course": "數(shù)據(jù)結(jié)構(gòu)",
        "Value": 95
      },
      {
        "Id": 13,
        "UserId": 2,
        "Course": "高等數(shù)學(xué)",
        "Value": 85
      }
    ]
  }
]

代碼:

到 Ubuntu Pastebin 查看

尛憇藌 回答

把你不需要的變量設(shè)成None,把不需要的cell刪掉,import gc; gc.collect()

女流氓 回答
優(yōu)先級不是最低的

不清楚你指的是什么。

偽元素顧名思義是當(dāng)作元素來看,兩個不同元素的選擇器優(yōu)先級沒有可比性。對于“是”來說,金色是繼承于 #sss 的,而它本身設(shè)置了紅色,則覆蓋了繼承。

萌面人 回答

可以打印一下file,其實(shí)就是一個js對象

console.log(document.querySelector('input[type=file]').files[0])
悶油瓶 回答

最近也在做這個,請問解決了嗎

柒槿年 回答
既然題主自己提到了microtask,我就假設(shè)題主已經(jīng)知道例1是怎么回事了

async內(nèi)的await會把之后的代碼放入新的microtask,即使等待的東西實(shí)際上是同步的。


詳細(xì)解析:

(async function GenFunc() {
  new Promise(function constructPromise(resolve) { // 1. Promise構(gòu)造器,同步執(zhí)行constructPromise
    resolve()                                      // 2. resolve,將promiseCallback放入microtask隊(duì)列位置1
  }).then(function promiseCallback() {
    console.log('1')                               // 6. microtask隊(duì)列位置1
  })
  await 'string'                                   // 3. await,將之后的所有代碼放入microtask隊(duì)列位置2
  console.log('2')                                 // 7. microtask隊(duì)列位置2
})()                                               // 4. async call return,返回Promise<pending>
console.log('3')                                   // 5. 執(zhí)行剩余的同步代碼
咕嚕嚕 回答

https://www.crummy.com/softwa...

html_doc = """
<html><head><title>The Dormouse's story</title></head>
<body>
<p class="title"><b>The Dormouse's story</b></p>

<p class="story">Once upon a time there were three little sisters; and their names were
<a  class="sister" id="link1">Elsie</a>,
<a  class="sister" id="link2">Lacie</a> and
<a  class="sister" id="link3">Tillie</a>;
and they lived at the bottom of a well.</p>

<p class="story">...</p>
"""

from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc)

soup.title
# <title>The Dormouse's story</title>

soup.title.name
# u'title'

soup.title.string
# u'The Dormouse's story'

soup.title.parent.name
# u'head'

soup.p
# <p class="title"><b>The Dormouse's story</b></p>

soup.p['class']
# u'title'

soup.a
# <a class="sister"  id="link1">Elsie</a>

soup.find_all('a')
# [<a class="sister"  id="link1">Elsie</a>,
#  <a class="sister"  id="link2">Lacie</a>,
#  <a class="sister"  id="link3">Tillie</a>]

soup.find(id="link3")
# <a class="sister"  id="link3">Tillie</a>
墨小白 回答

經(jīng)過自己查詢很多文章了解到,flume所支持elasticsearch版本較為落后,如果要想使用flume直接向es傳輸,需要使用低版本的es,而且需要修改jar包中的一些方法。flume的更新速度也遠(yuǎn)不如es的更新速率,所以應(yīng)該選取其它的日志收集策略

兄弟,同問啊,各種取對象的方法,都取了,就是方法跑不了。

喵小咪 回答

我在github上找到的答案:
https://github.com/spring-pro...
因?yàn)镴dbcConnectionRepository 不是public,無法使用代理類產(chǎn)生,如果使用spring boot的話可以設(shè)置spring.aop.proxy-target-class=false

或者在config里
@Bean

@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public ConnectionRepository connectionRepository(ConnectionFactoryLocator connectionFactoryLocator) {
    Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    if (authentication == null) {
        throw new IllegalStateException("Unable to get a ConnectionRepository: no user signed in");
    }
    return getUsersConnectionRepository(connectionFactoryLocator).createConnectionRepository(authentication.getName());
}

不適用CGLIB而使用JDK的代理
實(shí)在不行那應(yīng)該就是你的spring-boot-devtools的問題,刪除依賴即可

devserver的意思就是只在開發(fā)環(huán)境生效,打包到線上肯定就不生效了啊。因?yàn)榇虬鬀]有devserver了

孤影 回答

content-type 設(shè)置跟在數(shù)據(jù)后面

            //路徑   // 參數(shù) // 頭設(shè)置請求文本類型
    axios.post(url',params,{
        headers: {
          'Content-Type': 'application/x-www-form-urlencoded'
        }
    })

key:value格式 可以利用new URLSearchParams()方法 然后追加 append元素

json格式 那就 聲明拼接 對象值太多轉(zhuǎn)換JSON.stringify()

離夢 回答

$this->info這個數(shù)組對象已經(jīng)定義了么

trace這個模型的namespace沒問題么