Csdn user default icon
mongodb 内嵌数组大小

需要一个很简单的功能,就是获取数组大小。例如有这样数据: { "name":"test", "arr":[{"num":0},{"num":1},{"num":2}] } 然后我再次插入数据时候,需要获取一下arr这个数组的长度。实现类似这样的功能: update({},{ $addToSet:{"arr": {"num":(这里需要的是当前arr数组的长度,即3)} } }) 想进办法目前暂时没有实现。不知道是否有办法查询出数组长度。 而不是$size那种按数组长度查询。这个没有用啊。


<div class="post-text" itemprop="text"> <p>As <code>$</code> positional operator doesn't work 2 level deep nested array, I am using alternative schema to enable update function for nested array.</p> <p>I have a nested documents as follows</p> <pre><code>{ '_id' : 1234, 'bio' : { 'achievements' : { 'Yhg87Hghg65' : { 'title' : 'Achievement 1', 'score' : 95, 'year' : 2004 }, '67gjfygt8Hd' : { 'title' : 'Achievement 2', 'score' : 89, 'year' : 2003 }, 'Lkoh8hHggf7' : { 'title' : 'Achievement 1', 'score' : 90, 'year' : 2005 } } } } </code></pre> <p>Now, using mongodb aggregation pipeline, I can fetch this as follow in PHP</p> <pre><code>$doc = $collection -&gt; aggregate( array( '$match' =&gt; array( '_id' =&gt; 1234 ) ), array( '$project' =&gt; array( 'bio.achievements' =&gt; 1 ) ) ); </code></pre> <p>Until now, everything works fine. But I need to sort achievements by year. Using normal <code>'$sort'</code> before <code>'$project'</code> wont work because because achievements aren't arrays, they are fields whose values are array. If anyone know how to achieve it, please give me some hints.</p> </div>


<div class="post-text" itemprop="text"> <p>In the back end i m using go lang and for database i use mongoDB. I m trying to find the last document inserted in the embedded array so i can retrieve the document in the last array index without knowing its index.Right now i m getting all the documents of the employee and then find the last index.It is like overloading my RAM as i need to retrieve 1000 of record of employee and store it in ram before finding the last index of the array My struct is as follows</p> <pre><code> type ( Employee struct { Name string Password string EmpId string EmailAddress string Position string Gender string Nationality string Department string MaritalStatus string Approvedby string JoinDate time.Time ConfirmationDate time.Time EndDate time.Time Leave []*LeaveInfo } LeaveInfo struct { Total float64 Id int Days float64 From time.Time To time.Time Status string Certificate []*CertificateInfo } CertificateInfo struct { FileName string FileType string FileSize int } </code></pre> <p>Here is how i do in my application </p> <pre><code> My code is follows employee := Employee{} err = c.Find(bson.M{ "empid": "1234" }).One(&amp;result) if err != nil { log.Fatal(err) } name:=result.Name lastindex:= result.LeaveInfo[len(result.LeaveInfo)-1].Id </code></pre> <p>As you can see i retrive the whole employee data and then find the Id of the last document.Is there any better way to do this.Appreciate any help.Please ...Thanks..</p> <blockquote> <p>Newly Added Codes</p> </blockquote> <pre><code> This code is based on your example var result bson.M query := bson.M{"empid": "1234"} // gets the employee you are interested in match := bson.M{"$match": query} // Set up the match part of the pipeline unwind := bson.M{"$unwind": "$leave"} // sets up the leave field to be unwound pipeline := []bson.M{match, unwind,{ "$project":bson.M{ "ID":bson.M{ "$slice": []interface{}{"$", -1}, } } iter := postCollection.Pipe(pipeline).Iter() for iter.Next(&amp;result) { fmt.Printf("%+v ", result) } iter.Close() </code></pre> <p>This code gives me lot of same document like 542 documents .But all these document are same...</p> </div>


{ "_id" : ObjectId("549127427d3201f5086a711d"), "_class" : "cn.togym.entity.SitePrice", "siteId" : NumberLong(1122), "date" : "2014.3.10", "siteSlice" : [{ "sliceId" : 0, "sliceName" : "场馆一", "sliceIntroduction" : "阿斯达克减肥哈离开时记得发货了空间", "siteSliceDetail" : [{ "SiteSliceDetailId" : 0, "startTime" : "08:00", "endTime" : "09:00", "price" : 100.0, "occupy" : 0 }, { "SiteSliceDetailId" : 1, "startTime" : "09:00", "endTime" : "10:00", "price" : 100.0, "occupy" : 0 }, { "SiteSliceDetailId" : 2, "startTime" : "10:00", "endTime" : "11:00", "price" : 100.0, "occupy" : 0 }] }, { "sliceId" : 1, "sliceName" : "场馆一", "sliceIntroduction" : "阿斯达克减肥哈离开时记得发货了空间", "siteSliceDetail" : [{ "SiteSliceDetailId" : 0, "startTime" : "08:00", "endTime" : "09:00", "price" : 100.0, "occupy" : 0 }, { "SiteSliceDetailId" : 1, "startTime" : "09:00", "endTime" : "10:00", "price" : 100.0, "occupy" : 0 }, { "SiteSliceDetailId" : 2, "startTime" : "10:00", "endTime" : "11:00", "price" : 100.0, "occupy" : 0 }] }, }], "dateType" : "新年" } 怎么修改sliceId=1并且startTime=08:00内的occupy的值。不知道他在数组内的下标


