鍍金池/ 問(wèn)答/ C++問(wèn)答
乖乖瀦 回答

寬的可能是用meta標(biāo)簽設(shè)置的,窄的可能是知乎自己寫(xiě)的

已經(jīng)解決了問(wèn)題,首先要修改一下pom.xml中的build里面的配置。
然后要把本地的jar包都用maven來(lái)進(jìn)行管理。
貼上我的pom.xml文件供大家參考。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.qd</groupId>
    <artifactId>portal</artifactId>
    <version>1.0.0</version>
    <packaging>war</packaging>

    <name>portal</name>
    <description>Intelligence Connect Electric Drill</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            &lt;!&ndash;<scope>provided</scope>&ndash;&gt;
        </dependency>-->
        <!--<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>-->
        <!-- 添加mysql的依賴(lài) -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- 添加jpa的支持 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.3.12.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.qd</groupId>
            <artifactId>commons</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.2.1</version>
        </dependency>

        <dependency>
            <groupId>com.aliyun.oss</groupId>
            <artifactId>aliyun-sdk-oss</artifactId>
            <version>2.8.2</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.2</version>
        </dependency>

        <!-- 嘗試加一下core依賴(lài) -->
        <dependency>
            <groupId>com.qd</groupId>
            <artifactId>core</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!-- 把他們都改成maven引入,1-16 -->
        <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>aliyun-java-sdk-core</artifactId>
            <version>3.2.3</version>
        </dependency>

        <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
            <version>1.0.0</version>
        </dependency>

        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>

        <!-- Mqtt -->
        <dependency>
            <groupId>org.eclipse.paho</groupId>
            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
            <version>1.1.0</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>
心沉 回答

打開(kāi)藍(lán)牙的HCI log ,抓取hci log 看看通訊情況 ,hci log 可以用 wireshark 軟件查看 hci log文件一般會(huì)保存SD卡目錄下,也有的手機(jī)保持其他路徑,可以找 /etc下的藍(lán)牙配置文件查看保持路徑

舊言 回答
  1. 系統(tǒng)動(dòng)態(tài)庫(kù): 運(yùn)行時(shí)自動(dòng)鏈接到手機(jī)運(yùn)行環(huán)境的動(dòng)態(tài)庫(kù), 這些動(dòng)態(tài)庫(kù)一般都是保存$PATH(打開(kāi)adb shell可查看該環(huán)境變量)對(duì)應(yīng)的目錄下
  2. 第三方動(dòng)態(tài)庫(kù): 需要在mk中手動(dòng)cp到so目錄, apk運(yùn)行時(shí), 會(huì)自動(dòng)在沙箱內(nèi)的so目錄查看并鏈接到正確的so上
選擇 回答
    public function msgId($spid, $sqid)
    {
        $timeStr = time();
        //echo bindec(sprintf("%04s%05s%05s%06s%06s%022s%016s",decbin(date('m', $timeStr)),decbin(date('d', $timeStr)),decbin(date('H', $timeStr)),decbin(date('i', $timeStr)),decbin(date('s', $timeStr)),decbin($spid), decbin($sqid)));
        return bindec(sprintf("%04s%05s%05s%06s%06s%022s%016s",decbin(date('m', $timeStr)),decbin(date('d', $timeStr)),decbin(date('H', $timeStr)),decbin(date('i', $timeStr)),decbin(date('s', $timeStr)),decbin($spid), decbin($sqid)));
    }

    $this->msgId('600010','2');

在這里面給你糾正一下思路
第一: 64里面只能存0-1之間的數(shù)值,也就是說(shuō)都是2進(jìn)制數(shù)據(jù)
所以拼接一下2進(jìn)制數(shù)據(jù)就好了

月份(1-12)(【0001-1100】區(qū)間 4位)decbin(date('m', $timeStr))
日(1-31)(【00001-11111】區(qū)間 5位)decbin(date('d', $timeStr))
時(shí)(1-24)(【00001-11000】區(qū)間 5位)decbin(date('H', $timeStr))
分(1-59)(【000001-111011】區(qū)間 6位)decbin(date('i', $timeStr))
秒(1-59)(【000001-111011】區(qū)間 6位)decbin(date('s', $timeStr))
網(wǎng)關(guān)代碼(【0~0 - 1~1】22位)decbin($spid1)
// (如果這個(gè)網(wǎng)關(guān)代碼是22位0和1組成就不用decbin,本身就是2進(jìn)制了,如果不是的話,就變成二進(jìn)制)
序列號(hào)(區(qū)間 16位)decbin($spid2)

網(wǎng)關(guān)代碼多少位我沒(méi)洗數(shù),序列號(hào),什么的位數(shù)你自己調(diào)就行了%04d%06d%05d%06d%06d【%021d%016d】<-這里 如果沒(méi)算錯(cuò)的話是4+5+5+6+6+22+16應(yīng)該是64位了,那么這64位是一個(gè)2進(jìn)制的字符串,用bindec()轉(zhuǎn)換成十進(jìn)制的數(shù)值,存進(jìn)數(shù)據(jù)庫(kù)里面,那么數(shù)據(jù)庫(kù)存貯的2進(jìn)制數(shù)據(jù)就是符合你要的規(guī)定了,而且10進(jìn)制數(shù)據(jù),8位,64字節(jié),完美

變量名用點(diǎn)心$spid, $sqid 我以為是一個(gè)

下面這種方法也是簡(jiǎn)單,邏輯上不好理解,但是還是挺簡(jiǎn)單的,學(xué)習(xí)了

