key

Eclipse key mappings confused

Hey, I'm trying to use eclipse on Win 7, but for some reason it is screwing up my keys. For example, when I press '{' it ends up displaying a '^'. Im pretty sure that this is what would happen if I had a french keyboard layout, but I'm pretty sure that my language settings in Windows 7 are set to use Canadian English. Firefox or notep...

this class is not key value coding-compliant for the key

Hi, After having spent hours trying to solve a little problem of mine, I come to you for an ultimate try to fix it. I'm trying to link a UILabel with an IBOulet created in my class. That's something so basic you ask yourself why I need help ? Everytime I build my application, it crashes on the label screen saying "this class is not ke...

How do I convert an XML RSA key to a PEM file?

I have two XML files, structured as follows: My Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> <P> ... </P> <Q> ... </Q> <DP> ... </DP> <DQ> ... </DQ> <InverseQ> ... </InverseQ> <D> ... </D> </RSAKeyValue> A Public Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> </RS...

JavaScript associative array by variable

I'd like to pass a variable into the key of my monthHash variable here: var monthHash = new Array(); monthHash["JAN"] = "Jan"; monthHash["FEB"] = "Feb"; ... monthHash["NOV"] = "Nov"; monthHash["DEV"] = "Dec"; Such that I can do this: alert(monthHash[the_variable]); Instead of using a switch case to go through this. When...

Move a window on keypress + mouse (like linux ALT + mouse down)

Simple, i want to move a windows pressing ALT+MOUSE, like linux os (ALT+drag). It's possible to pass a win32 api (move api) to the windows interested clicking on it? I have a windows services that hook key pressed (ALT button in specific). When ALT key is pressed and a mouse down event is verified, i want to move window clicking anywhe...

How to assign/add item(s) to a Dictionary using the key index?

We wanted to assign/add an item to a Dictionary using the key index, like this: Dictionary<string, object> dict = new Dictionary<string, object>(); dict["key"] = dict["key"] ?? "object"; But it results to: "The given key was not present in the dictionary." Is there any way we could assign values to this dictionary the same as the way...

Is it totally fine to use a mutable object as a key in a Dictionary?

Say I have some special class, WrappedDataTable, and I want to associate each WrappedDataTable with exactly one DataTable. Furthermore, I want there to be no more than one WrappedDataTable in existence for any given DataTable. A colleague suggested I could cache my WrappedDataTable and use a factory method to access one, like this: pub...

JSF + HashMap and its key

I have a database with 2 tables CD and Song. Session bean access then entity classes of those two tables. In my backing bean, I just have a String cd and HashMap<CDName, CDName> cds that will hold the list of CD return back from my sessionbean, so in JSF I would do something like this. <h:selectOneMenu id="cd" value="#{backingBean.cd}"...

Handle Keyboard Done pressed event on Iphone

Hello, I am moving my view when a text field is pressed in order to get proper view when keyboard appears. Now, when DONE key is presses I would like to return view to its initial state but, how to handle an action when done key is pressed?? Thanks ...

Store IV and Key for Rijndael

I need to store username and password in an app.config. I want to encrypt these values using Rijndael algorithm. Where do I store the key and IV for decrypting the un and pw? I need to deploy the application to different servers with different users. ...

Finding my Valid RSA Host Key

I recently migrated one of my domains to a new hosting service, so I switched the DNS name servers, moved the content to the new hosting service, etc. Now I am trying to log into the site (now on the new host) and there seems to be a problem on my own machine regarding this issue. Question: Where and How do I find the new correct RSA k...

Using the enter key in silverlight datagrid

How can I program the enter key so it works exaclty like the tab key in a silverlight datagrid? ...

Python: Looping over One Dictionary and Creating Key/Value Pairs in a New Dictionary if Conditions Are Met

I want to compare the values of one dictionary to the values of a second dictionary. If the values meet certain criteria, I want to create a third dictionary with keys and value pairs that will vary depending on the matches. Here is a contrived example that shows my problem. edit: sorry about all the returns, but stack overflow is not...

Secondary Keys with Heap::Simple in Perl

I wanted to investigate if anyone has ever used a secondary key when inserting into the Heap::Simple in Perl? If so, was your performance ever impacted? ...

SQL to GQL - ON DUPLICATE KEY

INSERT INTO {$table_prefix}_players (id, name, v1, p1, r1) VALUES ('$id', '$name', '$villages', '$points', '$rank') ON DUPLICATE KEY UPDATE p7=p6 , p6=p5 , p5=p4 , p4=p3 , p3=p2 , p2=p1 , p1='$points' , v7=v6 , v6=v5 , v5=v4 , v4=v3 , v3=v2 , v2=v1 , v1='$villages' , r7=r6 , r6=r5 , r5=r4 , r4=r3 , r3=r2 , r2=r1 , r1='$rank'" Hi ...

Is there a native .NET method or equivalent to user32.dll's GetKeyboardState?

ANSWER: There isn't a natively managed equivalent for this method. However, a good example managed code API can be found over at pinvoke.net. Hi all I have an application that accepts a flag for 'trace mode'. Trace mode turns on a form containing a text box. The text box displays output via a custom TraceListener object. If there is a ...

Is there a way to create autoincrement key via Oracle Create Table Gui?

I create tables with using TOAD Create Table GUI. I want to create autoincrement key. I don't want to write sql of it. Is there any way to do this on GUI screen? ...

Need help sorting list of objects by key.

I am unable to get this code to sort a list of objects using either .sort() or sorted(). What am I missing here? P.S. My solution.distance() method could use some cosmetic surgery too if anyone has any suggestions. Thanks! import random import math POPULATION_SIZE = 100 data = [[1, 565.0, 575.0], [2, 25.0, 185.0], ...

Help: get the sessionKey using facebook-java api.

I am developing facebook application. In this application, I use java api provided by Google and the application is based on web. I have the facebook_api_key and facebook_secrete, but how to get the sessionKey? This code is not web-based: FacebookJsonRestClient client = new FacebookJsonRestClient(Test.API_KEY, Test.SECRET); String tok...

Last inserted row with sqlite3 and C

Hi folks, I wrote a kind of key/value store using sqlite3 and C. my put_pair(key, value) function accepts an empty key as a correct key, and in my INSERT query I use lower(hex(randomblob(16))) to generate a good key for this inserted row. The problem now is how to retrieve this key and return it by my function? ...