Top "Key" questions

A unique identifier used to retrieve a paired value.

JavaScript: Object Rename Key

Is there a clever (i.e. optimized) way to rename a key in a javascript object? A non-optimized way would …

javascript object key rename
How to get array keys in Javascript?

I have an array created with this code: var widthRange = new Array(); widthRange[46] = { min:0, max:52 }; widthRange[66] = { min:52, max:70 }; widthRange[90] = { min:70, …

javascript arrays key
Differences between INDEX, PRIMARY, UNIQUE, FULLTEXT in MySQL?

What are the differences between PRIMARY, UNIQUE, INDEX and FULLTEXT when creating MySQL tables? How would I use them?

mysql indexing key schema
Get the new record primary key ID from MySQL insert query?

Let's say I am doing a MySQL INSERT into one of my tables and the table has the column item_…

mysql insert key auto-increment
PHP: How to use array_filter() to filter array keys?

The callback function in array_filter() only passes in the array's values, not the keys. If I have: $my_array = …

php arrays key
Python dictionary: Get list of values for list of keys

Is there a built-in/quick way to use a list of keys to a dictionary to get a list of …

python list dictionary key
SQL keys, MUL vs PRI vs UNI

What is the difference between MUL, PRI and UNI in MySQL? I'm working on a MySQL query, using the command: …

mysql sql key
How to get a random value from dictionary in python

How can I get a random pair from a dict? I'm making a game where you need to guess a …

python random dictionary key
How to print all key and values from HashMap in Android?

I am very new for Android development, and I am trying to use HashMap in Android sample project. Now, am …

java android key hashmap
PHP: Get key from array?

I am sure that this is super easy and built-in function in PHP, but I have yet not seen it. …

php arrays multidimensional-array key