Daily Archives

Articles indexed Sunday July 1 2012

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

  • xor of sequence of numbers

    - by ArG0NaUt
    You are given with a sequence of natural numbers, you can add any natural number to any number in the sequence such that their xor becomes zero. Your goal is to minimize the sum of added numbers. e.g. Consider the following examples : sequence : 1, 3 answer : 2, adding 2 to 1 we get 3^3=0. sequence : 10, 4, 5, 1 answer: 6, adding 3 to 10 & 3 to 8 we get 13^4^8^1 = 0. sequence : 4, 4 answer : 0, since 4^4 = 0. I tried working on binary representations of sequence number but it got so complex. I want to know if there is any simple and efficient way to solve this problem.

    Read the article

  • Automatically change Sound Input Output device

    - by Senthil Kumaran
    I have to plugin my USB Audio adapter ( 4300054 Gigawire USB Audio Adapter) for audio input because has a combo-input-output port for voice. After I do this, I have go open Sound Settings and manually select the USB Audio adapter for Input and Output, if I do not, the system default remains selected. Is there anyway, I can make Ubuntu to automatically select the USB Audio Adapter as the default as soon as I plug-in?

    Read the article

  • Chrome window freezes in Ubuntu

    - by Dragon5689
    Sometimes, especially when I open pages that have some kind of multimedia contents, Chrome freezes. It always happens directly after opening a new tab. In contrast to the way Chrome usually has only tabs crashing, the entire windows freezes. If I have multiple separate Chrome windows open, the others keep working. I run Ubuntu 12.04 and Chrome in version 20.0.1132.47 but this has been going on since I last set up my machine around half a year ago. Anyone having the same problems or an idea what could be wrong here?

    Read the article

  • How can I start the desktop without having to "startx"?

    - by gtldsp
    I dont want to start every time startx is there any way to get GUI Direct login screen. my files are root@ubuntu:~# locate org.conf /usr/share/X11/xorg.conf.d /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/11-evdev-quirks.conf /usr/share/X11/xorg.conf.d/11-evdev-trackpoint.conf /usr/share/X11/xorg.conf.d/50-synaptics.conf /usr/share/X11/xorg.conf.d/50-vmmouse.conf /usr/share/X11/xorg.conf.d/50-wacom.conf /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf /usr/share/man/man5/xorg.conf.5.gz /usr/share/man/man5/xorg.conf.d.5.gz root@ubuntu:~# cd /usr/share/X11/xorg.conf.d root@ubuntu:/usr/share/X11/xorg.conf.d# ll total 36 drwxr-xr-x 2 root root 4096 Apr 23 04:38 ./ drwxr-xr-x 5 root root 4096 Apr 23 04:38 ../ -rw-r--r-- 1 root root 1099 Apr 4 17:04 10-evdev.conf -rw-r--r-- 1 root root 590 Mar 15 08:52 11-evdev-quirks.conf -rw-r--r-- 1 root root 364 Mar 15 08:52 11-evdev-trackpoint.conf -rw-r--r-- 1 root root 956 Apr 13 06:00 50-synaptics.conf -rw-r--r-- 1 root root 115 Mar 22 09:54 50-vmmouse.conf -rw-r--r-- 1 root root 842 Mar 30 03:13 50-wacom.conf -rw-r--r-- 1 root root 590 Apr 13 05:59 51-synaptics-quirks.conf root@ubuntu:/usr/share/X11/xorg.conf.d# Please provide me step by step details.

    Read the article

  • UBUNTU's Network Connection Manger can't detect Huawei ETS2051 Modem device!

    - by Doctoa
    I have a modem device called Huawei ETS2051 and the Network Connection Manger can't detect it, but when I use Gnome-PPP it work fine but the problem is when I use Gnome-PPP; apps like Ubuntu software Center Can't reconice that's Iam connecting to the Internet so the app is just act like it's offline while other apps like web browsers and IM's work good under Gnome-PPP. any way what I want is to have a Full Ubuntu experince by making The Network Connection Manger detect my ETS2051. I have another 3G USB modem and The Network Connection Manger detect it and it's work just fine but the internet price for this one is high and I can't effort it so am count on that ETS2051 modem as you can see for it's low price and stable internet speed that satesfy my needs. More information: Gnome-PPP is a GUI for wvdial. the ETS2051 modem use a serial USB port. I have a Windows driver CD for the device. I have also find This qustion about the software Center acting like it's offline around wvdial and there's this launchpad bug. and am really insest to use Ubuntu Software Center so please no other software manger apps recomendation... I've also this Genius ColorPage HR6X Slim scanner that's Ubuntu can't detect it, so if you interset you can check and answer the qustion from here...

    Read the article

  • How do I fix error building package on ppa, uses tweepy/quickly

    - by qw3rty_rocks
    I'm building an application that uses tweepy (a python library) and when I build it on my local machine it works fine. When I submit it to launchpad though, it sent me a log which has this error: ERROR: Python module tweepy not found. I found a ppa python-tweepy on launchpad. So how do I fix this error. The log from launchpad is here: https://launchpadlibrarian.net/109066317/buildlog_ubuntu-precise-i386.quicknote_12.07_FAILEDTOBUILD.txt.gz

    Read the article

  • Developing my own package manager: how do I resolve dependencies?

    - by shantanu
    According to debian control file ant package's dependency list is: Depends: default-jre-headless | java2-runtime-headless | java5-runtime-headless | java6-runtime-headless, libxerces2-java That means it depends on default-jre-headless or java2-runtime-headless or java5-runtime-headless or java6-runtime-headless. But how could i determine that which package need to select as dependency? Note: I am trying to develop a package manager. I can not use provided package because they read sources.list file from a specific directory.

    Read the article

  • Why does Unity screen blank out over XDMCP?

    - by James
    My XDMCP sessions display fine until I login. I've checked all logs and settings for this and can't find anything wrong, this works fine on other systems so I'm wondering if this has anything to do with the underlying hardware or an application that loads when logging in. System details: - Ubuntu 12.04 (Desktop, installed via Alternate CD for RAID) - 8GB of RAM - Core2Quad CPU @ 2.40GHz - Gigabit Network (Ethernet) Other notes: - Running with the onscreen keyboard enabled - Works fine when logging in locally Pre-login: Once logged in:

    Read the article

  • Why does Chrome crash on websites using the Awesome font?

    - by harry
    Since github using webfront for icons, every time I open github website that tab will crash. But other websites are not crash. I did everything I can, like disable all extensions, clean all cache, even create a new user profile, still not working. I'm using Ubuntu linux 12.04, last stable google chrome browser, always up to date. I searched from google and not found any one has the issue like mine. And I found any website using Font-Awesome my chrome tab will crash if I open that website.

    Read the article

  • Why is Thunderbird pegging a core at 100%?

    - by david6
    I have experienced 2-3 unexplained lockup over last 10 days. Today, I had a random lockup (no mouse, keyboard response, 100% CPU). But, when I finally switched (Ctrl-Alt-F1) to command line (it took several minutes) it told me that thunderbird-bin had locked a CPU. I ran this to resolve: pidof thunderbird-bin sudo kill #### However, after saving other work, I tried restarting Thunderbird. It went to 90%+ CPU, and within 20 seconds it locked again. Once I have more detail I will raise a bug (on Ubuntu Forums). Does anyone have any other suggestions, advice? UPDATE Thunderbird 13.0.1 is quite stable in safe mode. Still working to resolve ..

    Read the article

  • Why does installing 11.10 or 12.04 on old laptops fail?

    - by Adam
    I recently reimaged my Lenovo t400 with Ubuntu. However, after wiping two other systems (Compaq Presario 2100 and Dell Latitude D600) both hUbuntu 11.10 and Ubuntu 12.04 fail to load on boot. I am concerned that there is some type of issue using Ubuntu on these older systems as every part of the process has been repeated/attempted several times in the same manner as practiced in the successful load of the newer Lenovo t400. I now have two laptops without an operating system as the discs/thumb drives that were formatted to load on these devices do not seem to work. I would appreciate any assistance that you may be able to provide. Regards, -Adam

    Read the article

  • Why can't I install Windows 8 in Virtualbox on 12.04? [closed]

    - by The_Ubuntu_Kid
    I recently tried to install Windows 8 RP 32-bit in Virtualbox using Ubuntu 12.04 as the host. I have tried multiple settings for memory, hard drive size, etc. Every single time it has come up with this error Your PC needs to restart. Please hold down the power button Error code: 0x0000005D Parameters: 0x0306170A, 0x756E6547, 0x49656E69, 0x6C65746E I really like windows 8 and I would like to know how to fix this some time soon.

    Read the article

  • Why does apt-get keep waiting for headers on Oracle repository?

    - by hughdbrown
    I have this at the end of my /etc/apt/sources.list to retrieve Oracle code: deb http://oss.oracle.com/debian unstable main non-free When I run sudo apt-get update, the app gets stuck displaying this message: 100% [Waiting for headers] If I remove this, apt-get update runs without error. Is there a new, recommended URL for Oracle products and, generally, how do you fix this problem? I am pretty sure this did not happen on 11.10 and has only started with the move to 12.04. I have seen these answers and they do not help: apt-get update stuck on "Waiting for Headers" http://ubuntuforums.org/showthread.php?t=1689579 http://muffinresearch.co.uk/archives/2010/03/30/linux-fix-for-apt-get-update-waiting-for-headers/ http://www.kubuntuforums.net/showthread.php?57567-Ubuntu-problems-on-update

    Read the article

  • Choppy, stuttery & sped-up sound after update

    - by Synesso
    My audio has always worked perfectly on this hardware and 12.04. Yesterday I received an update, including a kernel update. Today the sound is periodically stuffed. In youtube, mkv files via VLC and embedded audio in web pages (memrise.com) the sound can become stuttery, sped up or stopped mid play-back. Where can I go to find if this is a known problem, or report it if it is not? Also, can I find a log that will tell me what packages were updated on my machine yesterday?

    Read the article

  • Authentication failure!

    - by veera
    At the time of installation i gave login password and that was the login keyring password and authentication password.. then once in user accounts-login options in dat for password options i set as none and then i locked.. after that the passwd which i gave at the time of installation remained as login keyring passwd but wen i entered that passwd for authentication while installing some packages it's showing authentication failure.pls try again.. so i couldnt download any packages or updates.. is there any possibilities to change/reset the authentication password.. pls help me..

    Read the article

  • Eclipse dissapears when minimized and will not come back (12.04 Unity)

    - by Kevin
    I have Ubuntu 12.04 x64 running Unity3d. I downloaded Eclipse from eclipse.org (not the software center) and created a desktop using gnome-desktop-item-edit. The resulting file is below, and I added it to the launcher on the left of the screen by dragging that file on. #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=/home/kevin/eclipse/icon.xpm Name[en_US]=Eclipse Exec=/home/kevin/eclipse/eclipse Name=Eclipse Icon=/home/kevin/eclipse/icon.xpm#!/usr/bin/env xdg-open However, when I minimize eclipse, eclipse disappears. There is no arrow to the left of the icon in the launcher like usual. And when I click on the launcher again, it tries to relaunch eclipse instead of bringing back the one that was minimized. Eclipse also does not show up when I alt-tab. I know it is still running because I can see it running with the system monitor. Note that Eclipse works properly until it is minimized. I have observed this behavior on two different computers now. Does anyone know how to fix it?

    Read the article

  • Ubuntu made my second HDD disappear from the BIOS!

    - by RWLarsen
    My netbook, an ASUS 1015PX, shipped with two harddrives. After switching to Ubuntu, the second drive isn't recognized by the OS or the BIOS. I've never formatted the second drive, so it's still set up for use by Windows. I guess I don't care about the data on the drive, I'd just like to be able to use it again. It's probably also worth mentioning that I'm very new to any form of Linux, so I'm remarkably new to the Terminal.

    Read the article

  • Default User Id at Login different from User Name in Terminal Shell

    - by Bill
    During the Ubuntu 12.04 LTS installation, I was prompted to enter a user name and password, so that a corresponding account could be created and set up for login. I replaced the one that was provided by default (i.e. '70319', which is the Windows 7 admin id) with a user name/id of my choosing. Now, when I turn on the computer, and choose to enter the Ubuntu operating system, the login id that is displayed is 70319 - that is, the one provided by Windows 7. However, when I open up a Unix/Terminal shell, the user id that is displayed at the prompt is the one I entered during installation. Otherwise, the installation of Ubuntu was a success! Is there some way of changing the user id that is displayed at the Login screen, so that it is consistent with the one I entered during installation? If it's any help, I installed Ubuntu using wubi on an ASUS Eee PC 1011PX running Windows 7, and ASUS Express Gate Cloud. Further details regarding the setup/installation can be found at the following link: Installing Ubuntu on an Eee PC 1011PX

    Read the article

  • Custom Xsession with Gnome visuals

    - by Siim K
    I'm trying to create a kiosk PC only for web browsing using this tutorial as a reference (only difference - I'm using Firefox instead of Chromium) It is working correctly in principle (only FF window opens when I log in using the Kiosk session) but it looks, well, super ugly. The scrollbar and right-click context menus look like from the 1990s - gray and boxy. How could I modify the session to get Gnome-like scrollbars/menus without the whole Gnome desktop (top/bottom panel etc)? My custom X session is currently set up like this: /usr/share/xsessions/kiosk.desktop: [Desktop Entry] Encoding=UTF-8 Name=Kiosk Mode Comment=Firefox Kiosk Mode Exec=/usr/share/xsessions/ffKiosk.sh Type=Application /usr/share/xsessions/ffKiosk.sh: #!/bin/bash while true; do firefox -height 768 -width 1024; sleep 1s; done

    Read the article

  • What is wrong with my Dot Product?

    - by Clay Ellis Murray
    I am trying to make a pong game but I wanted to use dot products to do the collisions with the paddles, however whenever I make a dot product objects it never changes much from .9 this is my code to make vectors vector = { make:function(object){ return [object.x + object.width/2,object.y + object.height/2] }, normalize:function(v){ var length = Math.sqrt(v[0] * v[0] + v[1] * v[1]) v[0] = v[0]/length v[1] = v[1]/length return v }, dot:function(v1,v2){ return v1[0] * v2[0] + v1[1] * v2[1] } } and this is where I am calculating the dot in my code vector1 = vector.normalize(vector.make(ball)) vector2 = vector.normalize(vector.make(object)) dot = vector.dot(vector1,vector2) Here is a JsFiddle of my code currently the paddles don't move. Any help would be greatly appreciated

    Read the article

  • JSP Iterating over a map of a list when the value might be null

    - by Brian Hoover
    How do I clear the value from the stack of a s:iterator? I'm trying to iterator over a TreeMultimap with a structure like: TreeMultimap<person, lineItems> persons; Using something like: <s:iterator value="attendeesForParticipantTypeEvents.asMap()"> <div> <s:property value="key.name" /><br /> <s:iterator id="currentSku" value="value"> <s:property value="currentSku.name" /><br /> </s:iterator> </div> </s:iterator> This works fine, except when the treeMultimap has null for lineItems, then it's taking the value from the previous iteration. So, a structure like: persons = {{"Person1",["Line1","line2"]}, {"Person2",["Line3","line4"]}, {"Person2",null}} Renders as: <div> Person1<br /> Line1<br /> Line2<br /> </div> <div> Person2<br /> Line3<br /> Line4<br /> </div> <div> Person3<br /> Line3<br /> Line4<br /> </div> Which seems to indicate that the value isn't being cleared on each iterator. What do I need to do to handle the case where value might be null? Thanks for your help

    Read the article

  • symfony2 blank page on web hosting server

    - by user1483085
    I try to deploy my project on my distant web server. I think the sf2 installation is ok I have the app_dev.php and the config.php pages, the check.php doesn't return me any error and I set up the acl on the directories app/cache and app/logs. but I cant have any of my pages from my controllers. If I try something like .../Symfony/web/app_dev.php/myurl I have a blank page. What can I do? thanks in advance

    Read the article

  • Passing viewmodel to actionresult creates new viewmodel

    - by Jonas Bohez
    I am using a viewmodel, which i then when to send to an actionresult to use (the modified viewmodel) But in the controller, i lose the list and objects in my viewmodel. This is my view: @using PigeonFancier.Models @model PigeonFancier.Models.InschrijvingModel @using (Html.BeginForm("UpdateInschrijvingen","Melker",Model)) { <div> <fieldset> <table> @foreach (var item in Model.inschrijvingLijst) { <tr> <td>@Html.DisplayFor(model => item.Duif.Naam)</td> <td> @Html.CheckBoxFor(model => item.isGeselecteerd)</td> </tr> } </table> <input type="submit" value="Wijzigen"/> </fieldset> </div> } This is my controller, which does nothing at the moment until i can get the full viewmodel back from the view. public ActionResult UpdateInschrijvingen(InschrijvingModel inschrijvingsModel) { // inschrijvingsModel is not null, but it creates a new model before it comes here with //Use the model for some updates return RedirectToAction("Inschrijven", new { vluchtId = inschrijvingsModel.vlucht.VluchtId }); } This is the model with the List and some other objects who become null because it creates a new model when it comes back from the view to the actionresult public class InschrijvingModel { public Vlucht vlucht; public Duivenmelker duivenmelker; public List<CheckBoxModel> inschrijvingLijst { get; set; } public InschrijvingModel() { // Without this i get, No parameterless constructor defined exception. // So it uses this when it comes back from the view to make a new model } public InschrijvingModel(Duivenmelker m, Vlucht vl) { inschrijvingLijst = new List<CheckBoxModel>(); vlucht = vl; duivenmelker = m; foreach (var i in m.Duiven) { inschrijvingLijst.Add(new CheckBoxModel(){Duif = i, isGeselecteerd = i.IsIngeschrevenOpVlucht(vl)}); } } What is going wrong and how should i fix this problem please? Thanks

    Read the article

  • get greatest prime factor in F#

    - by Alex
    I had VS 11 beta and the following code was working without problem: let rec fac x y = if (x = y) then y elif (x % y = 0I) then fac (x / y) y else fac x / (y + 1I);; Now I installed VS 2012 RC and I get the following error: The type 'System.Numerics.BigInteger -> System.Numerics.BigInteger' is not compatible with the type 'System.Numerics.BigInteger' Is code not correct or F# interactive? It's F# 3.0.

    Read the article

  • Search Complexity of a Hashtable within a Hashtable?

    - by spacker_lechuck
    Say we have a hashtable of size m, and at each bucket we store a hashtable of size p. What would the worst case/average case search complexity be? I am inclined to say that since computing a hash function is still atomic, the only worst case scenario is if the value is at the end of the linked list in the hashtable of size p, so O(n)? I have no idea how to calculate the average case for this scenario and would appreciate any pointers!

    Read the article

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