Daily Archives

Articles indexed Wednesday October 23 2013

Page 3/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Lubuntu 13.04, kernel still 3.8.0-32-generic

    - by Blue Ice
    My question is very similar to Ubuntu 13.10, kernel still 3.8.0-31-generic. Recently was updating to Saucy and the ethernet cable got unplugged. So I decided to run Software Update again, to reinstall files. It returned that "everything is up to date". But according to these command-line searches, that is incorrect. How can I install Saucy now safely from the command line? sudo apt-get install lubuntu-desktop Reading package lists... Done Building dependency tree Reading state information... Done lubuntu-desktop is already the newest version. The following package was automatically installed and is no longer required: linux-image-extra-3.8.0-19-generic Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. sudo apt-get update Get:1 http://extras.ubuntu.com raring Release.gpg [72 B] Hit http://extras.ubuntu.com raring Release Get:2 http://az-1.hpcloud.mirror.websitedevops.com raring Release.gpg Hit http://extras.ubuntu.com raring/main Sources Hit http://extras.ubuntu.com raring/main i386 Packages Get:3 http://az-1.hpcloud.mirror.websitedevops.com raring-updates Release.gpg Get:4 http://az-1.hpcloud.mirror.websitedevops.com raring-backports Release.gpg Get:5 http://az-1.hpcloud.mirror.websitedevops.com raring-security Release.gpg Get:6 http://az-1.hpcloud.mirror.websitedevops.com raring Release Ign http://extras.ubuntu.com raring/main Translation-en_US Ign http://extras.ubuntu.com raring/main Translation-en Hit http://ppa.launchpad.net raring Release.gpg Ign http://az-1.hpcloud.mirror.websitedevops.com raring Release E: GPG error: http://az-1.hpcloud.mirror.websitedevops.com raring Release: The following signatures were invalid: NODATA 1 NODATA 2 lsb_release -rd Description: Ubuntu 13.04 Release: 13.04 uname -r 3.8.0-32-generic

    Read the article

  • how to change dolphin's select region of a file/folder (in detail view mode)

    - by Daniel
    Since nautilus has removed the dual pane. So I turn to dolphin. I am wondering how to change the default select behavior in detail view mode? Now to select a file/folder, my cursor has to hover over that file/folder and then the left click will take effect, but I much prefer the nautilus way, that is as long as your cursor is in the same row of that file/folder, left click picks up that item. This I think is more robust for user selection, it is faster. Any ideas how to achieve this in dolphin?

    Read the article

  • How to install programs downloaded from the internet?

    - by Rosamunda Rosamunda
    I've downloadad the latest XAMPP file, to install it into Ubuntu 13.04. After downloading the file, I just can run it. I've double click it (and I've tried right click and clicking "open", whith the same result). All the answer I get is this message: Could not display “xampp-linux-1.8.3-1-installer.run”. There is no application installed for “executable” files. Do you want to search for an application to open this file? I've tried searching for an application, with no result... Also, I haven't found any questions related to this issue with the 13.04 Unity version... I've tried this solution, with no result. Please note that this isn't a Xampp question, the same happened to me when I tried to install Skype. UPDATE: I've tried this solution: cd ~/Downloads chmod +x myfile.run sudo sh myfile.run And I've got this error: Syntax error: "(" unexpected What should I do? Thanks!

    Read the article

  • Dates set according to location not chosen language

    - by aspersieman
    I recently installed Ubuntu 13.10 chose my location as Thailand/Bangkok, keyboard layout and language as South African English. Everything seems to be set up correctly except wherever a date is displayed it is displayed in Thai, instead of English. This is most noticeable in the clock indicator (see images included for what I mean). How can I change my dates to English (South African locale if possible).

    Read the article

  • Cannot boot from USB wtih ubuntu 13.10

    - by arunkant
    I downloaded ubuntu 13.10 amd64 iso and used all of following methods to make a install media. UNetBootin Universal USB installer (from windows) But I cannot boot from USB pen drive. Some time it just drop me in grub menu of previously installed ubuntu 13.04. Sometime it show a message "Could not open //fallback.efi: 14 ..." for a moment and then just stays there(blank screen). How to boot from USB pen drive?

    Read the article

  • Installed LibreOffice 4 with ppa, how do I remove it and go back to LibreOffice 3?

    - by MMA
    EDIT This question is not at all a duplicate of How to downgrade from LibreOffice 4.0 to 3.6? The above mentioned question talks about downgrading from a specific version of LibreOffice, namely from 4.0 to 3.6. The solutions mentioned are not the ones I am looking for. They will work but I wanted a general solution without using PPA or downloading .deb files for from a higher version to a lower version. The above solutions suggest either downloading .deb files for LibreOffice 3.6 or adding repository for it. Furthermore, some of the answers put out-of-proportion~(applicable for the solution, however) stress on use of synaptic, not general command-line-solution. That made me wonder, at this very moment, if I take a fresh computer, and install Ubuntu 12.04, LibreOffice installation will work without a hitch. Then why I can not install LibreOffice in my 12.04 machine today from simple command line? This answer to my question, clarified everything. I need to use ppa-purge so that this resets all packages from a PPA to the standard versions released for my distribution. Basically it is like a way to restore my system back to the way it was before my installed packages from a PPA. This article further elaborates the idea. The above mentioned answer worked perfectly for me. Actually, this was an education for me since it taught me how do downgrade a package that was added via PPA. I had upgraded from LibreOffice 3 to LibreOffice 4 using the PPA. Now since I found that LibreOffice 4 has some issues, including handling my native language, I want to move back to LibreOffice 3. In order to accomplish this, I removed the LibreOffice config directory from my home and then purged LibreOffice from my machine. sudo apt-get purge libreoffice-* Then I removed the relevant PPA's using the sudo apt-add-repository --remove command. And then ran sudo apt-get update. Now, when I try to install LibreOffice using the command sudo apt-get install libreoffice I get an avalanche of output about unmet dependencies, something like, The following packages have unmet dependencies: libreoffice : Depends: libreoffice-core (= 1:3.5.7-0ubuntu4) but it is not going to be installed (snipped) If I dig the issue further, by using the command, sudo apt-get install libreoffice-core I get The following packages have unmet dependencies: libreoffice-core : Depends: libreoffice-common (> 1:3.5.7) but it is not going to be installed Depends: libexttextcat0 (>= 2.2-8) but it is not going to be installed Depends: ure (>= 3.5.7~) but it is not going to be installed E: Unable to correct problems, you have held broken packages. Could you please tell me how do I install LibreOffice 3 in my machine? I am using Ubuntu 12.04 LTS.

    Read the article

  • Can't remove GPT data from MBR

    - by user2373121
    I am having difficulty getting the Ubuntu installer (and gparted) to recognize the partitions on my MBR type disk. Other operating systems and disk tools read the disk structure and the files on it fine. I have used fixparts to write a new MBR but the issue persists. I assume the issue stems from the Protective MBR data still present on the disk but I am at a loss as to how to remove it while preserving my NTFS data partition. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. c:\Users\mike\Desktop\fixpartsfixparts 3: FixParts 0.8.8 Loading MBR data from 3: Warning: 0xEE partition doesn't start on sector 1. This can cause problems in some OSes. MBR command (? for help): Running gdisk shows Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. c:\Users\mike\Desktop\fixparts>gdisk 3: GPT fdisk (gdisk) version 0.8.7 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present *************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format! *************************************************************** ************************************************************************ Most versions of Windows cannot boot from a GPT disk, and most varieties prior to Vista cannot read GPT disks. Therefore, you should exit now unless you understand the implications of converting MBR to GPT or creating a new GPT disk layout! ************************************************************************ Are you SURE you want to continue? (Y/N): y Command (? for help): p Disk 3:: 2930277168 sectors, 1.4 TiB Logical sector size: 512 bytes Disk identifier (GUID): BFE92CE8-F93D-4141-82B8-816AD06FB36E Partition table holds up to 128 entries First usable sector is 34, last usable sector is 2930277134 Partitions will be aligned on 2048-sector boundaries Total free space is 163846893 sectors (78.1 GiB) Number Start (sector) End (sector) Size Code Name 1 163842048 2930272255 1.3 TiB 0700 Microsoft basic data Command (? for help): r Recovery/transformation command (? for help): o Disk size is 2930277168 sectors (1.4 TiB) MBR disk identifier: 0x00000000 MBR partitions: Number Boot Start Sector End Sector Status Code 1 1 2930277167 primary 0xEE Recovery/transformation command (? for help): q

    Read the article

  • Are all "Important security updates", updates to already installed packages?

    - by Omnicomment
    I'm running 12.04, and I've never downloaded any drivers for the installation of any peripheral devices. Yet, I noticed a fair few "Important security updates" involving drivers/utilities for HP devices/software. I understand if the default installation of Ubuntu came with a set of drivers for these devices - and the update manager, having noticed that they live on my system, went and found newer versions, but still - given I don't use any devices - I'm either forced to download an irrelevant update, sift through the updates to check applicability, or turn off Update Manager altogether: none of which are desirable. First; the obvious - can someone confirm that the list of "Important security updates" on the server that Update manager connects to, is not actually populated with every patch ever written (i.e. for all Ubuntu packages regardless of whether they're installed or not)? Unlikely, but..

    Read the article

  • 13.10 upgrade dropping wifi [on hold]

    - by Daryl
    Almost a complete newb here. After my last upgrade from 12.04 to 13.10 my wifi now randomly drops. The only way I can get a signal back is a shutdown and restart otherwise it shows no network is even available to connect to. Had no problems until the upgrade. Any help would be appreciated. H/W path Device Class Description ==================================================== system h8-1534 (H2N64AA#ABA) /0 bus 2AC8 /0/0 memory 64KiB BIOS /0/4 processor AMD FX(tm)-6200 Six-Core Processor /0/4/5 memory 288KiB L1 cache /0/4/6 memory 6MiB L2 cache /0/4/7 memory 8MiB L3 cache /0/d memory 10GiB System Memory /0/d/0 memory DIMM Synchronous [empty] /0/d/1 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/d/2 memory 2GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/d/3 memory 4GiB DIMM DDR3 Synchronous 1600 MHz (0.6 ns) /0/100 bridge RD890 PCI to PCI bridge (external gfx0 port B) /0/100/0.2 generic RD990 I/O Memory Management Unit (IOMMU) /0/100/2 bridge RD890 PCI to PCI bridge (PCI express gpp port B) /0/100/2/0 display Turks PRO [Radeon HD 7570] /0/100/2/0.1 multimedia Turks/Whistler HDMI Audio [Radeon HD 6000 Series] /0/100/5 bridge RD890 PCI to PCI bridge (PCI express gpp port E) /0/100/5/0 bus TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller /0/100/11 storage SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] /0/100/12 bus SB7x0/SB8x0/SB9x0 USB OHCI0 Controller /0/100/12.2 bus SB7x0/SB8x0/SB9x0 USB EHCI Controller /0/100/13 bus SB7x0/SB8x0/SB9x0 USB OHCI0 Controller /0/100/13.2 bus SB7x0/SB8x0/SB9x0 USB EHCI Controller /0/100/14 bus SBx00 SMBus Controller /0/100/14.2 multimedia SBx00 Azalia (Intel HDA) /0/100/14.3 bridge SB7x0/SB8x0/SB9x0 LPC host controller /0/100/14.4 bridge SBx00 PCI to PCI Bridge /0/100/14.5 bus SB7x0/SB8x0/SB9x0 USB OHCI2 Controller /0/100/15 bridge SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) /0/100/15.1 bridge SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) /0/100/15.2 bridge SB900 PCI to PCI bridge (PCIE port 2) /0/100/15.2/0 wlan0 network RT3290 Wireless 802.11n 1T/1R PCIe /0/100/15.2/0.1 generic RT3290 Bluetooth /0/100/15.3 bridge SB900 PCI to PCI bridge (PCIE port 3) /0/100/15.3/0 eth0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller /0/100/16 bus SB7x0/SB8x0/SB9x0 USB OHCI0 Controller /0/100/16.2 bus SB7x0/SB8x0/SB9x0 USB EHCI Controller /0/101 bridge Family 15h Processor Function 0 /0/102 bridge Family 15h Processor Function 1 /0/103 bridge Family 15h Processor Function 2 /0/104 bridge Family 15h Processor Function 3 /0/105 bridge Family 15h Processor Function 4 /0/106 bridge Family 15h Processor Function 5 /0/1 scsi0 storage /0/1/0.0.0 /dev/sda disk 1TB WDC WD1002FAEX-0 /0/1/0.0.0/1 volume 189MiB Windows FAT volume /0/1/0.0.0/2 /dev/sda2 volume 244MiB data partition /0/1/0.0.0/3 /dev/sda3 volume 931GiB LVM Physical Volume /0/2 scsi2 storage /0/2/0.0.0 /dev/cdrom disk DVD A DH16ACSHR /0/3 scsi6 storage /0/3/0.0.0 /dev/sdb disk SCSI Disk /0/3/0.0.1 /dev/sdc disk SCSI Disk /0/3/0.0.2 /dev/sdd disk SCSI Disk /0/3/0.0.3 /dev/sde disk MS/MS-Pro /0/3/0.0.3/0 /dev/sde disk /1 power Standard Efficiency I apologize for my newbness. I hope this is enough info for the hardware. Thanks Bruno for pointing out I needed to add more info. If I am lacking anything else please let me know and I'll post it.

    Read the article

  • ERROR running Bumblebee on 13.10

    - by paul
    I'm trying to get Bumblebee working again after an upgrade to Saucy. Running software with Optirun gives the following output: optirun nvidia-settings [ 45.697126] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load /usr/lib/xorg/modules/libglamoregl.so: /usr/lib/xorg/modules/libglamoregl.so: undefined symbol: _glapi_tls_Context [ 45.697179] [ERROR]Aborting because fallback start is disabled. Does anyone know how to fix this? Thanks! :)

    Read the article

  • Ubuntu 13.04 to 13.10: Filesystem check or mount failed

    - by SamHuckaby
    I attempted to upgrade from Ubuntu 13.04 to 13.10 today, and mid upgrade the system started flaking out, and eventually locked up entirely. I was forced to restart the computer, and am now unable to get the computer to boot up at all. When I boot currently, it takes me to the GRUB menu, and I can choose to boot normally, or boot in an older version. I have tried several things, which I list below, but no matter what, when I try to finish booting into Ubuntu, I receive the following error: Filesystem check or mount failed. A maintenance shell will now be started. CONTROL-D will terminate this shell and continue booting after re-trying filesystems. Any further errors will be ignored root@ubuntu-computername:~# I have fun fsck -f and everything appears correct, no errors are reported. and it passes all 5 checks. If I run fdisk -l then I get the following information: Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 4096 bytes / 4096 bytes Disk identifier: 0x00010824 Device Boot Start End Blocks Id System /dev/sda1 * 2048 608456703 304227328 83 Linux /dev/sda2 608458750 625141759 8341505 5 Extended Partition 2 does not start on physical sector boundary. /dev/sda5 608458752 625141759 8341504 82 Linux swap / Solaris Disk /dev/sdb: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x0fb4b7e8 Device Boot Start End Blocks Id System /dev/sdb1 8192 625139711 312565760 7 HPFS/NTFS/exFAT I am considering just installing a new OS on the other disk, that currently has nothing on it, and then just attempting to scrape my data off the old disk (thankfully I didn't encrypt the files). Really my question is this: Can I salvage this Ubuntu install, or should I give up and just reinstall?

    Read the article

  • Data recovery on a Samsung SV1203N HDD

    - by Jim Conace
    Let me start by saying that I am a beginner in Ubuntu, but pretty knowledgeable with Windows. I am having a strange problem trying to recover data from a Samsung SV1203N HDD (120 GiB). I have tried numerous things in both Windows 7 and Ubuntu 12.04 LTS (on a flash drive, an external HDD and a Live CD). This drive has some very important data on it and I am praying some of you Ubuntu geeks can help me get it back. Here's my problem. The HDD is clicking while I am booting, but it stops when I get into Ubuntu or Windows. It refuses to be detected in the bios, so I cant perform any tests on it. I have tried numerous things in both Windows (repair CD, Jumpers, etc.) and Ubuntu (Boot-Fix, GParted, Testdisk, Photorec, forcing a mount, etc.). But it all seems to lead me back to the fact that the drive is not being recognized in the BIOS. I've even tried chilling the drive in the fridge, which worked well for another drive I work on, and I recovered all of the data in Ubuntu flawlessly. I am assuming that since the drive stops clicking when I get into the OS' that there is hope for recovery. I am going to try an IDE/SATA to USB cable, and replacing the Logic Board, but I want to exhaust all other possibilities before I do that. Any help would be greatly appreciated Bye

    Read the article

  • Is it possible to print to a Brother MFC-490CW that is conected to a LAN

    - by Johan Poelsma
    I have a Brother MFC-490CW printer that is connected to my LAN (wireless) and on which I can print with fine from Windows. From Ubuntu however, it does not seem to be possible. I downloaded and installed cups and lpd drivers from the Brother site and installed them. I get a Brother printer that says it is connected via USB. If I search for a network printer, my printer is shown. If I select it and select the correct driver, I can submit test pages. These pages are however not printed. What could be wrong. Should it really be that much harder then it is on Windows?

    Read the article

  • Xmonad Xsession

    - by AntLord
    My user level: noob-ish, so please bear with me I'm running 12.04 LTS. I have installed and, to some extent, configured xmonad 0.10 The "automagically" created xsession for it works fine as it is, but when I login it won't run a startup script I've created and "call from" /usr/share/xsessions/xmonad.desktop, if that's right. I've read pretty much all I could find about .xinitrc and .xsession, I tried that and it somehow messed up the other "sessions", if I'm explaining myself correctly. Had to $unity --reset to have the "main session" working again. Anyway, my question is, how do I autostart xmobar and set a desktop background after login into xmonad's default Xsession? I tried this script, start-xmonad: #!/bin/bash # #I only used one of the following each time I tried, none worked #Also, do I really need the '&'? I know what they're for, but... nitrogen --restore & feh --bg-scale ~/Pictures/picture.png & #Then I want xmobar to start, again do I need the '&'? I know it's for it to run #in the background, but I tried removing the '&' and xmonad still launched xmobar & #Finally, the only thing that seems to work in this script exec xmonad Yes, I made sure I did chomd +x ~/start-xmonad The xmonad.desktop is [Desktop Entry] Name=XMonad Encoding=UTF-8 Comment=Lightweight tiling window manager Exec=/home/myusername/start-xmonad Icon=custom_xmonad_badge.png Type=XSession So, this didn't work, now I'm here. Please help :s thanks

    Read the article

  • Software Center - Items cannot be installed or removed until package catalog is repaired"

    - by Stephanie
    I tried to install back in time and now I keep getting the message 'items cannot be installed or removed until package catalog is repaired. I have tried sudo apt-get install -f then get Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: backintime-gnome The following packages will be upgraded: backintime-gnome 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 1 not fully installed or removed. Need to get 0 B/39.4 kB of archives. After this operation, 24.6 kB of additional disk space will be used. Do you want to continue [Y/n]? when I click Y, I get the following message dpkg: dependency problems prevent configuration of backintime-gnome: backintime-gnome depends on backintime-common (= 1.0.7); however: Version of backintime-common on system is 1.0.8-1. dpkg: error processing backintime-gnome (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: backintime-gnome E: Sub-process /usr/bin/dpkg returned an error code (1) stephanie@stephanie-ThinkPad-T61:~$ sudo dpkg --configure -a dpkg: dependency problems prevent configuration of backintime-gnome: backintime-gnome depends on backintime-common (= 1.0.7); however: Version of backintime-common on system is 1.0.8-1. dpkg: error processing backintime-gnome (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: backintime-gnome

    Read the article

  • Facebook link to facebook.com/company-page doesn't work

    - by Teo
    For the last 2 days I'm trying to find the reason why my previous setup, which was a link to my websites Facebook pages doesn't work anymore. I assume that I mistakenly changed something in the Facebook developer area, but I can't remember what it was. The bottom linked my previously to the Facebook.com/company-page, now the same Bottom links me just to Facebook.com. I guess I saw some redirect in the tab, but I'm not sure since it's too fast changing to Facebook.com. The original link in the footer is correct : <a href="http://facebook.com/company-page " target="_blank" class="facebook_ico"></a>. Any ideas?

    Read the article

  • Is there a colloquial term for the web dev equivalent of "Script Kiddies"? [on hold]

    - by Darkcat Studios
    I recently came across a couple of lets say "young people" who were convinced that they were "Web Developers", despite the fact that they were only able to configure a wordpress template, and not even able to edit images properly. So this got me thinking, "back in the day" kids who thought they were hackers but just ran other peoples scripts they had found, were known as Script Kiddies. Do we have a term for these yet?

    Read the article

  • Is this the most effect simple way to display a moving image? SDL2

    - by user36324
    I've looked around for tutorials on SDL2, but there isnt many so I am curious i was messing around and is this an effective way to move an image. One problem is that it drags along the image to where it moves. #include "SDL.h" #include "SDL_image.h" int main(int argc, char* argv[]) { bool exit = false; SDL_Init(SDL_INIT_EVERYTHING); SDL_Window *win = SDL_CreateWindow("Hello World!", 100, 100, 640, 480, SDL_WINDOW_SHOWN); SDL_Renderer *ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); SDL_Surface *png = IMG_Load("character.png"); SDL_Rect src; src.x = 0; src.y = 0; src.w = 161; src.h = 159; SDL_Rect dest; dest.x = 50; dest.y = 50; dest.w = 161; dest.h = 159; SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, png); SDL_FreeSurface(png); while(exit==false){ dest.x++; SDL_RenderClear(ren); SDL_RenderCopy(ren, tex, &src, &dest); SDL_RenderPresent(ren); } SDL_Delay(5000); SDL_DestroyTexture(tex); SDL_DestroyRenderer(ren); SDL_DestroyWindow(win); SDL_Quit(); }

    Read the article

  • Saving to a file in C# [on hold]

    - by user36322
    If I use this code: using (StreamWriter streamWriter = new StreamWriter("Content/player.txt", true)) { streamWriter.Write("Hello!"); streamWriter.Close(); } The program will not actually add "Hello!" to the file. However, if I use this code: using (StreamWriter streamWriter = new StreamWriter("C:/Users/Michael/Documents/Visual Studio 2010/Projects/PuzzleGame/PuzzleGame/PuzzleGameContent/player.TXT", true)) { streamWriter.Write("Hello!"); streamWriter.Close(); } The program will work as intended and add "Hello!" to the save file. Is there any way I can do this without hardcoding the path?

    Read the article

  • Nice function for "rolling score up"?

    - by bobobobo
    I'm adding to the player's score, and I'm using a per-frame formula like: int score, displayedScore ;// score is ACTUAL score player has, // displayedScore is what is shown this frame to the player // (the creeping/"rolling" number) float disparity = score - displayedScore ; int d = disparity * .1f ; // add 1/10 of the difference, if( !d ) d = signum( disparity ) ; // last 10 go by 1's score += d ; Where inline int signum( float val ){ if( val > 0 ) return 1 ; else if( val < 0 ) return -1 ; else return 0 ; } So, it kind of works where it makes big changes rapidly, then it creeps in the last few one at a time. But I'm looking for better (or possibly well known?) score-creeping functions. Any one?

    Read the article

  • Changing enum in a different class for screen

    - by user2434321
    I'm trying to make a start menu for my game and my code uses Enum's to moniter the screen state. Now i want to change the screenstate declared in the main class, in my Background class Screen screen = new Screen(); is declared in the Game1 class Background(ref screen); This is in the update method for the Background Class KeyboardState keystate = Keyboard.GetState(); switch (screen) { case Screen.Start: if (isPressed && keystate.IsKeyUp(Keys.Up) && keystate.IsKeyUp(Keys.Down) && keystate.IsKeyUp(Keys.Enter)) { isPressed = false; } if (keystate.IsKeyDown(Keys.Down) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Credits; if (menuState == MenuState.Play) menuState = MenuState.Options; isPressed = true; } if (keystate.IsKeyDown(Keys.Up) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Play; if (menuState == MenuState.Credits) menuState = MenuState.Options; isPressed = true; } switch (menuState) { case MenuState.Play: arrowRect.X = 450; arrowRect.Y = 220; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Play; break; case MenuState.Options: arrowRect.X = 419; arrowRect.Y = 340; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Options; break; case MenuState.Credits: arrowRect.X = 425; arrowRect.Y = 460; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Credits; break; } break; } } For some reason when I play this and I hit the enter button the Background class's screen is changed but the main class's screen isn't how can i change this? EDIT 1* class Background { private Texture2D background; private Rectangle backgroundRect; private Texture2D arrow; private Rectangle arrowRect; private Screen screen; private MenuState menuState; private bool isPressed = false; public Screen getScreenState(ref Screen screen) { this.screen = screen; return this.screen; } public Background(ref Screen screen) { this.screen = screen; } public void Update() { KeyboardState keystate = Keyboard.GetState(); switch (screen) { case Screen.Start: if (isPressed && keystate.IsKeyUp(Keys.Up) && keystate.IsKeyUp(Keys.Down) && keystate.IsKeyUp(Keys.Enter)) { isPressed = false; } if (keystate.IsKeyDown(Keys.Down) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Credits; if (menuState == MenuState.Play) menuState = MenuState.Options; isPressed = true; } if (keystate.IsKeyDown(Keys.Up) && isPressed != true) { if (menuState == MenuState.Options) menuState = MenuState.Play; if (menuState == MenuState.Credits) menuState = MenuState.Options; isPressed = true; } switch (menuState) { case MenuState.Play: arrowRect.X = 450; arrowRect.Y = 220; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Play; break; case MenuState.Options: arrowRect.X = 419; arrowRect.Y = 340; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Options; break; case MenuState.Credits: arrowRect.X = 425; arrowRect.Y = 460; if (keystate.IsKeyDown(Keys.Enter) && isPressed != true) screen = Screen.Credits; break; } break; case Screen.Pause: break; case Screen.Over: break; } } public void LoadStartContent(ContentManager Content, GraphicsDeviceManager graphics) { background = Content.Load<Texture2D>("startBackground"); arrow = Content.Load<Texture2D>("arrow"); backgroundRect = new Rectangle(0, 0, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height); arrowRect = new Rectangle(450, 225, arrow.Width, arrow.Height); screen = Screen.Start; } public void LoadPlayContent(ContentManager Content, GraphicsDeviceManager graphics) { background = Content.Load<Texture2D>("Background"); backgroundRect = new Rectangle(0, 0, graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height); screen = Screen.Play; } public void LoadOverContent(ContentManager Content, GraphicsDeviceManager graphics) { } public void Draw(SpriteBatch spritebatch) { if (screen == Screen.Start) { spritebatch.Draw(background, backgroundRect, Color.White); spritebatch.Draw(arrow, arrowRect, Color.White); } else spritebatch.Draw(background, backgroundRect, Color.White); } } Thats my background class!

    Read the article

  • 3D BSP rendering for maps made in 2d platform style

    - by Dev Joy
    I wish to render a 3D map which is always seen from top, camera is in sky and always looking at earth. Sample of a floor layout: I don't think I need complex structures like BSP trees to render them. I mean I can divide the map in grids and render them like done in 2D platform games. I just want to know if this is a good idea and what may go wrong if I don't choose a BSP tree rendering here. Please also mention is any better known rendering techniques are available for such situations.

    Read the article

  • compiling cocos3d 0.7.2 with Xcode5 error

    - by jimmy
    I tried to compile my cocos3d 0.7.2 project with xcode5. I am already stuck at the first error I get with the line “super.parent = aNode;” in CC3ParametricMeshNodes.m. this line is in the setParent function: -(void) setParent: (CC3Node*) aNode { super.parent = aNode; [self deriveNameFrom: aNode]; if ( !mesh ) self.box = self.parentBoundingBox; } and the error I get is: CC3ParametricMeshNodes.m:246:15: Assignment to readonly property I am sure that there will be other errors after this one is fixed. Is there any topic on common errors that occur while compiling cocos3d 0.7.2 with Xcode5? Thanks

    Read the article

  • converting text to pdf?

    - by Samba Siva
    PdfWriter.GetInstance(document, new FileStream(Server.MapPath("~/") + "pdf/" + "print.pdf", FileMode.Create)); // document.NewPage(); document.Open(); List<IElement> htmlarraylist = iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList( new StringReader(lblArticle.Text), null); for (int k = 0; k < htmlarraylist.Count; k++) { document.Add((IElement)htmlarraylist[k]); } Paragraph mypara = new Paragraph(); document.Add(mypara); here,lblArticle.Text is "Label" control..but I want to .txt page to be converting in to pdf.what can i try?please tell me?

    Read the article

  • Inconsistent email formatting with inline css created using Javamail

    - by user1816183
    Okay, so I have a program that sends an email when it is finished running. I use inline css to format the email. This was working up until yesterday however now I am seeing different formats depending on which email account I view the email in. It coincides with an upgrade from Selenium 2.35.0 to 2.37.0 however I don't think this is my issue since I rolled back to 2.35.0 and it still happens. package tests; import java.util.Properties; import javax.mail.Message; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class TESTTEST { public static void main(String[] args) throws Exception { Properties props = new Properties(); props.put("mail.smtp.host","xxx.xxx.xxx.xxx"); Session session = Session.getInstance(props); String emailFrom="[email protected]"; String emailTo1="[email protected]"; MimeMessage message = new MimeMessage(session); message.setSubject("Testing HTML Email"); message.setFrom(new InternetAddress(emailFrom)); String htmlBody = "<STYLE>body {font-family:sans-serif,arial,helvetica,sans-serif;font-size:9pt;}" +"TABLE {border-collapse:collapse;border:1px solid black;}" +"TH {background-color:grey;color:white;padding:5px;border:1px solid black;font-size:9pt;}" +"TD {padding:5px;border:1px solid black;font-size:9pt;}" +"H3 {font-size:12pt;}" +".PASSED {background-color:#00FF00}" +".FAILED {background-color:#FF0000}" +".SKIPPED {background-color:#DEDEDE}" +".ITALIC {font-style:italic}" +"</STYLE>" + "<TABLE><TR><TD CLASS=PASSED>FAIL</TD><TD STYLE=background-color:#FF0000>FAIL</TD></TR></TABLE>"; message.setContent(htmlBody, "text/html; charset=ISO-8859-1"); message.addRecipient(Message.RecipientType.TO,new InternetAddress(emailTo1)); Transport.send(message,message.getRecipients(Message.RecipientType.TO)); System.out.println(htmlBody); System.out.println("Email Sent"); } } When I view the email in Hotmail/Outlook.com, it looks fine In Gmail In Lotus Notes Anybody able to help?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >