keyvalue

How can I implement incr/decr on top of a key/value store?

How can I implement incr/decr on top of a key/value store? I'm using a key value store that doesn't support incr and decr though which is why I want to create this. I have used Redis and Memcached incr and decr, so as mentioned in some of the answers then this is a perfect example of how I want the incr and decr to behave, so thanks to ...

Parsing plain text to some structured object

I am working on parsing plain text and converting it to key-value pairs. For example, plain text: some_uninteresting_thing key1 valueA, some_uninteresting_thing valueB key2 valueD key3 some_uninteresting_thing valueE key4 valueG(valueH, valueI) key5 some_uninteresting_thing And possible mappings: Map( key1 ->(valueA, valueB,va...

Pair attribute naming in custom configSections

I'm trying to store a user list in a config file. I've been looking at DictionarySectionHandler and NameValueSectionHandler. I'm not too sure what the difference between these two is, but anyway, neither of them do exactly what I'd like. You can add a custom config section like so: <configSections> <section name="userAges" type="S...

A KeyValuePair in Java

I'm looking for a KeyValuePair class in Java. Since java.util heavily uses interfaces there is no concrete implementation provided, only the Map.Entry interface. Is there some canonical implementation I can import? It is one of those "plumbers programming" classes I hate to implement 100x times. ...

How to assign/add item(s) to a Dictionary using the key index?

We wanted to assign/add an item to a Dictionary using the key index, like this: Dictionary<string, object> dict = new Dictionary<string, object>(); dict["key"] = dict["key"] ?? "object"; But it results to: "The given key was not present in the dictionary." Is there any way we could assign values to this dictionary the same as the way...

How to pass generic KeyValuePair<Tkey,TValue> to a WebMethod?

[WebMethod] public void Test(KeyValuePair<string,string> details) { } I have defined the above web-method. The KeyValuePair is defined in http://schemas.datacontract.org/2004/07/System.Collections.Generic how can i add it to my wsdl auto-generated file? i have to define this type because otherwise i get an empty definition...

How to find the median value of NSNumbers in an NSArray?

I'm trying to calculate the median of a (small) set of NSNumbers in an NSArray. Every object in the NSArray is a NSNumber. Here is what I'm trying, but it's not working: NSNumber *median = [smallNSArray valueForKeyPath:@"@median.floatValue"]; ...

should i implement my key/value system in memory or in MS SQL or 3rd party?

i think i've done enough research to know that i want to go with a NOsql key/value route. i've read up as much as i can and have the following questions still: should i go with something like amazon simpledb, google big table or microsoft azure's solution? (note i'm a .NET site) why not just simply create an in memory hashtable of ke...

Display a single object with a DataGridView.DataSource

I'm used to display multiple objects with a DataGridView control in the following format ID Name Address [...] ID1 Name1 123 street [...] ID2 Name2 456 street [...] This is simple to do with objects, properties and a BindingList<>. I'd like my data to be "rotated" 90 degrees so that the grid displays a ke...

Check keyvaluepair againt existing values in list of keyvaluepair

Hello, How can I check a new KeyValuePair against an existing list of KeyValuePair ? I want to compare for a condition to include or exclude the item. I am using vb.net 3.5 it is a nested For loop and I am deleting a datarow on the result of the condition args = (existing list of KeyValuePAir) For Each datarow As DataRow In ds.Tables...

Does Berkeley DB (Java version) support data partitioning?

Hi, I have about 5GB data to store BDB, but I found the performance is not very good. Does it support data partitioning? thanks ...

get data from dynamic key value in json

The requirement is following: I have to get the location field from page. var input= global.input = document.getElementById("Location"); Get the neighborhood area from the json file based on input and show on the page. I have a json object and have to filter the data from the json object based on the key value (location) var inputLo...

Grouping KeyValue pairs to Dictionary

Hi, I have the following code : using System.Collections.Generic; public class Test { static void Main() { var items = new List<KeyValuePair<int, User>> { new KeyValuePair<int, User>(1, new User {FirstName = "Name1"}), new KeyValuePair<in...

Grouping Nested KeyValue pairs to Dictionary

Hi, I have the following code: using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; public class Test { static void Main() { var list = new List<KeyValuePair<int, KeyValuePair<int, User>>> { new KeyValuePair<int, K...

Hi, Could anybody recommend me KeyValue Store supporting C#?

Hi, I am looking up keyvalue stores that support C#, but i found that most of them are implemented by Java. Could anybody recommend some to me? It would be super if it is very light-weight, i.e., appearing as a library. thanks!! ...