1
голосов
4ответов
2857 просмотров

Exploding Arrays in PHP While Keeping the Original Key

How can I do the following without lots of complicated code? Explode each value of an array in PHP (I sort of know how to do this step) Discard the first part Keep the original key for the second part (I know there will be only two parts) By this, I mean the following: $array[1]=blue,green $...

8
голосов
2ответов
1530 просмотров

home, end, delete, pageup, pagedown with ksh

I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilde ~) I found this: bind '^[[3'=prefix-2 bind '^[[3~'=delete-char-forward bind '^[[1'=prefix-2 bind '^[[1~'=beginning-of-line bind '^[[4'=p...

0
голосов
2ответов
318 просмотров

Counting all the keys pressed and what they are (python)

I'd like to create a map of the number of presses for every key for a project I'm working on. I'd like to do this with a Python module. Is it possible to do this in any way?

0
голосов
2ответов
2332 просмотров

XML Schema - Key in sequence

I'm trying to put a key in sequence and am being bombarded with errors. It seems I can't do this. Additionally, I am being told my key needs a field and selector, which I have been able to find very little documentation on. (In fact, in desperation, I downloaded Liquid XML Studio [vs. Notepad] an...

163
голосов
7ответов
169473 просмотров

How do I make a composite key with SQL Server Management Studio?

How do I make a composite key with SQL Server Management Studio? I want two INT columns to form the identity (unique) for a table

3
голосов
2ответов
2099 просмотров

Are Multi-column Primary Keys in MySQL a optimisation problem?

Been looking into using multi-column primary keys and as performance is extremely important with the size of traffic and database I need to know if there is anything to consider before I start throwing out the unique ID method on many of my tables and start using mulit column primary keys. So, w...

0
голосов
2ответов
231 просмотров

Dictionary<> is reporting invalid key when it's not

I have some code that adds a Func<short> to a Dictionary<byte, Func<short>> at index 0. Later on, some code within the class that contains the dictionary attempts to extract this Func (via TryGetValue) and execute it, throwing an exception if it does not work. Even though the in...

2
голосов
9ответов
5189 просмотров

Compound String key in HashMap

We are storing a String key in a HashMap that is a concatenation of three String fields and a boolean field. Problem is duplicate keys can be created if the delimiter appears in the field value. So to get around this, based on advice in another post, I'm planning on creating a key class which w...

1
голосов
2ответов
2344 просмотров

Google App Engine encoded key in Java

Can someone provide some simple code about how to use an encoded key in Java for the Google app engine. The sample code is a little bit confusing. Suppose I have an employee class and I want the primary key to be manually constructed with a format of "name, email, phone" for example a sample ke...

1
голосов
2ответов
85 просмотров

How can I see what exactly contains a proprieties variable?

I'm pretty new to Java, so don't kill me :) FileInputStream files = new FileInputStream(path); Properties prop = new Properties(); try { props.load(fis); ..... Let's say the files is: Mary goes to school, or, not. How can I see how the information was stocked i...

6
голосов
3ответов
8327 просмотров

Using MD5 to generate an encryption key from password?

I'm writing a simple program for file encryption. Mostly as an academic exercise but possibly for future serious use. All of the heavy lifting is done with third-party libraries, but putting the pieces together in a secure manner is still quite a challenge for the non-cryptographer. Basically, I'...

3
голосов
2ответов
5203 просмотров

Convert received keys in PreviewKeyDown to a string

I am using PreviewKeyDown event on a window to receive all the keys from a barcode scanner. The KeyEventArgs is an enumeration and does not given me the actual string. I dont want to use TextInput as some of the keys may get handled by the control itself and may not bubble up to the TextInput eve...

29
голосов
1ответов
8936 просмотров

When working with most APIs, why do they require two types of authentication, namely a key and a secret?

I have been working with APIs and I've always wondered why you have to use a key and a secret? Why do you need two types of authentication?

1
голосов
3ответов
178 просмотров

How to re-index the values of an array in PHP?

Array ( [id] => 3 [user_id] => 1 [clan_id] => 1 [date] => 2009-09-24 09:02:05 [skill1rank] => 1 [skill1lvl] => 2376 [skill1xp] => 1804229942 [skill2rank] => 53 [skill2lvl] => 99 [skill2xp] => 120510105 [skill3rank] => 55...

0
голосов
2ответов
76 просмотров

Keys and terminology

I have a predicament related to terminology. Our system processes events. Events are dispatched to a node based on the value of some field (or set of fields). We call this set of fields the key. We call the value of that set of fields the key value. What adds confusion is that each event is ess...

0
голосов
1ответов
3703 просмотров

c# How to use the ProcessDialogKey to capture special characters like "Tab", "Up" etc

I want to register when the key "Tab" has been pressed, but can't figure out how to use the ProcessDialogKey. This is what i got: this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Keypress); private void Keypress(object sender, KeyPressEventArgs e) { MessageBox.Show("...

0
голосов
2ответов
26 просмотров

Bug Table key field

I need to create a table to save the bugs of an application that have access on it many users, in a way to stock the bugs and manage them lately. So I need to have a key field that will be unique but identify the bug, have a meaning and also light on the server Does anyone have an idea about tha...

23
голосов
11ответов
37942 просмотров

Find all second level keys in multi-dimensional array in php

I want to generate a list of the second level of keys used. Each record does not contain all of the same keys. But I need to know what all of the keys are. array_keys() doesn't work, it only returns a list of numbers. Essentially the output Im looking for is: action, id, validate, Base, Ebase, ...

1
голосов
1ответов
949 просмотров

Phone-To-Server communication encryption in Java

This goes along with another thread, here: How to implement Java 256-bit AES encryption with CBC Mainly, trying to get AES encryption on a phone using Java. My question here is how to handle the encryption key. I don't know if I should store the key, hash the key and use that, or do a public-ke...

1
голосов
1ответов
1051 просмотров

How to identify the keyboard keys using C#

I have an C# application runing at the back ground. Now i want to stop this application when the system is locked. how can i do that. Any help regarding this is really appreciated. Thanks Hougen for the solution. could you please suggest me should we include any Dlls to handle "Microsoft.Win32.S...

37
голосов
9ответов
59166 просмотров

PHP API Key Generator

Does anyone know of any API key generator script/class for PHP? The class should have method generate, that would generate a key and isValid() method, to check if the key is valid.

2
голосов
2ответов
2270 просмотров

jQuery Variables as Key in Key:Pair CSS attributes

Is it possible to take something like: $("div").css({ "top": var1, "height": var2, etc. }); And turn it into: var dir = "top"; var length = "height"; $("div").css({ dir: var1, length: var2, etc. }); So far, the only way I can get it to work is by repeatedly declar...

24
голосов
8ответов
41692 просмотров

How to use multiple modifier keys in C#

I am using a keydown event to detect keys pressed and have several key combinations for various operations. if (e.KeyCode == Keys.C && e.Modifiers == Keys.Control && e.Modifiers == Keys.Shift) { //Do work } else if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control) ...

9
голосов
8ответов
18122 просмотров

How to use two numbers as a Map key

I have two numbers and I want to use them together as a key in a Map. Currently, I'm concatenating their string representations. For example, suppose the key numbers are 4 and 12. I use: String key = 4 + "," + 12; The map is declared as Map<String, Object>. I think this is so bad! I lik...

4
голосов
4ответов
5862 просмотров

What is the difference between signing Certificate and Encryption Certificate?

What is the difference between between signing certificate and encryption certificate? I see that signing certificate cannot be used for encrypting the data only encryption certificate. What is the technical difference? Does both have public key and private or only encryption cert will have PP k...

4
голосов
2ответов
5213 просмотров

Change "return key" in an iPhone WebApp textbox

I am creating an iPhone webapp with a textbox and would like to change the return key to "search". When you click on the textbox, the keyboard pops up and the return key on the bottom right of the keyboard displays "return" by default. However if you go to google.com on your iPhone and click on...

1
голосов
3ответов
1264 просмотров

How can you make a PHP application require a key to work?

About 4 years ago I used a php product called amember pro, it is a membership script which has plugins for lie 30 different payment processors, it was an easy way to set up an automated membership site where users would pay a payment and get access to a certain area. The script used ioncube ht...

194
голосов
5ответов
84881 просмотров

What's the difference between using INDEX vs KEY in MySQL?

I know how to use INDEX as in the following code. And I know how to use foreign key and primary key. CREATE TABLE tasks ( task_id INT UNSIGNED NOT NULL AUTO_INCREMENT, parent_id INT UNSIGNED NOT NULL DEFAULT 0, task VARCHAR(100) NOT NULL, date_added TIMESTAMP NOT NULL, date_comple...

7
голосов
7ответов
4979 просмотров

python: combine sort-key-functions itemgetter and str.lower

I want to sort a list of dictionaries by dictionary key, where I don't want to distinguish between upper and lower case characters. dict1 = {'name':'peter','phone':'12355'} dict2 = {'name':'Paul','phone':'545435'} dict3 = {'name':'klaus','phone':'55345'} dict4 = {'name':'Krishna','phone':'12345'...

58
голосов
7ответов
70181 просмотров

Is there a Unicode glyph that looks like a "key" icon?

Unicode has a million icon-like glyphs, but they're not always easy to search by, since I don't always know what they look like. Is there a Unicode glyph that looks like a "key"? Or is there a symbol that's used in database circles to mean "primary key", which is in Unicode?