keys

Dictionary keys don't contain a key that's already contained in keys

Why is the following 'exist' boolean variable getting a value of false??? foreach (Cell existCell in this.decoratorByCell.Keys) { //this call yield the same hashcode for both cells. still exist==false bool exist = this.decoratorByCell.ContainsKey(existCell); } I've overridden GetHashCode() & ...

candidate keys from functional dependencies

Given the Relation R with attributes ABCDE. You are given the following dependencies: A -> B, BC -> E, and ED -> A. I already have the answer which is CDE, ACD, and BCD. I just need to know how to do it. Thanks. ...

I'm capturing keys on my WinForm but I'm trying to see if the pressed key is a 'String' - getting an exception.

Here's my code: void gkh_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == neededLetter as Keys) { if (neededLetter == "n") { neededLetter = "o"; } else if (neededLetter == "o") { ...

BitShifting with BigIntegers in Java

I am implementing DES Encryption in Java with use of BigIntegers. I am left shifting binary keys with Java BigIntegers by doing the BigInteger.leftShift(int n) method. Key of N (Kn) is dependent on the result of the shift of Kn-1. The problem I am getting is that I am printing out the results after each key is generated and the shiftin...

Using Ruby, what is the most efficient way to check if any key in a hash matches any values within an Array.

I want to compare the keys in a hash of parameters against an array of elements for a match. For example: params = {"key1", "key2", "key3"} params_to_match = ["key2","key3"] I could do this, but I'm sure there is a much more elegant way to acheive the same result params.each_key{|key| if params_to_match.include?(key.to_s)...

Access Client Write Key & Server Write Key from OpenSSL C API

Hello, I have a need to access the encryption (cipher, write) keys that are generated from the master key that is generated from the OpenSSL C API. I know I can access the master key using the SSL struct as follows: ssl->session->master_key Unfortunately looking at the OpenSSL code has not gotten me very far as the API is not very ...

What is the difference between DSA and RSA?

It appears they are both encryption algorithms that require public and private keys. Why would I pick one versus the other to provide encryption in my client server application? ...

Getting a key in the ActionScript Dictionary

Hello, I am using a Dictionary in ActionScript as a queue, sort of, still reading most of the time as an associative container, but I need one time to make a loop to run through the whole dictionary, such as for (var key:String in queue) . Inside this for loop I perform some actions on an element and then call delete on that key. My is...

not able to install signature keys

Hi , I have to sign an blackberry application so that i can load it to the device but, the signature keys i got from the RIM are installed on the system gets formatted and now i am trying to install the signature keys on another system but the server prompts me for this "Unable to register client'2909103544'because there are no more reg...

How do I return specific keys from the $_POST array?

I would like to check to see if there are any keys in $_POST that contain a string. The string will not be the full key, only part of the key. (ie. search string = "delRowID", $_POST key = "delRowID_16"). I have tried to use array_keys($_POST,"delRowID"), but it has never returned anything. CODE print_r($_POST); print_r(array_keys($_PO...

Facebook oAuth needs secret key?

Facebook oAuth requires your secret key? I thought you weren't supposed to share that. Am I using the wrong secret key? ...

PHP: get keys of independent arrays

Hello. I have two arrays. Example of the first array: $arrayOne = array ( 'fruit' => array( 'apples' => array(), 'oranges' => array(), 'bananas' => array() ), 'vegetables' => array( 'tomatoes' => array(), 'carrots' => array(), 'celery' => array(), 'beets' => array ...

Random keyboard key assignment corruption in Windows XP

Manually Migrated to Super User: Random keyboard key assignment corruption in Windows XP This isn't a programming question but I'll try to get away with it. WinXP SP3 machine. Every so often (sometimes several times a day) my keyboard (or Windows, or something) decides that it is going to translate the keys I am typing. It...

Google App Engine retrieve user defined key name

Is there a way to retrieve the key name you set using: Model( key_name = ... ... ) I tried using the key() method but that returns the one Google makes. ...

How to bind key to another key in ubuntu?

Hey guys, I would like to map my "WASD" to the arrows. I don't like moving my hands around. I already fixed it for my editor by calling W for arrowUp. But, how can I bind it for the entire system? When I call W, I want it to call the arrow UP. I can't bind those keys one software at the time. Any ideas? Thanks. -hbt ...

Convert a string, char type to System.Windows.Forms.Keys

I'm trying to get a char converted to System.windows.Form.Keys type or a string to a Keys array. Does anyone know how to do it in a simple way? ...

sort a dictionary according to their values in python

Possible Duplicate: Sort by key of dictionary inside a dictionary in Python I have a dictionary: d={'abc.py':{'map':'someMap','distance':11}, 'x.jpg':{'map':'aMap','distance':2},....} Now what I need is: I need to sort d according to their distances? I tried sorted(d.items(),key=itemgetter(1,2), but it's not working. H...

How can I check if a character is a valid Key in VB.NET?

I need to check if a character is a valid Key (type) in VB.NET (I need to turn "K" into Keys.K, for example). I am currently doing this to convert it: Keys.Parse(GetType(Keys), key, False) However, if key is not valid it throws an exception. How can I check if key is a valid character? ...

How do I allow clients to upload to Amazon S3 without giving out my keys?

One of my clients has a site which displays media that has been uploaded from a client application. This application initially used FTP, but we're moving to S3 for various data storage and performance reasons. What I would like to be able to do is have this client upload a file directly to our central S3 store (ala dropbox/jungledisk e...

Add private key permanently with ssh-add on Ubuntu

I have a private key protected with a passowrd to access a server via SSH. I have 2 linux (ubuntu 10.04) machines and the behavior of ssh-add command is different in both of them. In one machine, once I use "ssh-add .ssh/identity" and entered my password, the key was added permanently, i.e., every time I shutdown the computer and log...