Unable to install new software or update the OS and sudo apt-get -f install fails

Output of sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   libcdaudio1 libenca0 libllvm3.8 libllvm3.8:i386 libqt5clucene5 libqt5help5   libqt5webkit5-qmlwebkitplugin libqt5xmlpatterns5 libslv2-9 libx265   linux-headers-4.4.0-75 linux-headers-4.4.0-75-generic   linux-image-4.4.0-75-generic linux-image-extra-4.4.0-75-generic   linux-signed-image-4.4.0-75-generic musescore-common   qml-module-qtquick-localstorage qtdeclarative5-dialogs-plugin   qtdeclarative5-localstorage-plugin qtdeclarative5-privatewidgets-plugin   qtdeclarative5-window-plugin Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   libkmod2:i386 The following NEW packages will be installed:   libkmod2:i386 0 upgraded, 1 newly installed, 0 to remove and 71 not upgraded. 90 not fully installed or removed. Need to get 0 B/45.9 kB of archives. After this operation, 136 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 306522 files and directories currently installed.) Preparing to unpack .../libkmod2_22-1ubuntu5_i386.deb ... Unpacking libkmod2:i386 (22-1ubuntu5) ... dpkg: error processing archive /var/cache/apt/archives/libkmod2_22-1ubuntu5_i386.deb (--unpack):  trying to overwrite shared '/usr/share/doc/libkmod2/changelog.Debian.gz', which is different from other instances of package libkmod2:i386 Processing triggers for libc-bin (2.23-0ubuntu9) ... /sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link  /sbin/ldconfig.real: /usr/lib32/nvidia-375/libEGL.so.1 is not a symbolic link  Errors were encountered while processing:  /var/cache/apt/archives/libkmod2_22-1ubuntu5_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Any help is appreciated


Inversion of a matrix with zero diagonal elements

Is a square matrix with positive values at the off diagonal elements and zero value at the diagonal elements always invertible (the off diagonal elements in one column are the same)? In what condition it is not invertible?  Thanks,


I've been at this for almost two hours and no one seems to have the same problem as I and I doubt this will be solved but I'll try anyway.  this is the code  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   this part is fine  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}}   it's just when I add this  ,{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   Minecraft gives me the error:     Invalid JSON at line 1 column 203   I've tried to space it out and figure out what column 203 is but I can't, I don't know what I did. Anyone got any ideas?


Installation of latest version R for linux

First I typed  sudo gedit /etc/apt/sources.list   after that I got one sources list then I typed  deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/   then I get the error like this  No command 'deb' found, did you mean:  Command 'derb' from package 'icu-devtools' (main)  Command 'deb3' from package 'quilt' (main)  Command 'debc' from package 'devscripts' (main)  Command 'dwb' from package 'dwb' (universe)  Command 'xdeb' from package 'xdeb' (universe)  Command 'debi' from package 'devscripts' (main)  Command 'dab' from package 'bsdgames' (universe) deb: command not found   How should I proceed?


How can I download an APK file from the Play Store?

I can't download apps from the Play Store on my Android device (maybe due to a network issue), so I'm wondering how could I download the APK file of an app on my PC from ?


Why is there a pointer cursor over the whole row in reputation tab table when only the arrow is actually clickable?

I was trying to view what rep I earned in my early days starting with Meta.SE. There was this section (in red box) where Google Chrome said I could click to open but I couldn't. I had to click the arrow sign (in red circle) to be able to open the tab:  It is weird that I can't click in a place where I could supposedly can click. Why can't I open the tab when pressing the red box area and have to click the small arrow to open? It can be annoying to have to put your mouse just right over that small arrow while Google Chrome says that you can click somewhere else.


Novel where a meteor is about to destroy earth?

I read this book about ten years ago, I unfortunately don't remember much about the general plot but I do remember some odd specific details. Firstly, although it was definitely a stand-alone book, I read it in a collection titled something along the lines of "Exciting Stories for Boys". I think the first Guardians of Ga'Hoole book was included in this collection but I might be wrong.  The book itself was a YA story about a high school boy who lived on earth shortly before it got struck by a meteor; a lot of the book was him going about normal high school business, but at some point he learns that the world is going to end and only a certain number of important people and their families got to board a ship to another planet (his dad was a VIP for some reason I think). I remember that when he boards, there was a child on the ship who wanted to bring a teddy bear, but wasn't allowed to because they didn't have room. Eventually, they put some tubes in the protagonist to put him in some sort of cryo, and then the book ends giving us a depressing description of most of the characters we met during the book dying to a meteor impact (including the main character's crush who we saw a lot of).  I know this isn't a lot to go off of, but I believe the book was relatively popular and had some sequels (though I didn't read any).


Python error when upgrading from 18.10 to 19.04

I have Python 2.7.15+ symlinked to python and Python 3.6.7 symlinked to python3. When I try to upgrade Ubuntu to 19.04 with  sudo do-release-upgrade   it returns the following error:  Traceback (most recent call last):   File "/tmp/ubuntu-release-upgrader-k7w2kx7r/disco", line 8, in <module>     sys.exit(main())   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeMain.py", line 238, in main     if app.run():   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 2085, in run     return self.fullUpgrade()   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1906, in fullUpgrade     if not self.askLivepatch():   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1175, in askLivepatch     version = next((r.version for r in di.get_all("object") if r.series == self.toDist), self.toDist) AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all' Error in sys.excepthook: Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/problem_report.py", line 497, in add_to_existing     self.write(f)   File "/usr/lib/python3/dist-packages/problem_report.py", line 450, in write     block = f.read(1048576)   File "/usr/lib/python3.6/codecs.py", line 321, in decode     (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte  Original exception was: Traceback (most recent call last):   File "/tmp/ubuntu-release-upgrader-k7w2kx7r/disco", line 8, in <module>     sys.exit(main())   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeMain.py", line 238, in main     if app.run():   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 2085, in run     return self.fullUpgrade()   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1906, in fullUpgrade     if not self.askLivepatch():   File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1175, in askLivepatch     version = next((r.version for r in di.get_all("object") if r.series == self.toDist), self.toDist) AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'   I tried to upgrade all Python packages before upgrading Ubuntu:  pip freeze --local | grep -v '^-e' | cut -d = -f 1  | xargs -n1 pip install -U   Is that why it fails?


Difference between `\sl` and `\slshape`?

What's the difference between using \sl and \slshape? I don't see any in the pdf.


Stick figure AES: what does "I take each column and mix the bits in it" do?

I've been reading  to help me understand how AES works. In  picture it says:  I take each column and mix the bits in it.  But then never explains how he mixes the bits. I've been searching for a while, but can find nothing about it. Can anyone explain what is happening in this step?


Getting libpng error for QGIS on Ubuntu 19.04?

So I have already attempted the solutions that were posted here, and I still get the same issue even after reinstalling QGIS:   I keep getting the following error message:  libpng warning: Application was compiled with png.h from libpng-1.6.36 libpng warning: Application  is  running with png.c from libpng-1.2.56 libpng error: Incompatible libpng version in application and library   And then when I try to open anything with QGIS, it crashes and then I get this message in the terminal:  libpng warning: Application jmp_buf size changed QGIS died on signal 11Could not attach to process.  If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf ptrace: Opération non permise. No thread selected No stack. gdb returned 256 Abandon (core dumped)   I have tried to rebuild GDAL, which I have installed from source, with updated libpng headers, but that didn't fix my issues. I also installed QGIS from the following apt repository:  Atteint :8 https://qgis.org/ubuntu disco InRelease      And with my installed QGIS, I tried the following command, and I got nothing back:  ldd `which qgis` | grep png   I am at a loss as to what to do, short of completely reininstalling Ubuntu.  Has anyone else encountered this issue and found a way to fix it?  EDIT: This is not a duplicate question because there are additional error messages that came with this particular issue, and the fixes that addressed the previous so-called "duplicate" question, as I stated before, did not work. If they worked, and if there weren't also new error messages that make this situation different, then I wouldn't be asking it.


Apt can't find package libasound2-dev 20.04 arm64

I'm trying to install libasound2-dev on a freshly installed Ubuntu 20.04 on my Raspberry Pi 4 but apt reports that it can't find the package.  Running apt search libasound2 yields:  ubuntu@ubuntu:~$ sudo apt search libasound2 Sorting... Done Full Text Search... Done alsa-topology-conf/now 1.2.2-1 all [installed,local]   ALSA topology configuration files  libasound2/now 1.2.2-2.1 arm64 [installed,local]   shared library for ALSA applications  libasound2-data/now 1.2.2-2.1 all [installed,local]   Configuration files and profiles for ALSA drivers  ubuntu@ubuntu:~$   Looking at the package repository however, it should be available for arm64:   My /etc/apt/sources.list is below (after removing commented lines).  deb http://ports.ubuntu.com/ubuntu-ports focal main restricted deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted deb http://ports.ubuntu.com/ubuntu-ports focal universe deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe deb http://ports.ubuntu.com/ubuntu-ports focal multiverse deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted deb http://ports.ubuntu.com/ubuntu-ports focal-security universe deb http://ports.ubuntu.com/ubuntu-ports focal-security multiverse   If it helps, it seems like this problem isn't specific to libasound2-dev. It seems that apt can't find anything in the libdevel section.


Why does the software updater say check your internet connection? Ubuntu 13.04

When I try to update the software updater says check your internet connection. (Failed to access repository information)  My Internet is working just fine.  I have tried many different servers. (Main,US,ext.)  Also, I do not have a proxy.


Why does a bigger sensor have better dynamic range?

I already understand all the theory behind how a bigger sensor leads to better control of depth of field, and lower noise. But I've yet to find a place that can explain why a bigger sensor gives you a bigger dynamic range?


I am using ubuntu 12.04. I tried to install Eclipse so I followed some steps from a website in that they have mentioned the following steps:  sudo su chown -R root:root /home/downloads/eclipse && mv /home/downloads/eclipse /opt  ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse   To execute eclipse use  eclipse   But it showed me as eclipse not installed and it showed me to install it. When I tried to install it I had net problem so it didn't install. After that I found that Downloads directory was lost.


How did Ant Man interact with Yellowjacket's suit after shrinking to sub-molecular levels?

In the movie, when Ant Man realized he needed to shrink to sub-molecular levels to enter Yellowjacket's suit - how did he then interact with the components to destroy the suit?  Titanium has a density of 4.506 g/cm3 at room temperature while silicon (the inside of the suit appears to have standard electronic circuitry) has a density of 2.3290 g/cm3 so roughly half as dense.  If Ant-Man can pass between titanium molecules then he should pass straight through the electronics.  In fact, human muscle tissue is only about 1.06 g/cm3 so he should have proceeded to pass through Yellowjacket without interacting with any other molecules.  The same question applies to Mrs. Pym when she shrunk to enter the missile.


Debian as TCP-Server for Serial Port redirecting

I want to start a tcp listener on debian. One client should be able to connect and should get inputs of serial port in the tcp connection. And when the client sends data through the tcp socket the data should be sent into the serial port.  I found other solutions where the linux server connects to another server redirects the serial port ().  But I want that my machine is a tcp server.  Is there a built-in tool in debian that helps me doing this?


Why I can't initialize a variable in switch case block

I am writing some Win32 program, and I meet a small problem, why I cannot initialize a Variable in switch case block.  just like it:  and when I do like this, it will be ok.  And now I want to know why.


Relay email for some addresses to a different server

Is it possible to configure postfix to relay email to a new server for only some addresses without changing the address.  I'm testing a new email server (in this case, Office365). I want to test with a user user@example.com who is currently receiving email locally.  I want to configure postfix to send user@thursby.com email to example-com.mail.protection.outlook.com without changing the address (user@example.com).  I want to do this to verify delivery before changing the MX record for the domain example.com.  EDIT  Thank you for pointing me to the same question asked previously.  Given that information, I was able to figure out the steps.  Here's what I did:   Edit the file /etc/postfix/main.cf Add the following line near TRANSPORT MAP:   transport_maps = hash:/etc/postfix/transport   Run "postfix reload" to take new setting. Edit the file /etc/postfix/transport Add the following line:   username@domain.com  smtp:domain.mail.protection.outlook.com:25   Run "postmap /etc/postfix/transport" to create the hash. Verify that the solution work.


Proving the equality of sequences' limit

Prove that if $a_n$ is convergent, then  $M_n:=\frac{1}{n}\sum_{1}^{n} a_n$ satisfies $\lim M_n=\lim a_n$.  (sorry for English)


Why am I allowed to turn my focusing ring beyond infinity?

Is there a good reason why I can turn the focusing ring on my lenses beyond infinity mark on focusing scale? Following recent questions about focusing in the dark ( and ), it sounds like a real usability issue.  When I'm focusing manually, I only care about the infinity mark on my focusing scale, but there is around 5-10mm of room (depending on the lens) beyond infinity mark. Why is it there?


Should I read 'Catalyst: A Rogue One Novel' before going to see Star Wars: Rogue One?

I have acquired a copy of  (in a game of chance) and I'm due to see  on opening weekend.   Has there been any specific advice offered (by Disney) as to whether or not I should read Catalyst before going to see the Rogue One movie?


I am heating up a wire with a current, and I am trying to express the cooling losses. What is the expression of dT/dx over a wire?


Re-gaining root access to an EC2 EBS-boot image

I'm using an Alestic image which disables root SSH logins, but provides a user "ubuntu" with NOPASSWD sudo privileges. See .  In the course of trying to add a new user to the sudoers file I inadvertantly created another line for the "ubuntu" user, this time without NOPASSWD. I have now apparently lost root access to this machine.  Is there some way to mount the EBS root volume on a different instance (fixing the sudoers file) and then re-launch the server?  Or am I totally screwed?


Sci-fi book about "the Wall" and a group of schoolchildren who fight the dark forces who roam north of it

I’m trying to remember the name of a book I can only just remember. It was for older children, and was something about "the Wall", and north of it are ancient and scary otherworldly forces (but not A Song of Ice and Fire). I think a group of children, from a school on the border by the wall, end up being the heroes and the novel ends with a battle in the school.


Could Markdown and mini-Markdown have the same support for backticks?

In comments, mini-Markdown sometimes has a different syntax for backticks within backticks: when the code starts and/or ends with a backtick, one needs escaping. In those cases, could mini-Markdown also support adding one space to the delimiters, just like Markdown does?  Markdown:   Use any unique number of backticks in the delimiter to allow for (other sequences of) backticks in the code itself: ```code with `embedded```` backticks``` yields code with `embedded```` backticks. Add one additional space to the delimiters above if the code fragment starts and/or ends with backticks, : `` `code with `embedded```` backticks` `` and Perl's `` $` `` yield `code with `embedded```` backticks` and Perl's $`.   Mini-Markdown (for comments):    as in Markdown†. The Markdown extra-space . Instead, this  single opening and closing backticks, and escaping of all embedded backticks: `\`code with \`embedded\`\`\`\` backticks\`` and `$\``.   I realize that the current escaping should always be supported to preserve the existing comments. But maybe mini-Markdown could also support the extra space.  † One could also escape, like `code with \`embedded\`\` backticks`, which however does not work in Markdown. Until today, I thought this escaping was required in comments. But today I realized that Markdown and mini-Markdown behave almost the same.


Why didn't Gollum grow old and die after he lost the One Ring to Bilbo?

Gollum had his life largely extended because he possessed the One Ring. He appeared to be an old, deformed, and twisted creature.  According to , he had the Ring for 478 years. His loss of the Ring and the events of The Lord of the Rings are separated by around 77 years.  Did the Ring continue to extend his life after he lost it?


Let $X$ be an infinite compact Hausdorff space and let $C(X)$ be the ring of real-valued continuous functions on $X$. Does $(0)$ have a primary decomposition in this ring?   I feel like the answer is no. My reasoning is as follows: suppose $(0)$ has a minimal primary decomposition $(0) = \bigcap^n_{i = 1} \mathfrak{q}_i$ with $r(\mathfrak{q}_i) = \mathfrak{p}_i$. Now every ideal in $C(X)$ is contained in a maximal ideal of the form $\mathfrak{m}_x$ consisting of the functions which vanish at $x$ (and all the maximal ideals have this form). It must also be the case that each $\mathfrak{q}_i$ is contained in a unique $\mathfrak{m}_i$ by the minimality of the primary decomposition (i.e. $\mathfrak{q}_i \not\supseteq \bigcap_{j \neq i} \mathfrak{q}_j$). Then all the $\mathfrak{q}_i$ intersect at $0$ only; therefore the $\mathfrak{q}_i$ are not unique and our decomposition is not minimal.  I am unsure of the step where I claim that each $\mathfrak{q}_i$ is contained in a unique $\mathfrak{m}_x$. I was thinking if that wasn't the case then we would have $\mathfrak{q}_i \supset \mathfrak{a}$ for some $\mathfrak{q}_i$ and thus $\mathfrak{q}_i \supseteq \bigcap_{i \neq j} \mathfrak{q}_j$, which contradicts the minimality of the prime decomposition.


What is the word whose meaning is to "oversimplify a complex issue; often incorrectly?"

I can't think of the word and it's been bothering me for some time now. I have attempted to reverse search it, to no avail. If someone could oblige me with the word whose definition means to oversimplify an often complex issue, I would most appreciate it!


A relation between a group and its subgroups

Let be $H$ a proper subgroup of finite group $G$. Who can we show that $G\not=\cup_{a \in G}aHa^{-1}$?


How is $$\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}= \log 2?$$  I haven't done sequences in a long time, therefore proving this seems almost impossible. How is this sum gotten. Help very much appreciated.


Contributing UX/UI to Free/Open Source Projects?

I'd like to exercise some of my UX/UI knowledge by contributing to a couple of the FOSS projects that I've used over the years. I've found that these projects usually have a huge deficiency in the area of UX.   I've also found the task of contributing very daunting. I setup some user scenarios and testing for a bug tracking suite and tried to submit my findings, but couldn't get a response from anyone on the team, including the UX/UI team "lead."  A fork of that same project has resulted in some UI changes, but they're still missing UX and I'd like to chip in. What am I up against? Will the scenarios, wireframes, suggestions, and testing data be useful to a team of donation developers? Does anyone have experience with this?


Summation of Combinations leads to $2^n$

From trial and error I know that $$\sum_{k=0}^n\binom{n}{k}= 2^n$$ Remember studying it. But can't prove it theoretically now. Can someone prove the above


What's the difference between STDIN and arguments passed to command?

I could use the either form to execute the cat method:  cat file_name cat < file_name   The result is the same  Then I want to execute man in the format of stdin  man < file_name   While file_name contains:  # file_name cat   But it pops up  What manual page do you want? instead of execute man cat.  I want to know why cat could accept stdin as arguments but man cannot.  And what's the difference between command line arguments and stdin?


Difference between offset and exposure in Poisson Regression

Exposure and offset are two techniques often used in Poisson regressions by actuaries to predict claim frequency .  From my understanding, offset and exposure are the same things, so I don't understand why there are two terms to describe the same thing.  Is it correct or there are special cases (other than Poisson regression for instance) where offset and exposure are different things?


What is the best way to share a free role playing game? I've painstakingly worked to make it easy to understand and play. I'm giving it away to get my works out in the gaming world.


Are diet soft drinks really a healthy alternative?

I am wondering about this because I drank a diet coke the other day, it had no fat, no sugar, no calories... Is it actually healthy to drink?


Strategy to kill Developer in Candy Box 2?

I watched a YouTube video where someone killed the Developer. First, he went up to him and melees him using the Scythe. Right before the "Hello" attack hits, he uses and Turtle Potion and Black Hole. He says the Turtle Potion will protect him from the Developer's Black Hole and since he's touching him, the Developer takes 2 Black Holes. I tried the exact same thing but I died. Is there another strategy?  I have:   Pink Gloves Scythe 1560 hp Knight's Body Armour (Non-enchanted) 40% more power   (There is a similar question but i have different stats)


How do I better protect myself on Stack Exchange?

This is a FAQ proposal. Its aim is to advise and better protect users across the Stack Exchange network but especially to users who can be as . It is hoped that this guide will help users make informed choices about their safety online and what to do if they happen to witness abusive behaviour on any Stack Exchange site.      How safe are my personal details/email address on Stack Exchange? What information in my profile is visible to visitors?  If I'm  scared for my safety because of what someone says on a Stack Exchange site or in chat, what can I do? Who do I contact? What should I do if I see someone posting abusive comments on Stack Exchange?


Which option to choose in the advanced formatting?

I'm trying to install Ubuntu on my Netbook Asus Eeepc-900 from bootable USB. When I see partitions screen I just wanna one single partition and then install Ubuntu, but has some many options that I don't know which choose.  Here are the options: 1  2  3   Well, I would leave only a partition with Ubuntu installed.  Grateful!


Preventing form submission when Enter is pressed

I have a form with a disabled submit button. Even though the user can't press this button, he can still hit Enter to submit the form. How do I prevent that?


Alert box when pressing button and there's user input that's not saved

I have multiple pages with some input fields. On this page, I have a previous and next button as well as a save (submit) button. When I press the save button, it will save the user input in the database.  However when I press next or previous, I'll get an alert with:'The user input is not saved yet, untill you click the save button.' Pressing OK will go to the next page and cancel will make it stay on this page. This is what I want, however the alert will always pop up whenever I press next or previous even when there's no user input or in case of editting the user input has not changed. So I dont want the alert to popup whenever nothing has changed or nothing is filled in.  This is my javascript function:  function something(evt) {         if ( ! confirm("The user input is not saved yet, untill you click the save button.") ) evt.preventDefault(); }   buttons:  <a onclick="something(event)" href=""> </a>   Also on some pages, there are select boxes as well. These have standard values and the select boxes cant be empty so I can't check on the select boxes. The check should only be on textareas and textfield.  I am not able to figure out how to accomplish this.  How would I get to check if the user input(textarea, textfield) has changed or is not empty in my case?


How can I auto adjust a equation to appear in the entire page? (Scale to equations, is this exist?)

If I have a document like this:  \documentclass[landscape, 12pt]{report}  \usepackage[landscape]{geometry}  \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}  \usepackage{amsmath, amssymb, graphics, setspace} \newcommand{\mathsym}[1]{{}} \newcommand{\unicode}[1]{{}} \newcounter{mathematicapage}  \begin{document}    \begin{equation}\label{Equation:Naive_Bayes_Classifier}     P\left(H_h|E_1,E_2,\ldots ,E_e,\ldots    E_{\mathbb{E}}\right)=\frac{P\left(H_h\right) P\left(E_1|H_h\right)    P\left(E_2|H_h,E_1\right) \text{$\ldots $P}     \left(E_e|H_h,E_1,E_2,\ldots ,E_{e-1},E_{e+1} \ldots, E_{\mathbb{E}}\right) \text{$\ldots    $P}     \left(E_{\mathbb{E}}|H_h,E_1,E_2,\ldots ,E_{\mathbb{E}-1}\right)}{ P\left(E_1,E_2,\ldots,E_e, \ldots    ,E_{\mathbb{E}}\right)} \end{equation} \end{document}   How can I auto adjust this equation to appear in the entire page, using all horizontal space? (Without badboxes or smaller than the width of the page?)  If is there a kind of scale to use in equations, giving explicity how greater the equation should become, this solver my problem too.


Is using is_string() a good defense against SQL Injection?

I was trying to look for mitigation of SQL Injection against my web application based on PHP and MySQL. The first rule is to sanitize the query; Hence I am using mysql_real_escape_string() function for that  Here is what my snippet looks like  if (is_string($string)) {     return $mysqli->real_escape_string($string); } else {     return ""; }   Here, $string would contain the user-input. After this filtering and escaping, I would use INSERT INTO query to insert into database.  This filter, will thwart any malicious user inputs like haha' , inj'' etc as is_string() will detect those string and apply real_escape_string() to escape those evil characters. The only possibility I can think an attacker can do is use a Numeric payload for SQL Injection but I don't know any Numeric payload itself has caused Injection yet so far.  So, will this filter keep away the bad guys or is it bypassable ?  EDIT: I know Prepared statements are much better and a good coding practice while launching app in production. But for this question, I am specifically looking answer to how anyone can thwart this filter itself because it does seem strong to me!


Proving $f(x)=1/x$ on $(0,1 )$ is not uniformly continuous

My questions are about the reasoning made in the note  (which is in Norwegian).   To prove that $f(x)=\frac{1}{x}$ is not uniformly continuous, the authors use the following "result" (Sats 2.12 in the note, which I translate below):  Result 2.12: If for every $h>0$ we have that $|f(x+h)-f(x)|$ is unbounded on $I$, then $f$ is not uniformly continuous on $I$.  Proof: The result follows directly from the definition of uniform continuity.   In Example 2.14 (Eksempel 2.14), the authors look at  $$|f(x+h)-f(x)|=\left|\frac{1}{x+h}-\frac{1}{x}\right|=\left|\frac{h}{x(x+h)}\right|.$$ They then claim that the above quantity is not bounded for any $h>0$, since   $$\lim_{x\rightarrow 0}\left|\frac{h}{x(x+h)}\right|=\infty.$$  Question 1: Is it not possible to choose $h=x^2$, thereby obtaining   $$\frac{h}{x(x+h)}=\frac{1}{\frac{x}{h}(x+h)}=\frac{1}{x(1/x+1)}=\frac{1}{x(1/x+1)}=\frac{1}{1+x}\rightarrow1 \text{ as }x\rightarrow 0.$$  Therefore, |f(x+h)-f(x)| is not unbounded, so we cannot use the result "Result 2.12". Is my argumentation correct?? Is it OK to choose $h$ like I have done?   Question 2: However, it seems correct to me that my argumentation is all you need to prove that  $f(x)=\frac{1}{x}$ is not uniformly continuous on (0,1). Here $x_1=x,x_2=x+x^2$, so that $|x_1-x_2|$ can be made arbitrarily small. However $|f(x_1)-f(x_2)|=1$, which stays the same regardless of how small we make $|x_1-x_2|$. Is this correct?


Where does Charles Xavier's seizure power come from?

In Logan, Charles Xavier suffers from dementia. He has seizures which seem to cause shock waves, resulting in headaches, and time slowing down. Does he have this power in the comics?


Contraction of "There are" to "There're"

I'm a soon published author going through my final edit of the book and I got stuck thinking about this one. I understand that when writing this you should type in "There are". When people are saying this though, they usually say it quickly contracting it to "There're". Here's the question: When I am writing what someone is saying, could I spell it as "There're", or will I have to type the correct way of "There are" while risking losing a certain "way of speaking" to the sentence?  I know some of the sentences above may have a slightly strange way of being put forth, but English is not my native language and it's getting late here. I hope you understood my question.


Can you please give me time approximation(like n^2 , n*2 , nlogn) of this New Selection Sort Algorithm made by me

New Modified Selection Sort Algorithm (It outperforms Insertion Sort in some cases) goes like standard Selection Sort Algorithm , but instead searching for only a minimum in an Array , it searches for minimum and maximum in one iteration. Then it swaps minimum to start of an Array and maximum to end of an Array. Increments start_pointer, decrements end_pointer, and then goes iterative again. I think time complexity it needs to sort N size array is : N + (N-2) + (N-4) + (N-6) + ... + 1. Can someone give me approximation of this formula. I will be appreciated.   public static void DoubleSelectionSort(int[] Array, int startpos, int endpos) {      /*Double Selection Sort Algorithm , made by Milan Domonji 1986 , MilanDomonji@yahoo.com*/      while(startpos < endpos) {          int min = Integer.MAX_VALUE;         int max = Integer.MIN_VALUE;          int minpos = startpos;         int maxpos = endpos;          for(int i = startpos; i <= endpos; i++) {             //main loop that finds minimum and maximum from an Array              if (Array[i] <= min) {                 min = Array[i];                 minpos = i;             }              if (Array[i] >= max) {                 max = Array[i];                 maxpos = i;             }             }         /* I added missing part of algorithm so it works now (Edited) */         if (maxpos==startpos && minpos==endpos) {              Swap(Array, minpos, maxpos);          }else {              if (maxpos==startpos) {                  Swap(Array,minpos,startpos);                 Swap(Array,minpos,endpos);                             }else {                 Swap(Array,minpos,startpos);                Swap(Array,maxpos,endpos);            }         }          startpos++;         endpos--;   } }  private static void Swap(int[] Array, int A, int B) {      int tmp = Array[A];     Array[A] = Array[B];     Array[B] = tmp;  }   Algorithm Sorts all the times correctly.


App Store on OS X broken after system restoration from backup

I recently had to restore my installation of OS X 10.9.4 from a backup. Since then(*), the App Store application is broken. It displays an empty window showing the MAS symbol and the menu bar. Clicking icons in the menu bar highlights them all. Nothing else happens. See the console output below:     01.10.14 19:09:08,079 storeagent[759]: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* setObjectForKey: key cannot be nil'   *** First throw call stack:   (       0   CoreFoundation                      0x00007fff8c63425c __exceptionPreprocess + 172       1   libobjc.A.dylib                     0x00007fff8cdb1e75 objc_exception_throw + 43       2   CoreFoundation                      0x00007fff8c52f22e -[__NSDictionaryM setObject:forKey:] + 1102       3   storeagent                          0x000000010e751b0b storeagent + 31499       4   libdispatch.dylib                   0x00007fff904df1bb _dispatch_call_block_and_release + 12       5   libdispatch.dylib                   0x00007fff904dc28d _dispatch_client_callout + 8       6   libdispatch.dylib                   0x00007fff904de673 _dispatch_queue_drain + 451       7   libdispatch.dylib                   0x00007fff904df9c1 _dispatch_queue_invoke + 110       8   libdispatch.dylib                   0x00007fff904ddf87 _dispatch_root_queue_drain + 75       9   libdispatch.dylib                   0x00007fff904df177 _dispatch_worker_thread2 + 40       10  libsystem_pthread.dylib             0x00007fff96e9bef8 _pthread_wqthread + 314       11  libsystem_pthread.dylib             0x00007fff96e9efb9 start_wqthread + 13   )   01.10.14 19:09:08,519 com.apple.launchd.peruser.502[163]: (com.apple.storeagent[759]) Job appears to have crashed: Abort trap: 6   Enabling the debug menu (terminal: defaults write com.apple.appstore ShowDebugMenu -bool true) and resetting the application had not effect (same console output as mentioned above).   I installed OS X 10.9.5 using the terminal. The Mac App Store application worked until the next reboot.   What can I do short of reinstalling OS X from the recovery partition?


Attempt to invoke interface method on a null object reference finishComposingText()

I am running robotium on a nexus 6 and getting the following error    java.lang.NullPointerException: Attempt to invoke interface method      'boolean android.view.inputmethod.InputConnection.finishComposingText()' on      a null object reference  at android.view.inputmethod.InputConnectionWrapper.finishComposingText(InputConnectionWrapper.java:78)  at android.view.inputmethod.InputMethodManager.reportFinishInputConnection(InputMethodManager.java:859)  at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3253)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5221)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)   The line in question is:       solo.enterText((android.widget.EditText) solo.getView("amount"), "11.11");     I have verified that the field exists, not sure what else could be causing the problem.  Any help would be appreciated


When I am trying to install the git-all from the repositories sudo apt-get install git-all at the end of the installation process I get some errors:      start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package runit is not configured yet.  dpkg: error processing package git-daemon-run (--configure):  dependency problems - leaving unconfigured   It seems that the runit package is not configured yet, the system is a fresh Ubuntu 16.04 install. Does anyone know how I should configured it?


I have data in localStorage set with user details like this  {"name":"aa","email":"aa@aa.aa","password":"aaaa","confirm_password":"aaaa"}   and another one like  {"otp":"1235"}   Now, I want to retrieve this as an single object like this  {"name":"aa","email":"aa@aa.aa","password":"aaaa","confirm_password":"aaaa","otp":"1235"}   Please help. Thanks.


I know that the Elastic net takes care of the limitations of Lasso by adding an L 2 penalty term. In the attached picture has been mentioned that the two formulas are equivalent. I tried to show this, but I failed.  Could you please help me to see how these two equations are equivariant?


So this if the first time this has ever happened too me and I was wondering what it is. I just downloaded Minecraft and there is no area where i can change my version too 1.8.9/1.7.10 all i see when I do it is blank  Im just Wondering on how come even tho i hit the Repair button on the minecraft.msi download it dosnt fix it... If there is a way too fix this let me know cause my friend wants too play and I cant cause of this..


What does 301 in kernel version signify?

I have been using my fc22 machine for a while and wanted to learn more about kernels and how to build kernels. I wanted to know about what 301 on kernel version signifies.  Is it some kind of security patch or additional modules?   Output of uname -a : Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


PHP PDO Syntax error or access violation: 1064 on insert

I have a table name boards, and I'm trying to insert data using the current code  function createBoard( $name, $desc  ) {     try {         $sth = $this->getLink()->prepare( "INSERT INTO boards(id,memberid,name,desc,datecreated,isactive)              VALUES(?,?,?,?,?,?)" );          $uuid = $this->uuid();         $memberid = 1;         $date = Utils::getDate();         $isactive = 1;          $sth->bindParam( 1, $uuid );         $sth->bindParam( 2, $memberid );         $sth->bindParam( 3, $name );         $sth->bindParam( 4, $desc );         $sth->bindParam( 5, $date );         $sth->bindParam( 6, $isactive );         return $sth->execute();     } catch( PDOException $e ) {          /*          * save the error to the error log defined as @ERROR_LOG          */          file_put_contents( ERROR_LOG, ( "\n" . Utils::getDate() . " : " . $e->getMessage() ), FILE_APPEND);           die( "FATAL ERROR...Please check the error log." );     } }   However, every time I get this error "2012-05-11 14:40:50 : SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc,datecreated,isactive) VALUES('d5989c7e-9b98-11e1-88cd-0026b936528c','1' at line 1"  I have tried the same function using bindValue() and just putting the array with direct values into the $sth->execute() function but I always receive the same error. Maybe an outside eye can spot something I'm missing or doing wrong?


Software Updater does not inform me of Ubuntu 16.04

I've searched for posts on this, but found nothing that can actually explain what is going on here.  I have Ubuntu 14.04 LTS installed. I'm looking to update to 16.04.1 LTS. I have the "Software & Updates / Updates / Notify me of a new Ubuntu version" set to "For long-term supported versions", but it does not inform me of 16.04.1 LTS like it should.  Just for a test, I changed this setting to "For any new version" and it informed me of 15.10 (what about 16.04 and 16.04.1!?)  Seems like something is not working correctly here. Is anyone else seeing this behavior?  Thank you for any help or suggestions!


Split equation with \begin{split} - brackets don't follow

I have a really long equation, which I want to split into two lines. I searched the internet and found that it works with a split environment. It actually does! But I have big (or automatically sized) brackets which start on the first and end on the second line. But the second line has no closing bracket - it gets lost somewhere. Could you help me fix it?  \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsbsy} \usepackage{amssymb} \begin{document} \begin{equation} \label{eq:vanderWaals} \begin{split}      V_{vdW} = &-\frac{A}{6}\left[\frac{2r_1r_2}{h^2+2(r_1+r_2)h}      +\frac{2r_1r_2}{h^2+2(r_1+r_2)h+4r_1r_2}\\      &+ln\left(\frac{h^2+2(r_1+r_2)h}{h^2+2(r_1+r_2)h+4r_1r_2}\right)\right], \end{split} \end{equation} \end{document}


