I've tried Key.Subtract but I think that is the numpad version. I'm looking for the one after the zero key.
I wish to handle it in a KeyDown event.
Thanks
The function which creates shared memory in *inux programming takes a key as one of its parameters..
What is the meaning of this key? And How can I use it?
Edit:
Not shared memory id
gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True)
print "Import the Key :", gpg.import_keys(pub_key).summary()
this two lines of code gives me public key exract which i further used in encryption.
i need to get the equivalent metods in php .
In my web application I access a private key that is stored in a Java KeyStore. I would like to know what is the best/recommended way to store the password for the KeyStore and private key.
I've considered using a properties file but that does not seem very secure for use in a production environment (storing password in a plain text file). Also, hard-coding the password in my code is not an option I'm willing to entertain.
Thanks.
Right now when I want to use the cw snippet, I'm typing cw, tab, tab.
Is this the correct(fastest!) way of doing it?
If there'd be some way of only having to hit once the tab key or any other key i'd be glad to know it.
I have the following requirements for a data structure:
Direct access to an element with the help of a key (Key will be an integer, range is also same as integer range)
Avoid memory allocation in chunks (Allocate contigous memory for the data structure including the data)
Should be able to grow the data structure size dynamically
Which data structure would you suggest?
Any pointers in the direction will also be of help.
I have a method with the following signature:
public ActionResult RenderFamilyTree(string name, Dictionary<string, string> children)
I'm trying to call it from javascript using jQuery like this:
$('#div_render').load(
"<%= Url.Action("RenderFamilyTree") %>",
{
'name': 'Raul',
[
{'key':'key1','value':'value1'},
{'key':'key2','value':'value2'}
]
},
function() {
alert('Loaded');
}
);
Am I missing something to get this to work?
I'm storing several versions of a file based on a digest of the original filename and its version, like this:
$filename = sha1($original . ':' . $version);
Would it be worth it to cache the digest ($filename) in memcache as a key/value pair (the key being the original + version and value the sha1 hash), or is generating the digest quick enough (for a high traffic php web app)?
Thanks,
Johnathan
Hello, I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but at step:
ssh [email protected]
I get:
Agent admitted failure to sign using
the key. Permission denied
(publickey).
What's wroing? And, of course, I'm adding my own user email.
i have a hashmap where every key has many values(stored in a arraylist). How to display the arraylist i.e the values for a particular key in a hashmap in java??
What is the difference between INSTEAD OF and AFTER trigger in MS-SQL?
INSTEAD OF trigger invoked before unique key constraint, will the AFTER trigger invoke after unique key constraint?
So when I set up my entitlements in my iPhone app project, I create a new Entitlements.plist, and set the value of get-task-allow to false. But why? What does this key represent?
EDIT
Note this is related to this question - I found that flipping the value of this key to true allowed me to install the app on my device)
I'm getting "The 'charCode' property of a keydown event should not be used. The value is meaningless" error in firefox using jQuery. My code looks like this:
$("div#center-box div#empid-textbox input.id").keydown(function(e){
key = e.which;
if(key===13){
//do something;
};
});
does anyone know how to remedy this error?
Need some help regarding array sorting....
I have two arrays. The main one (where the key is the user id) :
$user[31] = 'Tom'
$user[43] = 'Jane'
and another array with the order they should be displayed (where key is the order and value is the user id) :
$order[1] = 43
$order[2] = 31
How can I apply the ordering to the main array using the ordering one?
Thanks guys!
I'm wondering how other developers are handling source code conflicts for config files when system admins modify them in production. For example, if a system admin updates a appsettings key on the production server and then my team publishes out a project, it will overwrite that key.
How do you handle config file updates in your organization?
I have a set of key/values (all text) that is too large to load in memory at once. I would like to interact with this data via a Python dictionary-like interface.
Does such a module already exist?
Reading key values should be efficient and values compressed on disk to save space.
In ASP.NET, binding a DataGrid to a list of objects is super-easy.
I end up with a row for each object in the list, and any cell in a given row is bound to a property of the corresponding object.
However, suppose one of the properties of my object is a dictionary, and each is expected to contain a specific key. Is there any way to bind one of my DataGridColumns to that dictionary key?
Thanks.
Okay.. i got the offline access session key
Can some please tell me how can i get a user's status updates using the offline access session key i have ?
Looked in the Graph API and PHP SDK but nothing helps
In my iPhone project I have used this solution to encrypt data with DER encoded certificate, which was generated by openssl commands like this:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.pem -out cert.pem
openssl x509 -outform der -in cert.pem -out cert.der
openssl rsa -in privateKey.pem -outform DER -out privateKey.der
And now I want to decrypt data using private key file. How can I get the private SecKeyRef instance from DER encoded private key file?
I have the ciphertext and an encrypting program (with the key hardcoded in). How would I go about finding the key? Surely the availability of the encryptor must open up possibilities beyond brute-forcing it.
I'm writing a Perl script that reads data from the infamous /dev/input/event* and I didn't find a way to translate the key codes generated by the kernel into ASCII.
I'm talking about the linux key codes in this table here and I can't seem to find something that would help me translate them without hardcoding an array into the script. Am I missing something?
I'd like to skip the array part because it doesn't seem to be a good practice, so any idea? :)
A couple of times I've been in the situation where I've wanted to refactor the design of some model and have ended up putting update logic in migrations. However, as far as I've understood, this is not good practice (especially since you are encouraged to use your schema file for deployment, and not your migrations). How do you deal with these kind of problems?
To clearify what I mean, say I have a User model. Since I thought there would only be two kinds of users, namely a "normal" user and an administrator, I chose to use a simple boolean field telling whether the user was an adminstrator or not.
However, after I while I figured I needed some third kind of user, perhaps a moderator or something similar. In this case I add a UserType model (and the corresponding migration), and a second migration for removing the "admin" flag from the user table. And here comes the problem. In the "add_user_type_to_users" migration I have to map the admin flag value to a user type. Additionally, in order to do this, the user types have to exist, meaning I can not use the seeds file, but rather create the user types in the migration (also considered bad practice). Here comes some fictional code representing the situation:
class CreateUserTypes < ActiveRecord::Migration
def self.up
create_table :user_types do |t|
t.string :name, :nil => false, :unique => true
end
#Create basic types (can not put in seed, because of future migration dependency)
UserType.create!(:name => "BASIC")
UserType.create!(:name => "MODERATOR")
UserType.create!(:name => "ADMINISTRATOR")
end
def self.down
drop_table :user_types
end
end
class AddTypeIdToUsers < ActiveRecord::Migration
def self.up
add_column :users, :type_id, :integer
#Determine type via the admin flag
basic = UserType.find_by_name("BASIC")
admin = UserType.find_by_name("ADMINISTRATOR")
User.all.each {|u| u.update_attribute(:type_id, (u.admin?) ? admin.id : basic.id)}
#Remove the admin flag
remove_column :users, :admin
#Add foreign key
execute "alter table users add constraint fk_user_type_id
foreign key (type_id) references user_types (id)"
end
def self.down
#Re-add the admin flag
add_column :users, :admin, :boolean, :default => false
#Reset the admin flag (this is the problematic update code)
admin = UserType.find_by_name("ADMINISTRATOR")
execute "update users set admin=true where type_id=#{admin.id}"
#Remove foreign key constraint
execute "alter table users drop foreign key fk_user_type_id"
#Drop the type_id column
remove_column :users, :type_id
end
end
As you can see there are two problematic parts. First the row creation part in the first model, which is necessary if I would like to run all migrations in a row, then the "update" part in the second migration that maps the "admin" column to the "type_id" column.
Any advice?
I'm doing a INSERT INTO query in order to initialize a new table.
The primary key is RFQ_ID and Action_Time
How could add 1 milisecond to each Action_Time on new record in order to avoid "Violation of PRIMARY KEY constraint"
INSERT INTO QSW_RFQ_Log
(RFQ_ID, Action_Time, Quote_ID)
SELECT
RFQ_ID
, GETDATE() AS Action_Time
, Quote_ID
, 'Added to RFQ on Initialization' AS Note
FROM QSW_Quote