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

鍍金池/ 問答
純妹 回答

belondplanid 字段在 model 里出現(xiàn)了兩次
貼一下你的 tb_Lesson model 代碼

硬扛 回答

點(diǎn)擊提交后需要調(diào)用form.resetFields()方法重置一組輸入控件的值與狀態(tài)
https://codepen.io/yuanjiahui...

安于心 回答

你提供信息太少了,代碼都不貼。
可能是https的證書驗(yàn)證問題。

凝雅 回答

.....跟著改咯....
str.split(':')[1].replace(';', '')

司令 回答

@ExceptionHandler不是可以捕獲全局異常進(jìn)行處理?

生性 回答

官方示例代碼里auto-play屬性全X寫錯成了autoplay,/(ㄒoㄒ)/~~

鹿惑 回答

在.htaccess里寫上"ErrorDocument 404 error/404.html" 后面是404路徑,不需要雙引號,保存后重啟apache即可,希望能幫助到你

Writing to net

The server is writing a packet to the network. This state is called Sending to client as of MySQL 5.7.8.

ref: https://dev.mysql.com/doc/ref...

本地select 超過1S,推測你每次select出的數(shù)據(jù)集比較大,本地的packet設(shè)置得過小

在Mysql執(zhí)行下

show global variables like "max_allowed_packet"

解決方案:

  1. 降低每次查詢出的結(jié)果集
  2. 增大max_allowed_packet
淺時光 回答

這個問題太泛,百度搜一下,有很多有價(jià)值的東西。

青黛色 回答
排查了3天,最后可算是把 這個問題解決了,最后還是有完完全全的刨析了一次,scrapy-redis的源碼才找到問題.排查這個,要從爬蟲運(yùn)行后,Redis中的隊(duì)列情況來入手

排查思路

  • 首先查看Redis中的請求隊(duì)列的情況,發(fā)現(xiàn)在執(zhí)行過程中只有存儲指紋過濾的隊(duì)列和item的隊(duì)列,沒有存儲Request的隊(duì)列
  • 查看源碼發(fā)現(xiàn),scrapy-redis在將請求入隊(duì)列和出隊(duì)列時,采用的是,將請求序列化后進(jìn)行l(wèi)push和lpop后反序列化
  • 然后開啟斷點(diǎn)調(diào)試模式。在request lpush后,查看redis的情況,這時在redis中會出現(xiàn)key:reuqest的隊(duì)列,但是只有一個請求
  • 繼續(xù)斷點(diǎn)發(fā)現(xiàn) 在lpop后,由于只向redis中添加了一個request,所以在lpop后,list中就沒有元素了,redis會自動把list刪除
  • 所以這時,另一個爬蟲在查詢主機(jī)的redis請求隊(duì)列時,是查詢不到任何request的,所以是一直等待的狀態(tài)。
  • 這個跟爬取的數(shù)據(jù)結(jié)構(gòu)有感,爬取的是一個分頁的列表數(shù)據(jù),是在解析完當(dāng)前頁面后,才會生成下一頁的請求的。是深度優(yōu)先的模式
  • 每次只生成一個請求,所以redis請求隊(duì)列維護(hù)的也只有一個請求。所以就造成這樣的問題
  • 出現(xiàn)問題的代碼如下

        # 單頁面解析完成,開始構(gòu)建下一頁的數(shù)據(jù)
        next_page_link = response.xpath('//div[@class="grid-8"]/div[@class="navigation margin-20"]/a[@class="next page-numbers"]/@href').extract_first()

        if next_page_link is None or len(next_page_link) == 0:
            log.logger.info('completed all page request')

        else:
            log.logger.info('will request next page and request url is %s'%next_page_link)
            #問題出現(xiàn)這這里,每次只生成一個request,所以 redis隊(duì)列維護(hù)的也只有一個請求
            yield Request(url=next_page_link)