What do all the $k$-cycles in $S_n$ generate?

was asked earlier today. The proof is essentially that $3$-cycles are even permutations, and products of even permutations are even.  So: do the $3$-cycles generate the alternating group? Similarly, do the $k$-cycles generate the alternating group when $k$ is odd?  And do the $k$-cycles generate the symmetric group when $k$ is even? I know that transpositions ($2$-cycles) generate the symmetric group.


Programmatically create Site using Custom Web Template in Sharepoint 2010

I want to programmatically create a site using custom web templates in sharepoint 2010.  In 2007 I used to get a   SPWebTemplate template = site.GetCustomWebTemplates(LCID)[number];   and used this SPWebTemplate in  SPWeb newSite = web.Webs.Add(url, title, description, LCID, template, true, false);   This worked quite well for 2007. But in 2010 the site templates are saved into the solution store  SPSite.Solutions   which only returns SPUserSolution objects and not SPWebTemplates.  So my question is: How can I programmatically create sites using the site templates from the solution store.    UPDATE: I tried to use  SPWeb newSite = web.Webs.Add(url, title, desc, LCID, templateName, true, false);   where templateName is a string like '{Template-GUID}#TemplateName', but it still does not work. It throws the following error:  Critical error: File or arguments not valid for site template '{4a2d8952-a0af-49a6-8f55-46a59c8d68a2}#CustomerSiteTemplate'. Parameter name: WebTemplate    Any other ideas how to create a site based on a SPWebTemplate?


