Daily Archives

Articles indexed Friday March 23 2012

Page 7/18 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to improve testing your own code

    - by Peter
    Today I checked in a change on some code which turned out to be not working at all due to something rather stupid yet very crucial. I feel really bad about it and I hope I finally learn something from it. The stupid thing is, I've done these things before and I always tell myself, next time I won't be so stupid... Then it happens again and I feel even worse about it. I know you should keep your chin up and learn from your mistakes but here's the thing: I try to improve myself, I just don't see how I can prevent these things from happening. So, now I'm asking you guys: Do you have certain groundrules when testing your code?

    Read the article

  • Modular Architecture for Processing Pipeline

    - by anjruu
    I am trying to design the architecture of a system that I will be implementing in C++, and I was wondering if people could think of a good approach, or critique the approach that I have designed so far. First of all, the general problem is an image processing pipeline. It contains several stages, and the goal is to design a highly modular solution, so that any of the stages can be easily swapped out and replaced with a piece of custom code (so that the user can have a speed increase if s/he knows that a certain stage is constrained in a certain way in his or her problem). The current thinking is something like this: struct output; /*Contains the output values from the pipeline.*/ class input_routines{ public: virtual foo stage1(...){...} virtual bar stage2(...){...} virtual qux stage3(...){...} ... } output pipeline(input_routines stages); This would allow people to subclass input_routines and override whichever stage they wanted. That said, I've worked in systems like this before, and I find the subclassing and the default stuff tends to get messy, and can be difficult to use, so I'm not giddy about writing one myself. I was also thinking about a more STLish approach, where the different stages (there are 6 or 7) would be defaulted template parameters. Can anyone offer a critique of the pattern above, thoughts on the template approach, or any other architecture that comes to mind?

    Read the article

  • What syntax element do you hate most in a programming language you use frequently? [closed]

    - by Timwi
    No matter how much you love a programming language, there are always a few details in it that aren’t quite as nice as they could be. In this question, I would like to specifically focus on syntax elements. In a programming language that you use frequently (perhaps your favourite programming language, or perhaps the one you are forced to use at work), which syntax element do you find most unreadable, unclear, inconvenient or unpleasant?

    Read the article

  • RTOS experience

    - by Subbu
    I have been working as an embedded software engineer on mostly 8 bit micro-controller firmware and desktop/mobile applications development for the past five years. My work on a WinCE project (in which I got introduced to .NET CF) was short lived. I did use core APIs for interrupt processing, peripheral communication, etc...but again, not exactly a pure RTOS environment. In order to get together more solid experience for growing more in the embedded field, I want to work more with RTOSes. Will buying an evaluation board with an RTOS and putting together a project at home be regarded as a good experience or will an online course be more useful? I am just not clear as to what will be regarded as good experience. Any suggestions or directions will greatly help me. I have a passion for the field but just a need a point in the right direction.

    Read the article

  • How to store prices that have effective dates?

    - by lal00
    I have a list of products. Each of them is offered by N providers. Each providers quotes us a price for a specific date. That price is effective until that provider decides to set a new price. In that case, the provider will give the new price with a new date. The MySQL table header currently looks like: provider_id, product_id, price, date_price_effective Every other day, we compile a list of products/prices that are effective for the current day. For each product, the list contains a sorted list of the providers that have that particular product. In that way, we can order certain products from whoever happens to offer the best price. To get the effective prices, I have a SQL statement that returns all rows that have date_price_effective >= NOW(). That result set is processed with a ruby script that does the sorting and filtering necessary to obtain a file that looks like this: product_id_1,provider_1,provider_3,provider8,provider_10... product_id_2,provider_3,provider_2,provider1,provider_10... This works fine for our purposes, but I still have an itch that a SQL table is probably not the best way to store this kind of information. I have that feeling that this kind of problema has been solved previously in other more creative ways. Is there a better way to store this information other than in SQL? or, if using SQL, is there a better approach than the one I'm using?

    Read the article

  • changed /etc permission in oneiric (ubuntu11.10) by using "sudo chmod 665 /etc" cant use sudo now

    - by GuruDevil
    i screwed up big time. i changed the permission of /etc in ubuntu 11.10 by using following command sudo chmod 665 /etc now when ever i try to use sudo it gives the following error: sudo: can't open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, quitting any help will be greatly appreciated because i am new to ubuntu....i have already tried using su but it doesnt even login as root and even i give it the right password it always say Authentication Failure......i dont want to login as root coz its risky and even a newbie in linux like me is not stupid enough to have such control...i just want to use my sudo again......i have tried to go into recovery mode as well but i cant get in to recovery mode......HELP please!!!

    Read the article

  • ERROR with Ubuntu: Cannot open the disk 'D:\My Documents\My Virtual Machines\Ubuntu\Ubuntu-1.vmdk' or one of the snapshot disks it depends on

    - by leiyu
    Cannot open the disk 'D:\My Documents\My Virtual Machines\Ubuntu\Ubuntu-1.vmdk' or one of the snapshot disks it depends on. Reason: The physical disk is already in use. ====================== When I powered on my Ubuntu on VMwave, a window showed up within words above. I tried to remove the old hard disk in settings and created a new one, but it still doesnot work. Also, I tried to delete the .lck files and even the doc. BUT....... Has someone solved this problem? PLEASE do me a favour!!Many thanks!!

    Read the article

  • How can I find installed web applications?

    - by Jo-Erlend Schinstad
    I've installed LAMP Server using tasksel. I've installed phpMyAdmin, which I know from experience gets in /phpmyadmin. That works. Then I installed drupal6. I assumed that it would get in /drupal, but that's not the case. How can I find that kind of information? Of course, in this case, I'm looking for my Drupal install, but I would like to avoid having to spend so much time every time I install a web application, so I'm looking for a generic way.

    Read the article

  • How can i fix some broken packages PyQt packages?

    - by Jorge
    I'm trying to install PyQt but i've met some difficulties (i.e packages that won't be updated and stuff like that). I'm not very proficient with Ubuntu, so some help is needed. Here's the output i get from the terminal: sudo apt-get install python-qt4 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python-qt4 : Depends: libqt4-declarative (>= 4:4.7.0~rc1) but it is not going to be installed Depends: libqt4-designer (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-help (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-script (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-scripttools (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-svg (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-test (>= 4:4.7.0) but it is not going to be installed Depends: libqt4-xmlpatterns (>= 4:4.7.0) but it is not going to be installed E: Broken packages

    Read the article

  • One of my user accounts logs in without desktop environment

    - by Bill Cheatham
    When I log in to my main user account on Ubuntu 11.10 ,the desktop environment (unity bar, clock, volume control, etc.) is not there. All I have is the desktop background with a menu bar across the top which appears to be for nautilus (options like File-New folder). My other accounts log in like normal. I have recently followed these instructions to give my main user account access to an OSX partition, but I think I have logged in successfully since then. I am able to get a terminal by pressing ctrl+alt+t, but when I typed unity the whole thing crashed. Is there anything I can do to fix this? I have a separate administrator account I can use if needed.

    Read the article

  • HP Pavilion G6 1209 temperature higher than usual and fan working in 11.10

    - by vanjadjurdjevic
    Installing Ubuntu on this new machine i had various problems, so I asked around ask ubuntu for a solution. This is the latest one! :D When I start the pc it shows the temperature around 50-55. When I open chromium it shows 60+ (61,62,63). It even gets to 67-68 when multi-tasking 2 apps. The fan is working slightly louder than in windows 7. Talking about windows 7, the temperature is 45-50 when idle, 50-53 when working in browser. Im already loosing it with this machine. You can find specs here It says 'technishe daten' below the picture. Click that tab and you will reach the specs.

    Read the article

  • Installing 10.10+ with Radeon HD 6970 Video Card

    - by Ben Lacy
    I built a new PC that has a Diamond Radeon HD 6970 graphics card, and no on-board graphics. When I boot from the Ubuntu disc, it runs through some initial booting stuff, and then gets to a loading screen that just has the Ubuntu logo and some progress bar/dot thingies. After this screen is finished, it goes black and says it cannot display video mode. I've seen many people that say to simply install the ati drivers. However, I don't believe this is an option, because I can't even get to the boot screen that asks me if I want to run the system off of the LiveCD, boot to hard disk, etc... Is there a way to somehow boot to a CLI before getting to the screen that would normally let me choose that? I'm at a loss as far as what to do. Also: Yes, the CD boots fine on other machines. (I've also burnt a couple discs just to be sure) Yes, the graphics card is fine. I normally dual-boot with Windows 7, and it runs on Windows just fine. Thanks for any help!

    Read the article

  • Why does my cursor jump when typing in ubuntu 11.10

    - by Stephen Myall
    When typing in Ubuntu my cursor jumps around and its not application specific. It doesn't matter or Im filing in a web form, writing an e-mail or using LibreOffice or Lyx. Im using a Sony Vaio 64bit machine. i read a previous question (link below) on this subject which indicates it may have something to do with the touchpad settings. as this has occurred in previous Ubuntu distros Im guess it is somekind of hardware issue. How do you turn of the touchpad when typing to avoid the cursor jumping around? I'd be grateful if anyone can make this stop Stephen

    Read the article

  • UBS drive on Ubuntu on VM Virtualbox

    - by Raama
    OSX is my host OS I have windows xp and Ubuntu 10.10 on guest OS. They both work great. When I eject USB flash drive from host OS, it appears in windows guest OS but it does not appear in Ubuntu Guest OS. I never run both guest OS at the same time. its always either or. I am running, VM virtualbox 4.1.10 and installed latest guest additions and also installed VM virtualbox extension pack. Thanks for your help

    Read the article

  • Can't start ubuntu 11.10, Stops at login screen!

    - by Martinpizza
    I have been trying to dual boot ubuntu with windows 7 via WUBI on my custom built pc but without success. When i start the computer i can choose windows or ubuntu i choose ubuntu and when i should get to the login screen the screen just stays purple/pink. Tried safe mode but cant get in there either. I have tried reinstall but did not work either. :( The second time i install ubuntu the screen was purple/pink and the screen was cut of so the left side was on the right side and right side on left side (hard to describe) Third time installing (The last time) it is just like the first time please help!!!! cant get nowhere without help i am kinda new at ubuntu and its creepy commands. Had ubuntu on my old computer. I think the problem is my hardware so here is my computer specs: Amd Fx 6100 Amd HIS Radeon HD 6950 ICEQ X Asus Sabertooth 990fx 1TB Harddrive I have no idea the name on it Please Help me!! Sorry for my bad English! :D

    Read the article

  • How to resize / enlarge / grow a non-LVM ext4 partition

    - by Mischa
    I have already searched the forums, but couldnt find a good suitable answer: I have an Ubuntu Server 10.04 as KVM Host and a guest system, that also runs 10.04. The host system uses LVM and there are three logical volumes, which are provided to the guest as virtual block devices - one for /, one for /home and one for swap. The guest had been partitioned without LVM. I have already enlarged the logical volume in the host system - the guest successfully sees the bigger virtual disk. However, this virtual disk contains one "good old" partition, which still has the old small size. The output of fdisk -l is me@produktion:/$ LC_ALL=en_US sudo fdisk -l Disk /dev/vda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c8ce7 Device Boot Start End Blocks Id System /dev/vda1 * 1 3917 31455232 83 Linux Disk /dev/vdb: 2147 MB, 2147483648 bytes 244 heads, 47 sectors/track, 365 cylinders Units = cylinders of 11468 * 512 = 5871616 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000f2bf7 Device Boot Start End Blocks Id System /dev/vdb1 1 366 2095104 82 Linux swap / Solaris Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 32, 33) logical=(0, 43, 28) Partition 1 has different physical/logical endings: phys=(260, 243, 47) logical=(365, 136, 44) Disk /dev/vdc: 225.5 GB, 225485783040 bytes 255 heads, 63 sectors/track, 27413 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00027f25 Device Boot Start End Blocks Id System /dev/vdc1 1 9138 73398272 83 Linux The output of parted print all is Model: Virtio Block Device (virtblk) Disk /dev/vda: 32.2GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 32.2GB 32.2GB primary ext4 boot Model: Virtio Block Device (virtblk) Disk /dev/vdb: 2147MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 2146MB 2145MB primary linux-swap(v1) Model: Virtio Block Device (virtblk) Disk /dev/vdc: 225GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 75.2GB 75.2GB primary ext4 What I want to achieve is to simply grow or resize the partition /dev/vdc1 so that it uses the whole space provided by the virtual block device /dev/vdc. The problem is, that when I try to do that with parted, it complains: (parted) select /dev/vdc Using /dev/vdc (parted) print Model: Virtio Block Device (virtblk) Disk /dev/vdc: 225GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 75.2GB 75.2GB primary ext4 (parted) resize 1 WARNING: you are attempting to use parted to operate on (resize) a file system. parted's file system manipulation code is not as robust as what you'll find in dedicated, file-system-specific packages like e2fsprogs. We recommend you use parted only to manipulate partition tables, whenever possible. Support for performing most operations on most types of file systems will be removed in an upcoming release. Start? [1049kB]? End? [75.2GB]? 224GB Error: File system has an incompatible feature enabled. Compatible features are has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or debugfs to remove features. So what can I do? This is a headless production system. What is a safe way to grow this partition? I CAN unmount it, though - so this is not the problem.

    Read the article

  • How to connect to a serverside process on Ubuntu running in a VM?

    - by Jenko
    I am running Ubuntu 11.10 in VirtualBox, on Windows 7. I'm trying to setup a serverside process like Apache on it. How do I configure VirtualBox to allow access to the Ubuntu server process from other computers on the network? I can access the internet from Ubuntu. The Windows 7 computer is on a WiFi network using DHCP. The WiFi network has a dynamic IP with the network provider. This is my current configuration:

    Read the article

  • Connecting 2 PCs using USB-to-USB (male-male) cable

    - by Amirizzuan
    I found this while Googling around: http://www.hardwaresecrets.com/article/Connecting-Two-PCs-Using-a-USB-USB-Cable/248 But then, the solution given in the article is using Windows. Is there any Ubuntu equivalent to this? I would really love to SSH into my Ubuntu server via my Ubuntu laptop, just by connecting one end of the male USB to my laptop, and another end of the male USB to my server. I know I can always SSH into my server via the network, but then in this case of mine, there are cases the server is inside a secluded-secured network server room, and the only way for me to check things out is to go into the server room and open the keyboard console and monitor there. But, if I can just bring my laptop inside and connect to the USB there, then that would be cool. Any idea guys?

    Read the article

  • I can't hear any sounds on ubuntu 11.10 on Dell inspiron N5010

    - by Ahmed
    I have a problem that I can't hear any sounds and I don't know where to start. I did the following : lspci -v | grep -A7 -i "audio" 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06) Subsystem: Dell Device 0447 Flags: bus master, fast devsel, latency 0, IRQ 48 Memory at fbf00000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel -- 01:00.1 Audio device: ATI Technologies Inc Manhattan HDMI Audio [Mobility Radeon HD 5000 Series] Subsystem: Dell Device 0447 Flags: bus master, fast devsel, latency 0, IRQ 49 Memory at fbe40000 (64-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel And It seems that I have 2 soundcards. Is that normal ?? I also did this: aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 Also on the sound setting GUI. I have 2 hardware profiles for sound cards but none of them works when I test the speakers. Where should I start searching ?

    Read the article

  • How do I disable the sleep button on my keyboard?

    - by KillianDS
    I have a "power button" on my keyboard that enables standby or hibernate. I can't find the mapping of this key anywhere in "sytem settingsKeyboard", "systempower management", "compiz config or similar (where I could find it before unity). How can I disable (not remap) this button? I do not want to disable hibernate/sleep altogether, it's simply this key that gets pressed a lot by accident and it's getting quite annoying.

    Read the article

  • System beeps on shutdown

    - by Nicholas Smith
    Very recently a couple of our systems have started making beeps on shutdown, we've not been able to isolate the exact time that they've been updated and it's occuring, but I've narrowed it down to being not pcspkr or snd_pcsp as both are blacklisted under modprobe, and rmmod'ed just to be sure. Now I'm a bit puzzled as I was under the impression those were the only two modules that could make the beep, is there a third lurking that I need to blacklist? Edit: I've copied the results of lsmod over on Pastebin.

    Read the article

  • Fan running constantly on a Dell D420 laptop

    - by Halik
    I'm running latest Ubuntu 12.04 beta on a Dell D420 laptop. The fan is spinning almost constantly - even after turning the PC off, letting it cool down, and then turning it back on, the fan will turn on after some idle time. Not to mention any CPU work. The CPU temps are normal, in range of 50-55 idle, and up to 70 with some load. It wouldn't be an issue, but the same PC running Fedora, or Arch Linux, had a much more modest fan profile - the temps were managed while you seldom heard the fan. To counter the problem, I currently use i8k tools, set manual temperature thresholds which seemed to have worked, but the i8kmon has a tendency to cycle the fan between lower and higher state within aboutin a second intervals - which is extremely annoying. As far as I can tell I did not run any special software (beside laptop-mode-tools), or any additional kernel modules when running Arch Linux and I can't tell about Fedora.

    Read the article

  • Audio 2 dj soundcard configuration

    - by Jaroslav
    I have an http://www.native-instruments.com/#/en/products/dj/audio-2-dj/ The problem in settings it only sees one outpout, when there should be two(I need that for mixxx etc.) Also I want to be able set the sample rate to one of these 44.1, 48, 88.2, 96 kHz or at least check which one is set. Additionally if possible setting the latency would be an advantage. Some info: aplay -l **** List of PLAYBACK Hardware Devices **** card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: TraktorAudio2 [Traktor Audio 2], device 0: Traktor Audio 2 [Traktor Audio 2] Subdevices: 1/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 cat /proc/asound/cards 0 [HDMI ]: HDA-Intel - HDA ATI HDMI HDA ATI HDMI at 0xfdcfc000 irq 45 1 [TraktorAudio2 ]: snd-usb-caiaq - Traktor Audio 2 Native Instruments Traktor Audio 2 (usb-0000:00:1d.7-8)

    Read the article

  • 2 domains 1 host package

    - by sp-1986
    I have a windows web hosting package. I have 2 different domain names. Can i point my first domain to the the hosting package and then run BlogEngine.NET and then point the second domain to the hosting package running NopCommerce cart? www.domain1.co.uk (blog) www.domain2.co.uk (e-commerce cart) In IIS i would just create a new application within the site and create the bindings for domain2. But does this work for web hosting packages from 123-reg.co.uk

    Read the article

  • joomla 2.5 : list links to articles in 2 columns

    - by semyon
    I have a Joomla! 2.5 website, and I have to add a lightbox popup that will contain links to all articles from a specific category(+subs). If anyone can suggest all-in-one solution, that will be great! But generally I'm asking, how to list links to all articles from a specific category and its sub-categories in two/three columns? I know I can set Category blog View to output only article links, without full/introtext, but in this case links will all be in one column. I need at least two. A possibility of grouping article links by subcategory would be great as well (but this is the thing I can live without). How can this be done? I'm looking for: a standard way of configuring this Template override (I'm using T3 framework) Custom extension any other method ...

    Read the article

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