psql does not require a password on macOS with Postgres.app
"sudo -u postgres psql postgres" does not ask for password
Can Windows Virtual PC run a 64-bit OS? I'm creating a game where I have an Entity class that contains basic entity info (pos, health,..) and some functions. Enemies and Player later on inherit from this class.   Public class Entity {  public Vector2 position; public float health; ,...   Lets say that I have a function like this inside the Entity class:  public GameObject movingIntoEnemy(Vector2 movingToPoint) {     foreach (GameObject go in GameObject.Find("GameMap").GetComponent&lt;GameMap&gt;().enemyList)     {         if (go.GetComponent&lt;EnemyScript&gt;().enemy.position == movingToPoint)         {             return go;         }     }     return null; }   This function looks for a GameObject called "GameMap" and then cycles through enemies in it's list. If an enemy is found, it returns it's GameObject. Using GameObject.Find() is pretty ineffective, so what would be a better approach to this? I mean, I can't just easily use  public GameObject GameMap;   since the code is in a class, and this class needs to be instantiated first in my player/enemy scripts.  My question is - how do I attach gameObjects to this class before it is even created? What is the appropriate approach to this? I guess that I might pass these GameObjects to the class through it's constructor, but it would make things much more complicated.   Thanks in advance ;) Euclid Lemma proof reasoning This question is more concerned with understanding the reasoning behind mathematical proving rather than explaining this specific proof. I understand why this proof works.   This is the proof of Euclid Lemma from Wikipedia:      This   states that if $x$ and $y$ are relatively prime integers (i.e. they   share no common divisors other than 1) there exist integers $r$ and   $s$ such that      $rx+sy=1$. Let $a$ and $n$ be relatively prime, and assume that   $n|ab$. By Bézout's identity, there are $r$ and $s$ making      $rn+sa=1$. Multiply both sides by $b$:      $rnb+sab=b$. The first term on the left is divisible by $n$, and the   second term is divisible by $ab$, which by hypothesis is divisible by   $n$. Therefore their sum, $b$, is also divisible by $n$.   I am mostly concerned with this statement:      Multiply both sides by $b$:   My question is why this multiplication by $b$ happens. Is it because the person proving this observed that multiplying the equation by $b$ he would get a sum of two multiples of $n$? Or is there a mathematical rule by which we know that the next step is multiplying by $b$?  I am aware that this question might seem trivial to people here, but I just want to make sure. I just recently bought an arduino and requires gcc-avr/avrdude to compile the software. I installed avr for another microprocessor component a while ago but is obviously an outdated version (gcc version 3.3 20030512 (prerelease)) so I went ahead to update these but it didn't work.   (Please note that before hand I also broke my aptdaemon through an incomplete wine installation (couldn't get passed font installation agreement) but I fixed that via a re-installation then accepting the agreement.)   I am trying to update these by running  but the dependencies it requires cannot be installed due to avr... terminal reports   Reading package lists... Done Building dependency tree        Reading state information... Done build-essential is already the newest version. libncurses5-dev is already the newest version. libncurses5-dev set to manually installed. libusb-0.1-4 is already the newest version. libx11-dev is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: arduino-core : Depends: gcc-avr but it is not going to be installed avr-libc : Depends: gcc-avr (&gt;= 1:4.3.4) but it is not going to be installed Depends: binutils-avr (&gt;= 2.20) but it is not going to be installed binutils-dev : Depends: binutils (= 2.21.0.20110327-2ubuntu3) but 2.21.0.20110327-2ubuntu2 is to be installed libcwidget-dev : Depends: libcwidget3 (= 0.5.16-3ubuntu2) but it is not going to be installed Depends: libsigc++-2.0-dev but it is not going to be installed Depends: libncursesw5-dev but it is not going to be installed libmpfr-dev : Depends: libgmp3-dev (&gt;= 4.2.dfsg-1) but it is not going to be installed python-dev : Depends: python (= 2.7.1-0ubuntu5.1) but 2.7.1-0ubuntu5 is to be installed Depends: python2.7-dev (&gt;= 2.7.1-1~) but it is not going to be installed tk8.4-dev : Depends: tk8.4 (= 8.4.19-4) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   But running   apt-get -f install   results in   (Reading database ... 163021 files and directories currently installed.) Unpacking binutils-avr (from .../binutils-avr_2.20.1-1ubuntu2_i386.deb) ... dpkg: error processing /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-size', which is also in package avr-binutils 2.13.90.030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Unpacking gcc-avr (from .../gcc-avr_1%3a4.3.5-1_i386.deb) ... dpkg: error processing /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-g++', which is also in package avr-gcc-c++ 3.2.90.20030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried running update manager and updating my system via it but all I get is an error message  The following packages have unmet dependencies: arduino-core: Depends: gcc-avr but it is not installed avr-libc: Depends: gcc-avr (&gt;= 1:4.3.4) but it is not installed Depends: binutils-avr (&gt;= 2.20) but it is not installed   which then tells me to try running apt-get -f install which just results the same as last time.  So how can I fix my system, I really need the new avr, please :) BTW, my system is Ubuntu 11.04 TV series with pull out phone screens and pink/purple space ships I’m looking for a TV show where an alien race comes to Earth and sets up big purple/pink cylindrical or cone shaped spaceships in various cities around the world. The Aliens are not hostile but actually created peace and eliminated hunger on Earth.    I believe the aliens had some human features and were wise and calm the main actor had a phone with a pull out screen I believe the main actor worked for or with the aliens I believe that in the last episode some humans and aliens go into some kind of pods and perhaps leave Earth? one of the space ships was located in a major US city. Maybe Washington DC or another East Coast city   Could someone please tell me what TV series this is? I have been searching everywhere and cannot find it. Thanks! Running a script during booting/startup; init.d vs cron @reboot I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system.   The use of @reboot (this method was mentioned in  by hs.chandra) is some what simpler, by simply going into crontab -e and creating a @reboot /some_directory/to_your/script/your_script.txt and then your_script.txt shall be executed every time the system is rebooted. An in depth explanation of @reboot is   Alternatively by embedding /etc/init.d/your_script.txt into the second line of your script ie:  #!/bin/bash # /etc/init.d/your_script.txt  You can run chmod +x /etc/init.d/your_script.txt and that should also result for your_script.txt to run every time the system is booted.  Q1: What are the key differences between the two? Q2: Which is more robust? Q3: Is there a better one out of the two? Q4: Is this the correct way of embedding a script to run during booting?  I will be incorporating a bash .sh file to run during startup. Align equation left What is the best way to dump entire objects to a log in C#? How to shut down Ubuntu 11.10 host from within a Windows 7 VirtualBox guest? I am a new user for Ubuntu. I downloaded 13.10 yesterday and made a bootable USB with universal USB installer on my Lenovo IdeaPad Z580 laptop which is now using UEFI; everything appeared OK.  When I booted from the LiveUSB I got the choices of trying or installing Ubuntu but both of them keep giving me these error:  [ 1.929082] kernel panic-not syncing vfs unable to mount root fs on unknown-block (0.0)   Please tell me what is going wrong? Can FFMPEG extract images from a video with timestamps? What are good ways to make pdflatex output copy-and-pasteable? Did spacetime start with the Big Bang?  I mean, was there any presence of this spacetime we are experiencing now before big bang? And could there be a presence/existence of any other space-time before the big bang? How to prove a total order has a unique minimal element Let $R$ be a total order on set $S$. Prove that if $S$ has a minimal element, than the minimum element is unique.  I have difficulties with proofs. I know any graph of a total order is a straight line, which clearly has a minimal element. How doI tell when something is mathematically proven?  EDIT: this is how I would prove it  Let $x, y \in S$ such that x and y are minimal. Since S is a total order $x$ and $y$ are comparable and either    case 1: one comes after the other and therefore one isn't the minimal case 2: both are the same and $x=y$  I know this isn't a mathy argument and could use help making it more presentable. How does the computer know that the PC was not properly shut down? Actually, this question struck me because of power cuts in my house. When there is a power cut, there is a sudden loss of power from the computer.   How does the computer know that the shutdown was not properly done? Does $\pi$ contain all possible number combinations? E: dpkg was interrupted... run 'sudo dpkg --configure -a' I was running an upgrade with the apt-get command, and it was taking an exceptionally long time because half way through my ISP hit me in the face with their fair usage policy.   After sitting outside &amp; watching the rain for awhile my electronics regained consciousness, so I went back to complete the upgrade and my terminal scolds me with   "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."   The last bit of legible info was all this:  Installing (ri/RDoc) documention for (stuff and such) ERROR:  Could not find a valid gem 'watobo-0.9.8.724.gem' (&gt;= 0) in any repository rm: cannot remove `watobo-0.9.8.724.gem': No such file or directory  Setting up metasploit (4.3.0-bt1) ... Upgrading Pre-Existing Installation... /opt/metasploit/postgresql/scripts/ctl.sh : postgresql  (pid 1191) already running prosvc is running metasploit is running [*] [*] Attempting to update the Metasploit Framework... [*]   So on it goes for miles, talking about gem caches, rubies, &amp; stuff I wish I had. All up until:  A    lib/gemcache/ruby/1.9.1/gems/state_machine-1.1.2/gemfiles/active_record-2.1.2.gemfile.lock   ...and there it has sat, all night.    If I stop it, will I still get the dpkg error (on the off chance that I won't), or if so what do I need to to resume using apt-get commands and its Super Cow Powers? I tried to use xrandr to set 1680x1050 as a new mode to VGA output, but it says:  sudo xrandr --addmode VGA-0 1680 X Error of failed request:  BadMatch (invalid parameter attributes) Major opcode of failed request:  140 (RANDR) Minor opcode of failed request:  18 (RRAddOutputMode) Serial number of failed request:  35 Current serial number in output stream:  36 What do all those cryptic number and letter codes in a lens name mean? How to simulate data that satisfy specific constraints such as having specific mean and standard deviation?