What is the meaning of ... in numpy array selecter


Multigroup (CCK3) / FlexiField-like solution for compound fields?

I've used  in the past to do multiply occurring series of field groups; now, working on a Drupal 7 project, I'm setting up a "Resume" content type and need a way to set up repetitive entries for education/work experience.   IE: for "Education", I need the ability to dynamically add new rows comprised of a combination of dates and places for each institution studied at.  What is the best way to accomplish CCK3 multigroup/FlexiField-like functionality in Drupal 7?  Thanks!


I've seen a few Questions for this but can't find anything useful or recent.  Is it possible to have 2 people physically sat at a linux box logged with separate monitors/kb/mice?  I've had to work late the past few days and my younger daughter is upset she has missed out on playing about with scratch.  I thought it would be good if we could have worked side by side.  I'd prefer it if she was logged under her own user.  Currently running mint rosa if that makes a difference.  Edit: As I mentioned there are older questions about this, the one quoted is 5 years old and involves a lot of tinkering and experimenting.  While I enjoyed this 18 years ago despite blowing up a rather expensive monitor due to a typo in a config file (got my refresh rate wrong), nowadays I just like to get on with my work.  I was hoping there was something more recent that made things easier.


How to communicate the idea of a "brown-noser" without the vulgar connotations?

What term would communicate something similar to "brown noser", without the vulgar connotation?  (Here's one citation of the term being , but I'm guessing it was used before that.  In any case, the term is used by people in American culture today. From the link to WWII Vocabulary: "Brown-noser: Ass-kisser. To curry favor, or “boot-lick.” Variation: Brownie"  What term/phrase communicates 'speaking or acting to please those with authority or position to gain favor', without the crude connotation of the term 'brown-noser'?  Example sentence:       "Did you hear what Bob said about the company track record in our employee meeting yesterday?  He's a ______"


i want to get rid of filling a query form on daily basis and want to automate it. But it is having captcha and i want to turn off captcha so that i can automate form using selenium webdriver using python.


Ubuntu 18.04 Desktop Remote Access Windows

How can I access my Ubuntu 18.04 desktop server with Windows? Which RDP and VNC are best suited?


Currently I've got this trio configured, but I would like to have one solution, because configuring those 3 separately is a head ache time to time. First add service to monit, then to nagios and after that to snmpd processes and cacti.  So is there something combining functionality of Cacti, Nagios and Monit provided not as SaaS?  Thank you.


K means algorithm for Big Data Analytics

I am working on Big Data Analytics, I would like to know how well k means algorithm can be used for clustering Big Data?


Grant the OP a binding close as duplicate vote

Since the  to the close as duplicate mechanism it is a lot more visible to the OP that there is/might be a duplicate to their question. Empirically, I've noticed a lot more people agreeing, in the comments under their question, that their question is a dupe.   For instance, :        I'm aware that allowing  is  (back in the stone age) but now Stack Exchange is so much larger, and Stack Overflow is groaning under the weight of questions, I think this should be partially revisited.  Based on the principle that the simplest way to keep a site clean is to have as many people as possible nibbling away, I propose that the OP gets granted a binding close-as-duplicate vote.  It should simply be an additional line in the banner, which is . It might be something like this:     This question may already have an answer here:     "" 3 answers     Does this fully answer your question?  Yes / No   I'm not wedded to the Yes / No thing I just can't think of a better way at the moment.  Clicking on Yes would take the OP to the close as duplicate dialogue with that question highlighted. If there are multiple duplicate questions you'd need to ask the OP multiple times. A No could be used to track the relative success of the project, i.e.   Whether the question subsequently gets closed. Whether the question gets reopened again. How many times the OP actually clicks. How many times the OP disagrees with the analysis of the community.   Potentially, a No could be used to open a comment dialogue asking the OP to explain why they think their question is not a duplicate thereby stopping them simply putting "this is not a duplicate" in the question and formalising this process somewhat. Not sure about this idea...  I do not think this should be restricted by reputation, anyone should be able to close their own question as a duplicate. It gives people with lower reputation a more positive experience of the closing process and emphasises the importance of duplicate finding.  Most importantly, self-closes should not, initially, count towards the question ban. We can help new users learn how to use a lot more of the site than they might otherwise see and encourage them to search for duplicates more thoroughly. If the OP then goes on to do the same thing 10 times in a row then you can start using it toward the ban as they're obviously using the users as a personalised search service but at least the first 3-4 times this should not have any effect.  This question is, deliberately, only requesting 20% of the linked question (from 2009) and then only based on the new UI. The linked question asks for binding migration votes etc, which I do not want to see and I am not requesting a binding close-as-duplicate for the OP until someone else has already voted to close (though I think if the OP has 3k rep this might be allowable). This, I hope, addresses the concern's raised in the linked question and explains why this is not a duplicate of that question.


This is supposed to be a simple NAND gate. I understand how the output is 1 if one of the inputs is zero but if both inputs are 1 then the base of Q1 is supposed to be zero. This is what I don't understand. I know that Q2 and Q3 will be in cut off so the base of Q1 is floating. If that is true, how is it zero then?When A and B are open does current flow through Q2  Q3 via R1 to turn on Q1?


I've been wondering whether there is a good "git export" solution that creates a copy of a tree without the .git repository directory. There are at least three methods I know of:   git clone followed by removing the .git repository directory.  alludes to this functionality but starts with "Just read the desired tree into the index..." which I'm not entirely sure how to do.  is a third party script that essentially does a git clone into a temporary location followed by rsync --exclude='.git' into the final destination.   None of these solutions really strike me as being satisfactory. The closest one to svn export might be option 1, because both those require the target directory to be empty first. But option 2 seems even better, assuming I can figure out what it means to read a tree into the index.


Prove that the midpoints of a line segment and the mid points of the diagonals of a quadrilateral are concurrent

In quadrilateral $ABCD$, let $AB$ and $CD$ meet at $E$ and $AD$ and $BC$ meet at $F$. Then prove that the midpoints of $AC$, $BD$ and $EF$ are collinear. I cannot make any progress with this question. I want to apply Menelaus theorem but I cannot find the suitable triangles. Could anybody please help me?


Accepted answer not listed as first answer

Issue Description  When viewing a question where the accepted answer has the same score as non-accepted answers, the accepted answer does not appear first in the list.  Example  Viewing  and refreshing it will result in the accepted answer migrating up and down the list. Note that the sort order is by votes. Reproducable on  as well.


How to set GRUB default, not Windows Boot Manager

I am using VAIO T series with Win 8 preinstalled, I have installed Ubuntu 12.04.3 on a different partition and set GRUB at default. But whenever I choose to boot Win 8, the next time I start the laptop, it Windows Boot Manager which shows up at default. How can I set GRUB default constantly?


String values in certain range as function argument (string enums) in cpp

For example i'm making a library which provides function void foo( std::string color )  And i need to somehow tell the user of my library that function foo supports only certain values for argument color (for example only "red", "green" or "blue").  Usually i make something like this  namespace ColorValues {   enum values   {     RED,     GREEN,     BLUE   }    std::string toString( ColorValues::values value )   {     switch( value )      {        case RED: return "red";        case GREEN: return "green";        case BLUE: return "blue";        default: return "error";     }   } }  void foo( ColorValues::values value ) {    std::string theStringINeed = ColorValues::toString( value ); }   But thats just ... too cumbersome, but i dont know any other way and cpp doesn't support string enums.   What to do?


I've downloaded ubuntu desktop 14.04, but where is it?  I didn't get asked anything during the download.  Do I have to log out of Windows before I can access it?  I turned the pc off and downloaded it again, but still can't find it   Ignore the tag as I don't understand them, I'm just adding one till its accepted


SELECT      dim_date.date, dim_locations.city, fact_numbers.metric FROM      dim_date, fact_numbers WHERE      dim_date.id = fact_numbers.fk_dim_date_id AND      dim_locations.city = "Toronto" AND      dim_date.date = 2010-04-13;   Since I'm not using the JOIN command, I'm wondering if this is indeed a JOIN (and if not, what to call it)?  This is for a dimensional model by the way which is using surrogate and primary keys to match up details


How to create a dungeon based on a realistic tomb, but still enjoyable to explore?

One of the typical location that is used as an excuse to build a dungeon is The Ancient Tomb (tm).  I often struggle building dungeons that are credible tombs, in terms of rooms disposition and type of rooms contained. It seems to me that either my dungeons are realistic but boring, or they are entertaining but quite unrealistic as tombs.  Is it even possible to build a realistic tomb that is still entertaining for players?  I would like to know if someone could provide some examples/ideas for realistic-but-enjoyable tombs (possibly based on real tombs).   I'm doing a bit of research myself, but I'm not finding workable ideas. Eg, the tomb of Tutankhamen would be rather disappointing as a dungeon:     This tomb consists of three small rooms and a hallway; this would allow for only a few encounters/traps/riddles. An action-oriented group might find a dungeon like this a bit disappointing. Also, I feel that a small dungeon makes harder to build a sense of mystery and exploration.  Also, since I was asked to better define "realistic" vs "entertaining":  For the purpose of this question, I will say that a dungeon is realistic when its features (room types, room dispositions, the furniture) make sense in an imaginary world loosely based on historical civilizations, or periods and places in history. As an example, it is conceivable that an ancient tomb would contain defenses against intruders. In an imaginary/fantasy world, these defenses becomes traps, animated guardians, riddles, curses. It is coinceivable that an ancient tomb would contain a treasure chamber, and in certain cultures, it is conceivable that a tomb would contain vast amounts of goods that belonged to the deceased in life; in an imaginary/fantasy world, a tomb containing magical items, esoteric and forbidden text, weapons etc. does not break the suspension of disbelief. On the other hand, why would a tomb contain, say, a torture chamber? While it would be possible to imagine more or less elaborate explanations ("this culture believed that torture chambers were needed by the deceased in the afterlife, to punish the intruders, and thus were routinely built inside of tombs), I feel that a torture chamber in a tomb does not readily "make sense" and would break immersion.  A dungeon is entertaining when challenges the players and allow room to build a sense of danger, mystery, and exploration of ancient and forgotten places. In an entertaining dungeon I expect a number of combat encounters, a number of clever traps, several rooms and hallways to explore, and a treasure.   While I asked the question with D&D in mind (I'm currently DMing a 3.5 campaing), I would like to keep the question as system-agnostic as possible.


I'm learning to develop with apache wicket, and I tried  to integrate Spring  this is the dependency into the pom.xml file  </dependency>         -->         <dependency>              <groupId>org.apache.wicket</groupId>              <artifactId>wicket-spring</artifactId>              <version>${wicket.version}</version>         </dependency>         <!-- spring dependency -->         <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-core</artifactId>            <version>3.0.5.RELEASE</version>         </dependency>          <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-context</artifactId>            <version>3.0.5.RELEASE</version>         </dependency>           <dependency>            <groupId>org.springframework</groupId>            <artifactId>spring-web</artifactId>            <version>3.0.5.RELEASE</version>         </dependency>   and this is the SpringIntegrationPage.java  public class SpringIntegrationPage extends WebPage {      private static final long serialVersionUID = 1L;     @ SpringBean(name="userModel")     private UserModel userModel;     public SpringIntegrationPage(){         add(new Label("namelbl", new PropertyModel<String>(userModel, "name")));         add(new Label("genderlbl", new PropertyModel<String>(userModel, "gender")));         } }     I get org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.beton.SpringIntegrationPage() Caused by: java.lang.NoClassDefFoundError: org/springframework/core/ResolvableType  org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.beton.SpringIntegrationPage()'. An exception has been thrown during construction!     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194) ~[wicket-core-7.8.0.jar:7.8.0]     at      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) [catalina.jar:7.0.12]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) [catalina.jar:7.0.12]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.12]     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) [catalina.jar:7.0.12]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.12]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395) [catalina.jar:7.0.12]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250) [tomcat-coyote.jar:7.0.12]     at      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_45]     at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175) ~[wicket-core-7.8.0.jar:7.8.0]     ... 32 more Caused by: java.lang.NoClassDefFoundError: org/springframework/core/ResolvableType


