Why `additionalProperties` is the way to represent Dictionary/Map in Swagger/OpenAPI 2.0

Chen, I think your answer is correct. Some further background that might be helpful: In JavaScript, which was the original context for JSON, an object is like a hash map of strings to values, where some values are data, others are functions. You can think of each name-value pair as a property. But JavaScript doesn’t … Read more

Swift NSUserDefaults not saving Dictionary?

Update for Swift 2, Xcode 7: As @atxe noticed, NSUserDefaults dictionaries are now mapped as [String, AnyObject]. This is a consequence of the Objective-C “lightweight generics” which allow to declare the Objective-C method as – (NSDictionary<NSString *,id> *)dictionaryForKey:(NSString *)defaultName (Default objects must be property lists and in particular the dictionary keys can only be strings.) … Read more

Where to find dictionaries for other languages for IntelliJ?

Current IDEA versions load dictionaries in UTF-8, you don’t need to convert them to the platform encoding, ignore the iconv step below. The dictionary can be produced using aspell for Unix/Mac OS X or under Cygwin. You need to have aspell and appropriate dictionary installed. Here is the example for Russian dictionary I’ve used: aspell … Read more

What is the difference between a map and a dictionary?

Two terms for the same thing: “Map” is used by Java, C++ “Dictionary” is used by .Net, Python “Associative array” is used by PHP “Map” is the correct mathematical term, but it is avoided because it has a separate meaning in functional programming. Some languages use still other terms (“Object” in Javascript, “Hash” in Ruby, … Read more

LeafletJS markers move on zoom

The solution to this is quite simple. Leads should have posted it. when your markers are moving around your map it’s because the map doesn’t know the size of your marker and/or it doesn’t know the point of your marker that marks the location. your marker icon code might look like this: var locationIcon = … Read more