key

Determine if a PHP array uses keys or indices

How do I find out if a PHP array was built like this: array('First', 'Second', 'Third'); Or like this: array('first' => 'First', 'second' => 'Second', 'third' => 'Third'); ??? ...

Key Material Decription in Vista using WLAN API

I am getting encrypted value for the "Key Material" tag only in vista...After some googling i found that "CryptUnprotectData" method can be used to decript it..But i dont find any way to implement and get the decrypted value... If any one have suggestions to use it please help me out ...

Rationale in selecting Hash Key type

Guys, I have a data structure which has 25 distinct keys (integer) and a value. I have a list of these objects (say 50000) and I intend to use a hash table to store/retrieve them. I am planning to take one of these approaches. Create a integer hash from these 25 integer keys and store it on a hash table. (Yeah! I have some means to han...

Unbind Key Presses

I'm making a game that involves, like all games, key presses. Only left and right arrow and the Space Bar. They work, but the browser is pre-set to scroll left, right, or jump down on those keys. Is there any way to unbind those keys in the code? Thanks. ...

How can I Query only __key__ on a Google Appengine PolyModel child?

So the situation is: I want to optimize my code some for doing counting of records. So I have a parent Model class Base, a PolyModel class Entry, and a child class of Entry Article: How would I query Article.key so I can reduce the query load but only get the Article count. My first thought was to use: q = db.GqlQuery("SELECT __key__ f...

iPhone - Merge keys in a NSArray (Objective-C)

Hi everyone, I'm having troubles with arrays and keys... I have an array from my database: NSArray *elementArray = [[[menuArray valueForKey:@"meals"] valueForKey:@"recipe"] valueForKey:@"elements"] The problem here is that I would like all my elements of all my meals of all my menus in an array such that: [elementArray objectAtIndex:0...

iPhone's Unique Device Identifier (UDID) instead of Developer Key?

Hi.I want to run my app on my Iphone instead of simulator.But I want to ask that is UDID enough for this?We want to get Developer key and I will make my UDID registration and then can I test my apps on my device?Or 1 developer key for 1 device? ...

change last key name from array in php

i want to be able to change the last key from array i try with this function i made: function getlastimage($newkey){ $arr = $_SESSION['files']; $oldkey = array_pop(array_keys($arr)); $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]); $_SESSION['files'] = $arr; $results = end($arr); print_r($arr); } if i c...

how to generate PMK?

Hi everyone, I would like to know how can I generate a random pre-master key PMK in java? (related in key exchange and authentication) Is it similar with other randam key generating? What particularly is a pre master key? Thanks, Sebby. ...

Capture a keyup event at application level in WPF

Hi I have an application built in wpf. At the base level I have a usercontrol and on that usercontrol are many components. I want to be able to capture a key press event on my usercontrol even if the focus is on one of the children. Using PreviewKeyUp doesn't seem to do the trick. Thanks, Matt. ...

How to change behavior enter/backspace pressed in WYMEDITOR

Hi all, In Google Chrome after pressing enter key in WYMEDITOR a new <p> is created. How to change it? I would rather insert <br /> tag as it happens after shift-enter combination. (In fact shift-enter creates two <br />). Similar question concerns backspace pressed on the beginning of paragraph. How to change this behavior to erase p...

Editing a TreeView node doesn't change the TreeNode Key

I have a TreeView with user-editable nodes. I like to use the node caption as key to my tree node : + Root |+ Node1 ||- SubNode1 ||- SubNode2 |+ Node2 ||- SubNode3 ||- SubNode4 So I can reach a node like this: MyTreeView.Nodes["Root"].Nodes["Node2"].Nodes["SubNode3"] The problem is that, as I allow the user to rename any node, I wo...

Implement a RSA algorithm in Java

Hello everyone. I want to implement a RSA algorithm to encrypt an image (byte[]). To generate my two keys I used this piece of code : KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA"); keygen.initialize(512); keyPair = keygen.generateKeyPair(); Once public and private key are generated, I would like to show them to the us...

capture flash key event "escape"

I have a flash site that users can view full Screen video. the trouble is, I am making only the video player full screen (hiding the rest of the site behind it). my "toggle full screen" button works in that it reduces the video player back to normal size when the user toggles out of full screen back. but when the user hits the escape...

mysql complex key or + auto increment key (guid)

Hi, I have not very big db. I am using auto increment primary keys and in my case there is no problem with that. GUID is not necessary. I have a table containing this fields: from_destination to_testination shipper quantity Where the fields 1,2,3 needs to be unique. Also I have second table that for the fields 1,2,3 stores bought q...

Python raises a KeyError (for an out of dictionary key) even though the key IS in the dictionary

I'm getting a KeyError for an out of dictionary key, even though I know the key IS in fact in the dictionary. Any ideas as to what might be causing this? print G.keys() returns the following: ['24', '25', '20', '21', '22', '23', '1', '3', '2', '5', '4', '7', '6', '9', '8', '11', '10', '13', '12', '15', '14', '17', '16', '19', '18'] ...

In FLEX, How can you stop ENTER Key from my Alert being caught by the control that initiated the Alert?

I am having an issue where I show an AlertBox message when the user hits ENTER and the focus is in a text area. The pop up works fine, but when the user hits enter the Alert closes as expected, but the TextArea listener receives the ENTER event from the Alert and pops the dialog up again. I have tried a number of ways to catch and eat...

Problem comparing keys in Appengine/Python

I'm trying to create a relationship between "tables" with Appengine/Python. Imagine I have a "table" for items, and a table for colors. I save the color of an item by saving the color key as an atribute of the item. That's working well, but this particular piece of code is not working: <select id="colorKey" name="colorKey"> {% for c...

Game Key Events: Event or Method Overload?

If you were going to develop a game in say, Ruby, and you were provided with a game framework, would you rather act on key up/down events by overloading a method on the main window like so: class MyGameWindow < Framework::GameWindow def button_down(id) case id when UpArrow do_something ...

Access the next button event android

I don't know if it's very clear, but i'm trying to do something when the "next" (bottom right corner of the keyboard) is pressed, and i can't find its keycode. I have tried to look for "next" or "enter" in the keycodes but nothing really relevant... does anyone know? (actually, i've found the enter keycode to be precise, but it does no...