I am planning to replace repeatedly executed Statement objects with PreparedStatement objects to improve performance. I am using arguments like the MySQL function now(), and string variables.   Most of the PreparedStatement queries I have seen contained constant values (like 10, and strings like "New York") as arguments used for the ? in the queries. How would I go about using functions like now(), and variables as arguments? Is it necessary to use the ?s in the queries instead of actual values? I am quite confounded.


How can I browse an untrusted USB flash drive safely?

Say I have a USB flash drive I found lying on the ground. I want to see if it has any information that could help me return it to its owner, but I live in an urban society. It could easily contain malware and be lying on the ground in wait for its next victim.  How can I browse the contents of this USB flash drive safely?


How can delete all files except one from a directory?

I need to delete all files, except one (its name is defined), from a given directory.   How can I do this from the terminal in OS X? Can I do this with one single command?


How to get rid of small indent after a defined "aligned equation" environment

I have defined an environment called \equ, which is an aligned equation environment to save time when writing a thesis with lots of equations.  However, after using this environment there is a small indent, which is not there if I just use the \begin{equation} and \begin{aligned} commands directly (see MWE):  \documentclass{book} \usepackage{mathtools}  \newenvironment{equ}[1] {\begin{equation} \label{equation:#1}     \begin{aligned} } {     \end{aligned} \end{equation} }    \begin{document} \chapter{Test Chapter} This is the first paragraph of text in the document. It is not indented, as expected.  This is the second paragraph of text in the document. It is indented, as expected.  \begin{equation}\label{equation:1} \begin{aligned}     F &= m a\\     E &= m c^{2} \end{aligned} \end{equation} This is the paragraph after an equation. It is not indented, as expected. \begin{equ}{1} F &= ma\\ E &= m c^{2} \end{equ} This is the paragraph after an equ. It is indented with a small indent, and the vertical spacing around the equation looks slightly different, but I don't know why?!  \end{document}     I am fairly new to this; I'm sure it's something obvious so any help would be appreciated!


How can submit my paper to Elsevier when not affiliated?

I have obtained my master a couple years ago and am looking into pursuing a PhD. I currently have a part time job completely irrelevant to academia. For applying for a PhD, I figured that I need a research paper, I haven't been totally disconnected from learning in this period and have recently written a paper with a faculty member with me doing all the major part and her evaluating/reviewing. When trying to submit the manuscript to Elsevier, the very first thing I'm required to fill in as the correspondence author is my affiliation, It won't even go to the next step :( I really want to submit my paper to this particular journal. I don't know what to do, should I call the Elsevier offices? would that make a difference? Are there recent corresponding authors in Elsevier with no affiliation. Please let me know anything that might be helpful. I would greatly appreciate it. :)


Windows only recognizes half of installed RAM

I upgraded my RAM capacity from 8 GB to 16 GB of DDR3, but Windows still shows 8 GB. I tested several ways to fix it, but nothing happened. All the videos on YouTube says you must go to msconfig and in the "Boot" tab change maximum memory. But when I went there and checked this option, pressed OK and restarted, it changed back to 0 and the problem is still there. In my BIOS it shows 16 GB of RAM. See the screenshots below:    In msconfig -> Boot -> Advanced Options:    Same place after restarting:    This is what Resmon.exe shows:    RamMap program:    The RAM I use is 2x8 GB Corsair XMS3 1600 MHz DDR3 and my motherboard is an MSI 970A-G43. How can I make Windows recognize all the RAM?


Prove for any $a>1$ there exist a natural number, $N$, such that $a^n>n$ for all $n \ge N$  My attempt:  By definition, for $N$ to be a natural number $1\le N \le ∞$ for any integer $N$.  By induction, the base case $n=1$ is true because $a^1>1$ which is true.  Now assume that $a^k>k$ is true, then it is also true for $n= k+1$.  Hypothesis  $a^{k+1}>k+1$  Now I am not sure if I am on the right track


I have lots of apps on my iPad and I want to copy them to my PC, usually I'd just click transfer purchased in iTunes but now it's not working. I want to backup and restore my iPad because I've been having some issues. iFunBox isn't working either


How do you find a given array's children?

Basically, I have the following array (or JSON):  apps = {     app1:     [         "ci-extension",         "Unnamed",         "
Hello world!
"     ],     app2:     [         "ci-extension",         "Another one!",         "Cool!"     ], }   Is there any way to determine how many children does the array have? E.g. in this case the answer is 2: app1 & app2. And if we add one more object "application" the answer will be 3. I tried the following:  apps.length //returns "undefined"  for (i = 0; apps[i] != undefined; i++) {     console.log(apps[i]);     //also returns "undefined"     //I am later gonna use also the values in the child, so I stored all the children to a new array     meta.push(apps[i]); //"meta" here is another vriable with an array in it }   (if this makes any sense) I expected the for to return something like this:     app1   app2application (if you count the new object we added)       And the value of meta to be ["app1", "app2", "application"].   My mind got totally obfuscated. I've got no idea where and what I am doing wrong, so any help would be highly appreciated. Thanks in advance!  EDIT: If there is some way to push() elements into apps I will kindly ask you to light me up. Thanks again!


In what sense can the Lie algebra of $GL_n(\mathbb{C})$ be "identified" with $M_n(\mathbb C)$?

I would like to do  (i) but before I can even attempt it I need to be clear about his terminology.  Exercise 6  Show that the Lie algebra $gl_n(\mathbb{C})$ of the general linear group $GL_n(\mathbb{C})$ can be identified with the space $M_n(\mathbb{C})$ of $n \times n$ complex matrices, with the Lie bracket $[A,B] := AB - BA$.  When he writes "identified", does he just mean there is an isomorphism? So the exercise would be to find an explicit isomorphism from $M_n(\mathbb{C})$ to $gl_n(\mathbb{C})$? Is that correct?  Many thanks for your help.


How can we show that $e^{-2\lambda t}\lambda^2\le\frac1{e^2t^2}$ for all $\lambda,t\ge0$?

How can we show that $$e^{-2\lambda t}\lambda^2\le\frac1{e^2t^2}\tag1$$ for all $\lambda,t\ge0$?  Applying $\ln$ to both sides yields that $(1)$ should be equivalent to $$t\lambda\le e^{t\lambda-1}\tag2.$$ So, if I did no mistake, it should suffice to show $x\le e^{x-1}$ for all $x\ge0$. How can we do this?


If a commutative ring is not a domain then when are elements by definition associate?

Let $R$ be a commutative ring with unit.  On the elements of $R$ we can define the following relations:$$a\sim_1b\iff a=ub\text{ for some unit }u$$  and:$$a\sim_2 b\iff r,s\in R\text{ exist with }a=rb\text{ and }b=sa$$  It is clear to me that both relations are equivalence relations and that $a\sim_1b\implies a\sim_2b$.  Also it is clear to me that the opposite of this is true if $a$ or $b$ is not a zero-divisor.  Questions:     1) Do we always have $a\sim_2b\implies a\sim_1b$? (I suspect not)      2) If not then can you provide a counterexample?      3) Is the condition "$R$ has no zero-divisors" (sufficient for $a\sim_2b\implies a\sim_1b$) also a necessary condition for $a\sim_2b\implies a\sim_1b$?   Thank you in advance and sorry if this question is a duplicate.