解決辦法

  • 采用廣度優(yōu)先的模式進(jìn)行抓取
  • 獲取爬取的總頁數(shù),進(jìn)行提取總頁碼,生成請求連接
  • 獲取待爬取的所有頁面的請求,循環(huán)入redis隊(duì)列,可解決這個問題
  • 代碼如下
        if self.already_push_all_request is not True:
            page_list_html_a = response.xpath('//div[@class="grid-8"]/div[@class="navigation margin-20"]/a[@class="page-numbers"]')
            last_page_list_html_a = page_list_html_a[-1]
            last_page_index = last_page_list_html_a.xpath('text()').extract_first()
            print(type(last_page_index))
            last_index_number = int(last_page_index)
            print last_index_number
            format_url = 'http://python.jobbole.com/all-posts/page/{0}/'
            next_page_index = 2
            while next_page_index <= last_index_number:
                next_page_request_url = format_url.format(next_page_index)
                print(' will lpush to redis and url is %s'%next_page_request_url)
                yield Request(url=next_page_request_url)
                next_page_index += 1
            self.already_push_all_request = True
冷溫柔 回答

組件通信

了解下 $invoke。

如果你是要讓不同頁面使用同樣的data的話,還可以使用mixin。

巴扎嘿 回答

如果你的php是用brew安裝的那么按照樓上說的使用brew安裝memcache;如果是手動編譯安裝的那么我不確定brew安裝是否可行。如果你的memcache是手動安裝的,你在安裝的時候要先掛起phpize和configure

妖妖 回答
modules: {
    foo: {
      namespaced: true,

      actions: {
        someAction: {
          root: true,
          handler (namespacedContext, payload) { ... } // -> 'someAction'
        }
      }
    }
  }
尐潴豬 回答

不太理解左滑事件為何
我也是個react新手,對這問題略有興趣
是指
1.在一個物件上向左滑後觸發(fā)事件
還是
2.在螢?zāi)簧舷蜃蠡嵊|發(fā)事件
請問是哪種呢
若是第一種類型
我應(yīng)該會在上面加mousedown-->mouseup
然後判斷down跟up的時候觸擊位置是否為左滑來決定是否觸發(fā)事件

陪我終 回答

article 里面可以存儲一個comment的_id數(shù)組,就可以populate出評論了

let articleSchema = new Schema({
    title: String,
    content: String,
    comments:[{
    type: Schema.Types.ObjectId, ref: 'Comment'
    }]
)}
硬扛 回答

只要是符合插件規(guī)范的插件都可以使用,官網(wǎng)上羅列的插件也只是一部分,每個人都可以根據(jù)自己的需要編寫新的插件,所以也沒有地方查看全部插件,有一個折衷的辦法是在npm倉庫列表里搜索webpack-plugin,一般生產(chǎn)用的插件都會取這種規(guī)范的名字并且發(fā)布到npm倉庫上。

哚蕾咪 回答

如果我沒有理解錯,你的執(zhí)行邏輯是:

DruidDataSource屬性 依賴 -> jdbc.properties
其他beans屬性 依賴 -> DruidDataSource

那么你需要做的是在spring創(chuàng)建beans后

做后處理之前為DruidDataSource設(shè)置屬性

做后處理之后為其他beans創(chuàng)建PropertyPlaceholder

如下方式可供參考(代碼需要根據(jù)你的情況修改后才能用):

package com.bixuebihui;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;


public class BeanPostPrcessorImpl implements BeanPostProcessor {
    private Properties properties="jdbc.properties";
    
    // Bean 實(shí)例化之前進(jìn)行的處理
    public Object postProcessBeforeInitialization(Object bean, String beanName)
           throws BeansException {
       //System.out.println("對象" + beanName + "開始實(shí)例化");
        if(beanName.equals("druidDataSource")){
            try {
                //set druidDataSource's properties use properties
                ((DruidDataSource)bean).setUrl(properties.getProperty("url"));
                ......
            } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
                e.printStackTrace();
            }
        }
       return bean;
    }

    // Bean 實(shí)例化之后進(jìn)行的處理
    public Object postProcessAfterInitialization(Object bean, String beanName)
           throws BeansException {
       //System.out.println("對象" + beanName + "實(shí)例化完成");
        //<bean class="com.spring.test.di.BeanPostPrcessorImpl"/>
       return bean;
    }
    
    public String getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }
}
    <bean id="properties"
      class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="locations">
        <list>
        <value>classpath:jdbc.properties</value>
        </list>
    </property>
    </bean>

    <bean class="com.bixuebihui.BeanPostPrcessorImpl">
        <property name="properties" value="properties" />
    </bean>

參考:
https://segmentfault.com/a/11...

久礙你 回答

600-800條不分頁嗎=。=

旖襯 回答

你是不是 把 圖片信息, 寫到全局 類似 redux 里了 ?