Save data as key value pair in windows 8 metro style app? - windows-8

In my application I want to save the data as key value pair. How is this possible?

Related

Check if a sequence of keys are pressed in vb.net?

Im not sure if this is possible but I am working on a small project where I would like to be able to enter in a specific sequence of keys and then something happens. Its purpose is to act as a sort of "password" to unlock additional functionality. Im thinking maybe I could store key presses in an array somehow and compare the array to another that has the same key presses in it already or something similar but im not sure on where to start.

Numlock key pad not working vb.net textbox?

I have noticed that my textbox will not accept numbers from the num lock key pad how do I allow this in vb.net?
There's no restriction I know of. Either you've not activated NUMLOCK (thus making the keys act like cursor keys) or something is intercepting them (some other program).
From a VB.NET application's point of view, a key pad key is as good as any other. To be extra sure, try what happens in Visual Studio when you enter numbers using the key pad.

What data type is best for store points in Redis?

There are two buttons on web page: like and unlike.
When user click to these buttons does query that counters number of clicks.
What is best and user usable data type in Redis to store it?
I have some options:
use increment key
use hash with one field count and key of button ID
use sortet sets
Problem is that I want to show users names who pushed button and number of clicks.

Display a form only after installation in VB

I am developing a Windows form application in VB
I want to display a form only at the first application start up i.e. opening the form for the first time after installation , then it should not display the form . How to do it?
The way this is normally done is by
1) setting a registry key FirstRun (you create this) to a value of False
When you run your app for the first time you check the key if it exists (It won't at this stage) then run the installation form which will set the key. So next time the program runs it checks the key and sees that it has been set and knows not to run the form.
2) This is the way I do it. Check if a folder or file belonging to the app exists if not run installation form and create the file, folder that you will check for. If it does exist then you know not to run the form.
If (!File.Exists("yourFile"))
InstallForm.Show();

extjs 4 autogenerating a record id

I have a map to which features can be added and removed and am using an extjs 4 grid panel as a view (MVC) to list the features. The idea is that the user can click an item in the grid and highlight it in the map, click a button to remove it etc. The features do not have a natural key so I need to make one up, just a number is fine. At the moment the map starts up with some features already on it so I am able to loop through and give each an id and add a record to the store for each to tie the 2 up, but ideally I want the store to take care of that when each record is added. I also have the problem that when a new feature is created I need to get a fresh new id to use but I'd rather not have to loop through all my features to find the highest id.
I am using myStore.add({id:1,name:'blah'...}) to add the records - should I be using this or insert?
Any help appreciated
Yes you can use the store last to figure out your last record, but my recommendation is to handle ID generation to the server side. Typically database sequencer is used to create IDs.