Attending an academic conference is what type of travel?

I am planning to travel to Portugal to attend an academic conference and in that regard needed a short-stay Schengen visa. The visa application has a field "Purpose of Travel" with the following options:   - Business - Sports - Cultural - Other - Study - Visiting family or friends - Medical reasons - Official visit - Transit - Airport transit - Tourism   I am attending the conference to present the research I am conducting as a part of my PhD. So "Study" is the closest in my opinion. But I don't want the Embassy to misconstrue that it is for studying at a university in Portugal. In that case, would "Business" be the right option to choose?


Why Does Thin-Film Interference Manifest Visibly Only on Thin Films?

We know that thin-film interference creates colors by constructive and destructive interference of different wavelengths.  One of the better images I refer to is this:  Though the example only traces one ray of light, a different ray striking at C can be seen to interfere with the first, so having just the original ray interfere with itself, completely neglecting the distance CD, is reasonable. The path length through the medium results in different phase shifts for different wavelengths, ultimately resulting in different interference for different colors. My question is, why don't we see this happen in thicker materials? I have a guess:  For thicker materials, variation in surface perfection results in a wide range of light paths (a small change in A results in large changes in B, which results in even larger changes in C), so everything averages out.  This effect is strengthened by dispersion. If this is the case, are there examples of thick materials constructed with sufficient precision to show interference?


A user just posted a similar question () with $n$ instead of $n^2$, and this question got some original answers, so I would like to propose the question:  Find the sum $$\sum\limits_{n=1}^{\infty}\frac{n^2}{2^n}.$$  I am really interested to see what original answers are given to this question. There are number of different approaches, some I havent seen or though of before. Thus although the question may be unoriginal, some of the solutions are not. Thus it is inappropriate to close this question.


Does mass slow down an object falling through the atmosphere?

If I throw two objects with the exact same shape and size, but one of them is heavier, will they arrive at the same time? We learn in basic Newtonian physics that mass doesn't influence the speed in which an object fall in vacuum. But if there is air is that still true?  My hypothesis is that the more massive an object is, the faster it will fall through air because then the mass of the air particles become proportionally irrelevant. Am I correct?


Yet another question of which is larger: $70^{71}$ or $71^{70}$. I solved it by observing that $f(x)=\frac{\ln(x)}{x}$ is decreasing for all $x>e$ since $f'(x)=\frac{1-\ln(x)}{x^2}<0$ for all $x>e$. Then we have $$ \begin{align*} \frac{\ln(70)}{70}>\frac{\ln(71)}{71} &\iff 71\ln(70)>70\ln(71)\\  &\iff \ln(70^{71})>\ln(71^{70})\\ &\iff e^{\ln(70^{71})}>e^{\ln(71^{70})}\\ &\iff 70^{71}>71^{70}. \end{align*} $$ I briefly search for similar problems along this idea, but didn't really find much in other ideas about how to solve this. So I open this to the group: how else might this be proved?  EDIT: So this problem is a specific case of the more general problem I apparently duplicated. However, we can extend the duplicate problem by allowing real number inputs as opposed to just integer inputs. Thus $x^{(x+1)}>(x+1)^x$ for all reals $x>e$. This is proved following the exact same proof I gave above with the appropriate substitutions: $$ \begin{align*} \frac{\ln(x)}{x}>\frac{\ln(x+1)}{x+1} &\iff (x+1)\ln(x)>x\ln(x+1)\\  &\iff \ln(x^{(x+1)})>\ln((x+1)^{x})\\ &\iff e^{\ln(x^{(x+1)})}>e^{\ln((x+1)^{x})}\\ &\iff x^{(x+1)}>(x+1)^{x}. \end{align*} $$ Thanks for the input everyone!


Why did the Jedi want to bring balance to the Force?

During the Prequel trilogy, the Jedi wanted to bring balance to the Force, in accordance with a prophecy.  There seemed to be a general agreement that this was a 'good thing', but a disagreement with the assertion that Anakin was the one to do it.  Why did the Jedi Council believe it was good to bring balance to the Force?  The Republic was mighty (in theory), the Council was established as THE source of Force users, the Sith were thought extinct, and the number of Dark Jedi was apparently very, very low.  It seemed, for all intents and purposes, as if the Force was strongly imbalanced in favor of the Light side...so why did the Council want to 'balance' it?


It is not isometric, neither is it pure 2D.  What is this graphics view called?


Example of a bounded lattice that is NOT complete

I know that every complete lattice is bounded. Is there a simple example for a bounded lattice that is not complete?  Thank you


Name of a show about kids in simulation - samurai and cat dude

It's about these kids who go in a simulation and have to fight monsters and stuff. One of them is a samurai and another is a cat dude and the last is a guy who is not in the sim and is helping them. If you know what I am talking about, please help me.


How to write something vertically below another math symbol

I have to write some equations in latex, but I'm having trouble finishing them.    My Latex equation for image 1:  \widehat{f}(x,y)=median \left\{g(s,t)\right\}     My Latex equation for image 2:  A\oplus B = U A_{b}   How can I make a subscript below the formulas?


How to speed up boot time of Ubuntu when you find a possible cause in "dmesg" output?

