原创 vue對對象、數組的增、刪、改、查
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="widt
原创 slice刪除元素的性能對比
package main import ( "testing" ) // 第一種 func BenchmarkMake(t *testing.B) { t.ResetTimer() origin := []int{1
原创 索引
對單一鍵建立索引db.collection.createindex( {name: 1} )在集合的同一個鍵上不能重複建立單一索引;若已經建立了索引,再在間一個Key 上建立索引,將給予出錯提示。1升序,-1降序嵌套文檔單字段索引d
原创 mongodb插入詳解
db.getCollection("test").insert( { name :"<c 語音》", bookprice:"33.2", adddate:"2017-10-l", allow:"true", basein
原创 find詳解
等價查詢某個數組:db.getCollection("test").find( { tags: ["good","book","it","program"] } );(//連順序都要是存進去的順序,不能變)
原创 刪除文檔
MongoDB集合的文檔記錄, 若不需要了,則可以通過刪除命令永久刪除。語法: db.collection.removedb.getCollection("test").remove( { price: {$gt:
原创 聚合
聚合( Aggregation )爲集合文檔數據提供各種處理數據方法,並返回計算結果。MongoDB 提供了3 種方式來執行聚合命令:聚合管道方法、map-reduce 方法和單一目標聚合方法。1.聚合管道方法聚合管道方法又可以直接理解爲合
原创 更新文檔(update)
修改一條簡單文檔:db.getCollection("test").insert( { title: "商品購物單1", amount: 35, detail: [
原创 mongodb查詢案例,golang庫mgo案例
pipeline := []bson.M{ bson.M{"$match": bson.M{"id": uid}}, bson.M{"$project": bson.M{"last_msg": 1, "_id": 0}},
原创 在Vue中同時使用過渡和動畫
加一個功能,當刷新頁面的時候也有動畫效果(加上appear和appear-active-class="animated rubberBand":<!DOCTYPE html> <html> <head> <title></title
原创 Vue動畫 - Vue中CSS動畫原理
(顯示的過程:在動畫即將被執行的瞬間,會往div上增加兩個class名:fade-enter、fade-enter-active。然後去掉fade-enter,增加fade-enter-to。接着動畫繼續執行,到結束的瞬間,會把最後兩個cl
原创 動畫——Vue中的動畫封裝
封裝動畫讓代碼可複用如下是一個簡單的點擊漸變、漸隱:<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content=
原创 Vue中多個元素或組件的過渡
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
原创 Vue中的列表過渡
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
原创 Vue的Js動畫與Velocity.js的結合
@before-enter,在隱藏後,點擊讓它顯示的時候,顯示之前會觸發。@enter不同,是在動畫執行的過程中觸發。done觸發完成之後就是@after-enter。這些是通過js鉤子來實現,也就是js來實現的:<!DOCTYPE htm