Search Results

Search found 22078 results on 884 pages for 'composite primary key'.

Page 13/884 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • MYSQL KEY-VALUE PAIR Viability

    - by Amit
    Hi, I am new to mysql and I am looking for some answers to the follwoing questions: a) Can mysql community server can be leveraged for a key-value pair type database.?? b) Which mysql engine is best suited for a key-value pair type database ?? c) Is Mysql cluster a must for horizontal scaling of key-value based datastore or can it be acheived using MySQL replication?? d) Are there any docs or whitepapers for best practices when implementiing a kv datastore on mysql?? e) Are there any known big implementations other that friendfeed doing kv pair using MYSQL?? Would really appreciate some advise from all you Mysql gurus out there !! Thanks In Advance, Amit

    Read the article

  • Walk/loop through an XSL key: how?

    - by krisvandenbergh
    Is there a way to walk-through a key and output all the values it contains? I though of it this way: <xsl:for-each select="key('kElement', '.')"> <li><xsl:value-of select="." /></li> </xsl:for-each> However, this does not work. I simply want to list all the values in a key for testing purposes. The question is simply: how can this be done?

    Read the article

  • Change values in first key from 0 to count(array) - 1

    - by sologhost
    Ok, I have an array like so: $myArray[32]['value'] = 'value1'; $myArray[32]['type'] = 'type1'; $myArray[33]['value'] = 'value2'; $myArray[33]['type'] = 'type2'; $myArray[35]['value'] = 'value3'; $myArray[42]['value'] = 'value4'; $myArray[42]['type'] = 'type4'; Ok, looking for a quick way to change all numbers in the first key 32, 33, 35, and 42 into 0, 1, 2, and 3 instead. But I need to preserve the 2nd key and all of the values. The array is already ordered correctly, since I ordered it using a ksort, but now I need to reset the array from 0 - count($myArray) - 1 and keep the 2nd key intact and its value as well. Can someone please help me?

    Read the article

  • Retrieve the CAKeyframeAnimationKey's key in AnimationDidStop

    - by JacktheSparrow
    I have multiple CAKeyframeAnimation objects, each with a unique key like the following: ..... [myAnimation setValues:images]; [myAnimation setDuration:1]; .... [myLayer addAnimation:myAnimation forKey:@"unique key"]; My question is, if I have multiple animation like this and each with a unique key, how do I retrieve their keys in the method AnimationDidStop? I want to be able to do something like this: -(void)animationDidStop:(CAAnimation*)animation finished:(BOOL)flag{ if(..... ==@"uniquekey1"){ //code to handle this specific animation here: }else if(.... ==@"uiquekey2"){ //code to handle this specific animation here: } }

    Read the article

  • MySQL : how to add foreign key

    - by garcon1986
    Hello, I have the following code in mysql. create table employee( e_id int(10) not null auto_increment, user_id int(10), usertype_id default 1, name varchar(50), primary key (e_id) ); create table relation( r_id int(10) not null auto_increment, user_id int(10) not null, usertype_id int(10) not null, interest_id int(10) not null, primary key (id) ); Firstly, i want user_id will have the same value as column e_id; And then, i want to add user_id and usertype_id as an unity in table relation as a foreign key for user_id and usertype_id in table employee. Do you know how to do that? Thanks a lot.

    Read the article

  • change last key name from array in php

    - by robertdd
    i want to be able to change the last key from array i try with this function i made: function getlastimage($newkey){ $arr = $_SESSION['files']; $oldkey = array_pop(array_keys($arr)); $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]); $results = end($arr); //echo json_encode($results); print_r($arr); } if i call the function getlastimage('newkey') it change the key!but after if i print the $_SESSION the key is not changed? why this?

    Read the article

  • Editing a TreeView node doesn't change the TreeNode Key

    - by Blitzz
    I have a TreeView with user-editable nodes. I like to use the node caption as key to my tree node : + Root |+ Node1 ||- SubNode1 ||- SubNode2 |+ Node2 ||- SubNode3 ||- SubNode4 So I can reach a node like this: MyTreeView.Nodes["Root"].Nodes["Node2"].Nodes["SubNode3"] The problem is that, as I allow the user to rename any node, I would need also to change the key of my node in its parent in the AfterLabelEdit handler... which seems (logically) not to be done automatically. Unfortunately, Nodes["blabla"] is readonly, Nodes.Add(string Key, TreeNode Node) doesn't exist, and I can't find a way to do this without throwing (sooner or later) a bad exception. Any idea ?

    Read the article

  • How can I disable the F4 key from showing the items in a ComboBox

    - by Alex
    You might not know this, but pressing the F4 key on a ComboBox makes it's drop-down item list appear. I believe this is the default behavior on Windows. Does anyone know how to override this behavior in WPF (C#)? I know that overriding default behavior is generally seen as bad practice, however in this case I have a rugged-device that runs XP Embedded. It has a handful of prominent Function keys (F1-F6) that need to trigger different events. This works fine, however when focused over a ComboBox the events aren't triggered as the ComboBox drops down. I have tried catching the KeyDown event both on the form and on the ComboBox and listening for the F4 key, however it doesn't get this far as the key press must be handled at a lower level. Any ideas? Thanks.

    Read the article

  • Multiple column foreign key contraints

    - by eugene4968
    I want to setup table constraints for the following scenario and I’m not sure how to do it or if it’s even possible in SQL Server 2005. I have three tables A,B,C. C is a child of B. B will have a optional foreign key(may be null) referencing A. For performance reasons I also want table C to have the same foreign key reference to table A. The constraint on table C should be that C must reference its parent (B) and also have the same foreign key reference to A as its parent. Anyone have any thoughts on how to do this?

    Read the article

  • Public/Private Key Generation

    - by JacKeown
    I'm just learning about public key cryptography and I want to make a public key certificate for my web server so that I can use https. My server is hosted on some random free webhost that is practically impossible for anything...and so my question is this: Is there any harm in making my private key, public key, and public key certificate on my computer using openssl and then transferring it to the server? Thanks in advance. Also if there's anything else I'm missing, any help would be appreciated.

    Read the article

  • Configuring network to set wlan0 as primary

    - by Sheed
    I recently had to rebuild my pc and decided to go for ubuntu 14.04. I think the mistake I made was I started from a 12.04 install disk instead of the 12.10 disk I'd used previously and when given the option set my primary connection as ethernet (because the wireless option didn't work). After upgrading to 14.04 etc, I managed to get the wireless working, or more using steps like ifconfig -a and the likes I managed to prove that the wireless card etc. is all installed and working. However every time I boot without a hard wired connection plugged in I get the message "waiting for network configuration". I can then once it's booted without a network get my wirless working using sudo ifconfig wlan0 up iwlist wlan0 scan This seems to kick the wireless module into life and it appears in the GUI and I can then select a network, however all the options like edit network and disconnect etc are all greyed out. What I would like of course is if the WLAN0 was just set as my primary default network so I've been looking for a solution to this and it would seem that I need to adjust the old /etc/network/interfaces file but when I try to do so using the sudo vi /etc/network/interfaces command I, well I simply have no idea what I'm doing. Other than that typing :q! gets me out of there before I do to much damage! As far as I can tell (by navigating to the file in the GUI) the output of my /etc/network/interfaces is as follows: (obviously not including the " in each line that's just to break the heading rule of the #) "# This file describes the network interfaces available on your system "# and how to activate them. For more information, see interfaces(5). "# The loopback network interface auto lo iface lo inet loopback "# The primary network interface auto eth0 iface eth0 inet dhcp If this is the case then this clearly doesn't contain what it should do but I don't how to fix it. Nor do I even know if I'm on the right track. Any help would be appreciated thanks :)

    Read the article

  • Multiple key/value pairs in HTTP POST where key is the same name

    - by randombits
    I'm working on an API that accepts data from remote clients, some of which where the key in an HTTP POST almost functions as an array. In english what this means is say I have a resource on my server called "class". A class in this sense, is the type a student sits in and a teacher educates in. When the user submits an HTTP POST to create a new class for their application, a lot of the key value pairs look like: student_name: Bob Smith student_name: Jane Smith student_name: Chris Smith What's the best way to handle this on both the client side (let's say the client is cURL or ActiveResource, whatever..) and what's a decent way of handling this on the server-side if my server is a Ruby on Rails app? Need a way to allow for multiple keys with the same name and without any namespace clashing or loss of data.

    Read the article

  • Key logger wont record key strokes without console

    - by Daniel Gopar
    I created a small basic key logger in C++. For some reason when I compile and run the program with the console displayed, it will record every key stroke I make in whatever program I am using such as a browser and store it in a text file. However when I make it so that it WON'T display a console window, it will not record anything and it's just a process in the background doing nothing. Here is the link to my code: http://pastebin.com/4wqQyLJ9 The function that is giving me trouble with hiding the console, is the Stealth() function. Any suggestions, tips or hints will be helpful. Thanks.

    Read the article

  • Using one key for Encryption and HMAC

    - by Vladimir
    Hello, I am wondering whether I can use a shared secret key established between two clients as the HMAC key too. I saw that there is a problem when it is used as a CBC-MAC but I haven't found any evidence it is bad practice for HMACs. Thanks, Vladimir

    Read the article

  • 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

  • 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

  • How to safely store encryption key in a .NET assembly

    - by Alex
    In order to prevent somebody from grabbing my data easily, I cache data from my service as encrypted files (copy protection, basically). However, in order to do this, I must store the encryption key within the .NET assembly so it is able to encrypt and decrypt these files. Being aware of tools like Red Gate's .NET Reflector which can pull my key right out, I get a feeling that this is not a very safe way of doing it... are there any best practices to doing this?

    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

  • 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

  • Composite Moon Map Offers Stunning Views of the Lunar Surface [Astronomy]

    - by Jason Fitzpatrick
    Researchers at Arizona State University have stitched together a massive high-resolution map of the moon; seen the moon in astounding detail. Using images fro the Lunar Reconnaissance Orbiter (LRO) they carefully stitch a massive map of the moon with a higher resolution than the public has ever seen before: The WAC has a pixel scale of about 75 meters, and with an average altitude of 50 km, a WAC image swath is 70 km wide across the ground-track. Because the equatorial distance between orbits is about 30 km, there is nearly complete orbit-to-orbit stereo overlap all the way around the Moon, every month. Using digital photogrammetric techniques, a terrain model was computed from this stereo overlap. Hit up the link below to check out the images and the process they used. Lunar Topography as Never Seen Before [via NASA] How to Make the Kindle Fire Silk Browser *Actually* Fast! Amazon’s New Kindle Fire Tablet: the How-To Geek Review HTG Explains: How Hackers Take Over Web Sites with SQL Injection / DDoS

    Read the article

  • Where and how to reference composite MVP components?

    - by Lea Hayes
    I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with presenter. Context: Windows Forms / Client-Side JavaScript. I am led to believe that the MVP (or indeed MVC in general) pattern can be applied at various levels of a user interface ranging from the main "Window" to an embedded "Text Field". For instance, the model to the text field is probably just a string whereas the model to the "Window" contains application specific view state (like a persons name which resides within the contained text field). Given a more complex scenario: Documentation viewer which contains: TOC navigation pane Document view Search pane Since each of these 4 user interface items are complex and can be reused elsewhere it makes sense to design these using MVP. Given that each of these user interface items comprises of 3 components; which component should be nested? where? who instantiates them? Idea #1 - Embed View inside View from Parent View public class DocumentationViewer : Form, IDocumentationViewerView { public DocumentationViewer() { ... // Unclear as to how model and presenter are injected... TocPane = new TocPaneView(); } protected ITocPaneView TocPane { get; private set; } } Idea #2 - Embed Presenter inside View from Parent View public class DocumentationViewer : Form, IDocumentationViewerView { public DocumentationViewer() { ... // This doesn't seem like view logic... var tocPaneModel = new TocPaneModel(); var tocPaneView = new TocPaneView(); TocPane = new TocPanePresenter(tocPaneModel, tocPaneView); } protected TocPanePresenter TocPane { get; private set; } } Idea #3 - Embed View inside View from Parent Presenter public class DocumentationViewer : Form, IDocumentationViewerView { ... // Part of IDocumentationViewerView: public ITocPaneView TocPane { get; set; } } public class DocumentationViewerPresenter { public DocumentationViewerPresenter(DocumentationViewerModel model, IDocumentationViewerView view) { ... var tocPaneView = new TocPaneView(); var tocPaneModel = new TocPaneModel(model.Toc); var tocPanePresenter = new TocPanePresenter(tocPaneModel, tocPaneView); view.TocPane = tocPaneView; } } Some better idea...

    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

  • Hibernate : Opinions in Composite PK vs Surrogate PK

    - by Albert Kam
    As i understand it, whenever i use @Id and @GeneratedValue on a Long field inside JPA/Hibernate entity, i'm actually using a surrogate key, and i think this is a very nice way to define a primary key considering my not-so-good experiences in using composite primary keys, where : there are more than 1 business-value-columns combination that become a unique PK the composite pk values get duplicated across the table details cannot change the business value inside that composite PK I know hibernate can support both types of PK, but im left wondering by my previous chats with experienced colleagues where they said that composite PK is easier to deal with when doing complex SQL queries and stored procedure processes. They went on saying that when using surrogate keys will complicate things when doing joining and there are several condition when it's impossible to do some stuffs when using surrogate keys. Although im sorry i cant explain the detail here since i was not clear enough when they explain it. Maybe i'll put more details next time. Im currently trying to do a project, and want to try out surrogate keys, since it's not getting duplicated across tables, and we can change the business-column values. And when the need for some business value combination uniqueness, i can use something like : @Table(name="MY_TABLE", uniqueConstraints={ @UniqueConstraint(columnNames={"FIRST_NAME", "LAST_NAME"}) // name + lastName combination must be unique But im still in doubt because of the previous discussion about the composite key. Could you share your experiences in this matter ? Thank you !

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >