In this gist, you can find all the VS Code chat modes I am using in my projects for the Persona based approach technique I created.
You will find an article about on my dev.to blog (dev.to/kasuken)
In this gist, you can find all the VS Code chat modes I am using in my projects for the Persona based approach technique I created.
You will find an article about on my dev.to blog (dev.to/kasuken)
//5.1 | |
db.posts.aggregate([{"$unwind": "$comments"}, {"$group":{"_id": "$comments.author", "num":{"$sum": 1}}}, {"$sort": {"num":-1}}, {"$limit": 1}]) | |
//5.2 | |
db.zips.aggregate([{$match: { $or: [{state: "CA"}, {state: "NY"}]}}, {$group: {_id: {city: "$city", state: "$state"}, pop: {$sum: "$pop"}}}, {$match: {pop: {$gt: 25000}}}, {$group: {_id: 0, avg_pop: {$avg: "$pop"}}}]) | |
//5.3 | |
db.grades.aggregate([ | |
{$project:{"_id":{student_id : "$student_id", class_id : "$class_id"}, scores:1}}, | |
{$unwind:"$scores"}, | |
{$match:{"scores.type":{$in:["homework","exam"]}}}, | |
{$group:{_id:{student_id:"$_id.student_id", class_id:"$_id.class_id"}, score:{$avg:"$scores.score"}}}, |
package test; | |
import javax.ejb.Stateless; | |
import javax.ejb.TransactionAttribute; | |
import javax.ejb.TransactionAttributeType; | |
import java.util.concurrent.Callable; | |
/** | |
* Created by andy on 22/10/2015. | |
*/ |
import javax.annotation.Resource; | |
import javax.annotation.sql.DataSourceDefinition; | |
import javax.annotation.sql.DataSourceDefinitions; | |
import javax.ejb.Singleton; | |
import javax.inject.Inject; | |
import javax.jms.*; | |
import javax.sql.DataSource; |