17 Nisan 2016 Pazar

sub document group by count

db.SLS_ORDER.aggregate( [
{
$group: {
_id: "$SalesPayment.ORACLE_ID",
count: { $sum: 1 }
}
},
{ $match: { count: { $gt: 1 } } }
]);

how to delete sub document in sub document on c#

{
"_id": "binary_stuff",
"Name": "MyApplication",
"Settings": [
{
"_id": "binary_stuff",
"Key": "ImportDirectory",
"Value": "C:\data",
"Overrides": [{
"_id": "binary_stuff",
"Name": "PathDirectory",
"Value": "C:\anotherData"
}]
},
}






   var query = Query.And(Query.EQ("_id", applicationId),
Query.EQ("Settings.Key", "ImportDirectory"));
var update = Update.Pull("Settings.$.Overrides", new BsonDocument(){
{ "Name", "PathDirectory" }
});
database
.Applications().Update(query, update);

 

Image resolution for mdpi, hdpi, xhdpi and xxhdpi

From a base image size, there is a 3:4:6:8:12:16 scaling ratio in drawable size by DPI.
LDPI - 0.75x
MDPI
- Original size
HDPI
- 1.5x
XHDPI
- 2.0x
XXHDPI
- 3x
XXXHDPI
- 4.0x

For example, 100x100px image on a MDPI will be the same size of a 200x200px on a XHDPI screen.

JavaScript

JavaScript Nedir?    JavaScript web tabanlı bir programlama dilidir. Mayıs 1995 yılında Brendan Eich tarafından tasarlanmıştır. Kullanıcı et...