Search Results

Search found 5772 results on 231 pages for 'authorized keys'.

Page 46/231 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Is it possible to iterate all the OutputCache keys?

    - by Deane
    Is it possible to iterate the OutputCache keys? I know you can remove them individually via HttpResponse.RemoveOutputCacheItem(), but is there a way I can iterate all the keys to see what's in the collection? I searched through Object Viewer, but didn't see anything. Worst case, I can maintain my own index. Since I'm doing everything by VaryByCustom, they get "fed" through a method in global.asax. It just strikes me that there has to be a more elegant way of doing this.

    Read the article

  • is this a correct way to generate rsa keys?

    - by calccrypto
    is this code going to give me correct values for RSA keys (assuming that the other functions are correct)? im having trouble getting my program to decrypt properly, as in certain blocks are not decrypting properly this is in python: import random def keygen(bits): p = q = 3 while p == q: p = random.randint(2**(bits/2-2),2**(bits/2)) q = random.randint(2**(bits/2-2),2**(bits/2)) p += not(p&1) # changes the values from q += not(q&1) # even to odd while MillerRabin(p) == False: # checks for primality p -= 2 while MillerRabin(q) == False: q -= 2 n = p * q tot = (p-1) * (q-1) e = tot while gcd(tot,e) != 1: e = random.randint(3,tot-1) d = getd(tot,e) # gets the multiplicative inverse while d<0: # i can probably replace this with mod d = d + tot return e,d,n one set of keys generated: e = 3daf16a37799d3b2c951c9baab30ad2d d = 16873c0dd2825b2e8e6c2c68da3a5e25 n = dc2a732d64b83816a99448a2c2077ced

    Read the article

  • ANDROID. Emulate Hardware Keys with an IME. Doesn't work with Dialog and Spinner

    - by shutdown11
    I have understand that the only way to inject KeyEvents in the Android System is to implement an Input Method. I have created my IME with the purpose to control from remote the device. I emulate the hardware keys using the method private void keyDownUp(int keyEventCode) { getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_DOWN, keyEventCode)); getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_UP, keyEventCode)); } in my class that extends InputMethodService. It works fine until an AlertDialog, or the menu of a Spinner comes in foreground. Also the windows that appears when the Menu key is problematic. My IME can't get focus on them, and the keyevents are sent to the activity behind them. Using hardware keys, the Dialog get the focus and you can select the botton on the Dialog. How can i emulate that, using the IME(or anything else)?

    Read the article

  • How to encrypt data in php using Public/Private keys?

    - by Xeoncross
    I have a small string of some data (less than 1kb) that I would like to have user agents pass to other sites when they are sent from my site. In order for the other sites to verify that I was the one that created the string I though of two options. The server pings me back to confirm (like paypal, openid, etc..) I use public/private keys to prove I sent the message (like PGP, DKIM, etc..) I don't want to setup HMAC because that would mean I have to use custom keys for each site which would be a pain. Out of those two choices it seems that #2 would save on bandwidth which makes it seem like a better choice. So how can you setup public/private key cryptography using PHP and are there any downsides?

    Read the article

  • NSMutableDictionary confused over how to use keys with certain code ?

    - by Jules
    I'm getting data from a database and I need to add the string field value and the record id. However, I need this to work with some existing code... I'm replacing this (see code below) and getting data from my database. NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path]; self.allCategories = dict; [dict release]; But needs to work with these key and value search functions. - (void)resetSearch { NSMutableDictionary *allCategoriesCopy = [self.allCategories mutableDeepCopy]; self.Categories = allCategoriesCopy; [allCategoriesCopy release]; NSMutableArray *keyArray = [[NSMutableArray alloc] init]; [keyArray addObject:UITableViewIndexSearch]; [keyArray addObjectsFromArray:[[self.allCategories allKeys] sortedArrayUsingSelector:@selector(compare:)]]; self.keys = keyArray; [keyArray release]; } . - (void)handleSearchForTerm:(NSString *)searchTerm { NSMutableArray *sectionsToRemove = [[NSMutableArray alloc] init]; [self resetSearch]; for (NSString *key in self.keys) { NSMutableArray *array = [Categories valueForKey:key]; NSMutableArray *toRemove = [[NSMutableArray alloc] init]; for (NSString *name in array) { if ([name rangeOfString:searchTerm options:NSCaseInsensitiveSearch].location == NSNotFound) [toRemove addObject:name]; } if ([array count] == [toRemove count]) [sectionsToRemove addObject:key]; [array removeObjectsInArray:toRemove]; [toRemove release]; } [self.keys removeObjectsInArray:sectionsToRemove]; [sectionsToRemove release]; [table reloadData]; } Keep getting an error from this code... NSDictionary *arrayTmp= [[NSDictionary alloc] init]; ... loop records int cid = sqlite3_column_int(statementTMP, 0); NSString *category = [[NSString alloc] initWithUTF8String:(char *)sqlite3_column_text(statementTMP, 1)]; [arrayTmp setObject:category forKey:[NSString stringWithFormat:@"%i", cid]]; Error caused by line above * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString count]: unrecognized selector sent to instance 0x4d4c500' * Call stack at first throw * ... end loop self.allCategories = arrayTmp; [arrayTmp release];

    Read the article

  • Does MySQL allow two primary keys on one table?

    - by Bharanikumar
    CREATE TABLE Orders -> ( -> ID SMALLINT UNSIGNED NOT NULL, -> ModelID SMALLINT UNSIGNED NOT NULL, -> Descrip VARCHAR(40), -> PRIMARY KEY (ID, ModelID) -> ); Basically, this appears to me to be creating two primary key on one table. Is that correct? I thought that we could create a number of unique keys in one table, but only one primary key. How is it that my system is allowing the creation of multiple primary keys? Please advise: what are the rules governing this?

    Read the article

  • Best of both worlds: arrow keys for cursor movement or flipping through buffers.

    - by dreeves
    I really like this vim trick to use the left and right arrows to flip between buffers: "left/right arrows to switch buffers in normal mode map <right> :bn<cr> map <left> :bp<cr> (Put that in ~/.vimrc) But sometimes I'm munching on a sandwich or something when scrolling around a file and I really want the arrow keys to work normally. I think what would make most sense is for the arrow keys to have the above buffer-flipping functionality only if there are actually multiple buffers open. Is there a way to extend the above to accomplish that?

    Read the article

  • Mini keyboard has no home/end keys; how to type them?

    - by Steve Crane
    Some months ago I needed a small keyboard and bought an Okion KM229 without noticing that it has no Home or End key. This makes it tricky to type as I'm so used to using these keys. I haven't yet figured out if there is a key combination that issues Home and End keystrokes. Does anyone have experience of these keyboards and know how to issue those keystrokes? The keyboard is used on a PC running Windows XP. I have used the contact form on the Okion USA web site to ask this question but received no response. Wikipedia suggests that Home and End keystrokes are issued with Fn-Left and Fn-Right on some limited size keyboards. I may have tried those but don't remember for sure. I will try them again though when I am on site again in a week or so. Any other thoughts would be welcomed in the meantime.

    Read the article

  • PHPMyAdmin - Can I view actual field values instead of the foreign keys?

    - by Callum
    I have a database with some MyISAM tables. The tables contain foreign key relationships, but they are not inherently "enforced" (I believe "referential integrity" is the term). Using PHPMyAdmin, what I'd like to do is be able to view records from the tables but have all foreign keys replaced by whatever value they are representing. Eg, instead of seeing: 23 | 14 | $6.50 I'd like to see.. Extra Large | Thin Crust | $6.50 ($6.50 would be an editable field, the first two fields would not be). Any helpers? Thanks.

    Read the article

  • How to get list of defined shortcut keys in the Start menu?

    - by Peter Mortensen
    How can I find out which keyboard shortcuts are defined inside the Start menu? And what shortcuts they are assigned to? Platform: Windows XP SP2 64 bit. Example: I open my main Visual Studio solution with a shortcut key, Ctrl+Alt+M. This is setup by having a shortcut inside the Start menu with: Target: "D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" D:\dproj\MSQall\MSQuant\MSQuant.sln Shortcut key: Ctrl+ALT+M If a new shortcut is added and its shortcut key is also set to Ctrl+Alt+M then there are now two shortcuts with the same shortcut key (conflict). To prevent this it would be nice to know which shortcut keys are already assigned and to which shortcuts.

    Read the article

  • Is it possible to have zsh+keychain+tmux not ask for keys?

    - by Wayne Werner
    I'm using tmux and zsh, and I've recently been learning about ssh-agent and keychain. From the manpage for zsh, it says that it will source .zlogin only if the shell is, well, a login shell. Following advice I read, I stuck keychain --clear in my .zlogin, which worked perfectly. When I logged into the box I had to unlock my key. However, each time I create a new window in tmux, it clears/makes me re-add my key. This is a little annoying... but I can understand it if, in fact, each new tmux window is a login window. I haven't been able to find much help outside of the manpages on this topic. So is each new tmux window a login shell, or is there any way that I can make it not clear my keys only when I create a tmux window?

    Read the article

  • Stop Touchpad from disabling itself when I press any keys?

    - by ApprenticeHacker
    I have an acer E1-571 laptop, with an ELAN Smart Pad. Unfortunately the "Smart" pad is a bit too smart. It automatically disables itself while I am pressing any keys. This is useful when typing. However it does not allow me to play games that use the mouse for scrolling such as Counter Strike and GTA San Andreas as the touchpad gets disabled when I press any key. I tried to find an option or check-box of some kind that would disable this behavior in the ELAN Smart Device Driver's Properties and the Windows 7 Control Panel, but to no avail. Any ideas?

    Read the article

  • Can I reactivate the cursor keys for modifying a cell reference in a formula?

    - by Jonas Heidelberg
    When I enter an Excel formula by hand avoiding the mouse, I can conveniently reference cells by using the arrow keys (-,<- etc.). For example, I can enter the formula =A2&B2 in cell C2 by entering =<-&<-<- The result looks like this: If I want to change from B2 to B3, I can just press the downward arrow on the keyboard at this time. How do I do the same thing later, after having left this cell (e.g. by pressing Enter)? In other words, how do I get the flashing dashed line back when re-entering a cell with F2?

    Read the article

  • Can we change control of two keys on keyboard?

    - by mr_eclair
    I'm using Eliteook 8440p hp machine and two keys on my keyboard aren't working v and b. laptop keyboard replace will take 2-3 days, and I can't stop my office work. I'm bored of using On screen keyboard to write v and b. I don't have any portable USb keyoard to connect to laptop right now. I'm thinking I'm not using Pg up and Pg Down button at all, is there any software or trick which can make it possible so that If i press Pg Up it will write v on page and Pg Down will write b. Hoping for quick and positive response.

    Read the article

  • Can I store multiple private keys in one Putty PPK file?

    - by RedGrittyBrick
    I have multiple accounts on a server, say for example red webadmin testuser At the moment I have private keys for these in separate PPK files. I have shortcuts to these on the desktop - so clicking the desktop icon launches Pageant and prompts for a password. After doing this for each PPK file, I can log in and out of the server(s) multiple times during the day using various user-ids without entering passwords. So far so good. Could I streamline this further by somehow combining all these PPK files into a single PPK file? If so how?

    Read the article

  • Microsoft Office tracking license marks/keys in saved files (doc/docx/xls etc.)?

    - by pawel159
    Does Microsoft Office use any marks/keys in saved files, that can track the computer and software license using which file was saved? E.g.: I use Office at work and save files on pendrive. When I'm home I recall to check something and introduce little modifications. I'd save this file using MS Office Home and Student license, but at work I will be redistributing this file and it should look as it was saved at work, with company's license (not my private). Will saving it at work once again wipe license marks from home (if any exist)?

    Read the article

  • How to save two different ssh public keys to server?

    - by hemppa
    I have a CentOS-running server and I want to add ssh authentication for my laptop and desktop-computers. Both PCs are running Ubuntu. I managed to get it work with one computer. I added id_rsa.pub to my /home/$USER/.ssh/autheticated_keys-file. Then I disabled password protection so I can log in only if I have that ssh key on my computer. I tried to add that second id_rsa.pub-key to that authenticated_keys-file on my server, but it didn't work. Like this: cat id_rsa.pub >> /home/$USER/.ssh/authenticated_keys Is this the right way to do this? Or how to save two different public ssh keys on a server? (...and on a single user account)

    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

  • Drupal: Create custom search

    - by Dr. Hfuhruhurr
    I'm trying to create a custom search but getting stuck. What I want is to have a dropdownbox so the user can choose where to search in. These options can mean 1 or more content types. So if he chooses options A, then the search will look in node-type P,Q,R. But he may not give those results, but only the uid's which will be then themed to gather specific data for that user. To make it a little bit clearer, Suppose I want to llok for people. The what I'm searching in is 2 content profile types. But ofcourse you dont want to display those as a result, but a nice picture of the user and some data. I started with creating a form with a textfield and the dropdown box. Then, in the submit handler, i created the keys and redirected to another pages with those keys as a tail. This page has been defined in the menu hook, just like how search does it. After that I want to call hook_view to do the actual search by calling node_search, and give back the results. Unfortunately, it goes wrong. When i click the Search button, it gives me a 404. But am I on the right track? Is this the way to create a custom search? Thx for your help. Here's the code for some clarity: <?php // $Id$ /* * @file * Searches on Project, Person, Portfolio or Group. */ /** * returns an array of menu items * @return array of menu items */ function vm_search_menu() { $subjects = _vm_search_get_subjects(); foreach ($subjects as $name => $description) { $items['zoek/'. $name .'/%menu_tail'] = array( 'page callback' => 'vm_search_view', 'page arguments' => array($name), 'type' => MENU_LOCAL_TASK, ); } return $items; } /** * create a block to put the form into. * @param $op * @param $delta * @param $edit * @return mixed */ function vm_search_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'list': $blocks[0]['info'] = t('Algemene zoek'); return $blocks; case 'view': if (0 == $delta) { $block['subject'] = t(''); $block['content'] = drupal_get_form('vm_search_general_form'); } return $block; } } /** * Define the form. */ function vm_search_general_form() { $subjects = _vm_search_get_subjects(); foreach ($subjects as $key => $subject) { $options[$key] = $subject['desc']; } $form['subjects'] = array( '#type' => 'select', '#options' => $options, '#required' => TRUE, ); $form['keys'] = array( '#type' => 'textfield', '#required' => TRUE, ); $form['submit'] = array( '#type' => 'submit', '#value' => t('Zoek'), ); return $form; } function vm_search_general_form_submit($form, &$form_state) { $subjects = _vm_search_get_subjects(); $keys = $form_state['values']['keys']; //the search keys //the content types to search in $keys .= ' type:' . implode(',', $subjects[$form_state['values']['subjects']]['types']); //redirect to the page, where vm_search_view will handle the actual search $form_state['redirect'] = 'zoek/'. $form_state['values']['subjects'] .'/'. $keys; } /** * Menu callback; presents the search results. */ function vm_search_view($type = 'node') { // Search form submits with POST but redirects to GET. This way we can keep // the search query URL clean as a whistle: // search/type/keyword+keyword if (!isset($_POST['form_id'])) { if ($type == '') { // Note: search/node can not be a default tab because it would take on the // path of its parent (search). It would prevent remembering keywords when // switching tabs. This is why we drupal_goto to it from the parent instead. drupal_goto($front_page); } $keys = search_get_keys(); // Only perform search if there is non-whitespace search term: $results = ''; if (trim($keys)) { // Log the search keys: watchdog('vm_search', '%keys (@type).', array('%keys' => $keys, '@type' => $type)); // Collect the search results: $results = node_search('search', $type); if ($results) { $results = theme('box', t('Zoek resultaten'), $results); } else { $results = theme('box', t('Je zoek heeft geen resultaten opgeleverd.')); } } } return $results; } /** * returns array where to look for * @return array */ function _vm_search_get_subjects() { $subjects['opdracht'] = array('desc' => t('Opdracht'), 'types' => array('project') ); $subjects['persoon'] = array('desc' => t('Persoon'), 'types' => array('types_specialisatie', 'smaak_en_interesses') ); $subjects['groep'] = array('desc' => t('Groep'), 'types' => array('Villamedia_groep') ); $subjects['portfolio'] = array('desc' => t('Portfolio'), 'types' => array('artikel') ); return $subjects; }

    Read the article

  • CouchDB Map/Reduce raises execption in reduce function?

    - by fuzzy lollipop
    my view generates keys in this format ["job_id:1234567890", 1271430291000] where the first key element is a unique key and the second is a timestamp in milliseconds. I run my view with this elapsed_time?startkey=["123"]&endkey=["123",{}]&group=true&group_level=1 and here is my reduce function, the intention is to reduce the output to get the earliest and latest timestamps and return the difference between them and now function(keys,values,rereduce) { var now = new Date().valueOf(); var first = Number.MIN_VALUE; var last = Number.MAX_VALUE; if (rereduce) { first = Math.max(first,values[0].first); last = Math.min(last,values[0].last); } else { first = keys[0][0][1]; last = keys[keys.length-1][0][1]; } return {first:now - first, last:now - last}; } and when processing a query it constantly raises the following execption: function raised exception (new TypeError("keys has no properties", "", 1)) I am making sure not to reference keys inside my rereduce block. Why does this function constantly raise this exception?

    Read the article

  • getting a key out of a javascript hash

    - by mcintyre321
    I working with the latest draft of the twitter annotations api. An example bit of data looks like status { annotations : [ {myAnnotationType:{myKey:myValue}}, {someoneElsesAnnotationType:{theirKey:theirValue}}, ] } now i want to check a status to see if it has an annotation with myAnnotationType in it. If annotations was a hash instead of an array I could just write var ann = status.annotations.myAnnotationType. But its not so I wrote this instead: function getKeys(obj){ var keys = []; for (key in obj) { if (obj.hasOwnProperty(key)) { keys[keys.length] = key; } } return keys; } function getAnnotation(status, type){ for(var i=0;i<status.annotations.length;i++){ var keys = getKeys(status.annotations[i]); for(var j=0;j<keys.length;j++){ if(keys[j] == type){ return status.annotations[i]; } } } } var ann = getAnnotation(status, "myAnnotationType"); There must be a better way! Is there? PS I can't use jquery or anything as this is js to be used in a caja widget and the container doesn't support external libs

    Read the article

  • How to remap "Dashboard" key to show the Desktop on OSX [Snow] Leopard?

    - by Mike
    I use my Desktop far more often than I use my Dashboard. However, my MacBook Pro comes with a dedicated key for Dashboard but it doesn't come with one for Desktop. Using this article, I was able to remap my Dashboard key to show the desktop by changing the values for keys 62 and 63 ("Dashboard") to the same values used by keys 36 and 37 ("Show Desktop"). Specifically, I changed the value for both array index #1s to 111. This worked great for my external (kinesis freestyle) keyboard. But when I went back to my internal macbook keyboard, I discovered that the Dashboard key still mapped to the Dashboard rather than the Desktop. How can I complete this mapping for all of my keyboards? The Kinesis Freestyle, my internal MacBook Pro keyboard, and my external Apple Aluminum Bluetooth keyboard? Update: I'm definitely not looking for a solution that involves using the Function keys instead of the special keys. I wish to keep using my Function keys as function keys as they're indispensable for other applications.

    Read the article

  • Dynamic content in a Gridview

    - by mariki
    I have a gridview with couple of columns,I want to achieve the following: If user is NOT authorized display normal columns. If user IS authorized: set mouseover event for first column text and display some buttons (that are not available for NOT authorized users) in a second column when user hover over(using javascript) the first column. I am have 2 difficulties: The first one where and when should I create the buttons? I have 2 options, I can create those button on design time, in gridviews template and just set Visible value to false and then in codebehind set it to true if user is authorized. The second option would be creating this buttons dynamically in gridview_RowCreated event (or any other event) if user is authorized. The Second difficulty is setting the javascript event to show the buttons, the event should be added only if user is authorized! Note that event and buttons should have some kind of id match for Javascript function to know what should it hide/unhide when event is triggered. What should I do, what is the best practice? I know this is a long question, but please try to help :)

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >