key

C# (VS2008) Suppressing Keycode for modifier keys, but keeping modifiers

I'm trying to accomplish something similar to the fellow here, but going with the answer there leaves me with a bit of a bug that's not a huge deal, but ugly from a user POV: When it puts the keypress data into the textbox, if the user presses the modifier keys before the character (like one does), the textbox is being populated includ...

What's the best encryption algorithm for the iPhone in terms of speed and security?

The iPhone supports the following encryption algorithms enum { kCCAlgorithmAES128 = 0, kCCAlgorithmDES, kCCAlgorithm3DES, kCCAlgorithmCAST, kCCAlgorithmRC4, kCCAlgorithmRC2 }; I want to use only symmetric algorithm since asymmetric encryptions requires more computation overhea...

Not able to save composite foreign key

I am not able to save the many to one composite foreign key value. PricingSheetFeeLineItem has one-to-many relation with SaleObjectPricingSheet. saleObjectPricingSheet has composite primary key. When I called session.saveOrUpdate(aPricingSheetFeeLineItem), the value for saleObjectPricingSheet is not able to be caught by hibernate so the...

Key repeat delay and key repeat rate

How do I (programatically) find out the key repeat delay and key repeat rate for a system? A solution that works on any/all .Net capable platforms would be ideal, but the key target OSes would be XP, Vista, and 7. ...

How do I create a hash in Ruby that compares strings, ignoring case?

In Ruby, I want to store some stuff in a Hash, but I don't want it to be case-sensitive. So for example: h = Hash.new h["HELLO"] = 7 puts h["hello"] This should output 7, even though the case is different. Can I just override the equality method of the hash or something similar? Thanks. ...

Pressing "Home" in Vim on an Indented Line

I have a bad habit of using the 'home' key to go back to the beginning of a line. As I recently started using vim (and loving it!) I noticed that when I press the home key on a lined that is indented, it returns me to the very beginning of the line. In Notepad++ (the editor I used to use) it would return me to the beginning of the code o...

Possible to tie Google API Key with a Google Apps account?

I am trying to get an API key for Google AJAX Feed API's. However, it will only let me login with my Gmail (Google account), and I don't see any way to login with the Google Apps account here. Couldn't find anything related on Google or Lycos. So is it possible to tie the AJAX Feed API key (which I believe will let me access other APIs ...

What is the best way to keep password in SQL Server 2008?

Hi there, I am planning to save customer's sensitive information through SQL Server certificate/ (a)symmetric keys. Though data is secure now, certificate and keys are not readable, i wonder where should i put the keys? Is there any best practices? only thing i could think of is to create table only accessible to dbo or dedicated login ...

PHP: high depth array, how do return current key name?

I have a huge array from a json_decode result (assoc set to true) and have the following code to check if (one of the arrays within, a random serial) has the key 'set_true' $out = ""; foreach ($array as $sub) { //$out[] = $sub['set_true']; if (in_array($sub['set_true'], $sub) && $sub['set_true'] == '1' ) { $out[] = 'User: ' . $...

Gridview programmatic tooltips using dictionary

Hello all. I have the following code that I think should work - however, what I think and what actually works is something completely different! This being demonstrated by the fact it doesn't work! protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { Dictionary<String, String> headerTooltips = new ...

How do I get an array of keys from a hashmap that aren't type Object?

Iterator it = myHashMap.keySet().iterator(); while (it.hasNext()) { int next = it.next(); } That doesn't work because it.next() returns Object. My hashmap uses ints for keys. All of my methods accept ints to access the hashmap. How can I actually get an int value when looping through my keys so I can pass it to my other methods? ...

fast enumeration on NSDictionary fails with "[Waypoint countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance ..."

Hello, I have my data in a NSDictionary object where the keys are CGPoints converted to NSValues and the objects are UIColors. Here's the method I'm using to return an object from the dictionary: - (UIColor*) getTemperatureColor2 { NSDictionary* temperatureColorMap = [Weather getTemperatureColorMap]; for(id key in temperatu...

Flex TextArea Unicode chracters with control key

Hi Experts, I am developing a Flex based window application. In that I have used a textArea, Now when I type some characters like ctrl+b, ctrl+e or ctrl+q, it shows some square characters in text area, I think these are some unicode characters but why these are being entered. Unlike in simple textArea control on adobe example when I pr...

How to check a chackbox without window focus.

Hi! I just wanted to know, what would be the c# coding to check a checkbox (named cBox) even when the window does not have focus? I need the exact coding and what the using directives would be. Thank you for all who helped! I'm sorry to those of you who feel like I am just asking too much. I am brand new, and I had tried using Global...

Can the sendinput API simulate a keyboard key being held down during some time?

My app will need to simulate a key being held down during some time. I don't know how many time. Can I use the sendinput API for this? ...

Display Hilight of Tab index

I want to display Hightlight on element that content tabindex. name: <TD ROWSPAN=3>comments<BR> <TEXTAREA COLS=25 ROWS=5 TABINDEX=3></TEXTAREA></TD></TR> <TR> <TD>email: <INPUT NAME="email" TABINDEX=2></TD></TR> <TR> <TD>department: <SELECT NAM...

PHP SoapClient Warning: SoapClient::SoapClient(): Unable to set private key file

I'm trying to use soap to call a webservice but I keep getting the following error "Warning: SoapClient::SoapClient(): Unable to set private key file". I'm assuming that the error comes due to the fact the the .cer file I am using only includes public key and no private key. But i'm not sure of another way to use the .cer file. If i d...

Google API Key and Domain Check

Hello, did anyone know how the domain check for the Google API Key works? Did Google only check for the URL in the Locationbar of the browser or is it more complex? I want to use such feature in my own application but any of my solutions is easy to bypass. ...

What are the advantages of having customized commands with the <Leader> key on Vim?

I think its self explanatory. How it is more efficient to use that key? ...

C# how to trigg a key event in a tabcontrol specific tab?

I have an tabControl1 in my form with three TabPages named TabPage1, TabPage2 and TabPage3. When TabPage 2 has focus I need to raise an key event (arrow keys for navigation). This event should not be raised in the other TabPages. Anybody know how? ...