An existing DB schema has unique, non-primary, keys, and some foreign keys that rely on them.
Is it possible to define unique keys, alongside primary keys, in Entity Framework v4? How?
Hi,
I have an UITextField object in my view and want to launch a method when user press backspace button and textField is empty.
First I have to do is to create a cursor storing text length, so when cursor changes from 1 to 0 there is nothing to do.
The only way to launch the method is when text length is 0 - press backspace - remain to 0.
How to catch the event of pressing the backspace key in my UITextField ?
Thanks in advance !
what are some key differences between mvc1 and mvc2.
I have to adopt any one so i am unable to decide that is mvc2 have some really good features that mvc1 is missing.
What would be the best way to wait for a return key press from the user using the Java Scanner Class?
In a command line tool I would like the user to confirm before carrying out an action.
Please correct me if there a more standard way of doing this in a command line tool.
I want to define a trigger in PostgreSQL to check that the inserted row, on a generic table, has the the property: "no other row exists with the same key in the same valid time" (the keys are sequenced keys). In fact, I has already implemented it. But since the trigger has to scan the entire table, now i'm wondering: is there a need for a table-level lock? Or this is managed someway by the PostgreSQL itself?
Buttons in flex can be pressed with the space key, but a client would like to press enter instead of space. This can be achieved by programming each button, but it would be very time consuming.
Does anyone have an idea how to do this in the less amount of time?
thanks.
In java if I am looping over the keySet() of a HashMap, how do I (inside the loop), get the numerical index of that key?
Basically, as I loop through the map, I want to be able to get 0,1,2...I figure this would be cleaner than declaring an int and incrementing with each iteration.
Thanks.
I'd like to know if there is a way to figure out if a key does something in vim. I know that I can use :map to see user-defined mappings, but is there something for the built-in stuff?
For example, I always had CTRL-W bound to close tab, because I thought that it was unused. After half a year, I found out that there are some sequences that use it, like CTRL-W CTRL-S to split the window, and it was a nightmare to retrain myself.
I'm building a custom keyboard in android.
My input.xml:
<com.mykeyboard.MyKeyboardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:keyBackground="@drawable/keybg"
/>
All the keys do have the same background.
Now I'm trying to dynamically change the background of one single key.
Is this possible?
Hi,
I want to create a re-usable library. I was going to use extension methods however I run into some issues in some cases for the client to have to specify in the calling method the types.
QUESTION - If I use an abstract base class as the basis, can I specify an attribute/property in the class to be generic (e.g. the key property might be an 'int' in one case, or a 'string' in another)?
I would like to have my console app that runs for a while to give some options to the user at the end if at anytime during the process the user pressed the shift key. Is this possible?
how to get a Dictionary key by value in C#?
Dictionary<string, string> types = new Dictionary<string, string>()
{
{"1", "one"},
{"2", "two"},
{"3", "three"}
};
I want simething like this:
getByValueKey(string value);
getByValueKey("one") must be return "1".
What is the best way do this? may be HashTable, SortedLists?
I have a question about idioms and readability, and there seems to be a clash of Python philosophies for this particular case:
I want to build dictionary A from dictionary B. If a specific key does not exist in B, then do nothing and continue on.
Which way is better?
try:
A["blah"] = B["blah"]
except KeyError:
pass
or
if "blah" in B:
A["blah"] = B["blah"]
"Do and ask for forgiveness" vs. "simplicity and explicitness".
Which is better and why?
I am using the function CertCreateSelfSignCertificate (http://msdn.microsoft.com/en-us/library/aa376039(VS.85).aspx) to generate a certificate. I need to specify the key size to be 2048. I do not see how to provide this parameter.
I would appreciate any help in this matter.
Thanks.
This question asks for one in java,
what's the best candidate in PHP?
BTW,does the following establish:
distributed key value store ==
distributed cache
?
I have a map in perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla
$rec->{reqHdrs.bla}
My problem is now I cant seem to access this field from the map any ideas ?
The following is my error
Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use
I have two functions. When enter is pressed the functions runs correctly but when escape is pressed it doesn't. What's the correct number for the escape key?
$(document).keypress(function(e) {
if (e.which == 13) { $('.save').click(); } // enter (works as expected)
if (e.which == 27) { $('.cancel').click(); } // esc (does not work)
});
I am trying to use the below in my app.config
<add key="InstanceID" value="HID\VID_413C&PID_3200\6&227E6ED3&0&0000" />
It shows error in app.config, what is the problem ? i want to use this value as string in my c# code.
Hi All,
I have a json like:
var xx= {'name':'alx','age':12};
now i can read the value of name which is 'alx' as xx[0].name, but how to retrieve value of 'name' itself, means how i can fetch Key @ run time.
Please let me know if my question is not clear and you guys want more info.
Thanks.
So Ctrl/Cmd-F11 starts the server, but is there a key to restart the server? I'm developing using app engine and GWT if that makes any difference (I suspect not).
Given a multimap<A,B> M what's a neat way to create a vector<B> of all values in M with a specific key.
e.g given a multimap how can I get a vector of all strings mapped to the value 123?
An answer is easy, looping from lower-upper bound, but is there a neat loop-free method?
Sometimes I want a filename instead of what zsh guesses for me. For example, I have a PNG file without a proper .png suffix, which makes zsh think it isn't a picture and won't list it when I type Tab to complete arguments of display.
I am wondering if there is a key sequence that completes for a filename wherever the context is, like ^XC for _correct_filename, or how to configure zsh to do the thing?