How to join query in mongodb?

To have everything with just one query using the $lookup feature of the aggregation framework, try this : db.User.aggregate( [ // First step is to extract the “friends” field to work with the values { $unwind: “$friends” }, // Lookup all the linked friends from the User collection { $lookup: { from: “User”, localField: “friends”, … Read more

Strange error in rails – missing helper

The problem seems to have been introduced in the latest version of ruby, ruby 2.2.0. Try this experiment: in rails console/or irb: [1] pry(main)>File.expand_path (“./”) => “/users/xxxx/Sites/xxxx” and in the terminal window: ]$ pwd /users/xxxx/sites/xxxx See the different case? If you get that, then deep in the bowels of active support a regex goes south. … Read more

where to find xsd.exe in visual studio 2013 on windows 8

Once you have the SDK installed * (either Manually, or with Visual Studio), you’ll find it in the following directories: SDK 8 and later There is an an additional FX version subdirectory: %programfiles(x86)%\Microsoft SDKs\Windows\{ver}\bin\{FXVer} Tools Where {ver} is the SDK version (e.g. v8.1A) and {FXVer} is the applicable .Net Framework version, e.g. NETFX 4.0v e.g. … Read more

XML Attributes vs Elements [duplicate]

There is an article titled “Principles of XML design: When to use elements versus attributes” on IBM’s website. Though there doesn’t appear to be many hard and fast rules, there are some good guidelines mentioned in the posting. For instance, one of the recommendations is to use elements when your data must not be normalized … Read more

How can I tell jaxb / Maven to generate multiple schema packages?

I had to specify different generateDirectory (without this, the plugin was considering that files were up to date and wasn’t generating anything during the second execution). And I recommend to follow the target/generated-sources/<tool> convention for generated sources so that they will be imported in your favorite IDE automatically. I also recommend to declare several execution … Read more