Daily Archives

Articles indexed Saturday July 7 2012

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • can't update 12.04 getting package header error

    - by joel
    I originally posted this question, and was redirected to another thread where the question had already been asked. I then posted to that thread and had my post deleted by moderator fossfreedom, and told to post a "new" question... so wth ever.... I don't care if it's old or new I just need help here people! In a nutshell, I can't use sudo apt-get update or the GUI update tool to update my system. Anytime I try using either tool it gives me an error about packages missing headers. I can't send error reports, I have tried all the listed solutions from this post: I can't update my system properly, "no package header" error and from this post: "Problem with MergeList" error when trying to do an update and neither one work. I just want a working solution since I don't have the means of re-installing the OS entirely, and I REALLY don't want to have to go back to using Windows.

    Read the article

  • Why is lowlatency kernel not being updated in parallel with the generic kernel?

    - by FlabbergastedPickle
    All, Any idea when we'll see updates to the lowlatency version of the Ubuntu 12.04 kernel? It is still stuck at 3.2.0.23 whereas the generic kernel is already several updates ahead of it at a version 3.2.0.25? NB: I am using a 64-bit version but I don't think this is limited to the 64-bit kernels alone but rather affects both 32-bit and 64-bit builds. Please do correct me if I am wrong about this.

    Read the article

  • Ubuntu 12.04 installation problem

    - by LittleLego
    Okay, at the beginning of the installation, it went well. My laptop is connected to power source, the internet, I have also checked the boxes "install updates while installation", "install third party plugin". After inputting location, keyboard layout info and user's details and password, the installation took place. But after 3/4 of the installation, it stopped, right above the progress bar, it displayed "installing system", I clicked on the arrow below it, the terminal-like screen also stopped carrying out the process. I then clicked on the "Skip" button, nothing happens. I thought it was the problem of my laptop, then I did another fresh installation, same thing happened. The terminal-like screen was showing some different words. But it's not an error message, just some installation info. Does anyone have valuable solution to this problem?

    Read the article

  • Alt-Tab in 12.04 requires pressing Enter to select app, can I disable that?

    - by Brett Hoerner
    Alt+Tab quickly opens the switcher for me, but tabbing over to the next app and releasing the keys will just leave it selected, not switch to it. I have to press Enter to actually switch to the app. How do I make it automatically switch when I release like every other switcher out there? Same behavior occurs when using Super+Tab with either the Compiz Ring Switcher or Shift Switcher. This seems different from the 11.10 behavior.

    Read the article

  • How to resolve Unmet dependencies error?

    - by dandelion
    Using my new install of Ubuntu I haven't been able to download anything from the software center except the maryo game without the following error: The following packages have unmet dependencies: vlc: Depends: vlc-nox (= 1.1.12-2~oneiric1) but 1.1.12-2~oneiric1 is to be installed Depends: libaa1 (>= 1.4p5) but 1.4p5-38build1 is to be installed Depends: libavcodec-extra-53 (>= 4:0.7-1) but 4:0.7.3ubuntu0.11.10.1 is to be installed Depends: libavutil-extra-51 (>= 4:0.7-1) but 4:0.7.3ubuntu0.11.10.1 is to be installed Depends: libc6 (>= 2.8) but 2.13-20ubuntu5.1 is to be installed Depends: libfreetype6 (>= 2.2.1) but 2.4.4-2ubuntu1.1 is to be installed Depends: libgcc1 (>= 1:4.1.1) but 1:4.6.1-9ubuntu3 is to be installed Depends: libqtcore4 (>= 4:4.7.0~beta1) but 4:4.7.4-0ubuntu8.1 is to be installed Depends: libqtgui4 (>= 4:4.5.3) but 4:4.7.4-0ubuntu8.1 is to be installed Depends: libsdl-image1.2 (>= 1.2.10) but 1.2.10-2.1 is to be installed Depends: libsdl1.2debian (>= 1.2.10-1) but 1.2.14-6.1ubuntu4 is to be installed Depends: libstdc++6 (>= 4.6) but 4.6.1-9ubuntu3 is to be installed Depends: libva-x11-1 (> 1.0.12~) but it is not going to be installed Depends: libva1 (> 1.0.12~) but it is not going to be installed Depends: libxcb-randr0 (>= 1.1) but it is not going to be installed Depends: libxcb-xv0 (>= 1.2) but it is not going to be installed Depends: zlib1g (>= 1:1.2.3.3.dfsg) but 1:1.2.3.4.dfsg-3ubuntu3 is to be installed My system specs are version 11.10 64 bit. ge-g41m-es2l mother board amd 5770 video card wdc green 500 gig hard drive I have recently changed the motherboard, but otherwise have not changed my computer from when I used to be running the same version of Ubuntu. edit still unable to download output of sudo apt-get update output of sudo apt-get update ~$ sudo apt-get update Ign http://extras.ubuntu.com oneiric InRelease Ign http://security.ubuntu.com oneiric-security InRelease Ign http://archive.canonical.com oneiric InRelease Ign http://ppa.launchpad.net oneiric InRelease Ign http://us.archive.ubuntu.com oneiric InRelease Ign http://us.archive.ubuntu.com oneiric-updates InRelease Ign http://us.archive.ubuntu.com oneiric-backports InRelease Hit http://extras.ubuntu.com oneiric Release.gpg Hit http://archive.canonical.com oneiric Release.gpg Hit http://security.ubuntu.com oneiric-security Release.gpg Hit http://ppa.launchpad.net oneiric Release.gpg Ign http://us.archive.ubuntu.com oneiric-proposed InRelease Hit http://us.archive.ubuntu.com oneiric Release.gpg Hit http://extras.ubuntu.com oneiric Release Hit http://archive.canonical.com oneiric Release Hit http://security.ubuntu.com oneiric-security Release Hit http://ppa.launchpad.net oneiric Release Hit http://us.archive.ubuntu.com oneiric-updates Release.gpg Hit http://us.archive.ubuntu.com oneiric-backports Release.gpg Hit http://extras.ubuntu.com oneiric/main Sources Hit http://archive.canonical.com oneiric/partner i386 Packages Hit http://security.ubuntu.com oneiric-security/main Sources Hit http://ppa.launchpad.net oneiric/main Sources Hit http://us.archive.ubuntu.com oneiric-proposed Release.gpg Hit http://extras.ubuntu.com oneiric/main i386 Packages Ign http://extras.ubuntu.com oneiric/main TranslationIndex Hit http://ppa.launchpad.net oneiric/main i386 Packages Ign http://ppa.launchpad.net oneiric/main TranslationIndex Ign http://archive.canonical.com oneiric/partner TranslationIndex Hit http://security.ubuntu.com oneiric-security/restricted Sources Hit http://security.ubuntu.com oneiric-security/universe Sources Hit http://security.ubuntu.com oneiric-security/multiverse Sources Hit http://security.ubuntu.com oneiric-security/main i386 Packages Hit http://security.ubuntu.com oneiric-security/restricted i386 Packages Hit http://us.archive.ubuntu.com oneiric Release Hit http://us.archive.ubuntu.com oneiric-updates Release Hit http://security.ubuntu.com oneiric-security/universe i386 Packages Hit http://security.ubuntu.com oneiric-security/multiverse i386 Packages Hit http://security.ubuntu.com oneiric-security/main TranslationIndex Hit http://security.ubuntu.com oneiric-security/multiverse TranslationIndex Hit http://security.ubuntu.com oneiric-security/restricted TranslationIndex Hit http://security.ubuntu.com oneiric-security/universe TranslationIndex Hit http://us.archive.ubuntu.com oneiric-backports Release Hit http://security.ubuntu.com oneiric-security/main Translation-en Hit http://security.ubuntu.com oneiric-security/multiverse Translation-en Hit http://us.archive.ubuntu.com oneiric-proposed Release Hit http://us.archive.ubuntu.com oneiric/main Sources Hit http://us.archive.ubuntu.com oneiric/restricted Sources Hit http://us.archive.ubuntu.com oneiric/universe Sources Hit http://us.archive.ubuntu.com oneiric/multiverse Sources Hit http://security.ubuntu.com oneiric-security/restricted Translation-en Hit http://us.archive.ubuntu.com oneiric/restricted i386 Packages Hit http://us.archive.ubuntu.com oneiric/universe i386 Packages Hit http://us.archive.ubuntu.com oneiric/multiverse i386 Packages Hit http://us.archive.ubuntu.com oneiric/main TranslationIndex Hit http://us.archive.ubuntu.com oneiric/multiverse TranslationIndex Hit http://us.archive.ubuntu.com oneiric/restricted TranslationIndex Hit http://us.archive.ubuntu.com oneiric/universe TranslationIndex Hit http://us.archive.ubuntu.com oneiric-updates/main Sources Hit http://us.archive.ubuntu.com oneiric-updates/restricted Sources Hit http://security.ubuntu.com oneiric-security/universe Translation-en Hit http://us.archive.ubuntu.com oneiric-updates/universe Sources Hit http://us.archive.ubuntu.com oneiric-updates/multiverse Sources Hit http://us.archive.ubuntu.com oneiric-updates/main i386 Packages Hit http://us.archive.ubuntu.com oneiric-updates/restricted i386 Packages Hit http://us.archive.ubuntu.com oneiric-updates/universe i386 Packages Hit http://us.archive.ubuntu.com oneiric-updates/multiverse i386 Packages Hit http://us.archive.ubuntu.com oneiric-updates/main TranslationIndex Hit http://us.archive.ubuntu.com oneiric-updates/multiverse TranslationIndex Hit http://us.archive.ubuntu.com oneiric-updates/restricted TranslationIndex Hit http://us.archive.ubuntu.com oneiric-updates/universe TranslationIndex Hit http://us.archive.ubuntu.com oneiric-backports/main Sources Hit http://us.archive.ubuntu.com oneiric-backports/restricted Sources Hit http://us.archive.ubuntu.com oneiric-backports/universe Sources Hit http://us.archive.ubuntu.com oneiric-backports/multiverse Sources Hit http://us.archive.ubuntu.com oneiric-backports/main i386 Packages Hit http://us.archive.ubuntu.com oneiric-backports/restricted i386 Packages Hit http://us.archive.ubuntu.com oneiric-backports/universe i386 Packages Hit http://us.archive.ubuntu.com oneiric-backports/multiverse i386 Packages Hit http://us.archive.ubuntu.com oneiric-backports/main TranslationIndex Hit http://us.archive.ubuntu.com oneiric-backports/multiverse TranslationIndex Hit http://us.archive.ubuntu.com oneiric-backports/restricted TranslationIndex Hit http://us.archive.ubuntu.com oneiric-backports/universe TranslationIndex Ign http://extras.ubuntu.com oneiric/main Translation-en_US Ign http://ppa.launchpad.net oneiric/main Translation-en_US Hit http://us.archive.ubuntu.com oneiric-proposed/restricted i386 Packages Hit http://us.archive.ubuntu.com oneiric-proposed/main i386 Packages Hit http://us.archive.ubuntu.com oneiric-proposed/multiverse i386 Packages Hit http://us.archive.ubuntu.com oneiric-proposed/universe i386 Packages Hit http://us.archive.ubuntu.com oneiric-proposed/main TranslationIndex Hit http://us.archive.ubuntu.com oneiric-proposed/multiverse TranslationIndex Hit http://us.archive.ubuntu.com oneiric-proposed/restricted TranslationIndex Hit http://us.archive.ubuntu.com oneiric-proposed/universe TranslationIndex Ign http://archive.canonical.com oneiric/partner Translation-en_US Ign http://extras.ubuntu.com oneiric/main Translation-en Ign http://ppa.launchpad.net oneiric/main Translation-en Ign http://archive.canonical.com oneiric/partner Translation-en Get:1 http://us.archive.ubuntu.com oneiric/main i386 Packages [1,583 kB] Hit http://us.archive.ubuntu.com oneiric/main Translation-en Hit http://us.archive.ubuntu.com oneiric/multiverse Translation-en Hit http://us.archive.ubuntu.com oneiric/restricted Translation-en Hit http://us.archive.ubuntu.com oneiric/universe Translation-en Hit http://us.archive.ubuntu.com oneiric-updates/main Translation-en Hit http://us.archive.ubuntu.com oneiric-updates/multiverse Translation-en Hit http://us.archive.ubuntu.com oneiric-updates/restricted Translation-en Hit http://us.archive.ubuntu.com oneiric-updates/universe Translation-en Hit http://us.archive.ubuntu.com oneiric-backports/main Translation-en Hit http://us.archive.ubuntu.com oneiric-backports/multiverse Translation-en Hit http://us.archive.ubuntu.com oneiric-backports/restricted Translation-en Hit http://us.archive.ubuntu.com oneiric-backports/universe Translation-en Hit http://us.archive.ubuntu.com oneiric-proposed/main Translation-en Hit http://us.archive.ubuntu.com oneiric-proposed/multiverse Translation-en Hit http://us.archive.ubuntu.com oneiric-proposed/restricted Translation-en Hit http://us.archive.ubuntu.com oneiric-proposed/universe Translation-en Err http://us.archive.ubuntu.com oneiric/main i386 Packages 404 Not Found [IP: 91.189.92.179 80] Fetched 1 B in 2s (0 B/s) W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/oneiric/main/binary-i386/Packages 404 Not Found [IP: 91.189.92.179 80] E: Some index files failed to download. They have been ignored, or old ones used instead.

    Read the article

  • Java command not found

    - by TonyMocha
    Follow the instruction to setup the java on ubuntu 11.10 from How to install Java?. Running following command to install: sudo apt-get install openjdk-6-jdk After it success, I type "java", it prompts me with this error: The program 'java' can be found in the following packages: * gcj-4.4-jre-headless * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless

    Read the article

  • python: os.system does not execute shell comand

    - by capoluca
    I need to execute shell command in python program (I have ubuntu). More specifically I want to create graph using graphviz in python script. My code is os.system("dot -Tpng graph.dot -o graph.png") It does not work, but if I just type dot -Tpng graph.dot -o graph.png in command line then everything is fine. Do you know what the problem? Thank you! Edit: Does not work means that nothing happens, there are no errors. Output from dot -v -Tpng graph.dot -o graph.png: dot - graphviz version 2.26.3 (20100126.1600) Activated plugin library: libgvplugin_pango.so.6 Using textlayout: textlayout:cairo Activated plugin library: libgvplugin_dot_layout.so.6 Using layout: dot:dot_layout Using render: cairo:cairo Using device: png:cairo:cairo The plugin configuration file: /usr/lib/graphviz/config6 was successfully loaded. render : cairo dot fig gd map ps svg tk vml vrml xdot layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi textlayout : textlayout device : canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg

    Read the article

  • How do I stop banshee remembering what's been played?

    - by dunderhead
    How can I prevent Banshee from remembering what files I have played? I really hate the way it keeps surprising me by automatically playing, after the current track, the previous file it had played. I really HATE that. I was just listening to a beautiful piece of music and in a nice mood when Banshee, without asking me, immediately afterwards, started playing a really annoying answerphone message from earlier. My solution so far is to manually delete all files in the playlist, but obviously that's not a long term solution. I cannot find an option anywhere that says "Do not remember my history" (Did I mention I hate the way Banshee plays my files without asking me?)

    Read the article

  • Alternate CD image downloaded last year gives different hash

    - by Oxwivi
    I had downloaded the alternate CD images through torrents some time last year, and now that I need it again I decided to check it's md5 hash. $ md5sum ubuntu-11.10-alternate-i386.iso b502888194367acdec4d79203e7a539c ubuntu-11.10-alternate-i386.iso Now the problem is, the reference hashes it's supposed to match to is completely different: 24da873c870d6a3dbfc17390dda52eb8 ubuntu-11.10-alternate-i386.iso Can I safely conclude the image I downloaded is corrupted? Reference UbuntuHashes - Community Ubuntu Documentation

    Read the article

  • Transfer page from internal to external

    - by Theo Gulland
    Afternoon all! Currently I have a website with a list of audio products (essentially a search engine for audio deals). http://www.soundplaza.co.uk Once you go to the details page, you can then press the 'view deal' button to go to providers site e.g. = http://www.soundplaza.co.uk/all-deals/113/bookshelf-speakers/acoustic-energy-1 This jump between two sites is a bit harsh and I would like to show a transition page, to simply ease them into another site and not scare them off. Within this tradition page I will have a simple loading gif and some graphics showing that your transferring. QUESTION: What is the best way to send the details (link, product name etc) to this transfer page, to then wait 5 seconds, to then move on to the desired link... this can in NO WAY damage my SEO, if anything rel="nofollow" would be great if possible. Currently I have seen that you can submit form to the transition page, then you can use php sleep and then php header to transfer... however I am not sure if php header will transfer SEO value tot he provider? Any opinions would be great! Thanks

    Read the article

  • why google ignore my links page?

    - by Yaniv
    I have a website, where im loading all the data via AJAX. since, google doesn't work with AJAX, and the ways to make it AJAX-friendly are a bit odd, i thought that by creating a links page, where it links, from server side, to all the links that im loading in ajax - will solve the problem. but unfortunately, that doesnt seem to work. google webmaster shows that even though my links page discovered, the content of it - the links - are totally ignored. I can only assume that google tend to ignore links in such pages. my question is - WHY?! and furthermore, how to overcome this. Thanks.

    Read the article

  • Touching a CGRect

    - by Coder404
    In my cocos2d app I am trying to determine when a CCSprite is touched Here is what I have: -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{ NSMutableArray *targetsToDelete = [[NSMutableArray alloc] init]; for (CCSprite *target in _targets) { CGRect targetRect = CGRectMake(target.position.x - (target.contentSize.width/2), target.position.y - (target.contentSize.height/2), 27, 40); CGPoint touchLocation = [self convertTouchToNodeSpace:touch]; if (CGRectContainsPoint(targetRect, touchLocation)) { NSLog(@"Moo cheese!"); } } return YES; } For some reason it does not work. Can someone help me?

    Read the article

  • Matrices: Arrays or separate member variables?

    - by bjz
    I'm teaching myself 3D maths and in the process building my own rudimentary engine (of sorts). I was wondering what would be the best way to structure my matrix class. There are a few options: Separate member variables: struct Mat4 { float m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44; // methods } A multi-dimensional array: struct Mat4 { float[4][4] m; // methods } An array of vectors struct Mat4 { Vec4[4] m; // methods } I'm guessing there would be positives and negatives to each. From 3D Math Primer for Graphics and Game Development, 2nd Edition p.155: Matrices use 1-based indices, so the first row and column are numbered 1. For example, a12 (read “a one two,” not “a twelve”) is the element in the first row, second column. Notice that this is different from programming languages such as C++ and Java, which use 0-based array indices. A matrix does not have a column 0 or row 0. This difference in indexing can cause some confusion if matrices are stored using an actual array data type. For this reason, it’s common for classes that store small, fixed size matrices of the type used for geometric purposes to give each element its own named member variable, such as float a11, instead of using the language’s native array support with something like float elem[3][3]. So that's one vote for method one. Is this really the accepted way to do things? It seems rather unwieldy if the only benefit would be sticking with the conventional math notation.

    Read the article

  • Falling CCSprites

    - by Coder404
    Im trying to make ccsprites fall from the top of the screen. Im planning to use a touch delegate to determine when they fall. How could I make CCSprites fall from the screen in a way like this: -(void)addTarget { Monster *target = nil; if ((arc4random() % 2) == 0) { target = [WeakAndFastMonster monster]; } else { target = [StrongAndSlowMonster monster]; } // Determine where to spawn the target along the Y axis CGSize winSize = [[CCDirector sharedDirector] winSize]; int minY = target.contentSize.height/2; int maxY = winSize.height - target.contentSize.height/2; int rangeY = maxY - minY; int actualY = (arc4random() % rangeY) + minY; // Create the target slightly off-screen along the right edge, // and along a random position along the Y axis as calculated above target.position = ccp(winSize.width + (target.contentSize.width/2), actualY); [self addChild:target z:1]; // Determine speed of the target int minDuration = target.minMoveDuration; //2.0; int maxDuration = target.maxMoveDuration; //4.0; int rangeDuration = maxDuration - minDuration; int actualDuration = (arc4random() % rangeDuration) + minDuration; // Create the actions id actionMove = [CCMoveTo actionWithDuration:actualDuration position:ccp(-target.contentSize.width/2, actualY)]; id actionMoveDone = [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)]; [target runAction:[CCSequence actions:actionMove, actionMoveDone, nil]]; // Add to targets array target.tag = 1; [_targets addObject:target]; } This code makes CCSprites move from the right side of the screen to the left. How could I change this to make the CCSprites to move from the top of the screen to the bottom?

    Read the article

  • Is the new windows 8 sdk usable with visual c++ express 2010 on windows 7?

    - by JohnB
    This is inspired by and related to Is the June 2010 DX SDK really the latest? asked recently but it's a different question. I won't likely be purchasing the full visual studio 2012 for C++, I intend to use the free visual c++ express 2012 that targets desktop applications when it is released so for now I'm using visual c++ express 2010 running on windows 7. The latest directx11 sdk is the one included in the windows 8 SDK now, it's not a separate release any more. So my question is, can I use the windows 8 SDK to build directx11 programs that work on windows 7 using visual studio express 2010 running on windows 7. Or do I need to stick to the final DirectX SDK release for now?

    Read the article

  • Drawing map tiles for iPhone game

    - by user17778
    I'm working on a turn-based strategy game for the iPhone that has a hexagon-grid based map in it. I'm in the process of drawing up the actual tiles for the different landscapes (i.e. forest, grassland, etc.) and was wondering what program to draw the tile images in. I would assume Adobe Illustrator since a vector-based image may allow for smooth images even when the user is zoomed in really close. Is this right? Thanks!

    Read the article

  • How do I efficiently code both the client and server at the same time?

    - by liamzebedee
    I'm coding my game using a client-server model. When playing on singleplayer, the game starts a local server, and interacts with it just like a remote server (multiplayer). I have done this to avoid coding separate singleplayer and multiplayer code. I have just started coding and have encountered a major problem. Currently I'm developing the game in Eclipse, having all the game classes organized into packages. Then, in my server code, I just use all the classes in the client packages. The problem is, these client classes have variables that are specific to rendering, which obviously wouldn't be performed on a server. Should I create modified versions of the client classes to use in the server? Or should I just modify the client classes with a boolean, to indicate if its the client/server using it. Are there any other options I have? I just had a thought about maybe using the server class as the core class, then extending it with rendering stuff?

    Read the article

  • RemoteWebDriver doesn't work with xpath

    - by questions
    I'm trying to use RemoteWebDriver with xpath locators on google.com, this is the log from node running firefox. It receives all those commands but doesn't executes them. I dont see any activity with browser, other than opening google homepage. 14:05:05.671 INFO - Executing: [get: http://google.com] at URL: /session/1341695 049401/url) 14:05:06.260 INFO - Done: /session/1341695049401/url 14:05:06.301 INFO - Executing: [find element: By.xpath: //*[@id="gbqfqw"]] at UR L: /session/1341695049401/element) 14:05:06.453 INFO - Done: /session/1341695049401/element 14:05:06.495 INFO - Executing: [send keys: 0 org.openqa.selenium.support.events. EventFiringWebDriver$EventFiringWebElement@74d5f412, [StackOverflow]] at URL: /se ssion/1341695049401/element/0/value) 14:05:06.796 INFO - Done: /session/1341695049401/element/0/value 14:05:06.822 INFO - Executing: [find element: By.xpath: //*[@id="gbqfb"]] at URL : /session/1341695049401/element) 14:05:06.935 INFO - Done: /session/1341695049401/element 14:05:06.987 INFO - Executing: [click: 1 org.openqa.selenium.support.events.Even tFiringWebDriver$EventFiringWebElement@7b64218d] at URL: /session/1341695049401/ element/1/click) 14:05:09.627 INFO - Executing: org.openqa.selenium.remote.server.handler.Status@ 6349a3ca at URL: /status) 14:05:09.627 INFO - Done: /status I tried with By.name(q) and it works.

    Read the article

  • LINQ to SQL - database relationships won't update after submit

    - by Quantic Programming
    I have a Database with the tables Users and Uploads. The important columns are: Users -> UserID Uploads -> UploadID, UserID The primary key in the relationship is Users -> UserID and the foreign key is Uploads -> UserID. In LINQ to SQL, I do the following operations: Retrieve files var upload = new Upload(); upload.UserID = user.UserID; upload.UploadID = XXX; db.Uploads.InsertOnSubmit(upload) db.SubmitChanges(); If I do that and rerun the application (and the db object is re-built, of course) - if do something like this: foreach(var upload in user.Uploads) I get all the uploads with that user's ID. (like added in the previous example) The problem is, that my application, after adding an upload an submitting changes, doesn't update the user.Uploads collection. i.e - I don't get the newly added uploads. The user object is stored in the Session object. At first, I though that the LINQ to SQL Framework doesn't update the reference of the object, therefore I should simply "reset" the user object from a new SQL request. I mean this: Session["user"] = db.Users.Where(u => u.UserID == user.UserID).SingleOrDefault(); (Where user is the previous user) But it didn't help. Please note: After rerunning the application, user.Uploads does have the new upload! Did anyone experience this type of problem, or is it normal behavior? I am a newbie to this framework. I would gladly take any advice. Thank you!

    Read the article

  • Yii, Generate unquie ids one each tr element of CGridView

    - by Snow_Mac
    I have a CDbActiveRecord setup and I have a instance of the CGridView class setup as a widget. Basically my end game is I need a table, but each row to contain the primary key of the row associated with the Active Record. Such as: <tr id="123"> <td> Column value 1 </td> <td> Col 2 </td> <td> Col 3 </td> </tr> That's the specific of the row that I'm looking for. Here's the code I've got so far to produce a table. (The json variable is set because this is inside a controller and the widget is returned as json.) // get the content id for the version list $contentID_v = Yii::app()->request->getParam("id"); // setup the criteria to fetch related items $versionCdbCriteria = new CDbCriteria; $versionCdbCriteria->compare("contentID",$contentID_v); // setting up the active data provider for the version $vActiveDP = new CActiveDataProvider("FactsheetcontentVersion", array( "criteria" => $versionCdbCriteria, 'pagination' => array('PageSize' => $this->paginationSize), 'keyAttribute'=>'vID', )); $json_data .= $this->widget('zii.widgets.grid.CGridView', array( 'dataProvider' => $vActiveDP, 'columns' => array( 'title', 'created', 'createdBy' ), 'showTableOnEmpty' => 'false', ),true); This is what it produces for my active record. <div class="grid-view" id="yw0"> <div class="summary">Displaying 1-1 of 1 result(s).</div> <table class="items"><thead> <tr><th id="yw0_c0">Factsheettitle</th> <th id="yw0_c1"><a href="jq/work/admin/index.php?r=factsheetManager/Editor &amp;id=25601&amp;getV=true&amp;_=1341694154760&amp;FactsheetcontentVersion_sort=created">Created</a> </th> <th id="yw0_c2"><a href="jq/work/admin/index.php?r=factsheetManager/ Editor&amp;id=25601&amp;getV=true&amp;_=1341694154760&amp;FactsheetcontentVersion_sort=createdBy">Created By</a> </th> </tr></thead> <tbody><tr class="odd"><td>Distribution</td><td>0000-00-00 00:00:00</td><td>NULL</td></tr></tbody> </table> <div title="jq/work/admin/index.php?r=factsheetManager/Editor&amp;id=12&amp;id=25601&amp;getV=true&amp;_=1341694154760" style="display:none" class="keys"><span>8</span></div> </div>

    Read the article

  • Preventing a security breach

    - by Wiz
    I am creating a website where you "post", and the form content is saved in a MySql database, and upon loading the page, is retrieved, similar to facebook. I construct all the posts and insert raw html into a template. The thing is, as I was testing, I noticed that I could write javascript or other HTML into the form and submit it, and upon reloading, the html or JS would treated as source code, not a post. I figured that some simple encoding would do the trick, but using is not working. Is there an efficient way to prevent this type of security hole?

    Read the article

  • Rails 3 Processing by */*

    - by Maestro
    I have noticed that in Rails 3.2.2, all actions are being processed with */* format. So the question is: what means */* ? And why it is called by default (every time) ? Because there are two processings for one action: Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200 Processing by MainController#index as HTML Started GET "/" for 127.0.0.1 at 2012-07-07 22:50:22 +0200 Processing by MainController#index as */* I have tried to set: respond_to :html def index @posts = Post.all respond_with(@posts) end But the same problem still exists.

    Read the article

  • error on connecting to the server : socket io is not defined

    - by max
    i know there's been couple of question about the same problem , i've already check them . i have very simple node.js chat app i have a server running on 8000 port and it works fine my client pages are html , they are running on apache and i'm using socket.io to connect them to the server and it works fine on the local host but when i upload the app on the server i keep on getting this error in the firebug io is not defined var socket = io.connect('http://atenak.com:8000/'); or sometimes it doesn't show that but when i try to broadcast message from cliend i get this error : socket is undefined socket.emit('msg', { data: msg , user:'max' }); the only difference is i've changed the localhost with atenak.com ! here is my html code var socket = io.connect('http://atenak.com:8000/'); var user = 'jack'; socket.on('newmsg', function (data) { if(data.user == user ) { $('#container').html(data.data); } }); function brodcast(){ var msg = $('#fild').val(); socket.emit('msg', { data: msg , user:'max' }); } </script> </head> <body> <div id="container"> </div> <input id="fild" type="text"> <input name="" type="button" onClick="brodcast();"> </body> i have included the sockt.io.js and server is running ok which means socket.io is installed on the server here is the live page http://atenak.com/client.html

    Read the article

  • Employing elegance in order to evade importing elephants: a case of excessive dll Imports

    - by user994179
    I am writing C# code that interfaces to a legacy (Feb 2012) C program, using DllImport. It works fine, but I need to call more than 30 different functions, turning my normally impeccable, exquisite code into something of near-elephantine proportions. Surely there must be a way around this? [Warning: those with weak stomachs may want to avert their eyes from what follows]: [DllImport("C:\\Users\\mitt\\Documents\\Visual Studio 2010\\Projects\\mrSolution\\mr\\x64\\Debug\\mrDll.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] public static extern bool mrEngine_initialize( [In, Out, MarshalAs(UnmanagedType.LPStruct)] PLOT_SPEC PlotSpec); [DllImport("C:\\Users\\mitt\\Documents\\Visual Studio 2010\\Projects\\mrSolution\\mr\\x64\\Debug\\mrDll.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] public static extern bool mrEngine_getDataPoint( [In, Out, MarshalAs(UnmanagedType.LPStruct)] PLOT_SPEC PlotSpec);

    Read the article

  • CSS, HTML issue. How would I get the main body of the document to be a certain way down from the top?

    - by orano10000
    Basically I have a navbar and a title, that both have the properties, position: fixed; top: (VALUE I INSERTED); My problem is that obviously when I write the main body of the document the text is underneath the title/navbar. I need to get the text to be underneath the title and navbar, but without it having a fixed position. If any more information with code is needed, just comment saying so. Thanks in advance.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >