Search Results

Search found 14344 results on 574 pages for 'path'.

Page 274/574 | < Previous Page | 270 271 272 273 274 275 276 277 278 279 280 281  | Next Page >

  • Instantiate proper class based on some input

    - by Adam Backstrom
    I'm attempting to understand how "switch as a code smell" applies when the proper code path is determined by some observable piece of data. My Webapp object sets an internal "host" object based on the hostname of the current request. Each Host subclass corresponds to one possible hostname and application configuration: WwwHost, ApiHost, etc. What is an OOP way for a host subclass to accept responsibility for a specific hostname, and for Webapp to get an instance of the appropriate subclass? Currently, the hostname check and Host instantiation exists within the Webapp object. I could move the test into a static method within the Host subclasses, but I would still need to explicitly list those subclasses in Webapp unless I restructure further. It seems like any solution will require new subclasses to be added to some centralized list.

    Read the article

  • Windows Error After Wubi Install

    - by user106563
    The initial install on my laptop was Windows 7. I installed Wubi on Sunday - the install seemed fine. I was able to log in and use both Ubuntu and Windows. On Monday I started receiving the following error in Windows: windows cannot access the specified device path or file This occurs on every link I click on - essentially rendering Windows unusable. I do not experience the same problem when Windows is started up in safe mode. I have tried numerous virus scans (Malware bytes, Avg, AdAware) and have removed various trojans etc. Windows is still unusable. Ubuntu seems fine so far. My question is, can this error be attributed to the Wubi install?

    Read the article

  • internal error message pops up after each time system is rebooted

    - by Biju
    I had installed ubuntu 12.04 using wubi. But each time i boot the system an internal error message pops up. As show below:- Executable path /usr/share/apport/apport-gpu-error-intel.py Package xserver-xorg-video-intel 2:2.17.0-1ubuntu4 Problem Type crash Apportversion 2.0.1-0ubuntu7 and so on.. I had earlier upgraded to ubuntu 12.04 from ubuntu 11.10. And encountered the same issue. Hence i uninstalled the OS and reinstalled using wubi. I had posted the same query in ubuntu.com/support (Question Number: 195525) But couldnt find a solution. I am using dell inspiron with intel pentium. Need ur help in resolving this issue. thanking u, Biju

    Read the article

  • Store and create game objects at positions along terrain

    - by Alex
    I have a circular character that rolls down terrain like that shown in the picture below. The terrain is created from an array holding 1000 points. The ground is drawn one screen width infront and one screen width behind. So as the character moves, edges are created infront and edges are removed behind. My problem is, I want to create box2d bodies at certain locations along the path and need a way to store these creator methods or objects. I need some way to store a position at which they are created and some pointer to a function to create them, once the character is in range. I guess this would be an array of some sort that is checked each time the ground is updated and then if in range, the function is executed and removed from the array. But I'm not sure if its even possible to store pointers to functions with parameters included... any help is much appreciated!

    Read the article

  • How do we install Unity-2D and dependencies offline?

    - by Takkat
    We have installed 11.04 32-bit on an old machine that has no internet connection and with a graphics card that is not suitable for running Compiz or Unity. Still, we would like to run Unity-2D on this machine. We are aware of answers to this Question. Sadly Keryx will not run on 11.04 32-bit because of unmet dependencies. Building an offline repository is not an option because of limited storage capacity. Is there any convenient other way to find, download, install, and eventually update unity-2 and all dependencies (preferably from an OS independent download path)?

    Read the article

  • apt-get install problem: Errors were encountered while processing: sun-j2sdk1.6

    - by pyeleven
    I have the following problem every time i run apt-get install: for example : installing python-django-south ... Unpacking python-django-south (from .../python-django-south_0.5-2_all.deb) ... Setting up sun-j2sdk1.6 (1.6.0+update22-linux-i586.) ... update-alternatives: error: alternative path /usr/lib/j2sdk1.6-sun/jre/plugin/amd64/ns7/libjavaplugin_oji.so doesn't exist. dpkg: error processing sun-j2sdk1.6 (--configure): subprocess installed post-installation script returned error exit status 2 Setting up python-django-south (0.5-2) ... Processing triggers for python-support ... Errors were encountered while processing: sun-j2sdk1.6 E: Sub-process /usr/bin/dpkg returned an error code (1) What could be the problem? I have 9.10 Ubuntu

    Read the article

  • Sharing samba-folder with root access

    - by Industrial
    Hi everyone, I have a staging server in my network running Ubuntu server 10.10, being my main development area. As I need to access the files in the Apache root from other computers in the network, I have setup samba with the following settings: [www] comment = Apache root www path = /var/www writable = yes force user = root force group = root On the host computer, running Ubuntu 10.10 desktop, I am trying to mount the drive with a bash file looking like below: #!/bin/bash sudo mount -t cifs //192.168.1.5/www /media/www/ -o username=myusername,password=mypassword,rw,iocharset=utf8,file_mode=0777,dir_mode=0777 What happens is that I get mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) thrown in my face whilst trying to execute the mount. I've done exactly the same, with exactly the same smb.conf & mount-bash file on another computer in my network, but this just wont work. What am I doing wrong? I am running out of ideas.

    Read the article

  • JDK 7 In Action - Learn With Java Tutorials and Developer Guides

    - by sowmya
    At JavaOne 2012, Stuart Marks, Mike Duigou, and Joe Darcy gave a presentation about JDK 7 In Action. Learn more about using JDK 7 features with the help of Java Tutorials and JDK 7 Developer Guides. Links to relevant information are provided below. If you are considering moving to JDK 7 from a previous release, the JDK 7 Release Notes and JDK 7 Adoption Guide are great resources. Project Coin Features Improved Literals * Literals section in Primitive Datatypes topic. * Binary Literals * Underscores in Numeric Literals Strings In Switch * Strings In Switch Diamond * Type Inference for Generic Instance Creation * Type Inference and Instantiation of Generic Classes Multi-catch and Precise Throw * Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking * Catch Blocks Try-with-resources * The try-with-resources Statement NIO.2 File System API * File I/O for information on path, files, change notification, and more * Zip File System Provider * Zip File System Provider * Developing a Custom File System Provider Fork Join Framework * Fork/Join - Sowmya

    Read the article

  • How are "Json.org"-like specs graphs called and how can I generate them?

    - by Sebastián Grignoli
    In http://www.json.org Douglas Crockford shows the specs of the JSON format in two interesting ways: In the right side column he lists a text spec that looks like a YACC or LEX listing. In the main body of the homepage, he put several images that gives us a simple way to visually understand the valid sequences that composes a JSON string. Those images look like a description of the path that a finite state automaton would follow when parsing the JSON string. Wich are the names (if any) of that listing format and that kind of graphics? Is there any software that renders a source file containing the specification into that kind of images?

    Read the article

  • Design for future changes or solve the problem at hand

    - by Naveen
    While writing the code or during design do you try to generalize the problem at the first instance itself or try to solve that very specific problem. I am asking this because, trying to generalize the problem tends to complicate the things (which may not be necessary) and on the otherhand it will be very difficult to extend the specific solution if there is a change in the requirement. I guess the solution is to find the middle path which is easier said than done. How do you tackle this type of problem ? If you start generalizing it at what point of time you know that this much of generalization is sufficient ?

    Read the article

  • Wireless xbox360 pad connected with xboxdrv doesn't show in jstest

    - by Kyle Letham
    So Lubuntu 13.04, 3.4.0. I'm trying to use my wireless xbox controller. I've installed xboxdrv. I have to run it with sudo, or I get USBController::USBController(): libusb_open() failed: LIBUSB_ERROR_ACCESS. If I connect the adapter, run the program, and then press the button on the gamepad to connect it, it never really connects - just flashes like it's searching. If I reboot, leaving the controller searching, and run the command again while it's searching after I boot up, the controller connects (the light becomes solid in one corner). Using pkill xboxdrv and then relaunching it doesn't work. Regardless, no matter what I do, the gamepad never shows up in jstest-gtk. sudo xboxdrv --debug gives me: Controller: Microsoft Xbox 360 Wireless Controller (PC) Vendor/Product: 045e:0719 USB Path: 002:005 Wireless Port: 0 Controller Type: Xbox360 (wireless) [DEBUG] XboxdrvMain::run(): creating UInput [DEBUG] XboxdrvMain::run(): creating ControllerSlotConfig [DEBUG] UInput::create_uinput_device(): create device: 65534 [DEBUG] LinuxUinput::LinuxUinput(): Xbox Gamepad (userspace driver) 0:0 Any ideas?

    Read the article

  • Problem with wine

    - by Gernot
    Recently I've installed StarCraft 2 via playonlinux. The installation was absolutly no problem, everything was fine. But if I want to start the game now, it crashes. If I start it on the Terminal I get following error: optirun /usr/share/playonlinux/playonlinux --run "StarCraft II Wings of Liberty" [POL_Wine_SetVersionEnv] Message: Setting wine version path: 1.3.27, amd64 [POL_Wine_SetVersionEnv] Message: "/home/gernot/.PlayOnLinux//wine/linux-amd64/1.3.27" exists [POL_Wine] Message: Running wine-1.3.27 StarCraft II.exe wine: cannot find L"C:\windows\system32\winemenubuilder.exe" rm: Cannot remove »*“ : Can't find directory or file. Has anybody an idea what to do?

    Read the article

  • tomcat serving static content with directory listings

    - by milan
    I have tomcat 7 configured to serve static contents from a directory: <Host appBase="webapps" name="localhost"> ... <Context docBase="/var/projectA/static" path="/projectA/" /> </Host> This is available at localhost:8080/projectA/. Is it possible to somehow enable directory listings for this context? I know it's possible to do this with apache in front of tomcat, but that's not what I'm looking for. p.s. there's no 'tomcat' tag and my rep doesn't allow me to create tags...

    Read the article

  • How do I select DWM or fluxbox to start on login?

    - by axe
    I am trying to setup DWM in Ubuntu 10.10. The package is successfully built - and now I am trying to get it up and running. I created the dwm.desktop file with the proper text and the path to the dwm exec is correct. On login screen, I can see dwm as a alternate session : but if I select it, still gnome starts. I even tried another window manager (fluxbox) - same problem. I can see and select it in the login screen, but gnome starts up. Trying gconftool-2 -s /desktop/gnome/session/required_components/windowmanager dwm --type string also does nothing. Killing the windows manager just restarts it - even if I chvt first. Also, don't see the xinit daemon running. Any ideas ? This setup was trivial in Debian, and older versions of Ubuntu. What changed ? I am guessing gnome integration is to blame - but am clueless as of now.

    Read the article

  • Why do I get an exception when playing multiple sound instances?

    - by Boreal
    Right now, I'm adding a rudimentary sound engine to my game. So far, I am able to load in a WAV file and play it once, then free up the memory when I close the game. However, the game crashes with a nice ArgumentOutOfBoundsException when I try to play another sound instance. Specified argument was out of the range of valid values. Parameter name: readLength I'm following this tutorial pretty much exactly, but I still keep getting the aforementioned error. Here's my sound-related code. /// <summary> /// Manages all sound instances. /// </summary> public static class Audio { static XAudio2 device; static MasteringVoice master; static List<SoundInstance> instances; /// <summary> /// The XAudio2 device. /// </summary> internal static XAudio2 Device { get { return device; } } /// <summary> /// Initializes the audio device and master track. /// </summary> internal static void Initialize() { device = new XAudio2(); master = new MasteringVoice(device); instances = new List<SoundInstance>(); } /// <summary> /// Releases all XA2 resources. /// </summary> internal static void Shutdown() { foreach(SoundInstance i in instances) i.Dispose(); master.Dispose(); device.Dispose(); } /// <summary> /// Registers a sound instance with the system. /// </summary> /// <param name="instance">Sound instance</param> internal static void AddInstance(SoundInstance instance) { instances.Add(instance); } /// <summary> /// Disposes any sound instance that has stopped playing. /// </summary> internal static void Update() { List<SoundInstance> temp = new List<SoundInstance>(instances); foreach(SoundInstance i in temp) if(!i.Playing) { i.Dispose(); instances.Remove(i); } } } /// <summary> /// Loads sounds from various files. /// </summary> internal class SoundLoader { /// <summary> /// Loads a .wav sound file. /// </summary> /// <param name="format">The decoded format will be sent here</param> /// <param name="buffer">The data will be sent here</param> /// <param name="soundName">The path to the WAV file</param> internal static void LoadWAV(out WaveFormat format, out AudioBuffer buffer, string soundName) { WaveStream wave = new WaveStream(soundName); format = wave.Format; buffer = new AudioBuffer(); buffer.AudioData = wave; buffer.AudioBytes = (int)wave.Length; buffer.Flags = BufferFlags.EndOfStream; } } /// <summary> /// Manages the data for a single sound. /// </summary> public class Sound : IAsset { WaveFormat format; AudioBuffer buffer; /// <summary> /// Loads a sound from a file. /// </summary> /// <param name="soundName">The path to the sound file</param> /// <returns>Whether the sound loaded successfully</returns> public bool Load(string soundName) { if(soundName.EndsWith(".wav")) SoundLoader.LoadWAV(out format, out buffer, soundName); else return false; return true; } /// <summary> /// Plays the sound. /// </summary> public void Play() { Audio.AddInstance(new SoundInstance(format, buffer)); } /// <summary> /// Unloads the sound from memory. /// </summary> public void Unload() { buffer.Dispose(); } } /// <summary> /// Manages a single sound instance. /// </summary> public class SoundInstance { SourceVoice source; bool playing; /// <summary> /// Whether the sound is currently playing. /// </summary> public bool Playing { get { return playing; } } /// <summary> /// Starts a new instance of a sound. /// </summary> /// <param name="format">Format of the sound</param> /// <param name="buffer">Buffer holding sound data</param> internal SoundInstance(WaveFormat format, AudioBuffer buffer) { source = new SourceVoice(Audio.Device, format); source.BufferEnd += (s, e) => playing = false; source.Start(); source.SubmitSourceBuffer(buffer); // THIS IS WHERE THE EXCEPTION IS THROWN playing = true; } /// <summary> /// Releases memory used by the instance. /// </summary> internal void Dispose() { source.Dispose(); } } The exception occurs on line 156 when I am playing the sound: source.SubmitSourceBuffer(buffer);

    Read the article

  • How to stop getting too focused on a train of thought when programming?

    - by LDM91
    I often find myself getting too focused on a train of thought when programming, which results in me having what I guess could be described as "tunnel vision". As a result of this I miss important details/clues, which means I waste a fair amount of time before finally deciding the path I'm taking to solve the task is wrong. Afterwards, I take a step back which almost always results in me discovering what I've missed in a lot less time.. It's becoming really frustrating as it feels like I'm wasting a lot of time and effort, so I was wondering if anyone else had experienced similar issues, and had some suggestions to stop going down dead ends and programming "blindly" as it were!

    Read the article

  • How to generate Visa checkout token? [on hold]

    - by Muhammad Junaid
    I am on process of creating a Visa checkout plugin but stuck in generating token Here are the token requirment: Format: Alphanumeric; maximum 100 characters in the form of token: x:UNIX_UTC_Timestamp:SHA256_hash, where UNIX_UTC_Timestamp is a UNIX Epoch timestamp SHA256_hash is an SHA256 hash of the following unseparated items: Your shared secret Timestamp from the transaction; exactly the same as UNIX_UTC_Timestamp Resource path (API name). This HTTPS request's query string Note: The query string includes one or more parameters in name-value pair format, whose names are separated from values by equal signs (=); an empty value may be omitted but the name and equal sign must be present. The initial question mark (?) is not included. Note: All parameters must be present. The parameters must be in lexicographic sort order (UTF-8, uppercase hex characters) with parameters separated from each other by an ampersand (&). Note: The query string must be URL encoded (excepting the following characters, per RFC 3986: hyp You can find on Google "visa checkout developer updating 1 px image"

    Read the article

  • What are the Consequences for using Relative Location Headers?

    - by Alan Storm
    According to the spec, Location headers used in a redirect require a server name HTTP/1.1 301 Moved Permanently ... Location: http://example.com/foo/baz/bar However, in 2012, most web browsers will recognize a relative path and redirect you to the new location using the original server name HTTP/1.1 301 Moved Permanently ... Location: /foo/baz/bar Are there any negative/surprising consequences to using the relative URLs in the Location headers? My particular concern is how Google/search-engines will interpret this, but if there's anything else I'm not thinking about I'd love to hear it.

    Read the article

  • What do you do when one thinks the code isn't complicated enough?

    - by Chris
    After six months of development on a project, our stakeholders have had a "gut check" and have decided that the path that we've been walking (a custom designed application framework and data access layer) is holding us (the developers) back from quickly developing the features they would like to see. After several days of debate management and the development team have decided to scrap the current incarnation and start over using ASP.net MVC, with Entity Framework as the bases of the a 'quick and dirty', lets just get it done project. In days following, our senior developer who has never worked with MVC or Entity Framework has finally gotten into a sample project and done some work. His take on ASP.net MVC, "this is not software engineering". So my question is this; what do you do, when one doesn't think the code is complicated enough?

    Read the article

  • Why don't 8.04 panel launchers work on 10.04

    - by Android Eve
    I copied my panel launchers verbatim from 8.04 to 10.04, residing in both systems in the same path: $HOME/.gnome2/panel2.d/default/launchers However, for some reason, they are not visible on 10.04's GNOME panel. Why? In my attempts to troubleshoot the problem I: Verified that copied 8.04 launchers have same permissions as manually created 10.04 launchers (-rwxr-xr-x). Added the first line as: #!/usr/bin/env xdg-open Logged off, then logged on. Rebooted. None of the above helped. So the question remains: Why? And how do I make them work?

    Read the article

  • Is there a recommended order to take the Oracle Java EE certification exams?

    - by Karl
    I recently passed the Oracle Certified Professional, Java SE 6 Programmer examination. Now, my boss would like me to take "the next step" to broaden my competence. I tried to explain that there is no equivalent Java EE 6 Programmer examination, but a number of different exams, such as Web Services, Web Components, and Enterprise JavaBeans. Is there a recommended path to follow for the various Oracle certifications in the Enterprise Edition of Java? Is it logical to take some exams prior to taking others because the content builds upon previous knowledge or are they all independent?

    Read the article

  • Why do I get the message "program not found" when running "mal" for Latex

    - by maclin
    just started using Ubuntu (11.10 oneiric). It is running on a virtual machine. I used to use SuSE. However, SuSE is now with Novel, which goes hand in hand with Microsoft. So now shifted to Ubuntu. For documentation I use LaTeX and installed a package. This package uses a pre-processer (it is called "mal"). I ran the textconfig rehash command as required, but when I try to run the program, I get a "program not found" error. I am guessing that it is not in my path. (a sudo did not help) Any idea?

    Read the article

  • Creating a portfolio of projects [closed]

    - by Ryan
    As I pursue the path of becoming a programmer, I would like to build up a portfolio of projects I worked on at my current job so that I can eventually get programming work elsewhere (either as an employee, contractor, one man consulting shop, etc). Some of these were things I coded myself, others I was instrumental in the architecture, design and functionality (ie, not as a programmer but more of a BA). How do I show the work that I have done to others on the projects that I have produced for the company I work at? This is all internal software, so it's not something that the outside world would be able to use, and some of our products contain proprietary financial market tools and it would not be prudent to share those with the outside world. My guess is that screenshots would definitely be out of the question, as well as functional descriptions of the software.

    Read the article

  • No inodes left error, df -i command says contrary

    - by abhinavkulkarni
    I copied a lot of files in my mounted Windows drive from Ubuntu and I subsequently ran into Error opening file '/media/windows/<some-file-path>': No space left on device error. I checked the output of df -i command to see if I had ran out of inodes for the mounted Windows drive: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda5 2363904 504119 1859785 22% / udev 207621 522 207099 1% /dev tmpfs 211487 450 211037 1% /run none 211487 3 211484 1% /run/lock none 211487 7 211480 1% /run/shm none 211487 19 211468 1% /run/user /dev/sda2 458686680 2588876 456097804 1% /media/windows As above output shows, lots of inodes are available for /media/windows drive. I have plenty of disk space left - around 500GB. What's the problem then?

    Read the article

  • Building (simple) stellar systems

    - by space borg
    hi I'm currently looking at how to simulate easily some stellar systems (meaning some central stars and then some planets with maybe satellites), in order to allow later some space based strategy game (hence with space ships moving around). This should all be based around time (so the state of each system differs through time) I'm quite struggling with the math behind this topic, like for example: - ellipse related math, - creating the path from planet A to B having time in mind (respective positions will change over time)... Do you know of any resources for that ? I wouldn't mind even buying books about it... thanks in advance best space borg side note: how to display all this stuff isn't a matter at this point in time, I'll simple plans for that (basically sticking to 2D and a "high level view" with no space ships/planets details, just markers)

    Read the article

< Previous Page | 270 271 272 273 274 275 276 277 278 279 280 281  | Next Page >