如果還是一直沒好的話 可以和我一樣 下載一個(gè) 逍遙安卓模擬器,也可以使用。前提要下載好android sdk等工具
以下方案:
tcp server/ws server提供一個(gè)http接口。
比如我nodejs寫的websocket服務(wù)器,php要發(fā)消息怎么辦,PHP不能直接連接,那只能nodejs給個(gè)接口,php去請求了。
基于消息隊(duì)列
tcp server/ws server連接到一個(gè)消息隊(duì)列作為消費(fèi)者,php端將要發(fā)生的消息寫入消息隊(duì)列
我也是這樣做,先把頁面隱藏起來,但是箱問個(gè)問題,如果想在動畫結(jié)束后在聚焦的h話,要怎么實(shí)現(xiàn)呢
你這個(gè)18位的timestamp 是怎么生成的,一搬 uinx_timestamp 13位就精確到毫秒級了
單頁的應(yīng)用每個(gè)頁面里都需要單獨(dú)配置分享信息
@凌云識木 slice的零值是nil
,轉(zhuǎn)化后就是json的null
,文檔是ok的.
@xialeistudio 你的data["a"]是有值的, 且不是零值, 這種情況下轉(zhuǎn)成null
才是有問題.
ab沒這個(gè)能力,用高級一點(diǎn)的工具,比如jmeter、neoload之類的吧
我也遇到同樣的問題,求解。
你把 sport 22
改為 dport 22
你的中文編碼是UTF8的?如果是查看一下你對應(yīng)的要匹配的中文的UTF8編碼,然后在regex正則表達(dá)式中使用對應(yīng)的UTF8編碼匹配。
可以用 httpClient
這個(gè) java
庫寫測試程序。
可以用 python
和 shell
寫自動化測試腳本
我有遇到過啊,不過當(dāng)時(shí)是因?yàn)榫W(wǎng)絡(luò)的問題,網(wǎng)絡(luò)丟包了,導(dǎo)致少了文件,但是換了網(wǎng)絡(luò)環(huán)境,就好了,再沒出現(xiàn)過,你是否排除過網(wǎng)絡(luò)狀況?
你能提供更詳細(xì)的 HTTP 請求信息嗎?
這種速度差異很可能是緩存導(dǎo)致。
不用 inplace (直接分成兩個(gè)數(shù)組排序,再合并) 的話就太簡單了,要 inplace 的話其實(shí)也可以不用手寫 iterator,手寫一個(gè) reference 的 wrapper 就行了(然后直接調(diào)用任意 常規(guī) inplace 排序算法即可):
#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
template <typename T>
class Ref {
T & t;
public:
Ref(T & t) : t(t) {
}
Ref(Ref & o) : t(o.t) {
}
Ref(Ref && o) : t(o.t) {
}
Ref & operator = (Ref & o) {
t = o.t;
return *this;
}
Ref & operator = (Ref && o) {
t = move(o.t);
return *this;
}
bool operator < (Ref const & o) const {
return t < o.t;
}
friend void swap(Ref & a, Ref & b) {
using std::swap;
swap(a.t, b.t);
}
};
void solution(vector<string> & ret) {
vector<Ref<string>> a;
vector<Ref<string>> b;
for (auto & c : ret) {
bool numeric = true;
for (auto const & d : c) {
if (!isdigit(d)) numeric = false;
}
if (numeric) a.emplace_back(c); else b.emplace_back(c);
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
vector<string> v;
string l;
getline(cin, l);
stringstream ss;
ss << l;
string s;
while (ss >> s) {
v.emplace_back(move(s));
}
solution(v);
bool first = true;
for (auto const & c : v) {
if (first) first = false; else cout.put(' ');
cout << c;
}
cout << '\n';
}
測試:
輸入
2 Banana 1 Apple 3 Pear
輸出
1 Apple 2 Banana 3 Pear
時(shí)間是LogEvent創(chuàng)建時(shí)間, 多線程時(shí),寫入的順序可能與事件的創(chuàng)建時(shí)間不一致.
下面是我寫的一個(gè)測試程序
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
public class LogTest {
final Log log = LogFactory.getLog(this.getClass());
Object o = new Object() {
public String toString() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "this is slow! " + System.currentTimeMillis();
}
};
@Test
public void testFIFO() throws InterruptedException {
new Thread() {
public void run() {
log.info(o);
}
}.start();
Thread.sleep(100);
new Thread() {
public void run() {
log.info("this is fast! " + System.currentTimeMillis());
}
}.start();
Thread.sleep(2000);
}
@Test
public void testFILO() throws InterruptedException {
new Thread() {
public void run() {
log.info(o.toString());
}
}.start();
Thread.sleep(100);
new Thread() {
public void run() {
log.info("this is fast! " + System.currentTimeMillis());
}
}.start();
Thread.sleep(2000);
}
}
這里用的是commons-logging 來間接使用Log4j. 原理上是一樣的
輸出如下:
FIFO
INFO 2018-03-02 12:43:26,846 LogTest$2:run - this is slow! 1519965807848
INFO 2018-03-02 12:43:26,946 LogTest$3:run - this is fast! 1519965806946
FILO
INFO 2018-03-02 12:43:29,048 LogTest$5:run - this is fast! 1519965809048
INFO 2018-03-02 12:43:29,948 LogTest$4:run - this is slow! 1519965809948
第一個(gè)測試和第二個(gè)不同在于一個(gè)(FILO)是 log.info(o.toString());
, 一個(gè)(FIFO)是log.info(o);
我故意把toString方法變慢. 對比兩個(gè)結(jié)果, 可以看到發(fā)生時(shí)間和寫出時(shí)間的差異.
數(shù)據(jù)類型的問題!
1.看到你說的是頁面跳轉(zhuǎn)了,在跳轉(zhuǎn)之前發(fā)送事件,這個(gè)時(shí)候apple組件還不在內(nèi)存里,所以接收不到數(shù)據(jù),跳轉(zhuǎn)之后hello組件的生命周期結(jié)束,也不在生命周期里了
2.eventbus只能在都掛載在內(nèi)存里的組件之間傳遞數(shù)據(jù),像你這種需求可以用vuex,或者在路由之間傳遞數(shù)據(jù)
自定義handler或者自定義toolbar,把圖片添加按鈕改成你自己的上傳邏輯,上傳文件只會,把圖片插入到富文本編輯器里
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。