$messageId = 0;
$messageId |= $m << 60;
$messageId |= $d << 55;
$messageId |= $h << 50;
$messageId |= $i << 44;
$messageId |= $s << 38;
$messageId |= $spid << 16;
$messageId |= $sqid & 0xff;
echo $messageId
孤島 回答

      path:'/index',
      name:'index',
      component:index,
      redirect:'/device/deviceDisplay',
      children:[
        {
          path:'/device/user',
          name:'user',
          component:user,
            children:[
             {
              path: '/device/deviceDisplay',
              name: 'deviceDisplay',
              component: deviceDisplay
             }
           ]
        }

我理解的是默認(rèn)選中第一個(gè),用重定向

clipboard.png

https://router.vuejs.org/zh/g...

初念 回答

你把反編譯前的 apk 后綴改為 zip 再解壓看看,里面應(yīng)該也有 classes.dex classes2.dex classes3.dex classes4.dex 等文件,這是因?yàn)?apk 中方法數(shù)超過(guò)了 65536 個(gè),使用了 multidex support library 將一個(gè) apk 中的 dex 文件分割成多個(gè) dex 文件的緣故。相關(guān)知識(shí)可以搜索 "android 65k" 來(lái)進(jìn)行了解。

菊外人 回答

從調(diào)試工具比如gdb那拿到的結(jié)果有時(shí)不能保證是正確的。至于這到底是為什么,這也許是gdb的問(wèn)題,在深入的話我也不了解了(如果有人知道的話,還請(qǐng)?jiān)谠u(píng)論區(qū)指教)。這也是為什么有的時(shí)候用IDE的單步跟蹤查看變量值可能是不正確的。

如果打log的話,就可以保證完全正確了。

獨(dú)白 回答

問(wèn)題一,是的,listen參數(shù)backlog就是這個(gè)沒(méi)有建立(accept)的連接隊(duì)列的最大長(zhǎng)度,不過(guò)系統(tǒng)內(nèi)核還有另外一個(gè)上限控制,backlog不是隨便設(shè)多大就行。
問(wèn)題二,這個(gè)socket對(duì)象在內(nèi)核內(nèi)存里,你只有它的句柄(fd)。
內(nèi)核其中包括收發(fā)的緩沖區(qū)。你不能直接讀寫(xiě)它,內(nèi)核收發(fā)時(shí)read或send時(shí),會(huì)把內(nèi)核緩沖區(qū)的數(shù)據(jù)拷貝到用戶空間或者反之。能接收多少數(shù)據(jù)取決于內(nèi)核和網(wǎng)卡驅(qū)動(dòng)的參數(shù)配置,即相應(yīng)內(nèi)核緩沖區(qū)的大小。不同的IP連接有不同的描述符,不同進(jìn)程之間也是隔離的,都在內(nèi)核里統(tǒng)一維護(hù)。如果放不下。UDP會(huì)導(dǎo)致丟包,TCP連接對(duì)方則會(huì)嘗試重發(fā)。

氕氘氚 回答

已解決.
java對(duì)于帶報(bào)名的類(lèi)的查找是需要路徑的,看修改就知道了.
mkdir com
mv MyTest.jar com/
tar cvf MyTest.jar com

半心人 回答
代碼如上,ppp可以成功返回沒(méi)有報(bào)錯(cuò),ppp是個(gè)左值,那肯定不會(huì)是移動(dòng)的吧,那就要執(zhí)行拷貝構(gòu)造函數(shù)吧,但是unique_ptr沒(méi)有拷貝構(gòu)造啊。。。。

你這個(gè)判斷是錯(cuò)的,給你一個(gè)例子如下:

#include <iostream>
#include <memory>

using namespace std;
static unique_ptr<int> p1 = std::make_unique<int>(10);

// move -> copy construction -> failed
unique_ptr<int> foo()
{
    auto p = make_unique<int>(10);
    return p;                   // 1 ok p is local parameter(rvalue) can run it with move
    //return move( p );         // 2 also ok
    //return p1;                // NOK. p1 is lvalue can not performance move on it.
}

int main()
{
    unique_ptr<int> p = foo();

    cout << *p << endl;
    return 0;
}

首先,ppp是return回來(lái)的局部值,這是右值而不是左值;
其次,std::unique_ptr不接受左值作為入?yún)⒌目截悩?gòu)造函數(shù). 只有這個(gè):

unique_ptr( unique_ptr&& u ) noexcept;

你再揣摩一下這個(gè)例子吧:
https://github.com/lynnboy/Cp...

你的瞳 回答

callback-回調(diào).


this._rowsData.foreach(v=>document.querySelector("<selector>").value = v.xxx)
寫(xiě)榮 回答

已解決。只要加一個(gè)空插槽就行了

落殤 回答

代理軟件地址

proxies = {
    "http": "http://127.0.0.1:8080"
}
requests.post(url=url, json=joindata, proxies=proxies,verify=('FiddlerRoot.pem'))

verify同目錄下的Fiddler證書(shū),F(xiàn)iddler就能抓到包了

笨笨噠 回答

類(lèi)型轉(zhuǎn)換

#include <iostream>

struct width{
    int w;
    constexpr operator int()const {
        return w;
    }
};
int main(void)
{
    width w{8};
    int i = w; // 隱式轉(zhuǎn)換
    int j = int(w); // 顯式
    int k = width(w);

    std::cout<<i<<j<<k;
}
---
888

附:參考鏈接

薄荷糖 回答

不同段位各組成一個(gè)隊(duì)列,每次進(jìn)來(lái)取出兩個(gè)人,滿足條件就對(duì)戰(zhàn);隊(duì)列為空,從相鄰隊(duì)列里面去??;系統(tǒng)定時(shí)清理沒(méi)有匹配到的