![图1]( ![图2](


<div class="post-text" itemprop="text"> <p>Hi I am looking for solution. I am not sure if this question is already here in stackoverflow. I was trying to find its solution on google but couldn't find any solution. I need to fetch records from mongo database such that it should be ordered by the array of ids I specify only. For example following is the set of data from the required table.</p> <pre><code>{ "_id" : NumberLong("5832686213760"), "created_by" : "3694181860160", "title" : "adsf", "date" : "2015-10-12 21:57:27", "cat" : "251", "description" : "dsafadsf", "members" : [ "3694181860160" ], "battles" : [ ], "is_deleted" : NumberLong(0) } { "_id" : NumberLong("5836854817600"), "created_by" : "3692778550272", "title" : "dd", "date" : "2015-10-13 02:13:32", "cat" : "939", "description" : "dddd", "members" : [ "3692778550272", "3690476217152" ], "battles" : [ "1475499726016" ], "is_deleted" : NumberLong(0) } { "_id" : NumberLong("5830033945536"), "created_by" : "3692705624256", "title" : "My own group", "date" : "2015-10-11 11:50:27", "cat" : "731", "description" : "yes this is my own group. hahahhahah", "members" : [ "3692705624256" ], "battles" : [ "1478264481792", "1472313521152", "1478428020992" ], "is_deleted" : NumberLong(0) } </code></pre> <p>If I need to fetch the above data in the order as following array specify.</p> <pre><code>array("5830033945536","5832686213760", "5836854817600") </code></pre> <p>Please note that this is only a part of data and ids, the real query will be dynamic. I am working in Yii 1.x. So I need the solution in json as well as in php.</p> </div>


<div class="post-text" itemprop="text"> <p>Is that possible to sort data in sub array in mongo database? </p> <pre><code>{ "_id" : ObjectId("4e3f8c7de7c7914b87d2e0eb"), "list" : [ { "id" : ObjectId("4e3f8d0be62883f70c00031c"), "datetime" : 1312787723, "comments" : { "id" : ObjectId("4e3f8d0be62883f70c00031d") "datetime": 1312787723, }, { "id" : ObjectId("4e3f8d0be62883f70c00031d") "datetime": 1312787724, }, { "id" : ObjectId("4e3f8d0be62883f70c00031d") "datetime": 1312787725, }, } ], "user_id" : "3" } </code></pre> <p>For example I want to sort comments by field "datetime". Thanks. Or only variant is to select all data and sort it in PHP code, but my query works with limit from mongo...</p> </div>


数据结构如下: ![图片说明]( shell命令如下: db.tongueRecord.aggregate({$match:{userId:"123"}},{$project:{numberOfUserTongues:{$size:"$userTongues"}}},{$group:{_id:"$userId",total:{$sum:"$numberOfUserTongues"}}}); 命令行下成功执行结果: ![图片说明]( 但是通过spring-data-mongodb实现的时候遇到了如下错误: ![图片说明]( 意思不能够识别$size,意味着我不能够直接获取对象数组的长度,然后进行统计,苦恼0.0 下面是我mongoTemplate对聚合查询的实现,可能是某个地方有问题,还望高手指教! ![图片说明](


<div class="post-text" itemprop="text"> <p>I am using the mgo.v2 driver with the latest version of MongoDB installed. My document structure is defined like this: </p> <pre><code>type gameTemplate struct { ID bson.ObjectId `bson:"_id" json:"id"` GameCode string `bson:"gamecode" json:"gamecode"` Players []player `bson:"players" json:"players"` } type player struct { PlayerID bson.ObjectId `bson:"playerid" json:"playerid"` Username string `bson:"username" json:"username"` Level int `bson:"level" json:"level"` } </code></pre> <p>How would I go about getting a list of usernames in a particular game (Defined by <code>gamecode</code>)? </p> <p>Is there a way to get the size of the array and iterate through the elements, or is there a preferred method? </p> </div>

mongodb 如何进行 模糊分组查询

我现在有一个集合,比如{phonePlatform:'Android 4.0',carrier:"中国移动"},{phonePlatform:'Android 5.0',carrier:"中国移动"},{phonePlatform:'Android 6.0',carrier:"中国联通"},{phonePlatform:'iOS 6',carrier:"中国移动"},{phonePlatform:'iOS 7',carrier:"中国电信"} 我想统计一下 使用android ,iOS系统的分别有多少人,怎么写查询语句呢,如何进行分组呢,aggregate $group可以办到不? 请大神指点!在下感激涕零

mgo / mongodb:聚合-查找所有成员并按membercount排序,但是membercount是成员userid的数组

<div class="post-text" itemprop="text"> <p>The representation of 1 record (a community):</p> <pre><code>{ "_id" : ObjectId("538a4734d6194c0e98000001"), "name" : "Darko", "description" : "Darko", "subdomain" : "darko", "domain" : "", "created" : ISODate("2014-05-31T21:18:44.764Z"), "category" : "Art and Culture", "owner" : "53887456d6194c0f5b000001", "members" : [ "53887456d6194c0f5b000001" ] } </code></pre> <p>and the Go type</p> <pre><code>Community struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` Name string `json:"name"` Description string `bson:",omitempty" json:"description"` Subdomain string `bson:",omitempty" json:"subdomain"` Domain string `json:"domain"` Created time.Time `json:"created"` Category string `json:"category"` Owner string `json:"owner"` Banned []string `bson:",omitempty" json:"banned"` Members []string `json:"members"` Moderators []string `bson:",omitempty" json:"moderators"` Admins []string `bson:",omitempty" json:"admins"` Logo string `bson:",omitempty" json:"logo"` Stylesheets []string `bson:",omitempty" json:"stylesheets"` Javascripts []string `bson:",omitempty" json:"javascripts"` } </code></pre> <p>Ok now I'd like to retrieve a list of all communities of <code>Category</code> <code>Art and Culture</code> and order by the number of members aka <code>members.length</code> in js or <code>len(Community.Members)</code> in Go.</p> <p>something like <code>SELECT * FROM communities ORDER BY COUNT(members) WHERE category = 'Art and Culture'</code></p> <p>I have a custom type to be filled or unmarshalled into</p> <pre><code>CommunityDirectory struct { Id bson.ObjectId `bson:"_id,omitempty" json:"id"` Name string `json:"name"` Description string `bson:",omitempty" json:"description"` Subdomain string `bson:",omitempty" json:"subdomain"` Domain string `json:"domain"` Created time.Time `json:"created"` Category string `json:"category"` Logo string `bson:",omitempty" json:"logo"` Membercount int64 `bson:"membercount" json:"membercount"` } </code></pre> <hr> <p>What I have so far</p> <pre><code>func (ctx *CommunityContext) Directory() { pipe := ccommunity.Pipe([]bson.M{bson.M{"membercount": bson.M{"$size": "members"}}}) iter := pipe.Iter() result := CommunityDirectory{} results := []CommunityDirectory{} for { if iter.Next(&amp;result) { results = append(results, result) fmt.Println(result) } else { break } } ctx.JSON(results) } </code></pre> <p>but this doesn't work because</p> <pre><code>db.communities.aggregate( [ {"membercount": {$size:"members"}} ] ) Error("Printing Stack Trace")@:0 ()@src/mongo/shell/utils.js:37 ([object Array])@src/mongo/shell/collection.js:866 @(shell):3 uncaught exception: aggregate failed: { "errmsg" : "exception: Unrecognized pipeline stage name: 'membercount'", "code" : 16436, "ok" : 0 } </code></pre> <p>So, it should find all, order by membercount and assign a new "virtual" field membercount but only of category 'Art and Culture'.</p> <p>I find MongoDB quite complicated in this regard.</p> <ol> <li><p>What does the mongodb query look like?</p></li> <li><p>What does that look like in Go/mgo?</p></li> </ol> </div>


在mongodb中如何在group后取每个分组的前三条数据,我现在的语句是 db.getCollection('Recommend').aggregate([{ $match : { imgCount :{$gt : 0},maxWeight :{$gt : 0.1}}}, {$sort : {msgType : -1,time : -1 }}, {$limit : 10000}, {$group : {_id : "$topic", rowkey : {$first : "$rowkey"}}} ])取得每个分组第一条数据,要如何写可以取前三条?


<div class="post-text" itemprop="text"> <p>I'm trying to use the size of an array called "empofthemonth" to sort each field returned by their amount of employee of the month wins.</p> <p>Here is the insert code:</p> <pre><code>$db-&gt;users-&gt;insert( ["firstname" =&gt; "firstname1", "lastname" =&gt; "test", "email" =&gt; "", "keyinfo" =&gt; ["age" =&gt; 22, "gender" =&gt; "Male", "yearsemployed" =&gt; 1, "empofthemonth" =&gt; ["Apr"]] ]); $db-&gt;users-&gt;insert( ["firstname" =&gt; "firstname2", "lastname" =&gt; "test2", "email" =&gt; "", "keyinfo" =&gt; ["age" =&gt; 24, "gender" =&gt; "Female", "yearsemployed" =&gt; 5, "empofthemonth" =&gt; ["Feb", "Mar"]] ]); $db-&gt;users-&gt;insert( ["firstname" =&gt; "firstname3", "lastname" =&gt; "test2", "email" =&gt; "", "keyinfo" =&gt; ["age" =&gt; 31, "gender" =&gt; "Female", "yearsemployed" =&gt; 2, "empofthemonth" =&gt; ["Jan", "May", "Jun"]] ]); </code></pre> <p>I realise that <a href="" rel="nofollow">aggregation</a> might be used but i cannot work out the full syntax.</p> <p>To conclude the query results should be in this order:</p> <ol> <li>firstname3 (3 emp of the months)</li> <li>firstname2 (2)</li> <li>firstname1 (1)</li> </ol> </div>




新手求教。 本人的几种思路: 1.传统的序号,当要插队时,后面所有人的序号+1。 2.链表。 3.数组,但是传统的的SQL数据库能存数组么?没见过。目前想的是mongodb存json数组


<div class="post-text" itemprop="text"> <p>I'm trying to export data from leads table to excel using PHP/Laravel, the leads table caמ be customized to show specific columns and the export columns should be same as the table columns. the problem is - if column not exists in a specific row the column not shown empty and the 'xls' file is exported really messy... my code looks like this:</p> <pre><code>public function excelExport(Request $request, $client_id=null) { $client_id = is_null($client_id) ? \Auth::client()-&gt;id : $client_id; if(is_null($this-&gt;client_users)){ $this-&gt;client_users = $this-&gt;clientsController-&gt;listClientUsers($client_id); } $columns = $this-&gt;account_settings-&gt;getColumnsDef($client_id); $query = Lead::select(array_keys($columns))-&gt;where('client_id',strval($client_id))-&gt;where('deleted',0); $query = $this-&gt;setQueryDates($request,$query,$client_id); $query = $this-&gt;leadsFiltersController-&gt;setExportQuery($request,$query); $arr = $query-&gt;get()-&gt;toArray(); Excel::create('leads' , function($excel) use ($arr,$columns){ $excel-&gt;sheet('Leads' , function($sheet) use ($arr,$columns){ $rows = []; $count = 0; foreach($arr as $lead){ $row = $this-&gt;setExportRowData($lead,$count,$columns); $rows[] = $row; $count++; } $sheet-&gt;fromArray($rows); }); })-&gt;export('xls'); private function setExportRowData($lead,$count,$columns,$order = true) { $row = []; $order = null; foreach($lead as $k =&gt; $v) { if (is_array($v)) { switch (strtolower($k)) { case "ga_details": if (count($v) &gt; 2) { foreach ($v as $key =&gt; $ga_detail) { if ($key != "realTime_data" &amp;&amp; $key != "uacid") { $row[$key] = $ga_detail; } } } break; case "status": if (isset($v['name']) &amp;&amp; count($v['name'])) { $row['status'] = $v['name']; } else { $row['status'] = "no status"; } break; case "owner": if (isset($v['owner_id']) &amp;&amp; count($v)) { $row['owner'] = $this-&gt;getClientOwnerUserName($this-&gt;client_users, $v['owner_id']); } else { $row['owner'] = "no owner"; } break; case "prediction": if (isset($v['score']) &amp;&amp; count($v)) { $row['prediction'] = $v['score']; } else { $row['prediction'] = "no prediction"; } break; case "the_lead": foreach ($v as $key =&gt; $lead_detail) { $row[$key] = $lead_detail; } break; case "quality": if (isset($v['name'])) { $row['quality'] = $v['name']; } else { $row['quality'] = "no quality"; } break; case "feeds": if (isset($v['feeds']) &amp;&amp; count($v['feeds'])) { $row['feeds'] = array_pop($v['feeds'])['message']; } break; default : $row[$k] = $v; break; } } else { if ($k != "_id") { $row[$k] = $v; } } } return $order == true ? sortArrayByArrayValues($this-&gt;order,$row) : $row; } </code></pre> <p>sortArrayByArrayValues function looks like this:</p> <pre><code>function sortArrayByArrayValues(Array $array, Array $orderArray) { $rtn = []; foreach($array as $arr){ if(isset($orderArray[$arr])){ $rtn[$arr] = $orderArray[$arr]; }else{ $rtn[$arr] = ''; } } return $rtn; } </code></pre> <p>I really have no clue how to solve it, appreciate any help!!! :)</p> </div>


<div class="post-text" itemprop="text"> <p>Ok, first of all, I'm not even sure the title is right, if so, I'm sorry.</p> <p>I have this loop here which is the result of a MongoDB query:</p> <pre><code>foreach($cursor as $obj) { $monster = $obj["type"]; $strenght = $obj["strenght"]; $obj["value"] = rand(5, 15); } </code></pre> <p>now, I have put <code>rand</code> there to signify that <code>value</code> changes for each iteration. Now i want that this array, when is printed, is ordered by that <code>$obj["value"]</code>, and be able to chose if ascending or descending.</p> <hr> <p>ok, I have tried this</p> <pre><code>foreach($cursor as $obj) { $type = $obj["monster"]; $strenght = $obj["strenght"]; $obj["value"] = rand(5, 15); $newarr[] = $obj; } usort($newarr, "cmp"); function cmp($a, $b) { return $b['value'] &lt; $a['value']; } foreach ($newarr as $obj) { echo $obj['value'] . $obj['type'] . "&lt;br/&gt;"; } </code></pre> <p>As I expected, the </p> <pre><code> $obj["value"] = rand(5, 15); </code></pre> <p>does not get lost at every iteration in fact, the $newarr contains that value, the problem is that it does not sort them at all. The items are printed in the same order as they were put inside the array. Any help?</p> <p>Thanks</p> </div>


今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...



和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...


“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...






提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...




私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...


今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...


本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...


场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...



离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...


不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...




当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...


HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...



面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?







已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...



《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)





作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...






不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...


某站后端代码被“开源”,同时刷遍全网的,还有代码里的那些神注释。 我们这才知道,原来程序员个个都是段子手;这么多年来,我们也走过了他们的无数套路… 首先,产品经理,是永远永远吐槽不完的!网友的评论也非常扎心,说看这些代码就像在阅读程序员的日记,每一页都写满了对产品经理的恨。 然后,也要发出直击灵魂的质问:你是尊贵的付费大会员吗? 这不禁让人想起之前某音乐app的穷逼Vip,果然,穷逼在哪里都是...