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
I got an exception:
this class is not key value coding-compliant for the key textField.'
the exception occurs at this line:
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"cell" owner:?? options:nil];
What should be the owner if the class called cell.m owns this cell.xib?
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?
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.
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 .
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.
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'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
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?
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??
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?
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.
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'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?
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.
I logged into my MSDN subscription (Premium) today to download the new expression studio, and I noticed that unlike Expression 3, it requires you to enter a key, and they only provide 1.
Previously I installed Expression 3 on 2 computer, my home and my work computer. So my question is, is this no longer allowed? or is it a key that can be used multiple times?
Need help. I am trying to automate error notifications to be sent in mailers. For that I am querying the sysssislog table. I have pasted an "Execute SQl task" on the package event handler "On error". For testing purpose, I am deliberately trying to load duplicate keys in a table which consists of a Primary key column(so as to get an error).
But instead of having just one error, "Violation of primary key constraint", SSIS records 3 in the table. PFA the screenshot as well. How can i restrict the tool to log only one error and not multiple ???
Package Structure.
Package ("On error Event handler") - DFT -
Oledb Source - Oledb Destination
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK_SalesPerson_SalesPersonID'. Cannot insert duplicate key in object 'dbo.SalesPerson'.".
SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (56)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (56)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (43) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (56). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Please guide me. Your help is very much appreciated.
Thanks
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!
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
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 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
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?