class User {
private String country;
private String province;
private String name;
public User(String country, String province, String name) {
this.country = country;
this.province = province;
this.name = name;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
class Res {
private String country;
private String province;
private Integer count;
public Res(String country, String province, Integer count) {
this.country = country;
this.province = province;
this.count = count;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
}
@Test
public void test1() throws Exception {
List<Res> result = new ArrayList<>();
List<User> list = new ArrayList<>();
list.add(new User("中國", "北京", "張三"));
list.add(new User("中國", "北京", "張三"));
list.add(new User("中國", "北京", "李四"));
list.add(new User("中國", "北京", "李四"));
list.add(new User("中國", "北京", "李四"));
list.add(new User("中國", "北京", "王五"));
list.add(new User("中國", "湖南", "張三"));
list.add(new User("中國", "湖南", "張三"));
list.add(new User("中國", "湖南", "張三"));
list.stream()
.collect(Collectors.groupingBy(e -> e.getProvince()))
.forEach((k, v) -> {
StringBuilder count = new StringBuilder("0");
v.stream().
collect(Collectors.groupingBy(e -> e.getName()))
.forEach((k2, v2) -> {
if (v2.size() > 1) {
int c = Integer.parseInt(count.toString());
count.delete(0, count.length());
count.append(c + v2.size());
}
});
result.add(new Res(v.get(0).getCountry(), v.get(0).getProvince(), Integer.parseInt(count.toString())));
count.delete(0, count.length());
});
System.out.println(new ObjectMapper().writeValueAsString(result));
}
StringBuilder只是起了一個計數(shù)的作用, 雖然有點low~
如果是報超出范圍可以先判斷一下
r = each.xpath("./td[2]/text()").extract()
item['position_Type'] = r[0] if r else None
^[a-z]([a-z]|((?<!_)_))*[a-z]$
題主說明是javascript
,是不支持負(fù)向零寬斷言的(TAT)。上面的表達(dá)式?jīng)]法用。
建議分兩部分判斷:
^[a-z][a-z_]*[a-z]$
str.indexOf("__") === -1
我剛才以為js支持負(fù)向斷言,是因為chrome的v8引擎自己實現(xiàn)了這個功能。。。
題外話,推薦正則表達(dá)式測試網(wǎng)站:regex101,可以直接在下面寫測試數(shù)據(jù)看匹配情況,記得flag
選擇multiline
支持多行數(shù)據(jù)。
ps.正則表達(dá)式相關(guān)的問題建議加上相應(yīng)語言的標(biāo)簽或者說明語言,因為有些語言的正則表達(dá)式實現(xiàn)是不同的。
這個是語言設(shè)定的時候?qū)?shù)值類型定死的。
就像int是整型,double是雙精度一樣。
你只要記得它能存儲多少有效數(shù)據(jù)就可以了。
單一組件的state
放在組件內(nèi)就好,多個組件共享的state
再放到store
中
@click.stop.prevent="beActive(index)"
---》 @click.stop.prevent="beActive($event,index)"
這里改下試試。
手冊上40003是openid的問題,你檢查下看看是不是openid存取有問題。
這里改一下試試。
改成這樣的,多添加一個屬性即可
new HtmlWebpackPlugin({
filename: "login",
template: "./public/index.html", // 模板文件
chunks: ["common", "login"], // 選擇使用哪些生成的文件
chunksSortMode: "manual" // manual根據(jù)chunks的位置手動排序
})
重點是這個:chunksSortMode
為什么要在最后才配置這個?這個應(yīng)該放在最前面,你試試放在第一個看看效果!
已經(jīng)解決了。
上面的元素使用了浮動,但并未清除浮動導(dǎo)致的
我看到里面有幾行 Dosgi.requiredJavaVersion=1.8,看看是不是只能用 1.8
1、刪除今天以前的數(shù)據(jù),那是說每天凌晨刪除昨天數(shù)據(jù)即可,你一天就1000W?刪除也不需要排序,直接delete from table where 。。 limit 1000即可。另外也可以每次刪除更少量的數(shù)據(jù),避免產(chǎn)生鎖,執(zhí)行頻率高一點就行。
2、也可以采用分區(qū)的方式,按天分區(qū),每天刪除過期分區(qū)表
這個問題本人已解決,在File ImageFile=new File(strImageUrl);
打斷點,開啟調(diào)試模式,
斷點運行到GeoTiffReader reader=new GeoTiffReader(ImageFile);
時,按F5(進入函數(shù)內(nèi)部),但是沒有運行函數(shù),而是跳到classloader.class。
為了加載類時唯一,改為org.geotools.gce.geotiff.GeoTiffReader reader=new org.geotools.gce.geotiff.GeoTiffReader(ImageFile);
運行正常。
圖片是GeoTiffReader類的內(nèi)部函數(shù)。
再次自問自答一波,反復(fù)看了 文檔 以及Github
上的一些 issue
得出的結(jié)論:
默認(rèn)情況下,「索引」會從模型的 toArray 方法中讀取數(shù)據(jù)來做持久化。如果要自定義同步到搜索索引的數(shù)據(jù),可以覆蓋模型上的 toSearchableArray 方法:
...
public function toSearchableArray()
{
$array = $this->toArray();
// Customize array...
return $array;
}
...
toArray()
方法返回的數(shù)據(jù)才行,所以如果你需要篩選要索引的數(shù)據(jù)的話,你必須圍繞它來作文章,例如你只想要索引文章的標(biāo)題和內(nèi)容的話:...
public function toSearchableArray()
{
#_ Read Data & Filter Field
$Arr_Posts = array_only($this -> toArray(), ['title', 'content']);
#_ Back to Scout
return $Arr_Posts;
}
...
issue
鏈接:https://github.com/laravel/sc...
input和下拉框作為兄弟節(jié)點定位到同一個父元素。
。。主題less可以放在你的自己項目目錄下管理,就行了吖。
addEventListener
北大青鳥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
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團,成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。