activeIndex
這個(gè)還是2
啊。你只是判斷了,沒有改變它。
所以顯示這是2
是對(duì)的啊。
<el-menu-item index="1">
<a>菜單一</a>
</el-menu-item>
<el-menu-item index="2">
<a>菜單二</a>
</el-menu-item>
<el-menu-item index="3">
<a>菜單三</a>
</el-menu-item>
<el-menu-item index="4">
<a>菜單四</a>
</el-menu-item>
// 上面代碼可以用v-for優(yōu)化下
let menuArr = ['一', '二', '三', '四']
<el-menu-item v-for="(item, index) in menuArr" :index="index+1">
<a>菜單{{menuArr[index]}}</a>
</el-menu-item>
handleSelect(activeIndex, keyPath) {
this.activeIndex = activeIndex;
console.log(this.activeIndex);
// if (activeIndex === '1') {
// console.log(activeIndex);
// }else if (activeIndex === '2') {
// console.log(activeIndex);
//}
}
SELECT id, score from table GROUP BY score HAVING COUNT(score) = 1 ORDER BY score LIMIT 1
user_id(7) 和 id(3) 不是在同一列嗎?
order by 排序
你應(yīng)該思考: 購物車從哪里來,到哪里去。可能這樣說有點(diǎn)玄乎,那么你想購物車添加商品,那么它應(yīng)該從哪里來的數(shù)據(jù)添加進(jìn)去?
首先,購物車屬于誰,所以你必須要聲明這一點(diǎn),添加一個(gè)字段記錄用戶 ID 。
然后,這個(gè)購物車放了什么,你需要記錄對(duì)應(yīng)商品 ID ,所以這個(gè)也是必須的。
補(bǔ)充購物車放的商品,生成訂單結(jié)算時(shí)使用,為了節(jié)約性能,可以在購物車表存放商品的一些基本信息,用來進(jìn)行結(jié)算。當(dāng)然,考慮到商品信息的可能變動(dòng),可以用聯(lián)表來查詢獲取相關(guān)信息,這樣保證信息的。。。
最后生成訂單的話
select from (select from test
order by day
desc) temp
group by itemId order by day
desc
他的錯(cuò)誤應(yīng)該是函數(shù)沒有提交或者執(zhí)行錯(cuò)誤,可以我直接在命令行中輸入代碼函數(shù)是沒有問題的。
Google一下都有現(xiàn)成的:MongoDB Java: Finding objects in Mongo using QueryBuilder $in operator returns nothing
public static void getDocuments(List<Integer> documentIds) {
BasicDBList docIds = new BasicDBList();
docIds.addAll(documentIds)
DBObject inClause = new BasicDBObject("$in", docIds);
DBObject query = new BasicDBObject("Id", inClause);
DBCursor dbCursor = mongoRule.getDatabase().getCollection("mycollection").find(query);
System.out.println(dbCursor == null);
if (dbCursor != null) {
while (dbCursor.hasNext()) {
System.out.println("object - " + dbCursor.next());
}
}
}
我注意到你的_id
全是一樣的,所以你是不是已經(jīng)使用$unwind
把一個(gè)數(shù)組展開了?
控制器中使用try catch捕獲異常,catch中$model->getErrors();看一下異常錯(cuò)誤
總不能每條數(shù)據(jù)每一列去循環(huán)出來比對(duì)吧?
應(yīng)用層只能這樣處理。
innerText
上邊為沒看清題的手機(jī)回答,以下為正確答案:
如果確定里邊僅僅會(huì)多一個(gè)x
的話,最簡(jiǎn)單的就是.innerText.replace(/x$/, '')
如果是要過濾掉其中的標(biāo)簽的話,可以這么來:innerHTML.replace(/<.*?>.*?<\/.*?>/g, '')
查下有沒有 IP 限制
在遍歷時(shí),給每個(gè)生成的div元素,動(dòng)態(tài)設(shè)定style ,指定動(dòng)畫延遲時(shí)間,偽代碼(我不會(huì)php的語法)
set $delay = 0;
set $interval = 0.1;//設(shè)定動(dòng)畫間隔為0.1s
while haveRows
輸出 <div class="admin-user-layout pointer animated fadeInUp" style="animation-delay:" + $delay + "s;"></div>
$delay += $interval;
了解下多表聯(lián)查,或者直接了解 join 的使用方法就好,這個(gè)問題并不難,是業(yè)務(wù)上常見的需求。
select tt.*,test1.name from tt inner join test1 on tt.id=test1.id
建議使用psql控制臺(tái)來執(zhí)行CREATE DATABASE
語句。
另外,關(guān)于LC_COLLATE
選項(xiàng),它是受制于ENCODING
選項(xiàng)以及系統(tǒng)自身的locale的。詳細(xì)信息,你可以看一下PG官方手冊(cè)中關(guān)于LC_COLLATE和LC_CTYPE的注意事項(xiàng)(Notes)
先理清表之間的關(guān)系,及各字段的含義,然后再進(jìn)行操作
建議將表結(jié)構(gòu)及個(gè)字段含義,目標(biāo)結(jié)果貼下
where:{
$and: [
status: '0',
sushequ: ctx.request.body.class,
sequelize.where(
sequelize.fn('DATE', sequelize.col('created_at')), // 表對(duì)應(yīng)的字段
sequelize.literal('CURRENT_DATE')
)
]
}
--testtable
delimiter //
create trigger insertTrigger before insert on testtable
for each row set new.w = new.a + new.b + new.c + new.d;
//
create trigger updateTrigger before update on testtable
for each row set new.w = new.a + new.b + new.c + new.d;
//
delimiter ;
不需要設(shè)置 conn.setAutoCommit(true);
conn.close();執(zhí)行后autoCommit屬性變?yōu)閠rue.
北大青鳥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)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國成功上市,融資1
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(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)師。