Search Results

Search found 20746 results on 830 pages for 'alex key'.

Page 9/830 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Simulating Key Press event using Python for Linux

    - by user308827
    Hi, I am writing a script to automate running a particular model. When the model fails, it waits for a user input (Enter key). I can detect when the model has failed, but I am not able to use python (on linux) to simulate a key press event. Windows has the SendKeys library to do this but I was wondering if there is a similar library for python on linux. Thanks!

    Read the article

  • Timestamp as part of composite primary key?

    - by Curtis White
    I get this error when using linq-to-sql with timestamp as part of a composite primary key: "The primary key column of type 'Timestamp' cannot be generated by the server." I'm guessing this may be due to the fact timestamp is just a row version thus perhaps it must be created after the insert? Or...

    Read the article

  • Generate reasonable length license key with asymmetric encryption?

    - by starkos
    I've been looking at this all day. I probably should have walked away from it hours ago; I might be missing something obvious at this point. Short version: Is there a way to generate and boil down an asymmetrically encrypted hash to a reasonable number of unambiguous, human readable characters? Long version: I want to generate license keys for my software. I would like these keys to be of a reasonable length (25-36 characters) and easily read and entered by a human (so avoid ambiguous characters like the number 0 and the capital letter O). Finally--and this seems to be the kicker--I'd really like to use asymmetric encryption to make it more difficult to generate new keys. I've got the general approach: concatenate my information (user name, product version, a salt) into a string and generate a SHA1() hash from that, then encrypt the hash with my private key. On the client, build the SHA1() hash from the same information, then decrypt the license with the public key and see if I've got a match. Since this is a Mac app, I looked at AquaticPrime, but that generates a relatively large license file rather than a string. I can work with that if I must, but as a user I really like the convenience of a license key that I can read and print. I also looked at CocoaFob which does generate a key, but it is so long that I'd want to deliver it as a file anyway. I fooled around with OpenSSL for a while but couldn't come up with anything of a reasonable length. So...am I missing something obvious here? Is there a way to generate and boil down an asymmetrically encrypted hash to a reasonable number of unambiguous, human readable characters? I'm open to buying a solution. But I work on a number of different of platforms, so I'd want something portable. Everything I've looked at so far has been platform specific. Many, many thanks for a solution! PS - Yes, I know it will still be cracked. I'm trying to come up with something reasonable that, as a user, I would still find friendly.

    Read the article

  • I need to auto_increment a field in MySQL that is not primary key

    - by behrk2
    Hey everyone, Right now, I have a table whose primary key is an auto_increment field. However, I need to set the primary key as username, date (to ensure that there cannot be a duplicate username with a date). I need the auto_increment field, however, in order to make changes to row information (adding and deleting). What is normally done with this situation? Thanks!

    Read the article

  • Key Value Database For Windows?

    - by Axl
    Other than MongoDB and Memcached, what key-value stores run on Windows? Most of the ones I've seen seem to only run on Linux (Hypertable, Redis, Lightcloud). Related links: http://stackoverflow.com/questions/639545/is-there-a-business-proven-cloud-store-keyvalue-database-open-source http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/

    Read the article

  • Android: Text primary key with different name

    - by Echilon
    I have an existing Windows app for which I'm writing an Android port. The app uses a unique string as the primary key, but the SQLite methods in Android all seem to work with integers and a column names _id, whereas my ID column isn't called this. Is there a way to let Android know I have a key with a different column name?

    Read the article

  • jquery event handler- trigger function upon specific key and action

    - by Gal
    Background story: when a user selects a portion of text in a text field with her mouse (mark it up manually), and subsequently hits "alt" key, a certain function would trigger. My questions are: How can I trigger a function when a user hits a key (in her keyboard)? How can I preserve a portion of text selected, and use it as a parameter for that function? I've tried looking up online but haven't found any good answers, but i'd greatly appreciate links as well.

    Read the article

  • Public Private Key Encryption Tutorials

    - by Jake M
    Do you know of a tutorial that demonstrates Public Private Key encryption(PPKE) in C++ or C? I am trying to learn how it works and eventually use Crypto++ to create my own encryptions using public private keys. Maybe theres a Crypto++ PPKE tutorial? Maybe someone can explain the relationship(if any) between the public and private keys? Could anyone suggest some very simple public and private key values I could use(like 'char*32','char/32') to create my simple PPKE program to understand the concept?

    Read the article

  • PHP - Find parent key of array

    - by Jordan Rynard
    I'm trying to find a way to return the value of an array's parent key. For example, from the array below I'd like to find out the parent's key where $array['id'] == "0002". The parent key is obvious because it's defined here (it would be 'products'), but normally it'd be dynamic, hence the problem. The 'id' and value of 'id' is known though. [0] => Array ( [data] => [id] => 0000 [name] => Swirl [categories] => Array ( [0] => Array ( [id] => 0001 [name] => Whirl [products] => Array ( [0] => Array ( [id] => 0002 [filename] => 1.jpg ) [1] => Array ( [id] => 0003 [filename] => 2.jpg ) ) ) ) )

    Read the article

  • .NET - getting form field key/value pairs?

    - by AverageJoe719
    Hi there, I've got a form with textboxes and I want to run some server side validation code on the values after the form is submitted. I was planning to grab all the textbox controls on the page and adding them to a list, then running a for each loop that says for each control in the list query the database where fieldValidation.Name = Control.Name. This would return to me an object and an associated function where i coudl then input the Control.Value and actually perform the validation. My friend told me building the list is not necessary because all languages have a way to get key/value pairs from forms (he doesn't know .NET so coudln't help me). I may be searching the wrong term here but I have not been able to find a result, or maybe I misunderstood my friend. Is there some kind of dictionary or key/value pair automatically generated upon form submissions that contains the value that was submitted and...I guess also the control? Or am I just misunderstanding him. If he was just saying populate a key/value pair based on the form submissions, how does that help me in this situation over a list that contains the control? Thanks =)

    Read the article

  • need primitive public key signature with out of band key distribution

    - by Mike D
    I pretty much a complete neophyte at this signature business so I don't know if what I'm asking is nonsense or not. Anyway, here goes... I want to send an out of band message (don't worry about how it gets there) to a program I've written on a distant machine. I want the program to have some confidence the message is legit by attaching a digital signature to the message. The message will be small less than 200 characters. It seems a public key based signature is what I want to use. I could embed the public key in the program. I understand that the program would be vulnerable to attack by anyone who modifies it BUT I'm not too worried about that. The consequences are not dire. I've looked through the MSDN and around the web but the prospect of diving in is daunting. I'm writing in straight c++, no NET framework or other fancy stuff. I've had no experience including NET framework stuff and little luck during previous attempts. Can anyone point me at some very basic resources to get me started? I need to know 1)how to generate the public and private keys 2)how to sign the message 3)how to verify the signature Any help much appreciated. TIA, Mike

    Read the article

  • OpenSSL certificate lacks key identifiers

    - by 0xDEAD BEEF
    How do i add these sections to certificate (i am manualy building it using C++). X509v3 Subject Key Identifier: A4:F7:38:55:8D:35:1E:1D:4D:66:55:54:A5:BE:80:25:4A:F0:68:D0 X509v3 Authority Key Identifier: keyid:A4:F7:38:55:8D:35:1E:1D:4D:66:55:54:A5:BE:80:25:4A:F0:68:D0 Curently my code builds sertificate well, except for those keys.. :/ static X509 * GenerateSigningCertificate(EVP_PKEY* pKey) { X509 *x; x = X509_new(); //create x509 certificate X509_set_version(x, NID_X509); ASN1_INTEGER_set(X509_get_serialNumber(x), 0x00000000); //set serial number X509_gmtime_adj(X509_get_notBefore(x), 0); X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*365); //1 year X509_set_pubkey(x, pKey); //set pub key from just generated rsa X509_NAME *name; name = X509_get_subject_name(x); NAME_StringField(name, "C", "LV"); NAME_StringField(name, "CN", "Point"); //common name NAME_StringField(name, "O", "Point"); //organization X509_set_subject_name(x, name); //save name fields to certificate X509_set_issuer_name(x, name); //save name fields to certificate X509_EXTENSION *ex; ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_cert_type, "server"); X509_add_ext(x,ex,-1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_comment, "example comment extension"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_netscape_ssl_server_name, "www.lol.lv"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); ex = X509V3_EXT_conf_nid(NULL, NULL, NID_basic_constraints, "critical,CA:TRUE"); X509_add_ext(x, ex, -1); X509_EXTENSION_free(ex); X509_sign(x, pKey, EVP_sha1()); //sign x509 certificate return x; }

    Read the article

  • wanted to extend jQuery to handle a custom enter key event based on tabindex

    - by ullasvk
    I write the following code to handle when the enter key pressed an with few validation like if it is a textarea allow only four lines and if the value is empty, focus on itself. var temp = 1; function getLines(id) { return temp=temp+id; } $("#theform").keypress(function(e){ var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; if (key == 13) { var $targ = $(e.target); var tindex = $targ.attr("tabindex"); var count =1; var focusNext = false; var allowedNumberOfLines = 4; if ($targ.is("textarea") && !$targ.is(":button,:submit")) { var lines= getLines(count); if (lines > allowedNumberOfLines) { $("#login_error").css('background', '#F7F77C').fadeIn(1000).html("Only "+allowedNumberOfLines+" Lines Allowed").fadeOut(1000); tindex++; $("[tabindex=" + tindex + "]").focus(); return false; } } else if($targ.val() =='' || $targ.val() == "undefined") { $("[tabindex=" + tindex + "]").focus(); return false; } else if($targ.val() !='' || $targ.val() != "undefined") { tindex++; $("[tabindex=" + tindex + "]").focus(); return false; } } }); Is there any way to make it a custom function so that i can just call the function like $('theform').returnPress();

    Read the article

  • Rationale in selecting Hash Key type

    - by Amrish
    Guys, I have a data structure which has 25 distinct keys (integer) and a value. I have a list of these objects (say 50000) and I intend to use a hash table to store/retrieve them. I am planning to take one of these approaches. Create a integer hash from these 25 integer keys and store it on a hash table. (Yeah! I have some means to handle collisions) Make a string concatenation on the individual keys and use it as a hash key for the hash table. For example, if the key values are 1,2,4,6,7 then the hash key would be "12467". Assuming that I have a total of 50000 records each with 25 distinct keys and a value, then will my second approach be a overkill when it comes to the cost of string comparisons it needs to do to retrieve and insert a record? Some more information! Each bucket in the hash table is a balanced binary tree. I am using the boost library's hash_combine method to create the hash from the 25 keys.

    Read the article

  • MySQL: optimization of table (indexing, foreign key) with no primary keys

    - by Haradzieniec
    Each member has 0 or more orders. Each order contains at least 1 item. memberid - varchar, not integer - that's OK (please do not mention that's not very good, I can't change it). So, thera 3 tables: members, orders and order_items. Orders and order_items are below: CREATE TABLE `orders` ( `orderid` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `memberid` VARCHAR( 20 ), `Time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `info` VARCHAR( 3200 ) NULL , PRIMARY KEY (orderid) , FOREIGN KEY (memberid) REFERENCES members(memberid) ) ENGINE = InnoDB; CREATE TABLE `order_items` ( `orderid` INT(11) UNSIGNED NOT NULL, `item_number_in_cart` tinyint(1) NOT NULL , --- 5 items in cart= 5 rows `price` DECIMAL (6,2) NOT NULL, FOREIGN KEY (orderid) REFERENCES orders(orderid) ) ENGINE = InnoDB; So, order_items table looks like: orderid - item_number_in_cart - price: ... 1000456 - 1 - 24.99 1000456 - 2 - 39.99 1000456 - 3 - 4.99 1000456 - 4 - 17.97 1000457 - 1 - 20.00 1000458 - 1 - 99.99 1000459 - 1 - 2.99 1000459 - 2 - 69.99 1000460 - 1 - 4.99 ... As you see, order_items table has no primary keys (and I think there is no sense to create an auto_increment id for this table, because once we want to extract data, we always extract it as WHERE orderid='1000456' order by item_number_in_card asc - the whole block, id woudn't be helpful in queries). Once data is inserted into order_items, it's not UPDATEd, just SELECTed. The questions are: I think it's a good idea to put index on item_number_in_cart. Could anybody please confirm that? Is there anything else I have to do with order_items to increase the performance, or that looks pretty good? I could miss something because I'm a newbie. Thank you in advance.

    Read the article

  • how i can encrypt each file with its own public key ??

    - by Mohammad AL-Rawabdeh
    how i can encrypt each file with its own public key for example :- there exist 3 company (X,Y and Z)each company sent to me its own public key so that i have now 3 public key 1- x.pub 2- y.pub 3- z.pub now i want to send file to each company and encrypt it by its company public key 1- encrypt file1.txt by x.pub and send it to company X 2- encrypt file2.txt by y.pub and send it to company Y 3- encrypt file3.txt by z.pub and send it to company Z please how i can do the above by writting batch file my operating system is Windows

    Read the article

  • openssl api verify the public key matches private key

    - by AC
    How do I write an openssl server that on a single port has two different active RSA private keys? The openssl documentation seems to implies there can only be one rsa private key active at time with in a context. So I was thinking I have two active context, but what is the code to handle figuring out which connection matches which context. Or am I going about this the wrong way.

    Read the article

  • LINQ transform Dictionary<key,value> to Dictionary<value,key>

    - by code4life
    I'm having a low-brainwave day... Does anyone know of a quick & elegant way to transform a Dictionary so that the key becomes the value and vice-versa? Example: var originalDictionary = new Dictionary<int, string>() { {1, "One"}, {2, "Two"}, {3, "Three"} }; becomes var newDictionary = new Dictionary<string, int>(); // contents: // { // {"One". 1}, {"Two". 2}, {"Three", 3} // };

    Read the article

  • KeyTouch remaps the delete key

    - by Robert Gowland
    I installed KeyTouch, but it decided that the delete key should be the KeyTouch hot key. So, when I pressed deleted, KeyTouch came up. Next I uninstalled KeyTouch and now the delete key doesn't do anything. Is there any way to remap the delete key to actually delete? Notes: I tried reinstalling KeyTouch, and the same thing happens. KeyTouch does not allow the user to map the delete key. EDIT xev shows keycode 119 when I press the delete key xmodmap shows keycode 119 mapped to Delete NoSymbol Delete running xmodmap -e "keycode 119 = Delete" from the command line does not resolve the issue

    Read the article

  • Setting winforms ToolStripMenuItem ShortcutKeys to numpad key does not work

    - by Axarydax
    We have the ability to define ShortcutKeys for WinForms application menu items. That way I can tell a menu item File-Save to have a shortcut key Ctrl+S and the menu item's handler is "magically" executed after pressing Ctrl+S. The trouble is with the numeric keypad keys, the ShortcutKey property does not accept them (I don't understand how are they different from the other acceptable keys. MSDN states that the property accepts type System.Windows.Forms.Keys (One of the Keys values. The default is None.); and an InvalidEnumArgumentException would be thrown when the parameter is not one of Keys values. But for example Keys.Divide IS one of Keys values, and yet it can't be used. So how can I set a menu item to have a shortcut for Numpad * or Numpad +? Do I need to handle the key in Form's ProcessCmdKey event? Thanks

    Read the article

  • iPhone Key-Value Observer: observer not registering in UITableViewController

    - by Scott
    Hi Fellow iPhone Developers, I am an experienced software engineer but new to the iPhone platform. I have successfully implemented sub-classed view controllers and can push and pop parent/child views on the view controller stack. However, I have struck trouble while trying to update a view controller when an object is edited in a child view controller. After much failed experimentation, I discovered the key-value observer API which looked like the perfect way to do this. I then registered an observer in my main/parent view controller, and in the observer I intend to reload the view. The idea is that when the object is edited in the child view controller, this will be fired. However, I think that the observer is not being registered, because I know that the value is being updated in the editing view controller (I can see it in the debugger), but the observing method is never being called. Please help! Code snippets follow below. Object being observed. I believe that this is key-value compliant as the value is set when called with the setvalue message (see Child View Controller below). X.h: @interface X : NSObject <NSCoding> { NSString *name; ... @property (nonatomic, retain) NSString *name; X.m: @implementation X @synthesize name; ... Main View Controller.h: @class X; @interface XViewController : UITableViewController { X *x; ... Main View Controller.m: @implementation XViewController @synthesize x; ... - (void)viewDidLoad { ... [self.x addObserver:self forKeyPath: @"name" options: (NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) context:nil]; [super viewDidLoad]; } ... - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqual:@"name"]) { NSLog(@"Found change to X"); [self.tableView reloadData]; } [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } Child View Controller.m: (this correctly sets the value in the object in the child view controller) [self.x setValue:[[tempValues objectForKey:key] text] forKey:@"name"];

    Read the article

  • search array and get array key

    - by SoulieBaby
    Hi all, I have an array, which I'd like to search for a value in and retreive the array key if it exists, but not sure how to even go about doing that. Here's my array: Array ( [hours] => Array ( [0] => 5 [1] => 5 [2] => 6 [3] => 6 [4] => 8 [5] => 10 ) ) So I'd like to search the hours array for 10, if 10 exists in the array, I want the key (5) to be returned. If that makes sense? Am trying to do it dynamically so the search string (10) will change, but I figure if I can get it working for number 10, I can get it working with a variable number :)

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >