Search Results

Search found 423 results on 17 pages for 'william hooper'.

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

  • What is the proper response to lousy error message?

    - by William Pursell
    I've just come across (for the 47 millionth time) some code that looks like this: except IOError, e: print "Problems reading file: %s." % filename sys.exit( 1 ) My first reaction is very visceral: the person who coded this is a complete idiot. How hard is it to print error messages to stderr and to include the system error message in the string? I haven't used python in years, and it took me all of 4 minutes to track down the documentation to figure out how to get the error message from the exception object e and the syntax for printing to stderr. My "complete idiot" reaction was slightly lessened since at least a non-zero value is passed to sys.exit, but I still find this code offensive. My prime thought is that the developer who wrote this is a complete novice for whom I have zero respect. Am I over-reacting? Surely there are excuses for all sorts of bad coding practices, but is there anything that can possibly excuse this sort of $#|t? I guess there are two question here: one is a duplicate of What are developer's problems with helpful error messages?, and the other is "am I over-reacting, or is it valid to conclude that the author of the above code is a novice?"

    Read the article

  • Why is MaybeChannelBound callable?

    - by William Payne
    The Queue class in the python kombu library inherits from MaybeChannelBound, which in turn implements the call method (making it callable). The call() method itself is a thin wrapper around the bind() method. It is not clear why this was done, as calling the bind() method seems (to my simple mind, at least) to be clearer and more descriptive of the intent of the function. Why would somebody use the call() method in a situation like this?

    Read the article

  • Kile missing "Settings" dialog after update to kubuntu 12.10

    - by William
    After update to Kubuntu 12.10, I can no longer access configuration options in Kile from Settings-Configure kile (or whatever the menu entry was for configuration). In fact, "Settings" menu has only five entries: "Define current document as master document", "System check", "Show side bar", "Show message bar", and "Toolbars shown." I did a fresh install of Kubuntu 12.10 on one of my other computers, and same problem. I even tried adding the (unsupported) ppa:kile/stable, but the problem persists. Any ideas? I need to access settings to set PDF Latex to use "modern" compilation mode, so that I can use synctex.

    Read the article

  • Ubuntu 13.10 Unity doesn't load after upgrade

    - by William
    Just upgraded to Ubuntu 13.10 only to find that Unity won't load (login freezes, after doing ctrl+alt+F1, logging in and then doing startx, I get a blank desktop and the mouse pointer, and nothing else). I can right click, but the only operations that work are "create new file" and "create new folder". For example, "change desktop background" doesn't work. Also, after doing a few right clicks and choosing "change desktop background", I get a warning message box: "compiz closed unexpectedly." Guest login works fine. Tried creating a new user, but I experience the same thing with the new user. Tried removing all configuration files from my home directory... same thing. Doing dconf reset -f /org/compiz/ gives an error "error spawning command line..." Doing unity --reset also gives errors. Tried uninstalling unity (and compiz) and reinstalling, but that doesn't help. Tried reconfiguring lightdm, didn't help. I don't have any proprietary drivers installed. Once again, the funny thing is that the guest session works fine.

    Read the article

  • Sound through HDMI with the NVIDIA drivers

    - by William
    I am running a media center setup with the display through HDMI, powered by a NVIDIA card. I am using the proprietary NVIDIA drivers availabler through the additional drivers utility, on Xubuntu 11.10. In the mixer, I have all the volumes unmuted and turned up to 100%, but no sound through the HDMI. If I plug in speakers the nd comes through just fine. What can I do to make the sound go through the HDMI and to the TV?

    Read the article

  • Does this factory method pattern example violate open-close?

    - by William
    In Head-First Design Patterns, they use a pizza shop example to demonstrate the factory method pattern. public abstract class PizzaStore { public Pizza orderPizza(String type) { Pizza pizza; pizza = createPizza(type); pizza.prepare(); pizza.bake(); pizza.cut(); pizza.box(); return pizza; } abstract Pizza createPizza(String type) } public class NYPizzaStore extends PizzaStore { Pizza createPizza(String item) { if (item.equals("cheese") { return new NYStyleCheesePizza(); } else if (item.equals("veggie")) { return new NYStyleVeggiePizza(); } else if (item.equals("clam")) { return new NYStyleClamPizza(); } else if (item.equals("pepperoni")) { return new NYStylePepperioniPizza(); } else return null; } } I don't understand how this pattern is not violating open-close. What if we require a beef Pizza, then we must edit the if statement in the NYPizzaStore class.

    Read the article

  • Wireless connection disconnects and reconnects with a Netgear WNA1000

    - by William Berkenkamp
    Ever since I made the permanent switch from Vista to Ubuntu i've had wireless connectivity problems. From watching the network manager when it disconnects it seems like it turns off the receiver for some reason. Could it be bad drivers? I used their install software and the site doesn't really offer driver downloads. The adapter is a Netgear WNA1000 if memory serves, and I don't know much about the router except that it's a Motorola Surfboard. And I figure this might help a bit *-network description: Ethernet interface product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:01:00.0 logical name: eth0 version: 01 serial: 00:1b:b9:a7:39:a4 size: 10Mbit/s capacity: 100Mbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=N/A latency=0 link=no multicast=yes port=MII speed=10Mbit/s resources: irq:40 ioport:d800(size=256) memory:feaff000-feafffff memory:feac0000-feadffff *-network description: Wireless interface physical id: 1 bus info: usb@2:1.1 logical name: wlan0 serial: 00:26:f2:8b:fb:38 capabilities: ethernet physical wireless configuration: broadcast=yes driver=carl9170 driverversion=3.2.0-24-generic-pae firmware=1.9.4 ip=10.0.0.36 link=yes multicast=yes wireless=IEEE 802.11bgn I have tried installing WICD and it didn't fix the problem. Any help would be greatly appreciated. This problem is greatly limiting what I can do with my computer.

    Read the article

  • How'd they do it: Millions of tiles in Terraria

    - by William 'MindWorX' Mariager
    I've been working up a game engine similar to Terraria, mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in Terraria, in my engine causes the frame-rate to drop from 60 to around 20, even tho I'm still only rendering the tiles in view. Mind you, I'm not doing anything with the tiles, only keeping them in memory. Update: Code added to show how I do things. This is part of a class, which handles the tiles and draws them. I'm guessing the culprit is the "foreach" part, which iterates everything, even empty indexes. ... public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { foreach (Tile tile in this.Tiles) { if (tile != null) { if (tile.Position.X < -this.Offset.X + 32) continue; if (tile.Position.X > -this.Offset.X + 1024 - 48) continue; if (tile.Position.Y < -this.Offset.Y + 32) continue; if (tile.Position.Y > -this.Offset.Y + 768 - 48) continue; tile.Draw(spriteBatch, gameTime); } } } ... Also here is the Tile.Draw method, which could also do with an update, as each Tile uses four calls to the SpriteBatch.Draw method. This is part of my autotiling system, which means drawing each corner depending on neighboring tiles. texture_* are Rectangles, are set once at level creation, not each update. ... public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime) { if (this.type == TileType.TileSet) { spriteBatch.Draw(this.texture, this.realm.Offset + this.Position, texture_tl, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 0), texture_tr, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(0, 8), texture_bl, this.BlendColor); spriteBatch.Draw(this.texture, this.realm.Offset + this.Position + new Vector2(8, 8), texture_br, this.BlendColor); } } ... Any critique or suggestions to my code is welcome. Update: Solution added. Here's the final Level.Draw method. The Level.TileAt method simply checks the inputted values, to avoid OutOfRange exceptions. ... public void Draw(SpriteBatch spriteBatch, GameTime gameTime) { Int32 startx = (Int32)Math.Floor((-this.Offset.X - 32) / 16); Int32 endx = (Int32)Math.Ceiling((-this.Offset.X + 1024 + 32) / 16); Int32 starty = (Int32)Math.Floor((-this.Offset.Y - 32) / 16); Int32 endy = (Int32)Math.Ceiling((-this.Offset.Y + 768 + 32) / 16); for (Int32 x = startx; x < endx; x += 1) { for (Int32 y = starty; y < endy; y += 1) { Tile tile = this.TileAt(x, y); if (tile != null) tile.Draw(spriteBatch, gameTime); } } } ...

    Read the article

  • Message "Getting information" don't close

    - by William
    I have Windows 7 x64 I installed this software and I have a problem. I like Ubuntu but I feel the softwares related Linux often have problems. We each time need to seek to resolve the malfunctions. my problem is , I am getting a message as Getting information, please wait and it don't disappear. My firewall is completely deactivate and I already go to the UAC or the firewall to allow the "exe" of the Ubuntu One software in the settings. Nothing runs.Linux never run at the first time. I'm really disappointed and discouraged. Please help me. Thank you for your answers... Ps : I have Windows 7 64 bits

    Read the article

  • Windows gets progressively slower over time, why doesn't Ubuntu?

    - by William
    I, and many other previous Windows users notice that the computer seems to get progressively slower over time. I bought a leapfrog crammer only to find it installed process that sat there waiting for me to plug the crammer in so it could run the software. It took up three percent of the CPU twenty-four seven, seven day a week! This is one of the main reasons I left Windows. But, Ubuntu doesn't seem to slow down over time at all. Does Ubuntu allow programs to install background programs like the leapfrog crammer did to sit there like a leech and suck away at resources? Could someone explain why Windows tends to get slower over time, and is Ubuntu vulnrable to this too? Thanks for any help, this is puzzling me.

    Read the article

  • Problem using python QPID and gevent together [closed]

    - by William Payne
    I have a python script that pulls messages from an Apache QPID queue, and then uses gevent to perform (IO-bound) tasks on those messages in parallel. The queue that this script pulls from was recently changed: I suspect the version of the C++ QPID broker changed, although I cannot verify this at the present time. Now, my process deadlocks and hangs upon QPID queue creation. I strongly suspect that this is a result of an incompatibility with gevent, although I have not done the work yet to produce a minimal example to demonstrate the problem. (Next on my list). Does anybody else have experience of getting gevent and QPID to work together? or Has anybody else seen the same issues?

    Read the article

  • Am I violating LSP if the condition can be checked?

    - by William
    This base class for some shapes I have in my game looks like this. Some of the shapes can be resized, some of them can not. private Shape shape; public virtual void SetSizeOfShape(int x, int y) { if (CanResize()){ shape.Width = x; shape.Height = y; } else { throw new Exception("You cannot resize this shape"); } } public virtual bool CanResize() { return true; } In a sub class of a shape that I don't ever want to resize I am overriding the CanResize() method so a piece of client code can check before calling the SetSizeOfShape() method. public override bool CanResize() { return false; } Here's how it might look in my client code: public void DoSomething(Shape s) { if(s.CanResize()){ s.SetSizeOfShape(50, 70); } } Is this violating LSP?

    Read the article

  • Long 'Wait' Time for three php/CSS files. Is something blocking them?

    - by William Pitcher
    I have been speed optimizing a Wordpress site to little effect. There are three files CSS-related php files from the Wordpress theme that are delaying page loads on the site. One of the three files is basically one line of custom CSS from the custom CSS feature in the theme. You can see what I am talking about with this Pingdom speed test: The yellow is 'Wait'. There are no slow items in the cut-off portion of the image. The full results are here: Pingdom Results Page 1. Any thoughts on what might be causing this? I understand that I have blocking CSS or JS files, but I don't see anything that would be causing that long of a wait. When I ran the P3 Plugin Profiler, Wordpress and all plugins appeared fine -- it is the theme that is taking all the time. GTmetrix recommends avoiding dynamic queries. I assume all the ver=3.61 references are to the version of Wordpress (which I am using). I noticed that my Wordpress sites using other themes don't make this query (at least not over and over). 2. Is this typical coding practice? 3. How much negative impact do these query-strings have -- a little or a lot? I tried searching for similar questions here, please excuse me if I missed something. Sometimes, I know just enough to be dangerous.

    Read the article

  • How do I install VirtualBox 4.1?

    - by William
    How to install virtualbox-4.1.4 in ubuntu 11.04 fluently? when apt-get install libqt* unmet dependency. there is a long list of unmet dependency. Where start first and any command to install virtualbox fluently? You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: virtualbox-4.1 : Depends: libcurl3 (>= 7.16.2-1) but it is not going to be installed Depends: libqt4-network (>= 4:4.5.3) but it is not going to be installed Depends: libqt4-opengl (>= 4:4.7.0~rc1) but it is not going to be installed Depends: libqtcore4 (>= 4:4.7.0~beta1) but it is not going to be installed Depends: libqtgui4 (>= 4:4.7.0~beta1) but it is not going to be installed Recommends: libsdl-ttf2.0-0 but it is not going to be installed Recommends: dkms but it is not going to be installed Recommends: libhal1 (>= 0.5) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

    Read the article

  • Leapfrog Crammer won't mount as a USB flash drive

    - by William
    I can't seem to get the Leapfrog Crammer study and sound system to show up as a flash drive under ubuntu so I can transfer stuff to it. I don't want to install the leapfrog bloatware, can someone help me with this? Additional Information: When I plug my crammer into my computer it shows a 1 MB file system with a link to download the crammer software. I want to know how to access the rest of the crammer's file system so I can transfer music to it. The crammer does not show any other partitions in natulius. According to an article on the internet, the crammed is divided into three partitions: One with a link to install the crammer software, one with all content(music, flash cards, etc.) and one for firmware. I want to know how to access the one with the content so I can add music to the player. Can anyone help me with this? Thanks in advance.

    Read the article

  • transfer Thunderbird (17) Profile on Win7 to Ubuntu 12.04

    - by William Curran
    I want to transfer Thunderbird Profile on Win7 to thunderbird (17) Ubuntu 12.04. I already copied the profile folder from Windows to Ubuntu and modified progile.ini on the ubuntu machine to include [Profile] Name=Bill IsRelative=1 Path=(the name of the transfered profile folder) I think the problem is that the Win. TB profile content (files and folder structure) look VERY different that the that of the unbuntu TB profile's that was created on installation. The Ubuntu install is new where as the Win TB has undergone many updates. Seems the system for profile storage has changed drastically. I tried to start TB in safe mode but could't get the path correct to start TB in the terminal with the -safe-mode switch. What can I do? Bill

    Read the article

  • Should I install ia32-libs or lib32stdc++ or can I just use --force-all for 32-bit printer driver

    - by William
    I got a Brother printer MFC class. The brother website only provides 32-bit drivers but I installed 64-bit Ubuntu. It says I need to install "ia32-libs" or "lib32stdc++" to install the 32-bit drivers onto 64-bit Ubuntu. Elsewhere I've read that I don't need to install these packages, I can just use --force-all when installing, but I don't know of the accuracy of this information. My questions: 1) do I HAVE to install "ia32-libs" or "lib32stdc++" or can I use --force-all to make 32-bit drivers install on 64-bit ubuntu? 2) if I do have to install "ia32-libs" or "lib32stdc++", which should I install? Which is better, which is recommended by ubuntu experts?

    Read the article

  • How to install ubuntu 12.04

    - by William A. Jordan
    I've had ubuntu on my pc for about 5 years,after the new 12.04 version and a day and a half trying to get it to just boot up. I will take it off my pc and rely on windows. I have 5 pc's which I built and am not an amateur, After installing it numerous times and even to run it from your webpage (to no avail). Granted I do have nvidia drivers on it, but after I went to their webpage and downloaded and installed the linux driver it,it still would not boot, by the way I took 2 different pc's apart and used what I thought were compatible (I shouldn't have to do this) parts. I have it on a seperate hd which I will remove and format. Have a nice day and so long (2 much trouble).

    Read the article

  • App not showing up in Google Play search on app name [on hold]

    - by William Jockusch
    About 30 hours ago, I released an app on Google Play. I am concerned that if you search on the exact app name, it does not show up in the results, even if you click "show more". https://play.google.com/store/search?q=free+graphing+calculator&c=apps It does show up if you put the name in quotes. But that's awfully low discoverability. https://play.google.com/store/search?q=%22free%20graphing%20calculator%22&c=apps Possibly relevant information: I had an earlier version with a different bundle ID. It was up for just an hour or so, and probably never actually visible to users. How can I fix this?

    Read the article

  • Xubuntu and other Debian based distros slow

    - by William V
    I have a Compaq Presario SR1950NX desktop computer with the AMD64 3800+ processor and 1GB ram and it seems that Ubunutu, Xubuntu and Lubuntu are all laggy. Things seem to be slow such as clicking on menus and opening programs and the UI renders in peices. When using the browser the system slows down considerably. I ran the TOP command and I do notice that xorg hits 30 to 40 percent cpu when running the browsers. I have tried these distros on a spare P4 machine and it is even worse. As long as I don't have a several things open at one time I can manage to get around although sluggishly. I also notice that I can't get debian based distros to install in 64bit (crtc6 failure) only in 32bit. Can anyone tell me what is it that I might be doing wrong? I have an integrated Nvidia card and have tried several of the recommended drivers which sometimes result in no boot screen upon reboot. Thanks

    Read the article

  • How do I filter out NaN FLOAT values in Teradata SQL?

    - by Paul Hooper
    With the Teradata database, it is possible to load values of NaN, -Inf, and +Inf into FLOAT columns through Java. Unfortunately, once those values get into the tables, they make life difficult when writing SQL that needs to filter them out. There is no IsNaN() function, nor can you "CAST ('NaN' as FLOAT)" and use an equality comparison. What I would like to do is, SELECT SUM(VAL**2) FROM DTM WHERE NOT ABS(VAL) > 1e+21 AND NOT VAL = CAST ('NaN' AS FLOAT) but that fails with error 2620, "The format or data contains a bad character.", specifically on the CAST. I've tried simply "... AND NOT VAL = 'NaN'", which also fails for a similar reason (3535, "A character string failed conversion to a numeric value."). I cannot seem to figure out how to represent NaN within the SQL statement. Even if I could represent NaN successfully in an SQL statement, I would be concerned that the comparison would fail. According to the IEEE 754 spec, NaN = NaN should evaluate to false. What I really seem to need is an IsNaN() function. Yet that function does not seem to exist.

    Read the article

  • Restarting explorer from a batch file only opens an explorer window

    - by Ben Hooper
    In one part of a batch file (kind of), I need to restart Explorer. I use the following method to accomplish this: taskkill /f /im explorer.exe >nul explorer.exe :: I have also tried: %winDir%\explorer.exe :: start %winDir%\explorer.exe :: start /b %winDir%\explorer.exe :: start /d %winDir%\explorer.exe (as suggested by panda-34) :: :: I've even tried delaying the above commands with: ping localhost -n 11 >nul Then this happens: explorer.exe is successfully terminated (denoted by the lack of taskbar and desktop) An explorer window opens, which I am left with indefinitely (see Image 1) I can only then restart explorer by manually starting a new process from Task Manager (Win + R doesn't respond), even though explorer.exe is actually already in the process list, strangely enough.. (see Image 2)   Now, I say "kind of" as I'm running the batch file from a self-executing SFX archive, created with WinRAR. When executed, the contents of the archive are extracted to %temp% and a user-defined bootstrapper (in this case, my batch file) is run upon successful extraction. The strangest thing about it, though, is that if you manually extract the contents of the archive and run the batch file then explorer restarts correctly. It only ever glitches when called from an SFX. I'm experiencing this glitch on Windows 7 x64.   Link to an SFX archive demonstrating this, if anyone wants it: https://dl.dropbox.com/u/27573003/Social%20Distribution/restart-explorer.exe Image 1: Image 2:

    Read the article

  • C++ Unary - Operator Overload Won't Compile

    - by Brian Hooper
    I am attempting to create an overloaded unary - operator but can't get the code to compile. A cut-down version of the code is as follows:- class frag { public: frag myfunc (frag oper1, frag oper2); frag myfunc2 (frag oper1, frag oper2); friend frag operator + (frag &oper1, frag &oper2); frag operator - () { frag f; f.element = -element; return f; } private: int element; }; frag myfunc (frag oper1, frag oper2) { return oper1 + -oper2; } frag myfunc2 (frag oper1, frag oper2) { return oper1 + oper2; } frag operator+ (frag &oper1, frag &oper2) { frag innerfrag; innerfrag.element = oper1.element + oper2.element; return innerfrag; } The compiler reports... /home/brian/Desktop/frag.hpp: In function ‘frag myfunc(frag, frag)’: /home/brian/Desktop/frag.hpp:41: error: no match for ‘operator+’ in ‘oper1 + oper2.frag::operator-()’ /home/brian/Desktop/frag.hpp:16: note: candidates are: frag operator+(frag&, frag&) Could anyone suggest what I need to be doing here? Thanks.

    Read the article

  • KDevelop has no build menu.

    - by Brian Hooper
    I have just installed KDevelop on my Ubuntu machine (KDevelop 3.9.95 on Ubuntu 9.10) with sudo apt-get install kdevelop I created a new project with the "Hello World" program in it, but there doesn't appear to be any way to compile anything. The manuals refer to the build menu but there isn't one, all all compile options on the other menus are greyed out. Does anyone know what I have done wrong?

    Read the article

  • scrollTo (jQuery) won't work in firefox

    - by William
    For some reason, firefox seems to ignore my scrollTo function even though it works in chrome and safari. Here's an example link: http://blog.rainbird.me/post/2358248459/blowholes-are-awesome Chrome and Safari will automatically scroll to the top of the image (with an offset of 20 pixels) It doesn't work in firefox. I'm baffled! code: $(document).ready(function() { $(".photoShell img").lazyload({ placeholder: "http://william.rainbird.me/boston-polaroid/white.gif", threshold: 200 }); window.viewport = { height: function() { return $(window).height(); }, width: function() { return $(window).width(); }, scrollTop: function() { return $(window).scrollTop(); }, scrollLeft: function() { return $(window).scrollLeft(); } }; $(".photoShell img").hide(); $(".photoShell .caption").hide(); $(".photoShell img").load(function() { var maxWidth = viewport.width() - 40; // Max width for the image if(maxWidth > 960){ maxWidth = 960; } var maxHeight = viewport.height() - 50; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if(width > maxWidth){ ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", height * ratio); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image width = width * ratio; // Reset width to match scaled image } // Check if current height is larger than max if(height > maxHeight){ ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", width * ratio); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image } $(this).parents('div.photoShell').css("width", $(this).width() + 22); $(this).parents('div.photoShell').addClass('loaded'); $(this).next(".caption").show(); var scrollNum = $(this).parents('div.photoShell').offset().top; $.scrollTo(scrollNum - 20, {duration: 700, axis:"y"}); $(this).fadeIn("slow"); }).each(function() { // trigger the load event in case the image has been cached by the browser if(this.complete) $(this).trigger('load'); });

    Read the article

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