Search Results

Search found 6628 results on 266 pages for 'foreign keys'.

Page 39/266 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Custom keys with NERDComment plugin and remapped Leader?

    - by Paul Wicks
    I'm trying to set up the NERDComment plugin in vim, but I'm having some trouble with the keys. I'd like to set the basic toggle functionality (comment a line if it's uncommented, uncomment if it's commented) to be c. The problem is that I've remapped the Leader to be ,, which is the same key that NERD wants for all of it's hotkeys. Anyone have any idea as to how to set this up?

    Read the article

  • Arrow keys with NSTableView

    - by dreamlax
    Is it possible to navigate an NSTableView's editable cell around the NSTableView using arrow keys and enter/tab? For example, I want to make it feel more like a spreadsheet. The users of this application are expected to edit quite a lot of cells (but not all of them), and I think it would be easier to do so if they didn't have to double-click on each cell.

    Read the article

  • Doctrine: String keys with Array hydration

    - by BenV
    According to their documentation, you should use Array hydration rather than record hydration when retrieving data for read-only purposes. However, this means I have to access the attributes of the retrieved object using arrays and string keys: $user['Phonenumbers'][0]['number'] instead of the OO style: $user->PhoneNumbers[0]->number Now I'm kinda new to PHP, but in other languages I've worked with the 2nd notation would be preferable because typos would be caught at compile time while typos in string literals would not be noticed until runtime. Does this apply to PHP/Doctrine?

    Read the article

  • Negative Primary Keys

    - by bjax
    Are there any repercussions using Negative Primary Keys for tables (Identity Increment -1, Identity Seed -1 in SQL Server 2005)? The reason for this is we're creating a new database to replace an existing one. There are similar tables between the two databases and we'd like the "source" of the information to be transparent to our applications. The approach is to create views that unions tables from both databases. Negative PKs ensures the identities don't overlap.

    Read the article

  • Filter entire NSDictionaries out of NSArray based on multiple keys

    - by user270475
    Hi, I have an NSArray of NSDictionary objects which I would like to be able to return a new array of NSDictionaries from, where every NSDictionary has "Area == North" (for example). The closest example I have found so far is http://stackoverflow.com/questions/958622/using-nspredicate-to-filter-an-nsarray-based-on-nsdictionary-keys but this just returns the unique values for a given key, not the dictionary that has that key. Is there any way to perform a similar operation, and to return the entire dictionary?

    Read the article

  • how to delete memcached data with "filter" keys ?

    - by panchicore
    Hi, I just want to delete cached data, but I have many keys, for example: user_54_books user_54_movies user_54_comments user_54_foobar I can write $cache-delete('user_54_books'); but I have to do it with all "user_ID_objects", can I say to memcache, something like delete-('user_54_*'); ? how? thanks :)

    Read the article

  • ASP.NET Checkboxes/RadioLists Arrow Keys

    - by rlb.usa
    I have an ASP.NET web application for data entry, and we have big lists of radiobuttons, and long lists of checkboxes, in some sections. The client wants to be able to be able to navigate and manipulate these controls with their keyboard, like the tab/space/enter/right-left-up-down-arrow-keys. Are there any ASP.NET controls that I can use?

    Read the article

  • C++: Accessing std::map keys and values

    - by Jay
    How do you access an std::vector of the keys or values of an std::map? Thanks. Edit: I would like to access the actual elements, not just copies of their contents. essentially I want a reference, not a copy. This is essentially what I am wanting to do: std::map<std::string, GLuint> textures_map; // fill map glGenTextures( textures_map.size(), &textures_map.access_values_somehow[0] );

    Read the article

  • when to index on multiple keys in mongodb

    - by Evan
    say I have an Item document with :price and :qty fields. I sometimes want to find all documents matching a given :price AND :qty, and at other times it will be either :price on its own or :qty on its own. I have already indexed the :price and :qty keys, but do I also need to create a compound index on both together or are the single key indexes enough?

    Read the article

  • Adding keys to superglobals in php

    - by gautam kumar
    Is there any way by which I can add keys to superglobals in php without defining the corresponding values to those key? For example: $_SESSION['key']='set';//key` automatically gets defined. But I want to do something like this add_key($_SESSION,'key')//key is added to $_SESSION array. Is it possible?

    Read the article

  • How to choose between UUIDs, autoincrement/sequence keys and sequence tables for database primary keys?

    - by Tim
    I'm looking at the pros and cons of these three primary methods of coming up with primary keys for database rows. So assuming I am using a database that supports more than one of these methods, is there a simple heuristic to determine what the best option would be for me? How do considerations such a distributed/multiple masters, performance requirements, ORM use, security and testing have on the choice? Any unexpected drawbacks that one might run into?

    Read the article

  • Pressing up/down keys will navigate through items present in the silverlight listbox

    - by Malcolm
    I am using VS 2010 and SL 4.And I came up with strange behaviour of the listbox that it don't have keyboard navigation(the one which is present in wpf :( ).So is there a way or any idea or suggestion how can i do it.. I know the long way thats shown up here , link text But anything simpler then this or shortes then this will be nice.. :) Pressing up/down keys will navigate through items present in the silverlight listbox

    Read the article

  • Table in DB for generating primary keys?

    - by Sapphire
    Do you ever use a separate table for "generating" artificial primary keys for DB (and why)? What I mean is to have a table with two columns, table name and current ID - with which you could get new "ID" for some table by simply locking the row with that table name, getting the current value of the key, increment it by one, and unlock the row. Why would you prefer this over standard integer identity column? P.S. The "idea" is from Fowlers Patterns of Enterprise Application Architecture, btw...

    Read the article

  • django convert list of objects to list of primary keys

    - by John
    Hi, As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this? I know I could do my_list = [] for item in object_list: my_list.append(item.pk) but was wondering if there is Django or Python specific way of doing this better. Thanks

    Read the article

  • Fastest way to add prefix to array keys?

    - by Kirzilla
    Hello, What is the fastes way to add string prefixes to array keys? was $array = array( '1' => 'val1', '2' => 'val2', ); needed $array = array( 'prefix1' => 'val1', 'prefix2' => 'val2', ); According to http://www.phpbench.com/ (see Modify Loop) I should use "for" statement, but probably there is more elegant way? Thank you.

    Read the article

  • Iterating over key/value pairs in a dict sorted by keys

    - by Helper Method
    I have the following code, which just print the key/value pairs in a dict (the pairs are sorted by keys): for word, count in sorted(count_words(filename).items()): print word, count However, calling iteritems() instead of items() produces the same output for word, count in sorted(count_words(filename).iteritems()): print word, count Now, which one should I choose in this situation? I consulted the Python tutorial but it doesn't really answer my question.

    Read the article

  • Smartcards for storing gpg/ssh keys (Linux) - what do I need?

    - by Ninefingers
    Hi All, I'm interested in storing my SSH keys and gpg keys on a smartcard for added security. However, I'm a bit uncertain on a few points, which are as follows: How many keys can I get on a card? I assume both SSH and GPG can store keys on the card. Is there a limit to key size? I see a lot of cards saying they support 2048-bit keys, what about larger sizes? Hardware: can anyone recommend a card/reader combination that works well? I've done a fair amount of research and it seems PC/SC readers can be a bit iffy - is this your experience? Have I missed anything I should be asking? Are there any other hurdles? I'm aware fsf europe give away cards with membership - I'm not sure I want to join, but... are these cards any good?

    Read the article

  • insert, delete etc. keys not working on Cherry Strait keyboard

    - by Brabster
    Hey folks, I got a Cherry Strait USB wired keyboard for xmas and I've been unable to get several keys working under Ubuntu 10.10 or Win XP. There are a few keys. including the Print Screen key, insert, end, delete, pg up, pg down and home. I've not been able to identify any others that aren't working. I'm not sure as to the best approach to determine what's wrong. Is there any way to confirm whether there is any output from the keyboard in response to pressing those keys, ideally in Ubuntu as that's where I spend most of my time so that I know if it's a fault with the device itself? (I've tried different USB ports and also hitting those keys whilst in the Keyboard Shortcuts app, no response to these keys)

    Read the article

  • Easiest way to remove Keys from a 2D Array?

    - by dbemerlin
    Hi, I have an Array that looks like this: array( 0 => array( 'key1' => 'a', 'key2' => 'b', 'key3' => 'c' ), 1 => array( 'key1' => 'c', 'key2' => 'b', 'key3' => 'a' ), ... ) I need a function to get an array containing just a (variable) number of keys, i.e. reduce_array(array('key1', 'key3')); should return: array( 0 => array( 'key1' => 'a', 'key3' => 'c' ), 1 => array( 'key1' => 'c', 'key3' => 'a' ), ... ) What is the easiest way to do this? If possible without any additional helper function like array_filter or array_map as my coworkers already complain about me using too many functions. The source array will always have the given keys so it's not required to check for existance. Bonus points if the values are unique (the keys will always be related to each other, meaning that if key1 has value a then the other key(s) will always have value b). My current solution which works but is quite clumsy (even the name is horrible but can't find a better one): function get_unique_values_from_array_by_keys(array $array, array $keys) { $result = array(); $found = array(); if (count($keys) > 0) { foreach ($array as $item) { if (in_array($item[$keys[0]], $found)) continue; array_push($found, $item[$keys[0]]); $result_item = array(); foreach ($keys as $key) { $result_item[$key] = $item[$key]; } array_push($result, $result_item); } } return $result; } Addition: PHP Version is 5.1.6.

    Read the article

  • Unique Keys not recognized by Entity Framework

    - by David Pfeffer
    I have two tables, Reports and Visualizations. Reports has a field, VisualizationID, which points to Visualization's field of the same name via a foreign key. It also has a unique key declared on the field. VisualizationID is not nullable. This means the relationship has to be 0..1 to 1, because every Reports record must have a unique, not null Visualizations record associated with it. The Entity Framework doesn't see it this way. I'm getting the following error: Error 113: Multiplicity is not valid in Role 'Report' in relationship 'FK_Reports_Visualizations'. Because the Dependent Role properties are not the key properties, the upper bound of the multiplicity of the Dependent Role must be *. What's the problem here? How can I make the EF recognize the proper relationship multiplicity?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >