key

Encryption key generated by java program is not accepted by Microsoft encryption API

We have generated RSA public key by our java program to encrypt the data in C++ before transmitting it but when we use this key to encrypt the data using Microsoft encryption API, it doesn't accepts this key. Do anyone has any ideas on this? ...

Separating encrypt and decrypt privilidges in SQL Server

Hi there, I am trying to save sensitive information on DB with encryption and all users can put their information in DB after encrypting it, but only privilidged users can decrypt and see it. How can i achieve it using SQL Server 2008 key/certificate/encryption mechanism? Thanks, Ebe. ...

A NSDictionary that doesn't copy keys for iPhone 3.0 SDK?

Hello, I am using NSDictionary as an associated array (i.e, the keys i am using can be any arbitrary objects). One of the very annoying thing about NSDictionary is that it always make a copy of the key and store it. In my scenario, I will later retrieve the keys from the NSDictionary and do some operations with them. The operation happe...

array key initial value

i want to set my array key initial value to a certain number. here is what i have: $tickets=array(); array_push($tickets,"10","20","TBD") for($i=3; $i<20; $i++) i want my array initial value to start at 3 not 0. any ideas ...

C++ SetWindowsHookEx WH_KEYBOARD_LL Correct Setup

I'm creating a console application in which I'd like to record key presses (like the UP ARROW). I've created a Low Level Keyboard Hook that is supposed to capture all Key Presses in any thread and invoke my callback function, but it isn't working. The program stalls for a bit when I hit a key, but never invokes the callback. I've checked...

what's the best way to design dynamic key-value pairs in mysql?

Hi, I need to attach unlimited attributes to a record in a table, and I've already designed a system using #3 below using mysql. Unfortunately I am finding that searching across a million records is getting slow. Is #2 a better approach, or is there a better way alltogether? Is this a case for using a view? I'd like to have my keys ...

C#.NET: Enter key to check CheckBoxes..

I want to use Enter key instead of Space key to check the checkboxes.. private void Form2_KeyDown(object sender, KeyEventArgs e) { CheckBox c1 = this.ActiveControl as CheckBox; if (e.KeyData == Keys.Enter && this.ActiveControl.Equals(c1)) c1.Checked = true; } I could do it if i w...

Using google maps without API Keys?

I am developing a cms that will use more than one domain and i have to use only one google map script in my page. Is there a way to use google maps without api key? Otherwise it's not working? ...

Primary key versus key

When creating a mysql dump containing the structure of my database, one of the tables shows the following: CREATE TABLE `completedTransactions` ( `paymentId` int(10) unsigned NOT NULL, `timestamp` int(15) unsigned NOT NULL, `actionTaken` varchar(25) NOT NULL, `response` varchar(255) NOT NULL, `responseCode` int(5) NOT NULL, ...

how to fill a jquery autocomplete list with key value pairs from web service

Can somebody please give an example on passing key value pairs to a jQuery autocomplete list using a webservice. Tanks for the help. $('#txtBox1').autocomplete("Autocomplete.asmx/GetKeyValu", { dataType: "xml", datakey: "string", max: 10, minChars: 0 }); [WebMethod] public Dictionary<string,string> GetKeyValu(string q, int li...

App Engine - Chain of entities generates exceptionally long entity keys

I am writing an application which allows users to send messages between them. I am using transactions to ensure that there is only a single "top" message between any two users, and this "top" message has a link to the "next" message, and so on.. forming a sort of of linked list of messages. The messages reference each other through refer...

Google gadget/spreadsheet: Grab spreadsheet key for gadget.

So I'm working on a google gadget(really only gadgetizing so I can get a datastore for this) that I want to be embeddable in a google spreadsheet (after this point, I'm going to skip the word google - you can just imagine it's there). I want to use the spreadsheet that I embed the gadget in as a key/value store for the data I enter with...

Python equiv. of PHP foreach []?

I am fetching rows from the database and wish to populate a multi-dimensional dictionary. The php version would be roughly this: foreach($query as $rows): $values[$rows->id][] = $rows->name; endforeach; return $values; I can't seem to find out the following issues: What is the python way to add keys to a dictionary using an au...

Actionscript 2: How to detect a key?

Hello Here's my current code: if (Key.isDown(Key.UP)) { //do stuff } What I want to do, is to detect if user presses a button. My code atm just detects if it's pressed down continueusly. Is there a way to detect when user only presses it down, doesn't hold it down? And please, no AS3 answers here. Martti Laine ...

Catch keypress with android

Hello! How can i catch a phone keypress with the android SDK? i've been looking around for hours without finding anything.. For example: In some cases, i want to catch the message when a user presses the "hang up" button on the phone, and then discard the message before it reaches the OS. Is this possible? ...

How do you dynamically access attributes of a JSON Object

I have a two level JSON object EX: var regexDefs = { "alpha": { "regex" : /^[A-Z]+$/, "errMsg" : "Alpha Only" } } I want to do something akin to searching an array for a key. (using jQuery's inArray) var key = "alpha"; alert($.inArray(key,regexDefs)); if the key is in the array then I want to ...

Need a repeatable random array shuffle using a key

I am looking to randomly shuffle a list/array using a key. I want to be able to repeat the same random order using the key. So I will randomly generate a numeric key from say 1 to 20 then use that key to try and randomly shuffle the list. I first tried just using the key to keep iterating through my list, decrementing the key until=0,...

Sampling keys due to their values

Hi guys, I have a dictionary(python) with key->value (str->int). I have to chose some key due to it's own value. Then bigger this value the key has less posibility to be chosen. For example if key1 has value 2 and key2->1 key1 the attitude should be 2:1. How can I do this? ...

Detect Caps Lock on/off using jquery

How can i detect caps lock key on/off using jquery.... I have a password textbox and i allow only small letters so i dont want caps lock key to be on.... Is it possible to detect the state of Caps Lock Key using jquery? ...

Action Parameter POST .. An item with the same key has already been added.

Hi Everyone! I have a little problem in ASP.NET MVC 2 FrameWork 4... Let me explain : I have one class that contains other classes like ... IndexViewData -­­> MemberViewData -> UserViewData public class IndexViewData : Manager { public MemberViewData member { get; set; } .... public class MemberViewData : Manager { publi...