Search Results

Search found 20640 results on 826 pages for 'key combination'.

Page 88/826 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Disable Foreign Key Exposure in Entity Framework?

    - by davemackey
    When I originally created a Dynamic Data project I told it to expose the foreign keys, but now I can't make mappings between two entities b/c of the foreign keys. When I click on mapping details while focused on my association I receive the message: Mappings are not allow for an association over exposed foreign keys. So I'd like to disable the exposure of the foreign keys but am unsure how to do this without creating a new Entity Model from scratch. I'm not far along - so that wouldn't be hard, but I imagine there must be a programmatic switch for this?

    Read the article

  • "2d Search" in Solr or how to get the best item of the multivalued field 'items'?

    - by Karussell
    The title is a bit awkward but I couldn't found a better one. My problem is as follows: I have several users stored as documents and I am storing several key-value-pairs or items (which have an id) for each document. Now, if I apply highlighting I can get the first n items. If you have several hundreds of such items this highlighting is necessary and works nicely. But there are two problems: The highlighted text won't contain the id and so retrieving additional information of the highlighted item text is ugly. E.g. you need to store the id in the text so that the highlighter returns it. Adding the id to the hl.fl parameter does not help. You will not get the most relevant n-items. You will get the first n items ... So how can I find the best items of a documents with multiple such items? I will now add my own findings as answers, but as I will point out. Each of them has its drawbacks. Hopefully anyone of you can point me to a better solution.

    Read the article

  • php Undefined index but i can access that key anyways

    - by Linas
    I just don't get it, i know what the error means i know how to fix it but it seems to be more of a php bug, i have an array returned from some function which looks like this when i use var_dump: array(1) { ["89512480-1884-11e2-aee6-618bca23e5b1"]=> array(5) { ["created"]=> string(10) "1350514509" ["expires"]=> string(10) "1351724109" ["token"]=> string(40) "81fa1895a6d5d4cb11efae8e71adf98fbdbfb5ca" ["user_agent"]=> string(40) "6ab18a2ea1d4b17d67713e416b07d46bf2f4d03b" ["username"]=> string(4) "test" } } array(0) { } but if i try for example: echo $token['89512480-1884-11e2-aee6-618bca23e5b1']['user_agent']; it shows me the value, but at the same time i get that annoying error, what the hell?

    Read the article

  • How to create unique user key

    - by Grayson Mitchell
    Scenario: I have a fairly generic table (Data), that has an identity column. The data in this table is grouped (lets say by city). The users need an identifier in order for printing on paper forms, etc. The users can only access their cites data, so if they use the identity column for this purpose they will see odd numbers (e.g. a 'New York' user might see 1,37,2028... as the listed keys. Idealy they would see 1,2,3... (or something similar) The problem of course is concurrency, this being a web application you can't just have something like: UserId = Select Count(*)+1 from Data Where City='New York' Has anyone come up with any cunning ways around this problem?

    Read the article

  • Convert PHP array into Key => Value Array

    - by Feature
    Total PHP Noob and I couldn't find an answer to this specific problem. Hope someone can help! $myvar is an array that looks like this: Array ( [aid] = Array ( [0] = 2 [1] = 1 ) [oid] = Array( [0] = 2 [1] = 1 ) ) And I need to set a new variable (called $attributes) to something that looks like this: $attributes = array($myvar['aid'][0] => $myvar['oid'][0], $myvar['aid'][1] => $myvar['oid'][1], etc...); And, of course, $myvar may contain many more items... How do I iterate through $myvar and build the $attributes variable?

    Read the article

  • GPG - why am I encrypting with subkey instead of primary key?

    - by khedron
    When encrypting a file to send to a collaborator, I see this message: gpg: using subkey XXXX instead of primary key YYYY Why would that be? I've noticed that when they send me an encrypted file, it also appears to be encrypted towards my subkey instead of my primary key. For me, this doesn't appear to be a problem; gpg (1.4.x, macosx) just handles it & moves on. But for them, with their automated tool setup, this seems to be an issue, and they've requested that I be sure to use their primary key. I've tried to do some reading, and I have the Michael Lucas's "GPG & PGP" book on order, but I'm not seeing why there's this distinction. I have read that the key used for signing and the key used for encryption would be different, but I assumed that was about public vs private keys at first. In case it was a trust/validation issue, I went through the process of comparing fingerprints and verifying, yes, I trust this key. While I was doing that, I noticed the primary & subkeys had different "usage" notes: primary: usage: SCA subkey: usage: E "E" seems likely to mean "Encryption". But, I haven't been able to find any documentation on this. Moreover, my collaborator has been using these tools & techniques for some years now, so why would this only be a problem for me?

    Read the article

  • get foreign key objects in a single query - Django

    - by John
    Hi I have 2 models in my django code: class ModelA(models.Model): name = models.CharField(max_length=255) description = models.CharField(max_length=255) created_by = models.ForeignKey(User) class ModelB(models.Model): category = models.CharField(max_length=255) modela_link = models.ForeignKey(ModelA, 'modelb_link') functions = models.CharField(max_length=255) created_by = models.ForeignKey(User) Say ModelA has 100 records, all of which may or may not have links to ModelB Now say I want to get a list of every ModelA record along with the data from ModelB I would do: list_a = ModelA.objects.all() Then to get the data for ModelB I would have to do for i in list_a: i.additional_data = i.modelb_link.all() However this runs a query on every instance of i. Thus making 101 queries to run. Is there any way of running this all in just 1 query. Or at least less than the 101 queries. I've tried putting in ModelA.objects.select_related().all() but this didn't seem to have any effect. Thanks

    Read the article

  • Elegant way to aggregate multi-dimensional array by index key

    - by Stephen J. Fuhry
    How can I recursively find the total value of all children of an array that looks something like this? [0] => Array ( [value] => ? // 8590.25 + 200.5 + 22.4 [children] => Array ( [0] => Array ( [value] => ? // 8590.25 + 200.5 [children] => Array ( [0] => Array ( [value] => 8590.25 // leaf node ) [1] => Array ( [value] => 200.05 // leaf node ) ) ) [1] => Array ( [value] => 22.4 // leaf node ) ) )

    Read the article

  • Why the generated key size is not constant?

    - by Tom Brito
    The following code prints randomly 634, 635, 636, each time I run it. Why its not constant? public static void main(String[] args) throws Exception { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA", "BC"); keyPairGen.initialize(1024); RsaKeyPair keyPair = new RsaKeyPair(keyPairGen.generateKeyPair()); System.out.println(keyPair.getPrivate().getEncoded().length); }

    Read the article

  • javascript : key validation

    - by Geetha
    hi all, im using javascript to validate keys in textbox. it is not working :( function numeric(e) { return ((e.keyCode == 8) || (e.keyCode == 9) || (e.keyCode > 47 && e.keyCode < 58) || (e.keyCode > 36 && e.keyCode < 41) || (e.keyCode == 46) || (e.keyCode > 95 && e.keyCode < 106) || e.keyCode == 190 || e.keyCode == 110); } help me...

    Read the article

  • Elegant way to distinct Path or Entry key

    - by sum1stolemyname
    I have an application loading CAD data (Custom format), either from the local filesystem specifing an absolute path to a drawing or from a database. Database access is realized through a library function taking the drawings identifier as a parameter. the identifiers have a format like ABC 01234T56-T, while my paths a typical windows Paths (eg x:\Data\cadfiles\cadfile001.bin). I would like to write a wrapper function Taking a String as an argument which can be either a path or an identifier which calls the appropriate functions to load my data. Like this: Function CadLoader(nameOrPath : String):TCadData; My Question: How can I elegantly decide wether my string is an idnetifier or a Path to a file? Use A regexp? Or just search for '\' and ':', which are not appearing in the Identifiers?

    Read the article

  • The best way to structure this database?

    - by James P
    At the moment I'm doing this: gems(id, name, colour, level, effects, source) id is the primary key and is not auto-increment. A typical row of data would look like this: id => 40153 name => Veiled Ametrine colour => Orange level => 80 effects => +12 sp, +10 hit source => Ametrine (Some of you gamers might see what I'm doing here :) ) But I realise this could be sorted a lot better. I have studied database relationships and secondary keys in my A-Level computing class but never got as far as to set one up properly. I just need help with how this database should be organised, like what tables should have what data with what secondary and foreign keys? I was thinking maybe 3 tables: gem, effects, source. Which then have relationships to each other? Can anyone shed some light on this? Is a complex way like I'm proposing really the way to go or should I just carry on with what I'm doing? Cheers.

    Read the article

  • How do I pick the most beneficial combination of items from a set of items?

    - by Chu
    I'm designing a piece of a game where the AI needs to determine which combination of armor will give the best overall stat bonus to the character. Each character will have about 10 stats, of which only 3-4 are important, and of those important ones, a few will be more important than the others. Armor will also give a boost to 1 or all stats. For example, a shirt might give +4 to the character's int and +2 stamina while at the same time, a pair of pants may have +7 strength and nothing else. So let's say that a character has a healthy choice of armor to use (5 pairs of pants, 5 pairs of gloves, etc.) We've designated that Int and Perception are the most important stats for this character. How could I write an algorithm that would determine which combination of armor and items would result in the highest of any given stat (say in this example Int and Perception)?

    Read the article

  • Elegant way to aggregate multi-demensional array by index key

    - by Stephen J. Fuhry
    How can I recursively find the total value of all children of an array that looks something like this? [0] => Array ( [value] => ? // 8590.25 + 200.5 + 22.4 [children] => Array ( [0] => Array ( [value] => ? // 8590.25 + 200.5 [children] => Array ( [0] => Array ( [value] => 8590.25 // leaf node ) [1] => Array ( [value] => 200.05 // leaf node ) ) ) [1] => Array ( [value] => 22.4 // leaf node ) ) )

    Read the article

  • Key Events in TabActivities?

    - by stormin986
    I have a TabActivity and want to catch and handle presses of HOME and BACK. Where do I need to catch these events? In my subclass of TabActivity I implement the following: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { // Code handling } return super.onKeyDown(keyCode, event); } Didn't work. So I placed a breakpoint on the switch statement line. But this function never gets called, whether I press volume up/down, menu, home, or back. Where do I need to catch these KeyEvents?

    Read the article

  • How to disable listbox auto select item when pressing key

    - by tomfox66
    I have a listbox where I want to copy and paste items within that listbox. Copy and paste works fine but everytime I press "Crtl + C" the item starting with the letter C is automatically selected. Can this automatic selection be disabled or am I missing something here Here is the copy and paste method I implemented: private void listBox_Script_KeyDown(object sender, KeyEventArgs e) { if (e.Control == true && e.KeyCode == Keys.C) { int test = listBox_Script.SelectedIndex; Clipboard.SetDataObject(listBox_Script.Items[listBox_Script.SelectedIndex], true); return; } if (e.Control == true && e.KeyCode == Keys.V) { if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text)) { listBox_Script.Items.Insert(listBox_Script.SelectedIndex + 1, Clipboard.GetDataObject().GetData(DataFormats.Text).ToString()); return; } }

    Read the article

  • Next Identity Key LINQ + SQL Server

    - by user569347
    To represent our course tree structure in our Linq Dataclasses we have 2 columns that could potentially be the same as the PK. My problem is that if I want to Insert a new record and populate 2 other columns with the PK that was generated there is no way I can get the next identity and stop conflict with other administrators who might be doing the same insert at the same time. Case: A Leaf node has right_id and left_id = itself (prereq_id) **dbo.pre_req:** prereq_id left_id right_id op_id course_id is_head is_coreq is_enforced parent_course_id and I basically want to do this: pre_req rec = new pre_req { left_id = prereq_id, right_id = prereq_id, op_id = 3, course_id = query.course_id, is_head = true, is_coreq = false, parent_course_id = curCourse.course_id }; db.courses.InsertOnSubmit(rec); try { db.SubmitChanges(); } Any way to solve my dilemma? Thanks!

    Read the article

  • How to retrieve key and value from JSON object

    - by I Like PHP
    I have a JSON object in this format: { "supplier": { "mov_10": "love actually", "mov_1": "fare" }, "quantity": 20, "success": true, "length":2 } Now I want to create a select box below using the supplier object (using both the keys and values), like this: <select id="selectme"> <option id="mov_10">love actually</option> <option id="mov_1">fare</option> </select> So how do I create it? I just want to know how to reach mov_10 and mov_1 in the object. Sorry for my bad English, but please help me. Thanks.

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >