Search Results

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

Page 94/826 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • Saving a grails object with a composite id

    - by Jared
    The answer to this may be obvious but how do you save an object, in grails, that has a composite id. I have an object that has a composite id including a long and a date and I am trying to save an instance of the object from the update method of another classes controller, and using (object).save() isn't working. Any tips or suggestions?

    Read the article

  • How to update a mesh position base on a pressed key?

    - by steven166
    I have a mesh loaded from a file, like a tiger mesh. At the first time it locates at A position, then if I press a left key, it will moves to B position but the problem is if I press a left key one more time, it will move from B position to C position. It means that the amount I want to move the mesh will base on the current position instead of the first time rendering position. I can do it if I have a array vertices then I just update the vertex buffer, but a mesh loaded from a file does not have an array vertices, so how to do it? Anybody help me, please?

    Read the article

  • array_key_exists is not working

    - by Arun
    array_key_exists is not working for large multidimensional array. For ex $arr=array( '1'=>10, '2'=>array('21'=>21, '22'=>22, '23'=>array('test'=>100, '231'=>231), ), '3'=>30, '4'=>40 ); array_key_exists('test',$arr) returns 'false' but it works with some simple arrays.

    Read the article

  • Content Assist problem in eclipse 3.5

    - by user361996
    I've got a Content Assist problem in eclipse 3.5, which is eclipse-java-galileo-win32.zip. When I press Alt+/(I've changed Ctrl+Space to this) in Java Editor, no assistant tips are shown up. I've solved this problem and I'd like to share my experience. 1 Eclipse--Preferences--General--Keys; 2 Search 'Content Assist'; 3 You'll find that in 'When' Field, the default value is 'in dialogs and window', change it to 'Editing Java Source', then press 'OK' to save; I can not post a image, but here is a link: http://www.freeimagehosting.net/image.php?e0987ea847.png That's All.

    Read the article

  • Should I try to write simple key-value storage by myself?

    - by shabunc
    I need a key-value storage in a simplest form we can think of. Keys should be some fixed-length strings, values should be some texts. This key-value storage should have an HTTP-backed API. That's basically it. As you can see, there is no big difference between such storage and some web application with some upload functionality. The thing is - it'll take few hours (including tests and coffee drinking) to write something like this. "Something like this" will be fully under my control and can be tuned on demand. Should I, in this specific case, not try to reinvent bicycles? Is it better to use some of existing NoSQL solutions. If yes, which one exactly? If, say, I'd needed something SQL-like, I won't ask and won't try to write something by myself. But with NoSQL I just don't know what is adequate and what is not.

    Read the article

  • how to store data with many categories and many properties efficiently?

    - by Mickey Shine
    We have a large number of data in many categories with many properties, e.g. category 1: Book properties: BookID, BookName, BookType, BookAuthor, BookPrice category 2: Fruit properties: FruitID, FruitName, FruitShape, FruitColor, FruitPrice We have many categories like book and fruit. Obviously we can create many tables for them (MySQL e.g.), and each category a table. But this will have to create too many tables and we have to write many "adapters" to unify manipulating data. The difficulties are: 1) Every category has different properties and this results in a different data structure. 2) The properties of every categoriy may have to be changed at anytime. 3) Hard to manipulate data if each category a table (too many tables) How do you store such kind of data?

    Read the article

  • LINQ2SQL: How to let a column accept null values as zero (0) in Self-Relation table

    - by Remon
    As described in the img, I got a parent-Children relation and since the ParentID not accepting null values (and I can't change to nullabel due to some restriction in the UI I have), how can I remove an existence relation between ReportDataSources in order to change the parent for them (here i want to set the parentId for one of them = 0) how could i do that since i cant change the ParentID directly and setting Parent = null is not valid public void SetReportDataSourceAsMaster(ReportDataSource reportDataSource) { //Some logic - not necessarily for this scenario //Reset Master this.ReportDataSources.ToList().ForEach(rds => rds.IsMaster = false); //Set Master reportDataSource.IsMaster = true; //Set Parent ID for the rest of the Reports data sources this.ReportDataSources.Where(rds => rds.ID != reportDataSource.ID).ToList().ForEach(rds => { //Change Parent ID rds.Parent = reportDataSource; //Remove filttering data rds.FilteringDataMembers.Clear(); //Remove Grouping Data rds.GroupingDataMembers.Clear(); }); //Delete parent HERE THE EXCEPTION THROWN AFTER CALLING SUBMITCHANGES() reportDataSource.Parent = null; //Other logic } Exception thrown after calling submitChanges An attempt was made to remove a relationship between a ReportDataSource and a ReportDataSource. However, one of the relationship's foreign keys (ReportDataSource.ParentID) cannot be set to null.

    Read the article

  • Rename INDEX Column

    - by Lee
    Hey All I have a database with around 40 tables and need to rename every index column. IE USER a table has a bunch of fields like user_id | user_username | user_password | etc... I want to rename the ID columns just to id ie id | user_username | user_password | etc... But I keep getting mysql errors on the alter table command ie. ALTER TABLE database RENAME COLUMN user_id to id; Plus many different variations. Whats the best way to do this ? Hope you can advise

    Read the article

  • Entity framework Update fails when object is linked to a missing child

    - by McKay
    I’m having trouble updating an objects child when the object has a reference to a nonexising child record. eg. Tables Car and CarColor have a relationship. Car.CarColorId CarColor.CarColorId If I load the car with its color record like so this var result = from x in database.Car.Include("CarColor") where x.CarId = 5 select x; I'll get back the Car object and it’s Color object. Now suppose that some time ago a CarColor had been deleted but the Car record in question still contains the CarColorId value. So when I run the query the Color object is null because the CarColor record didn’t exist. My problem here is that when I attach another Color object that does exist I get a Store update, insert error when saving. Car.Color = newColor Database.SaveChanges(); It’s like the context is trying to delete the nonexisting color. How can I get around this?

    Read the article

  • Importing data and keeping ids and relationships

    - by Justin Hamade
    I am working on cleaning up a mess that another programmer started. The created 2 identical databases for different locations but that obviously caused major issues. They are using cakePHP and there are quite a few relationships. I am pretty sure I will have to write a script to import that data from on DB to the other and keep all the relationships but was wondering if there is an easier way to do it.

    Read the article

  • How to add values accordingly of the first indices of a dictionary of tuples of a list of strings? Python 3x

    - by TheStruggler
    I'm stuck on how to formulate this problem properly and the following is: What if we had the following values: {('A','B','C','D'):3, ('A','C','B','D'):2, ('B','D','C','A'):4, ('D','C','B','A'):3, ('C','B','A','D'):1, ('C','D','A','B'):1} When we sum up the first place values: [5,4,2,3] (5 people picked for A first, 4 people picked for B first, and so on like A = 5, B = 4, C = 2, D = 3) The maximum values for any alphabet is 5, which isn't a majority (5/14 is less than half), where 14 is the sum of total values. So we remove the alphabet with the fewest first place picks. Which in this case is C. I want to return a dictionary where {'A':5, 'B':4, 'C':2, 'D':3} without importing anything. This is my work: def popular(letter): '''(dict of {tuple of (str, str, str, str): int}) -> dict of {str:int} ''' my_dictionary = {} counter = 0 for (alphabet, picks) in letter.items(): if (alphabet[0]): my_dictionary[alphabet[0]] = picks else: my_dictionary[alphabet[0]] = counter return my_dictionary This returns duplicate of keys which I cannot get rid of. Thanks.

    Read the article

  • Database PK-FK design for future-effective-date entries?

    - by Scott Balmos
    Ultimately I'm going to convert this into a Hibernate/JPA design. But I wanted to start out from purely a database perspective. We have various tables containing data that is future-effective-dated. Take an employee table with the following pseudo-definition: employee id INT AUTO_INCREMENT ... data fields ... effectiveFrom DATE effectiveTo DATE employee_reviews id INT AUTO_INCREMENT employee_id INT FK employee.id Very simplistic. But let's say Employee A has id = 1, effectiveFrom = 1/1/2011, effectiveTo = 1/1/2099. That employee is going to be changing jobs in the future, which would in theory create a new row, id = 2 with effectiveFrom = 7/1/2011, effectiveTo = 1/1/2099, and id = 1's effectiveTo updated to 6/30/2011. But now, my program would have to go through any table that has a FK relationship to employee every night, and update those FK to reference the newly-effective employee entry. I have seen various postings in both pure SQL and Hibernate forums that I should have a separate employee_versions table, which is where I would have all effective-dated data stored, resulting in the updated pseudo-definition below: employee id INT AUTO_INCREMENT employee_versions id INT AUTO_INCREMENT employee_id INT FK employee.id ... data fields ... effectiveFrom DATE effectiveTo DATE employee_reviews id INT AUTO_INCREMENT employee_id INT FK employee.id Then to get any actual data, one would have to actually select from employee_versions with the proper employee_id and date range. This feels rather unnatural to have this secondary "versions" table for each versioned entity. Anyone have any opinions, suggestions from your own prior work, etc? Like I said, I'm taking this purely from a general SQL design standpoint first before layering in Hibernate on top. Thanks!

    Read the article

  • Solution for this SQL query?

    - by homeWorkBoy
    Suppose you have these tables: Table Name: Salesman Fields: S_ID(Primary Key), Name Table Name: Region_1 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_2 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_3 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Table Name: Region_4 Fields: Reg_ID(Primary Key), S_ID(Foreign Key), sales Query 1: Find out total of sales of each salesman in all the regions. Query 2: Find out total of sales of a particual salesman in all the regions. (if the first one is solved I think this will be easy. :-) )

    Read the article

  • Retrieving an RSA key from a running instance of Apache?

    - by Nathan Osman
    I created an RSA keypair for an SSL certificate and stored the private key in /etc/ssl/private/server.key. Unfortunately this was the only copy of the private key that I had. Then I accidentally overwrote the file on disk (yes, I know). Apache is still running and still serving SSL requests, leading me to believe that there may be hope in recovering the private key. (Perhaps there is a symbolic link somewhere in /proc or something?) This server is running Ubuntu 12.04 LTS.

    Read the article

  • How can I get the root account to generate an acceptable ssh key?

    - by Jamie
    On an ubuntu machine I did the following: ~$ sudo su - [sudo] password for jamie: root@mydomain:~# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 12:34:56:78:9a:bc:de:f0:12:34:56:78:9a:bc:de:f0 [email protected] The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | | | | | | | | | | | | +-----------------+ root@mydomain:~# cat /root/.ssh/id_rsa.pub | ssh -p 443 [email protected] 'cat > authorized_keys' [email protected]'s password: root@mydomain:~# ssh -p 443 [email protected] [email protected]'s password: It's asking me for a password. However, using a regular account, the following works: $ cd ; ssh-keygen -t rsa ; cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' $ ssh [email protected] Last login: Thu Oct 24 14:48:41 2013 from 173.45.232.105 [[email protected] ~]$ Which leads me to believe it's not an issue of authorized_keys versus authorized_keys2 or permissions. Why does the 'root' account accessing the remote 'jamie' account not work? The remote machine is CentOS if that's relevant.

    Read the article

  • How to send Windows key over VNC to Linux from Windows?

    - by MJBoa
    Alright, so I'm running Linux with AwesomeWM on my home machine. I'm running x11vnc on that machine and I want to connect to it from a windows machine. So it suffices to say that I need the Windows key for my home machine to function. I really like TightVNC, but I have found that only RealVNC is able to send the Windows key presses that I need. My problem is that RealVNC is sorely lacking customization and I feel it's inferior to TightVNC and unusable. I know that Ctrl-Esc sends the windows key press in Tight but then I can't use it as a modifier key. Useless. Anyone have any ideas? I don't think it's a server issue since I've tried Tightvnc server on the linux machine and it still doesn't work, at least in TightVNC. It works with Real anyway. Oh and UltraVNC doesn't work either.

    Read the article

  • How long will a USB key with an OS installed on it last?

    - by Xananax
    I've heard numerous times that installing an OS on a USB key is a bad thing to do, as USBs typically have a certain number of writes before dying, and installing an OS on it will wear it out (unless it's used sporadically for rescue purposes). Nonetheless, I am very tempted to install some flavour of Linux (Ubuntu or Arch, I haven't decided yet) on a small, transportable, USB Key. My problem is, although you read a lot that it's "bad", you are never told how bad. How long would it last (provided, say, a pc that is 24/7 on)? A month? A year? Five years? Is there recipes to make it last longer? Is there any reason beside weariness that should prevent me from attempting this? I mean, if it can be calculated, then I could theoretically shield myself by doing regular backups on another key when the deadline gets close (for example). Notes I am not talking of using a USB as a live CD, but actually installing the OS on it.) When I say "USB Key", I refer to the little USBs with a flash memory, not an external USB hard drive. For the curious, my reason is that I work in a lot of different places, on different PCs, and I have a very customized session, with my own WM, my own key bindings, my own scripts, , a selection of plugins for firefox and chrome, etc, and currently I am synchronizing all this through a mix of dropbox, git, and transporting files on USBs, and and it's becoming a chore. It would be much simpler for me to just plug the USB and mount the hard disk of the PC I am using and use it's processing power without actually needing to install any OS on it.

    Read the article

  • Is my Windows 7 x86 license key valid for a x64 installation of Windows?

    - by Kragen
    I've just got a new laptop with Windows 7 x86 Home Premium installed, however I ideally I'd like to be running a 64-bit operating system: Is my Windows license key "generic" (in that it entitles me to install either a x86 or x64 edition of Windows), or does this licence key specific to the x86 version of Windows? Is there any way of me installing and running Windows 7 Home Premium x64 using my x86 license key?

    Read the article

  • Pressing an accent key (´ / ?) adds the character twice in most programs

    - by sh code
    This might seem as duplicate of Pressing key with accent character makes it enter twice but it is not: About three days ago, the issue started - I am using Slovak (Slovakia) keyboard, and the key for adding accents/diacritics (just left from backspace) acts strangely - it should "do nothing" upon pressing, and then when character key is pressed right after it, it should output that character with accent/diacritics. However, in most programs, pressing it once results in immediately outputting the accent itself twice (which under normal circumstances happens when you press the key twice). This issue doesn't happen in Visual Studio or any program I make in it, and Pidgin, it seems to happen everywhere else (firefox, notepad, MS OneNote, Windows Explorer itself). I am not aware of any software installations, driver changes or system updates between the time it worked properly and the time when it broke. What could be the problem and how do I solve it?

    Read the article

  • EFS Remote Encryption

    - by Apoulet
    We have been trying to setup EFS across our domain. Unfortunately Reading/Writing file over network share does not work, we get an "Access Denied" error. Another worrying fact is that I managed to get it working for 1 machine but no other would work. The machines are all Windows 2008R2, running as VM under ESXi host. According to: http://technet.microsoft.com/en-us/library/bb457116.aspx#EHAA We setup the involved machine to be trusted for delegation The user are not restricted and can be trusted for delegation. The users have logged-in on both side and can read/write encrypted files without issues locally. I enabled Kerberos logging in the registry and this is the relevant logs that I get on the machine that has the encrypted files. In order for all certificate that the user possess (Only Key Name changes): Event ID 5058: Audit Success, "Other System Events" Key file operation. Subject: Security ID: {MyDOMAIN}\{MyID} Account Name: {MyID} Account Domain: {MyDOMAIN} Logon ID: 0xbXXXXXXX Cryptographic Parameters: Provider Name: Microsoft Software Key Storage Provider Algorithm Name: Not Available. Key Name: {CE885431-9B4F-47C2-8415-2D766B999999} Key Type: User key. Key File Operation Information: File Path: C:\Users\{MyID}\AppData\Roaming\Microsoft\Crypto\RSA\S-1-5-21-4585646465656-260371901-2912106767-1207\66099999999991e891f187e791277da03d_dfe9ecd8-31c4-4b0f-9b57-6fd3cab90760 Operation: Read persisted key from file. Return Code: 0x0[/code] Event ID 5061: Audit Faillure, "System Intergrity" [code]Cryptographic operation. Subject: Security ID: {MyDOMAIN}\{MyID} Account Name: {MyID} Account Domain: {MyDOMAIN} Logon ID: 0xbXXXXXXX Cryptographic Parameters: Provider Name: Microsoft Software Key Storage Provider Algorithm Name: RSA Key Name: {CE885431-9B4F-47C2-8415-2D766B999999} Key Type: User key. Cryptographic Operation: Operation: Open Key. Return Code: 0x8009000b Could this be related to this error from the CryptAcquireContext function NTE_BAD_KEY_STATE 0x8009000BL The user password has changed since the private keys were encrypted. The problem is that the users I using at the moment can not change their password.

    Read the article

  • Should I enter my Office product key before running sysprep?

    - by stickmangumby
    I'm planning on cloning a Windows XP install, and am a little confused about sysprep. I know that it blanks out the XP product key, but what about other software? If I install Office 2007 and enter a product key, then use sysprep and create an image, will I be able to enter a new product key in clones I create from the image? Or will they all have duplicate product keys?

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >