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

鍍金池/ 問答/ C++問答
不舍棄 回答
  1. 構(gòu)造函數(shù)里面的$username = ''$username的默認(rèn)參數(shù),可以使用new User()new User('abc')來給User類的$username屬性賦值
  2. 后面的$username = []是一種好的習(xí)慣,對(duì)$username進(jìn)行初始化,參見手冊(cè)PHP基礎(chǔ),初始化變量
<?php
function test($res){
    $ret = [];
    if($res){
        $ret = [1,2,3];
    }
    return $ret;
}

function test2($res){
    if($res){
        $ret = [1,2,3];
    }
    return $ret;
}
var_dump(test(false));
var_dump(test2(false));
舊言 回答
  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(打開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上
亮瞎她 回答

你沒有把原型寫清楚,如果getitem函數(shù)/方法有一個(gè)返回值來指示錯(cuò)誤信息,那對(duì)于 C++ 這種單返回值的語言,只能把返回的數(shù)據(jù)通過指針傳回來。
如果不是,那可能寫書的這個(gè)人喜歡這樣寫吧。

苦妄 回答

看你給出的代碼,你以前沒寫過“異步”結(jié)構(gòu)的代碼嗎?
js 里拿數(shù)據(jù)都是異步的,不是同步的,沒有 return ,只有 callback 。

乖乖瀦 回答

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

已經(jīng)解決了問題,首先要修改一下pom.xml中的build里面的配置。
然后要把本地的jar包都用maven來進(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的依賴 -->
        <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依賴 -->
        <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>
做不到 回答

你可以在pom.xml中使用相對(duì)路徑指定submodule的位置,如

父項(xiàng)目中

<modules>
  <module>../module1</module>
  <module>../module2</module>
  <module>../module3</module>
</modules>

子模塊中

<parent>
  <groupId>my.awsome.module1</groupId>
  <artifactId>parent-pom</artifactId>
  <version>1.0.1<version>
  <relativePath>../parent-pom/pom.xml</relativePath>
</parent>

但顯然這不是什么好的做法, 最好重新規(guī)劃項(xiàng)目路徑, 避免因?yàn)檫@個(gè)產(chǎn)生的各種微妙的小問題.

心沉 回答

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

初念 回答

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

你的瞳 回答

callback-回調(diào).


this._rowsData.foreach(v=>document.querySelector("<selector>").value = v.xxx)
選擇 回答
    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ù)值,也就是說都是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)代碼多少位我沒洗數(shù),序列號(hào),什么的位數(shù)你自己調(diào)就行了%04d%06d%05d%06d%06d【%021d%016d】<-這里 如果沒算錯(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
獨(dú)白 回答

問題一,是的,listen參數(shù)backlog就是這個(gè)沒有建立(accept)的連接隊(duì)列的最大長(zhǎng)度,不過系統(tǒng)內(nèi)核還有另外一個(gè)上限控制,backlog不是隨便設(shè)多大就行。
問題二,這個(gè)socket對(duì)象在內(nèi)核內(nèi)存里,你只有它的句柄(fd)。
內(nèi)核其中包括收發(fā)的緩沖區(qū)。你不能直接讀寫它,內(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ā)。

菊外人 回答

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

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

假灑脫 回答

用post提交表需要確認(rèn)服務(wù)器需要的數(shù)據(jù)項(xiàng),然后組成json對(duì)。

requests.post(url=url, data=data)

我覺得樓主說的是data的提交。


一般用瀏覽器的開發(fā)者工具確認(rèn)網(wǎng)頁(yè)請(qǐng)求時(shí)候的方法,cookie,請(qǐng)求頭等等
也就是說data也可以在這里找到
模擬一次提交表的過程,就可以看到提交的參數(shù)項(xiàng)了

clipboard.png

clipboard.png

requests.post(headers=headers,params=json.dumps(payload),url=url)

嗯嗯嗯,用的payload。我錯(cuò)了。。。

網(wǎng)妓 回答

答案來了。

const axios = require('axios')
// 下面代碼發(fā)送一個(gè)post請(qǐng)求到一個(gè)服務(wù)器
axios.post('驗(yàn)證驗(yàn)證碼的目標(biāo)url', {
    telephone: "17202345234" // 帶上手機(jī)號(hào)參數(shù)
  })
  .then(function (response) { // 后端處理成功,給你返回一個(gè)驗(yàn)證碼數(shù)據(jù),數(shù)據(jù)通過response讀取
    console.log(response.testnumber);
    return axios.post('獲取驗(yàn)證碼成功再發(fā)送一次請(qǐng)求的地址',{
        password: "我是密碼",
        telephone: "17202345234",
        noteinfo: "我是備注"
    })
  })
  .then(function(res){
    //完成注冊(cè)了
    console.log("注冊(cè)完成");
   })
  .catch(function (error) { // 如果請(qǐng)求失敗就走這里了
    console.log(error);
  });
氕氘氚 回答

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

半心人 回答
代碼如上,ppp可以成功返回沒有報(bào)錯(cuò),ppp是個(gè)左值,那肯定不會(huì)是移動(dòng)的吧,那就要執(zhí)行拷貝構(gòu)造函數(shù)吧,但是unique_ptr沒有拷貝構(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回來的局部值,這是右值而不是左值;
其次,std::unique_ptr不接受左值作為入?yún)⒌目截悩?gòu)造函數(shù). 只有這個(gè):

unique_ptr( unique_ptr&& u ) noexcept;

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

寫榮 回答

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