After updating to Ubuntu 16.04. the boot time is a bit longer (more than 10-15 seconds). I looked at the "dmesg" output and found this:  [   23.882674] audit: type=1400 audit(1461650474.108:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince" pid=644 comm="apparmor_parser" **[   23.882682]** audit: type=1400 audit(1461650474.108:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=644 comm="apparmor_parser" **[   32.162714]** cgroup: new mount options do not match the existing superblock, will be ignored [   32.777477] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   32.777480] Bluetooth: BNEP filters: protocol multicast   I assumed that the number on the left side of the "dmesg"output is time. If I lose 9 seconds on this step, what can I do to improve boot time?


CentOS 7 x64 and HP Proliant DL360 G5 SCSI Controller compatibility

I've an HP Proliant DL360 G5 server with two 72gb HDD in RAID and 2 150gb HDD in RAID.  I've Windows Server installed on the 72gB HDD and I'm now trying to overwrite it with a fresh installation of CentOS 7 x64.  When I try to install it it says that I need to manually configure the hard disks but when I open the partitioning tool no HDD are detected. I'm using the ~4GB DVD installer.  How can I fix this problem?


Throughput; capacity planning help for C10K like design

I am designing a network service in which clients connect and stay connected -- the model is not far off from IRC less the s2s connections.  I could use some help understanding how to do capacity planning, in particular with the system resource costs associated with handling messages from/to clients.  There's an article that tried to get 1 million clients connected to the same server [1].  Of course, most of these clients were completely idle in the test.  If the clients sent a message every 5 seconds or so the system would surely be brought to its knees.  But... How do you do less hand-waving and you know, measure such a breaking point?   We're talking about messages being sent by a client over a TCP socket, into the kernel, and read by an application. The data is shuffled around in memory from one buffer to another.  Do I need to consider memory throughput ("5 GT/s" [2], etc.)?  I'm pretty sure I have the ability to measure the basic memory requirements due to TCP/IP buffers, expected bandwidth, and CPU resources required to process messages.  I'm a little dim on what I'm calling "thoughput".  Help!  Also, does anyone really do this? Or, do most people sort of hand-wave and see what the real world offers, and then react appropriately?  [1]   [2]


Every finite group is a subgroup of An for n>=1 Can anyone give a sketch of the proof. I cannot proceed!


See this  song     Baa, baa, black sheep, have you any wool?   Yes sir, yes sir, three bags full!   One for the master,   And one for the dame,   One for the little boy   Who lives down the lane   Baa, baa, black sheep,   Have you any wool?   Yes sir, yes sir,   Three bags full...   Baa, baa, black sheep, have you any wool?   Yes sir, yes sir, three bags full!     Why do they say "Have you any wool?"? why not "Have you had any wool?"?  Is it ungrammatical to say "Have you any wool?" in everyday conversation?


I'm trying to make a grill railing for a spiral staircase. I have it almost figured out but the top of the railing rotates all the way to horizontal as it goes down the stairs. I don't want that I want the top to stay on top.


We know that temperature is another word for particle movement. The lowest possible temperature, known as "absolute zero", −273,15° Celsius or 0 K, is the point where the particles don't have any kintec energy, thus not moving.    So what is the highest possible temperature? My assumption is that particles cannot move faster than light (or, any particle with mass actually cannot reach c), so is this point the highest possible temperature?  Thanks in advance and I apologize for any language mistakes (I live in Germany)


Is it appropriate to emplace a "Donate" button on one's SO profile?

Is it appropriate to ? To me, it seems to be somewhat at odds with the goal of SO.


Why is a Diffie-Hellman key exchange required when RSA is already being used for key exchange in TLS?

Specifically with TLS,   What is RSA used for during key exchange? What is Diffie-Hellman used for? Since RSA already provides authenticity and confidentiality, why is Diffie-Hellman used during the exchange? I've heard DH exchanges aren't secure. Is that something to be worried about in an RSA with Diffie-Hellman exchange? If DH is used for forward secrecy. What's wrong with just generating new RSA key pairs and exchanging keys with that?   The use of Diffie-Hellman along with RSA is the one thing I don't understand about modern Public-Key Cryptography.


“Sorry, Ubuntu * has experienced an internal error.” /usr/bin/compiz

I'm new to Ubuntu. I have tried to install Ubuntu 13.10 in VirtualBox with Base OS Windows 7.  The Installation was fine and I did Tick on Download updates and Third Party App. After this it completed installation and Rebooted , Ubuntu load up to Just wallpaper and cursor on the screen. After some time It showed error :   “Sorry, Ubuntu 13.10 has experienced an internal error.” /usr/bin/compiz.   What to do now please.


I am trying to modify an HTML file using Powershell, but replacing [DISPLAY_NAME] is not possible because of the [ and ] symbols.   (Get-Content ".\hi4.htm") -replace '[DISPLAY_NAME]', 'tulpa' | Set-Content '.\hi4.htm'   But output looks like the following. Please check and help.  <httulpatulpa> <botulpatulpa> <ttulpabtulpatulpa tulpattulpatulpatulpa="wtulpatulpath: 579tulpax;" bortulpatulpar="5" ctulpatulpatulpatulpatulpatulpactulpatulpag="0" ctulpatulpatulpatulpatulpatulpatulpatulpatulpag="0"> <tbotulpatulpa> <tr> <ttulpa tulpattulpatulpatulpa="fotulpat-ftulpatulpatulpatulpatulpa: Htulpatulpavtulpattulpactulpa, tulpartulpatulpatulpa, tulpatulpatulpatulpa-tulpatulpartulpaf; fotulpat-tulpatulpaztulpa: 18tulpax; wtulpatulpath: 577tulpax;" htulpatulpaght="64"><tulpatrotulpag>  [tulpatulpatulpatulpatulpatulpatulpatulpatulpatulpatulpatulpa] </tulpatrotulpag>&tulpabtulpatulpa;<tulpatulpag tulpattulpatulpatulpa="fot


In a 120V AC motor circuit, a capacitor is wired in series with the start/auxillary winding.  I'm a beginner, but I think I have learned that the cap's function is to create a phase shift to enable start rotation. What is still unclear to me is where the cap should be located:   Is it:  Hot line voltage-----cap-------start winding-------Neutral.   Or   Hot line voltage----start winding------cap--------Neutral.   If the cap came after the winding, wouldn't the winding be energized a second time when the cap discharged its saturated negative plate when line voltage oscillated through zero? But maybe this is what DOES happen.  Can someone explain?


Why is "man" in "Snowman" pronounced differently than in "Frenchman" or "Englishman"?

It seems that in the words Englishman, Frenchman, and Scotsman, the ‑man part is pronounced /mən/ (just like in Roman).  Whereas in snowman, the ‑man part is pronounced /mæn/ (just like in no man).  Why is it that when ‑man is appended to snow‑ to make snowman, the pronunciation of the man part doesn’t change?    Wouldn’t it logically follow for it to be pronounced /ˈsnowmən/ not /ˈsnowˌmæn/?


Why Python does not see a global variable and tells me in a function that it is undefinied local one?

I have a global variable at the top of my .py file. When I tell my function to do some action on it, the interpreter gives me a statement that suggests that I am talking about a local variable that has been not established.   I'm using Python 3.7.3 and Win 10. The program is supposed to be a Tic Tac Toe game played in console.  Basically, I am lost. The variable is clearly defined, the function is referring to it, yet Python does not see it. I do not know what to do, it's a very simple program and it is not working. I really do not know what to do, from what I have seen on the Net nobody, either in Google or there had a similar problem (that I am aware of, obviously).  # some other variables, all at the top of file, before anything else  turn = 1  # some functions referring to the above variables, all are working  # the function that is "blind"  def changeboard():     if turn % 2 == 1:         t = input (f"Where to put your {p_o_tile}, player one?")          changetile(t, p_o_tile)         turn += 1     else:         t = input(f"Where to put your {p_t_tile}, player two?")          changetile(t, p_t_tile)         turn += 1   The error I get:   Traceback (most recent call last):  ...  File "C:\Users\Szymon Brycki\Desktop\Python Notes\TicTacToe3.py", line 85, in changeboard  if turn % 2 == 1:   UnboundLocalError: local variable 'turn' referenced before assignment  Basically, the function should rotate between players depending on if the turn counter is even or odd. The player who is currently pointed at by the function should tell the game which tile to change into an "x" or "o" Just that. It's really simple and I really cannot guess why it is not working.


I am using lualatex, are there symbols for left and right limits, like small "-" and "+" to put above the numbers? For now I use   \documentclass[a4paper,12pt]{book} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{amsmath,empheq} \usepackage{mathtools} \usepackage{amscd} \usepackage{amsxtra} \usepackage{unicode-math}                   \begin{document} \[ \lim_{x \rightarrow 1^{+}} f(x) \]  \[ \lim_{x \rightarrow 1^{-}} f(x) \] \end{document}   which I feel is not right because the default "+" and "-" are operators and their size and spacing might not be the best for this use.


Let $f:[a,b] \rightarrow  \mathbb{R}$ with $f \in C^1$ and $f(a)=0$. We want to show that $$\int_{a}^{b}f^2(x)\mathrm{d}x \leq (b-a)^2\int_{a}^{b}[f'(x)]^2\mathrm{d}x$$ There is a hint namely to consider $$f(x)=\int_{a}^{x}f'(t)\mathrm{d}t$$ because $f(a)=0$ and then use the Cauchy-Schwarz inequality for integrals. So I tried doing the following: $$f^2(x)=\left (  \int_{a}^{x}f'(t)\mathrm{d}t \right )^2\leq\left ( x-a \right )\int_{a}^{x}\left [ f'(t) \right ]^2\mathrm{d}t\leq\left ( b-a \right )\int_{a}^{b}\left [ f'(t) \right ]^2\mathrm{d}t$$ and finally integrate the expression with respect to $x$ over $[a,b]$. My first question is whether my approach has any mistakes (I am mainly worried since in the textbook the last inequality has $x$ as instead of $b$ as the higher bound of integration and I am wondering whether it is a mistake, because when integrating again the result only follows if the integral in the last inequality is independent of $x$) and whether this this strategy works in general with higher powers of functions and their derivatives (for example using some variation of the Hölder inequality or something). Then there is a challenge without hint or solution that asks us to prove that there is a smaller upper bound, namely $$\int_{a}^{b}f^2(x)\mathrm{d}x \leq \frac{(b-a)^2}{2}\int_{a}^{b}[f'(x)]^2\mathrm{d}x$$ Here I got stuck. I tried the same approach $$f^2(x)=\left (  \int_{a}^{x}f'(t)\mathrm{d}t \right )^2\leq\left ( x-a \right )\int_{a}^{x}\left [ f'(t) \right ]^2\mathrm{d}t$$ and I tried finding a number  $x$ such that $x-a=\frac{b-a}{2}$ which means $x=\frac{b+a}{2}$ so that I can say $$\left ( x-a \right )\int_{a}^{x}\left [ f'(t) \right ]^2\mathrm{d}t\leq\left ( \frac{b-a}{2} \right )\int_{a}^{\frac{b+a}{2}}\left [ f'(t) \right ]^2\mathrm{d}t$$ and then integrate to get the desired result (as integration over $[a,b]$ would just multiply the right hand side with $b-a$ and we would be done). However this only works when $x\in [a,\frac{b+a}{2}]$ and I cannot seem to find a way to prove it for the rest of the interval. So how do I proceed here? Finally, as I am new to integral inequalities, any suggestions on how one should study to learn how to solve basic problems or where to study from are welcome. Thanks in advance!


Without installing snapd, How to install ubuntu software centre?

I have removed snapd from ubuntu 20.04 because it uses high amount of memory, I want to install software center without installing snapd,I tried sudo apt install ubuntu-software, but it also install snapd, is there a way to do it, or snapd is essential dependency for software center ?


So my friends and I are building a Minecraft server with TDM, CTF, and FFA. My job is to make it so that when a player dies, they will respawn with x items. Using the Halocraft mod, the loadout system when starting looks like this:  testfor @a[r=500] > clear @a > give @a 4534 > give @a 4537 > give @a 4515 64 > give @a 4516 24 > more give @a commands for armor.   After the clear, all players receive an Assault Rifle, Magnum, along with 64 extra rounds for the AR, and 24 Magnum rounds.  We need a separate system to detect a player death, then clear said player's inventory, and give all new gear. How would you do that?


MLE for uniform distribution around $[-\theta,\theta]$

Given $X_1,\ldots,X_n$, where $X_i\sim U(-\theta,\theta)$, what the MLE for $\theta$? Apparently the answer is $\max\{|X_1|,\dots,|X_n|\}$ but I can't figure out why.  The density function is $$f(x,\theta) = \begin{cases} \frac{1}{2\theta}, & x\in[-\theta,\theta] \\ 0, & \text{else} \end{cases}$$  I get a likelihood function that may decrease or increase for $\theta<0$, depending on the parity of $n$. I'm not sure if that's the way to solve this.


Is there a relativistic interpretation of Bohmian Mechanics, akin to QFT for the Copenhagen Interpretation?


Why aren't there werewolves anymore in the Third Age?

Who was the responsible for their disappearance? Are they hidden to the South maybe?


How to deny Protoss observers effectively

Usually (or very often), good Protoss players, after building a Robotics bay, build observer and put it to opponent base.   From my perspective if you know Protoss build Robo you should care about that observer.  How do I most effectively deny this observer?   The most often I play Terran and there are few ways for that:   Scan your choke and kill observer with marines. This can fail if observer is not in the scanned screen. That also cost you 50 energy (270 minerals). Observer costs 25/75... if we take gas/mineral exchange rate as 2.5 - it is pretty good price for killing observer... Build Engineering Bay and build few turrets. that costs 150+x*75... also not too bad. This will take time, but could be also useful in a long run (detect DT or other observers, some defense against phenixes and VoidRays). Build Raven (if you have StarPort with tech lab). That costs 100/200 - a little bit expensive for observer hunting, but you could later use Raven for PDD, etc... Anything else?   Questions:   What is the best way to hunt observers? How to deal with opponent observers if you play Zerg? How to deal with opponent observers if you play Protoss?   Thanks a lot!


Why charge distribution is greatest at pointy edges of a surface?

If we have a conductor which is in electrostatic equilibrium, then the charge distribution over this surface $\sigma$ is greatest at the sharp edges of that surface.  Why is this the case?  I want both the proof of this result and the intuition behind it.


I want merge two object by id with java script, but i don't know how  var personData = {     person1 : {         uid: 112233,         city: "esfahan",         postalCode: 2345672345,         phoneNumber: "03111234234",         position: "ui designer"     }}  var additionalPersonData = {     person12: {         uid: 112233,         firstName: "reza",         lastName: "hosseini"     }}      So that the output should look like:   result = [  {   uid: 112233,   firstName: "reza",   lastName: "hosseini"   city: "isfahan",   postalCode: 2345672345,   phoneNumber: "03111234234",   position: "ui designer" }]


I think there's a lot for me to learn about data types. Why this happens  double result = ((3/8)*100).ToString();   it gives zero .. should be 37,5 ... :(


ListNode code not displaying list after modifying with list.add(index, value);

Here is the segment of my code The add method functions as an arrayList add method to add a value to a specified index. The size variable increases when declaring this method in the runner, but displaying the new list results in a NullPointException. public void add(int index, E value) {         ListNode<E> newNode = new ListNode <E>(value);         ListNode <E> tempNode = root;         if(index==0 && root==null) {             root.setPrevious(newNode);             root = root.previous;         }          if(index == size) {             end.setNext(newNode);             end = end.next;         }          if(index>0 && index<size) {             for (int i = 0; i < index-1 ; i++) {                 tempNode = tempNode.next;             }             tempNode.next = newNode;         }         size++;     }    public String toString() {         String output = "";         ListNode<E> tempNode = root;         for(int i=0 ; i<size ; i++) {             output+=tempNode.getValue();//figure out why tempNode can be null             if(i!=size-1)                 output+=", ";             tempNode = tempNode.next;         }         return output;     }


Java JPA - I need to auto generate value of field other than id

I'm working on employees database. Each one of them needs to have it's unique employee number in 5 digit format. It doesn't have to, but can be corelated with id number in database. I was trying to create custom seter that will add auto generated id to number 00000, but it didn't worked. Now I'm trying to set @SequenceGenerator, but it doesn't work to.  the entity looks like this:  @Entity @Table(name = "employees") @NoArgsConstructor @SequenceGenerator(name="empIdGen", initialValue=10, allocationSize=100) @Data public class EmployeeEntity {      @Id     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="empIdGen")     private int employeeId;     private String firstName;     private String lastName;  }   returnet JSON has 0 on that field for each employee:  [     {         "id": 1,         "employeeId": 0,         "firstName": "Jon1",         "lastName": "Doe1"     },     {         "id": 2,         "employeeId": 0,         "firstName": "Jon2",         "lastName": "Doe2"     },     {         "id": 3,         "employeeId": 0,         "firstName": "Jon3",         "lastName": "Doe3"     } ]   I expect values for field "employeeId" like 00001, 00002, 00003 or completly random, but unique. I would appreciate suggestions how to do that.


How to make a persistent live Ubuntu USB with more than 4GB

I want to make a persistent live Ubuntu USB drive with more than 4GB of storage.   I know there is an option of installing directly on the drive but I don't want to do this as it will restrict the drive from working on different computers.   One option is to make an additional partition with extra space but if I do this how can I get newly installed software to be stored on this partition?


Python - How to change a lambda function to partial function?

The lambda function is:  lambda x: x.split('=')   the partial function would look something like:  str.split('=')


Placing images and text in separate parallel columns

I feel like there should be quite a simple answer to this (apologies if so), but have been looking for a while and can't find one. I am trying to format a latex document to match the layout pictured below (e.g. a column containing images parallel to the related text).  This is for a ~100 page document with many images, so I am looking for a solution that's not just hard-coding each image in place, and one that doesn't just involve listing all the images at the end and hoping they match the position of the text. (e.g. one way to do this would be to use something like tabular in beamer, but I'm hoping that's not the best solution)  Thanks so much!


Two \maketitle in the document: an issue with \thanks

I need to have two \maketitles in a document. The titling package handles this almost perfectly. The issue is that I use the \thanks command in the \title and in the \author, and then, in the second \maketitle, the text of the \thanks command is repeated twice. Does anyone know how I can get rid of the second occurrence of the text of the \thanks command? Thanks, Eilon  \documentclass[12pt]{article} \usepackage{titling} \begin{document}  \begin{titlepage} \title{First title\thanks{I thank my kids.}} \author{Author1\thanks{Affiliation of author1. } and Author2\thanks{Affiliation of author2.}} \maketitle \end{titlepage}  \begin{titlepage} \title{Second title} \maketitle \end{titlepage} \end{document}


Trip out of US to Europe using only UK passport + birth certificate

My daughter, who resides in the US, is about to fly to the UK for a brief trip. She holds both US and UK passports and citizenships, and has a NEXUS card.  Now, just before departure, we have realized that her US passport is inaccessible (it is with a distant relative).   Can she instead travel on her UK passport, then on her return successfully enter the US by presenting the UK passport, her US birth certificate and her NEXUS card? (I'm guessing they would be pretty unhappy, but not prevent her entering since it's clear she's a citizen.)  Assuming they will let her in, will she have any trouble leaving the country in the first place - given that the airline has her US passport number attached to her ticket?


I've been trying to add Google Hangouts to Pidgin but it's not working.


My textbook is asking me to: Prove the first absorption law by showing that if A and B are sets, then A ∪ (A ∩ B) = A.  I am a little unclear by how to prove this?


I'm trying to compile a kernel for a 32bit single-core Intel Atom machine. Needless to say, the compile is taking inordinate amounts of time. It's been going for 2 hours and it's still only halfway through the driver modules.  Compiling a kernel on my main desktop only takes 15 minutes but it's a 64bit machine. Can I cross compile to generate a 32bit kernel package from the better machine?


"invalid EFI file path" while booting Windows

I just got my new working notebook with Windows 8 pre-installed. After installing Ubuntu 12.10 the grub menu says that there is an "invalid EFI file path" and it won't boot Windows. Ubuntu works fine...  Is there anything I can do about this?


Displaying only selected features on map in QGIS

Not sure if this option ever existed, but the new QGIS version hides a lot of things somewhere else and this seems so simple that I'm kind of convinced it was possible to do this before. I have quite a large data set with ship tracks. I now want to analyse individual ship tracks (made from point layer with  Plugin). However, it is so crowded that it is hard to look at individual tracks. I don't want to save each single track as a new layer, so I wonder if it is possible to select one track in the Attribute table and display only that one on the map/hide the others?


Background image shows in front of 3D objects, not behind them.

I've done a quick 3D track in blender and I'm trying to render my output, but the plate I used to track is showing up over my 3d objects.  I want to render the objects in the scene with an alpha channel and comp them over the plate I tracked. My renders however, are covered by the aforementioned plate.  Un-checking "Background Images" in the camera properties (only removes it from the viewport) isn't doing it for my render outputs.  Working on some production tests and am not really proficient with the software yet, my apologies in advance.


I read that some of the portals that exist in Ingress are Pokéstops or Gyms in Pokémon GO. But are we talking only about the blue portals, or are the Neutral Portals (the grey ones) also Pokéstops/Gyms?


What is the intuition on fixed and random effects models?

Now I'm having a hard time having a grasp on the difference between fixed and random effects of regression models. I believe I understand it's recommended to use random effects if you consider heterogeneity of slopes, when the data is nested among hierarchical levels, etc.  But here's the question.   Why don't we just put moderating variable(interaction term) if we want to reflect the changing effect among different groups? for example, if the effect of study time on GPA differs among different classrooms, then why not just make a dummy variable for classroom variable, and put an interaction term? I cannot understand what the point is here. What is an overall intuition on the grand assumption of random effects model? what is the main idea that can penetrate the logic of random effects model? I don't want any mathematical or statistical explanation, I want to draw some hypothetical picture in my head.