카테고리Dev

vue

    watch: {         // 라우트가 변경되면 메소드를 다시 호출됩니다.         ‘$route’: ‘fetchData’     },

더보기

동적 라우트 매칭 | Vue Router

      watch: {         ‘$route’ (to, from) {             let urlParams = new URLSearchParams(window.location.search);             let type = urlParams.get(‘type’);             let groupNo = urlParams.get(‘groupNo’);             let collectionNo = urlParams.get(‘collectionNo’);             let params = { groupNo: groupNo, collectionNo: collectionNo, limit: 10 };             this.searchCollection(params);         },     },

더보기

정규식

정규식은 일반 문자(예: a에서 z)와 메타문자로 알려진 특수 문자로 구성된 문자열 패턴이다. 패턴은 문자열 본문을 검색할 때 일치하는 문자열을 설명한다. 정규식은 검색되는 문자열과 일치하는 문자 패턴을 찾는 템플릿의 역할을 한다. 일반적으로 볼 수 있는 몇 가지 정규식 예는 다음과 같다. 출력 공통 <scRIPT> var s,re; function showChar(){ sindex=s.search(re); slastIndex=RegExp.lastIndex; document.write(sindex+’~’+RegExp.lastIndex); document.write(‘ (‘+s.substring(sindex,slastIndex)+’)’); } </scRIPT> <scRIPT>var s,re; function showChar(){ ...

더보기

c# TimeSpan

// timespan to datetime DateTime riderRecord = new DateTime() + record.riderRecord; DateTime riderRecordDifference = new DateTime() + record.riderRecordDifference; DateTime riderRecordSoFar = new DateTime() + record.riderRecordSoFar; // datetime to timespan TimeSpan CurrentTime = riderRecord.TimeOfDay;  

더보기

mongodb unset

db.getCollection(‘contents’).update( {}, { $unset:{ “page”:””, “size”:””, “pub_review” : “”, “contents” : “”, “bookin” : “”, “recommand” : “”, “author_review” : “” } }, {multi:true} )

더보기

c# serialize

var pipeline = new[] { match, unwind, lookup, project, group }; AggregateResult result = collection.Aggregate(pipeline); var aggregate = result.Response.GetValue(0); var aggregateArr = aggregate.AsBsonArray; fpOrderItem.ActiveSheet.Rows.Count = 0; int ttt = 0; foreach (var agg_result in aggregateArr) { var order_record = agg_result[“_id”]; var order_no = order_record[“order_no”].ToString(); var order_list_str = order_record[“order_list”]; var contents_str ...

더보기

mongodb join

db.order_list.aggregate([ { $unwind: “$booklist” }, { $lookup: { from: “contents”, localField: “booklist.isbn”, foreignField: “isbn”, as: “xxxx” } }, { $group:{ _id:{order_no:”$order_no”}, booklist:{ $push:”$xxxx.isbn”, $push:”$xxxx.title” } } } ])   ======================================     db.votes.aggregate([ { $lookup: { from: “users”, localField: “createdBy”, foreignField: “_id”, as: “userYYY” } }, { $unwind: “$userYYY” }, ...

더보기

mongoDB serialize

  public class Zoo { [BsonId] public ObjectId Id { get; set; } public List<Animal> Animals { get; set; } } [BsonDiscriminator(RootClass = true)] [BsonKnownTypes(typeof(Tiger), typeof(Zebra))] public class Animal { [BsonId] public ObjectId Id { get; set; } public string Name { get; set; } } public class Tiger : ...

더보기

Storing TreeView Structures With MongoDB

Storing Tree like Structures With MongoDB Educational repository demonstrating approaches for storing tree structures with NoSQL database MongoDB Background In a real life almost any project deals with the tree structures. Different kinds of taxonomies, site structures etc require modelling of hierarhy relations. In this article I will illustrate using ...

더보기

This is a unique website which will require a more modern browser to work!

Please upgrade today!