Top "Key-value" questions

A key-value pair is a set of two linked data items: a key which uniquely identifies some item of data, and the value, which is either the data that is identified or a pointer to the location of that data.

Why can't I compare a KeyValuePair<TKey, TValue> with default

In .Net 2.5 I can usually get an equality comparison (==) between a value and its type default if (myString == default(string)) …

c# .net key-value
Create a Dictionary in xaml?

Pseudo example: <Window> <Window.Tag> <x:Dictionary KeyType="{x:Type sys:String}" ValueType="{x:Type …

xaml dictionary key-value idictionary
What is the type of "keys" in JavaScript?

I bumbed into one of those moments when I just lose the focus and start wondering on a silly question: …

javascript object key-value
What are the differences b/w Hashtable, Dictionary and KeyValuePair?

I use Dictionary in my code but my colleagues use Hashtable. MSDN says they work on Key Value pair & …

c# .net dictionary hashtable key-value
Check if a key exists in the Windows Registry with VB.NET

In VB.NET I can create a key in the Windows Registry like this: My.Computer.Registry.CurrentUser.CreateSubKey("TestKey") …

windows vb.net registry key-value registrykey
Assign multiple keys to same value in array

$lang = array( 'thank you'=>'You are welcome', 'thanks'=>'You are welcome', 'thank ya'=>'You are welcome' ); As …

php arrays key key-value
How to remove hash keys which hash value is blank?

I am using Ruby on Rails 3.2.13 and I would like to remove hash keys which corresponding hash value is blank. …

ruby-on-rails ruby ruby-on-rails-3 hash key-value
Swift - Create data model from JSON response

I'm learning Swift lang and one of the things that would be great to hear others input about is "How …

json swift key-value
PHP - split String in Key/Value pairs

I have a string like this: key=value, key2=value2 and I would like to parse it into something like …

php string split key-value
Mongo conditional for "key doesn't exist"?

I want to find a document using a conditional if the key == None or if the key doesn't exist. Something …

python mongodb pymongo key-value