keys

Delphi2009 Shortcuts?

Possible Duplicate: Comprehensive list of Delphi IDE Shortcuts What are the Common useful shortcut in delphi2009? can we create also our own? ...

PHP can I do this loop?

I have a loop (based on an array - which could grow but NOT too much - max 6 keys) e.g.: array('12','34','56',48'). What I would like to do is loop through the array and THEN loop again to find the "previous" array val. For example, key[0] = 12, key[1] = 34 then key[0] = 12, key[2] = 56 then key[1] = 34 etc. The values of the array ar...

Treap with implicit keys

There's a data structure called treap: that's a randomized binary search tree, which is also a heap on randomly generated so-called "priorities". There's a variation of this structure, where keys are implicit, they aren't stored in the tree, but we consider the ordered index of the node in the tree as this node's key. We need to store s...

What is special about a 20byte (160bit) key?

I was emailed a reset key. It was 40 hex letters, so 20 bytes which is 160 bits. I thought to myself, why 160 bits? Maybe it's a 128 (key) + 32 bit (checksum or id or something). Maybe something else. I am sure it was done for a reason but why? (PS: The person on the other end seems to not want to say why or maybe doesn't know. So askin...

Which formats are available for Keys Enum?

Hi all. I have a next problem. I need to represent a pressed keys combination in a text form. I got pressed keys from KeyEventArgs e... And when I try to use following code e.KeyData.ToString(); I got something like this: N, Control .... But I want to get Ctrl+N string. I think that must be present specific format for String.Format becau...

Asterisk AGI (Perl script) - Sometimes all keys are ignored by the script

I am new to Asterisk (VoIP) and am rather new to UNIX/Perl. I'm taking this over from a co-worker that left the company, so I didn't set this up in the first place, I just need to make some changes. I'm having a problem where I use get_data() to get the user's keypad entry, but the keys are just ignored and the get_data() function just ...

Cracking a secure key

Another simple question from silly old me. We keep hearing big numbers being thrown around, for example the key: 234234-234WEF-ER334AS-3535FWF Would take 20 billion gabizillion years for anyone to crack. Could someone explain how you even know when you have cracked it? If you have permutated a trillion combinations how do you know...

using access key for browser to underline the first character of all links with access keys

I am trying to figure out how to use the dom to access the access keys of each access keyed link and underline the first character of all of the links on the page when the access key is pressed. i.e. when the person presses alt in IE and Chrome all of the first letters of the links underline letting the person know which key to press. ...

going through a dictionary and printing its values in sequence

def display_hand(hand): for letter in hand.keys(): for j in range(hand[letter]): print letter, Will return something like: b e h q u w x. This is the desired output. How can I modify this code to get the output only when the funtion has finished its loops? Something like below code causes me problems as I can...

Should/can one change their Public and Private API keys on a regular basis for security purposes?

I run a site that is an implementation of a proprietary hosting+cms solution. This solution offers a nicely doc'd API that I have had several contracted programmers interface with in order to build custom extensions of the site functionality. As such, I have had to share my API keys several times. The methods called by the API can ope...

Groovy keyset and values

Is there a way to grab the key of one map and replace the value of the other with its value? def wild = [animal1:"pet3", animal2:"dog", animal3:"pig"] def pet = [pet1:"hamster", pet2:"fish", pet3:"cat"] if(pet.containsKey(wild.animal1)) { //replace wild.animal1 with the value contained in pet3 for example //so wild.animal1 wou...

In a large Perl hash, how do I extract a subset of particular keys?

I have a large hash and have a subset of keys that I want to extract the values for, without having to iterate over the hash looking for each key (as I think that will take too long). I was wondering if I can use grep to grab a file with a subset of keys? For example, something along the lines of: my @value = grep { defined $hash{$_}{...

PHP array keys values

I have an array like this $data = array( "some => "163", "rand" => "630", "om" => "43", "words" => "924", "as" => "4", "keys" => "54" ); How can I get each set's key associated with their values like this: foreach ($data as $stuff){ $this->$stuff["key"] = $stuff["value"]; } ...

Inputs in SDL (on key pressed)

Hello. I would like to know how can I detect the press of a key or release of a key in a while loop in SDL. Now, I know you can get the events with SDL like OnKeyPressed, OnKeyReleased, OnKeyHit, etc, but I want to know how to build functions like 'KeyPressed' that returns a boolean, instead of being an event. Example: while not KeyHit(...

Java Key Combos

I want to perform a specific action anytime a certain key combination is pressed while the program is running even if the window is not in focus. For instance, if I press CTRL-U the program would exit. Is this possible? ...

forKeyPath troubles with Quartz Composer and MacRuby

Hi All, I am having some issues with setting values using MacRuby and Cocoa. I have the inserted the QCView and the QCPatchController into the XIB and loaded the composition into the QCPatchController. Everything is running but I cannot access the published inputs on the QCView. attr_accessor :myQCView #this is bound to the QCControlle...

Is it safe to leave my password-protected PGP secret key available publicly?

My PGP secret keys are always password protected, which means you need to decrypt it using a symmetric key to get access to my private key. I am interested in making my password protected PGP secret key publicly available but I am not entirely sure if I am missing something. Storing my secret key on my computer seems only to be making t...

Multiple keys Hash Table (unordered_map)

I need to use multiple keys(int type) to store and retrieve a single value from a hash table. I would use multiple key to index a single item. I need fast insertion and look up for the hash table. By the way, I am not allowed to use the Boost library in the implementation. How could I do that? Thanks. ...

blackberry browser - numeric keys

Is there a javascript/html way of forcing the Blackberry browser to convert alpha characters to numeric within a specific HTML form text input box? Normally users have to hold down the alt key and click a bi-functional key to get numeric values. In BB/Java, you can apply a numeric mask to an input field. I have not found an equivalent...

NHibernate one-to-one mapping, non-primary keys

Can't get NHibernate to generate the correct query. It keeps using the primary keys of the two tables I'm joining for the one-to-one relationship, and I can't figure out how to specify the foreign key in one of the tables. tableA tableB { aID, { bID, bID, z, c, y, d } x } so the tableA should jo...