$B^2 = \{x \in \mathbb{R}^2; ||x|| \leq 1\}$ is the unit disk inthe plane, and let $f: B^2 \rightarrow B^2$ be a continuous map such that $f(x) = x$ for every $x \in S^1 = \{x \in \mathbb{R}^2; ||x|| = 1\}$. Show that $f$ is surjective. This my following attempt at a solution: If $f$ isn't surjective, then there exists a point $y \in B^2$ such that $f(x) - y$ is never $0$ for all $x \in B^2$. Thus $\frac{f(x) - y}{|f(x) - y|}$ is well defined and exists on $S^1$. however, I'm sure this is a dead end. Some hints would be greatly appreciated!

Consider a closed disc $D^n\subseteq \mathbb{R}^n$ and let $f:D^n\rightarrow \mathbb{R}^n$ be a continuous map with $f|_{S^{n-1}}$ is the identity on the boundary of $D^n$. Prove that $D^n \subseteq \operatorname{Im}(f)$. Is my following argument correct? Suppose $x\in D^n$ and $x\not \in f(D^n)$. Then we have $\operatorname{id}_{S^{n-1}}$ factors through $f\circ i:S^{n-1} \hookrightarrow D^n \rightarrow \mathbb{R}^n-\{x\}$. Recalling the fact that $\mathbb{R}^n-\{x\}$ deform retracts to $S^{n-1}$, the contradiction here comes from applying the $H_{n-1}$ functor to obtain that $H_{n-1}(f\circ i):\mathbb{Z}\rightarrow 0 \rightarrow \mathbb{Z}$ is the zero homomorphism, certainly not equal to the identity homomorphism $H_{n-1}(\operatorname{id}_{S^{n-1}}):\mathbb{Z}\rightarrow \mathbb{Z}$. Hence $f$ must contain its image. Also is there a way to prove this directly? I think I can smell Brouwer's fixed point theorem and/or Borsuk-Ulam but I'm not sure how to employ it.


I installed VirtualBox by downloading the .deb file directly from their , however, turns out I won't actually need that program and I have no idea on how to uninstall it. I found a couple solutions that suggested sudo apt-get remove --purge virtualbox but that doesn't work since I didn't install it from apt, upon running whereis virtualbox I get the following directories: /usr/bin/virtualbox  /usr/lib/virtualbox  /usr/share/virtualbox  Do I just delete everything from those directories or what do I do to properly uninstall the program?

Suppose I download a .deb package from a website and install it. (I assume that when I double click the .deb file, the package is installed through a GUI that interfaces with dpkg right?)  How can I uninstall it?


How can I get to know when my password will expire? I'm running IBM AIX.

I can check that the user is expired or not with:   lsuser -f USERNAME | fgrep expires   But how can I check that the user's password is expired or not? Are there any other "expiring" things that can cause trouble? [so that user can't login, because he can only reach a server through FTP and his password expired, and he can't change it, because he hasn't got SSH access to give out the "passwd" command to update his password.]


A covid test showed a 95% true positive rate and a 7% false positive rate. Currently, 3% of the population has covid. Alexa was selected to take the test and it came back positive. How likely it is that Alexa actually has covid? Not sure how to go ahead with this.

I need help in all things related to identifying, defining conditions and solution feed back and reasoning most importantly.  1) A blood test indicates the presence of a particular disease 95 % of the time when the diseases is actually present. The same test indicates the presence of the disease .5% of the time when the disease is not present. One percent of the population actually has the disease. Calculate the probability that a person has a disease given that the test indicates the presence of the disease.  First and foremost one might think that because the word "given" is followed by the indication of the disease they might think that, the indication of the disease is the is the condition However my understanding is that a condition related to a mathematical definition is the state of affairs that must occur or exist before something else can happen. Well clearly one must first either have the disease or not have the disease before a test can indicate whether or not the disease is in fact present.   Solution:  $C=$ The individual has the disease $.01%$  $E=$ The test indicates that it is present in those with the disease $.95%$  SO we want the proportion of those that have the disease and test positive to the proportion of those that have the disease:  $P(E \vert C) = \frac{P(E \cap C)}{P(E \cap C)+P(E^c \cap C)}$  $= \frac{(.01)(.95)}{(.01)(.95)+(.05)(.01)}= \frac{.0095}{.01}=.950$  My answer choices were $.324,.657,.945,.950,.995$  This one made the most sense to me? The other method I used by using the condition as the test didnt even give me anything close to 1%. Was I supposed to do it the other way and was I somehow supposed to take into account that of those that don't have the disease 50% test positive but that wouldnt make sense to me.   2) Ninety-eight percent of all babies survive delivery, However 15 percent of all births involve a c section and when they are done the baby survives 96 percent of the time. If a randomly chosen pregnant woman does not have a c section what is the probability that her baby survives?  By the same logic as the previous problem the condition would only make sense to be the method of delivery because if we are talking about a baby surviving delivery then its survival is conditioned on the method of delivery. Correct?   $C=$ Does not have a C-section $.85%$  $E=$ her baby survives without a c-section this is difficult to figure out:  if 96% of all 15% c section births survive and since we have the percentage of the total 98 percent that survive from both non c and c section then thus 1 minus this should give us the percentage that survive when they do not have a C-section, this makes sense correct? then the probability of a baby surviving a c-section is $.98-.144=.836$ Right?  Okay now we set up the question:  Using this we want:  $P(E \vert C)= \frac{P(EC)}{P(E \cap C)+ P(E^c \cap C)}= \frac{P(E \cap C)}{P(C)}=\frac{(.836)(.85)}{(.836)(.85)+ ?}$  ?= we want the percentage that didn't survive when they had a c-section and didn't have a c-section $(.85)(1-.836?)$  recopying and pasting we get:  $P(E \vert C)= \frac{P(EC)}{P(E \cap C)+ P(E^c \cap C)}= \frac{P(E \cap C)}{P(C)}=\frac{(.836)(.85)}{(.836)(.85)+(1-.836)}=\frac{.7106}{(.7106+.164)}$  Some how this was wrong as the supposed answer is slightly above .98. I want to rant a bunch of improper things and swear at the top of my lungs who the hell does my logic not follow I used the exact definition of condition and and properly applied bayes theoreom please label every step and the reason behind each intersection obtained.


Let $A,\,B$ be subsets of the set $X$. Prove one of de Morgan's Laws of set theory:$$X\setminus(A\cap B)=(X\setminus A)\cup(X\setminus B)$$

In logic De Morgan's law means $\lnot (A \land B) \Leftrightarrow \lnot A \lor \lnot B$  In set theory De Morgan's law means $(A \cap B)^C = A^C \cup B^C$  I'm surprised that the same idea is true in different fields. Is there any explanation for this phenomenon or is it just a coincidence?


I am from India, I have visa for USA it expires on September 8th I am planning to Travel September 4th and return on October 1st. Does it possible? Can I travel to the USA from India just 4 days before my visa expires? I never traveled to the USA before, but I was issued a visa valid for 2 months. I mentioned to the visa office my dates of travel, yet the visa I was granted is expiring before my expected arrival date. Is it possible for me to stay in the USA for one month after the expiration of my visa? and does it effect my future visa applications to the USA?

Can I Travel to USA from India just before 4 days before my visa expires to USA, I never Travel to USA before, but I was issued visa for 2 months, I mentioned to visa offer that I am traveling on September 10th and stay there for 15 days, yet Visa granted and visa expiring in Sept 8th, Well does it possible for me to stay in Usa for one month? and Does it effect for my future visas to usa?


I can't seem to install Ubuntu Desktop on my Windows 7 PC.  Once it was done downloading Cyberlink Power2Go opened up and told me that "No burner is currently available or you don't have rights to access the burner" Not sure why this is happening or how to fix it.  Any advice?  Also, I have been told that I need a disk burner to make this work, but I do not currently have one, and I'd rather not buy one to make it work.

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


how can I obtain the following approximate symbol.    Thank you. bkarpuz

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'm using a combination of exiftool and PIL to geotag and resize imagery. I've geotagged the full resolution images and now want to create lower resolution images for web hosting. Using PIL I have resized them but it looses the Geotag data. does anyone know of a way to maintain the EXIF metadata on the img.save  many thanks  basewidth = 3680 img = Image.open(INPUTFILE) wpercent = (basewidth / float(img.size[0])) hsize = int((float(img.size[1]) * float(wpercent))) img = img.resize((basewidth, hsize), PIL.Image.ANTIALIAS) img.save(INPUTFILE + "_LowRes.jpg")

I need to resize jpg images with Python without losing the original image's EXIF data (metadata about date taken, camera model etc.). All google searches about python and images point to the PIL library which I'm currently using, but doesn't seem to be able to retain the metadata. The code I have so far (using PIL) is this:  img = Image.open('foo.jpg') width,height = 800,600 if img.size[0] < img.size[1]:     width,height = height,width  resized_img = img.resize((width, height), Image.ANTIALIAS) # best down-sizing filter resized_img.save('foo-resized.jpg')   Any ideas? Or other libraries that I could be using?


People like me who constantly re-installs distro for some reasons doesn't want to go with the same process of setting up the previous environment.(unlike windows where i know what folders and drives needs to be included in backup(although i use AOMEI BACKUPPER) so my life is easy in windows but not so in ubuntu because i'm an avid noob who keeps messing up with system and then re-installs it.

I'm fighting the 'too small /boot partition' problem, and it looks like I'm going to have to either re-partition or install a larger drive (AND re-partition?). I keep seeing warnings that I should be sure to "back up important files," but excuse my ignorance -- what are "important files"? Incidentally, I have about $200 worth of Ubuntu books that don't explain this, or even what to back up when you back up. Sigh.  Specifically:   Back up the /home directory. However, without using sudo, this fails to backup about five files (for example, a 'lock' file). Am I ok, or do I need to use sudo? I suspect I should back up /etc. With sudo? Where are the files for things like games and apps? Do I need to back them up? If I'm doing a "clean install," is there any point to backing up the whole frickin' drive? If I'm going to repartition /boot, what should I back up before I do that? If I back up the drive, repartition, and then restore the backup, will it "restore" the old /boot partition?   Inquiring minds are flummoxed.


I know how silly it will be if I ask this question, please do bear with me as I am new to Ubuntu.  I have my project done in Eclipse in Ubuntu 10.04. As I wanted to add some extra features in my project I could not do it in Eclipse Juno.   My question is if I upgrade my ubuntu 10.04 to 12.04 or any other latest version, will my existing project remain the same or will it affect my existing project, which I have in ubuntu 10.04?  If not, can I upgrade it using the update manager?

What are the different ways I can use to upgrade Ubuntu from one release to another?


Lifetime of local variable declared inside a method is limited to the execution of that method. But in the following code sample lifetime of local variable index preserved after the execution of method .  class Program {     static Action action;     static void Main(string[] args)     {         setAction();         for (int i = 0; i < 5; i++)         {              action();         }                     Console.ReadLine();     }      static void setAction()     {         var index = 5;         action = () => {             index++;             Console.WriteLine("Value in index is {0}",index);         };     } }   The output of the program is this  Value in index is 6 Value in index is 7 Value in index is 8 Value in index is 9 Value in index is 10   I can not understand how the values in variable index is preserved.

What is a closure? Do we have them in .NET?  If they do exist in .NET, could you please provide a code snippet (preferably in C#) explaining it?


Is it safe to drive the pins of this AVR chip while it's unpowered?  For example, if I were to share a motor driver such that it can be driven by two microcontrollers, would either microcontroller be damaged while the other is unpowered, but is seeing the signal voltages on its pins from the other microcontroller?  EDIT: Because this was marked as a duplicate, here is some clarification. The MCU specified here is different from a different manufacturer. Though I'm not sure, their operation and limits would most certainly differ. This question was not about wether it'll 'weaken' the MCU but about if its safe to do so in the first place. IMO weaken would mean that it is possible but over time it'll degrade the performance of the MCU.

We are using the  in a project. The way our design is now, the IC's GPIO pins will sometimes be driven high (to 3.3V) or low when it is powered-off. Will this weaken the chip? The absolute maximum ratings state the voltage on any digital I/O pin is -0.3V to VSupply+0.3V. If the answer is no, could the IC be weakened during power up?  The LTC5800-IPM does not have the most detailed datasheet. If it is not clear for that device in particular, I'd be interested to know for CMOS microcontroller GPIOs in general.


I saw a link to  in .  The link took me to a book in Amazon website.  redirects me to   So, I'll just repeat the title: What purpose does rads.stackoverflow.com serve?

We have officially discontinued the Amazon book affiliate remnant ads, since despite our best efforts they don't perform well for our audience and cannot be made to perform well.  We've often wondered,   I'm thinking this isn't a problem; it has gotten lots of support historically. So we're going to go ahead and do it, so the company Amazon account is still getting some use, and we benefit a little.   To be clear: from this point on, all Amazon links posted on all sites will automatically be rewritten to add our affiliate link. We have a clever affiliate redirect that geolocates the IP address and redirects to the appropriate regional Amazon store (amazon.uk, amazon.ca, et cetera).  If you have any feedback on this, or suggestions, as they say … speak now or forever hold your peace!


On my school iPad while I had a few tabs open my internet all was all fine and handy dandy but then all of a sudden I lost wifi connection (which my iPad does pretty often so I'm angry but used to it) but when I connected to my home's wifi connection and I went back on safari to my tabs, it said my ipad isn't connected to the internet suggesting I didn't have my wifi on even though I checked and my wifi network had it's blue check mark meaning I was connected. And sometimes it would take a long moment to load it would then say  "Safari could not open the page because the server stopped responding." If I refresh the page a second time if I get this message it once more says "because your iPad is not connected to the internet." even though when I check my wifi it says I'm connected and shows the blue check mark. Even if I forget the network and renew the lease the same thing happens. I went onto Google on my computer and iPhone "wifi connected but no internet acess iPad" because I can't find the answer I need and most of the answers I don't understand. I'm only 13 years old in 8th grade jr high so I don't understand anything about stuff like DHCP or BootP or Static and how they work and I don't know what is DNS and such. I don't know exacty what resetting my network settings does and what I've read about network settings reset gets rid of stuff like VPN or MMS or APN. I'm trying to find something easy for me to understand and something helpful but not complicated that you need to be a professional coder or something to understand.  My regular iPad my family and I use, my computer (which isn't Apple) and my iPhone work perfectly fine with wifi. (Well, my iphone is new and I literally just got it yesterday and it's my first phone ever so of course no problems yet.) I tried forgetting the network after renewing the lease and that does no good either. Everytime I check the wifi network says it's connected and has the  blue checkmark and even the little lock icon but it always says it's not connected when I reload the page on safari. Can someone please explain exactly what's going on but explain in a way a jr high student girl (who doesn't know the complicated stuff and difficult steps to fixing issues like these well at all) like me can understand?  (Oh, and I apologize for any grammar mistakes and whatnot just to say before I start feeling guilty over them afterwards in case I made any.) I'd really love the help! In case I need to include info on the school iPad, it's a iPad air with the 9.2.1 software update and IOS 8.  Just including this info in case it's important!

I'm a relatively new macOS user. Let me try to describe the problem I'm facing as succinctly as possible  Just this morning, when I'm unable to get any internet connection even though WiFi is connected (full strength). All my other devices has no issues when connected to the same network (it's my home network)  I've logged into the router, and checked, there are no blacklisted IP/MAC addresses.  Additional information   I'm using a tMBP 15" for over a year I've had no issues with any WiFi connectivity to my home network before today. ping from terminal doesn't work as well. I'm able to connect to my phone's hotspot, and get internet from my MBP.  I have bootcamp set up. When I boot into Windows, I'm able to get internet access through my home WiFi   How can I troubleshoot this to get to the root cause of the problem?


I use Terminator terminal. As you can see from the screenshot below, everywhere it shows the directory names. Instead of showing whole directory names, I want it to show only the last directory name i.e ecommerce in this case. Is there a way to do this?

When I was using ubuntu 14.04, it's easy to set title. Just press F2 or move mouse to top menu. But there is no menu on ubuntu 16.04 and press F2 can't change the title. What should I do?


I have a JSON object in Python that represents operation data, and it's heavily nested. In constructing my UI for it, it looks like I'll need to show a section of it in a tree view.    Is there a way to find a key in a JSON object in Python? From the docs, it doesn't look like it. I could write something to traverse the object and find it, but if there's an out of the box way, that'd be preferable. Is there such a way?    Thank you for your time.

I have nested dictionaries:  {'key0': {'attrs': {'entity': 'p', 'hash': '34nj3h43b4n3', 'id': '4130'},           u'key1': {'attrs': {'entity': 'r',                               'hash': '34njasd3h43b4n3',                               'id': '4130-1'},                     u'key2': {'attrs': {'entity': 'c',                                         'hash': '34njasd3h43bdsfsd4n3',                                         'id': '4130-1-1'}}},           u'key3': {'attrs': {'entity': 'r',                               'hash': '34njasasasd3h43b4n3',                               'id': '4130-2'},                     u'key4': {'attrs': {'entity': 'c',                                         'hash': '34njawersd3h43bdsfsd4n3',                                         'id': '4130-2-1'}},                     u'key5': {'attrs': {'entity': 'c',                                         'hash': '34njawersd3h43bdsfsd4n3',                                         'id': '4130-2-2'}}}},  'someohterthing': 'someothervalue',  'something': 'somevalue'}   given an id  - one of all the ids like 4130 to 4130-2-2.                       whats the easiest way to navigate to the correct dictionary?  Like if the given id is 4130-2-1 then it should reach the dictionary with key=key5  non xml approaches please.  Edit(1): The nesting is between 1 to 4 levels, but I know the nesting before I parse.  Edit(2): Fixed the code.  **Edit(3):**Fixed code again for string values of ids. Please excuse for the confusion created. This is final I hope :)


The conversion of dvi to pdf fails when using the \arrow command. For instance, the file  \documentclass{article} \usepackage{chemfig}  \begin{document} \schemestart A\arrow B \schemestop \end{document}   returns:  Error: /undefined in XC@. Operand stack: --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostring  val-- --nostringval-- false 1 %stopped_push 2045 1 3 %oparray_pop 2044 1 3 %oparray_pop 2025 1 3 %oparray_pop 1884 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:961/1684(ro)(G)-- --dict:1/20(G)-- --dict:88/200(L)-- --dict:178/300(L)-- --dict:58/200(L)-- Current allocation mode is local Current file position is 33303 GPL Ghostscript 9.26: Unrecoverable error, exit code 1   Thank you for helping !

I use tikz (and tikzpicture) a fair bit, but files that used to compile fine before the latest slew of updates to pgf, and pstricks, no longer seem to do so (at least, on my MikTeX installation). The MWE (below) seems to compile correctly, but the DVI can't be rendered using yap, and dvi -> ps -> pdf fails (the dvi -> ps seems to be ok -- to the extent it isn't throwing errors), but ps2pdf fails miserably, with the following errors:   Error: /undefined in XC@.  Operand stack:    --nostringval--   --nostringval--   --nostringval--   --nostringval--   -  -nostringval--   --nostringval-- Execution stack: %interp_exit   .runexec2   --nostringval--   --nostringval--   --  nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --  nostringval--   false   1   %stopped_push   2045   1   3   %oparray_pop    2044   1   3   %oparray_pop   2025   1   3   %oparray_pop   1884   1   3    %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval-  -   --nostringval--   --nostringval--   2   %stopped_push   --nostringval-- Dictionary stack:   --dict:979/1684(ro)(G)--   --dict:1/20(G)--   --dict:87/200(L)--   --    dict:182/300(L)--   --dict:58/200(L)--   Current allocation mode is local   Current file position is 99615   GPL Ghostscript 9.26: Unrecoverable error, exit code 1   Here is the MWE:  \documentclass[12pt,letterpaper,oneside]{article}  \usepackage{tikz}  \usetikzlibrary{decorations,shapes,arrows,matrix,positioning}  \begin{document}  \begin{center} \begin{tikzpicture}[x=0.175cm,y=0.175cm,scale=1]  % set up maximum and minimum x- and y-coordinates \def\xmin{0} \def\xmax{23.5} \def\ymin{0} \def\ymax{23.5}  % draw and label axes    \draw[->,thick] (\xmin,0) -- (\xmax,0) node[below=8pt,near end]  {\small{abundance ($N$)}};   \draw[->,thick] (0,\ymin) -- (0,\ymax) node[above=12pt,near   start,rotate=90] { \small{birth rate ($b$)}};  % draw vertical reference line at K/2=50   \draw[color=black, thick,  smooth] (0,20) -- (20,0)  node[below=6pt,midway,rotate=-45] {\small{slope~$=a$}};  % draw circle around point where function intersects x-axis \draw [red] (0,20)  ellipse (0.2cm and 0.2cm) node[right=3pt,black] {$b_0$};   \end{tikzpicture}  \end{center}   \end{document}


My phone was left in a friends car and I need the imei number

I had a Nexus S but lost it or it was stolen. I need to find it's IMEI. I don't have the box or documentation either.  I've checked exif data from photos taken with the phone.  What other potential sources are there for it's IMEI?


Ichabod the Inscrutable has an imp familiar and is exploring a dungeon. He comes across a series of trapped rooms that have Antimagic Fields in them, and he wants to send his familiar in to do some exploring.The Antimagic Fields completely fill each room, but do not extend beyond their walls. Ichabod is currently standing outside of the first room. Would an Antimagic Field block telepathic communication with a familiar?

The  spell has a duration of instantaneous, which implies that the familiar itself is not an ongoing magical effect. However, the spell provides a number of ongoing features that are definitely supernatural:    The familiar disappears when it drops to 0 HP. The wizard can temporarily or permanently dismiss the familiar. The wizard can communicate with the familiar telepathically. The wizard can observe through the familiar's eyes and ears. The familiar can deliver touch spells on behalf of the wizard.   Which of these features are considered magical? For example, would any of them show up to a detect magic spell or be suppressed by an antimagic field? In addition, is my assumption above correct that the familiar itself is not considered magical?


Assume we have a table which has two columns, one column contains the names of some people and the other column contains some values related to each person. One person can have more than one value. Each value has a numeric type. The question is we want to select the top 3 values for each person from the table. If one person has less than 3 values, we select all the values for that person.   The issue can be solved if there are no duplicates in the table by the query provided in this article  . But if there are duplicates, what is the solution?   For example, if for one name John, he has 5 values related to him. They are 20,7,7,7,4. I need to return the name/value pairs as below order by value descending for each name:  -----------+-------+ | name     | value | -----------+-------+ | John     |    20 | | John     |     7 | | John     |     7 | -----------+-------+   Only 3 rows should be returned for John even though there are three 7s for John.

I want to return top 10 records from each section in one query. Can anyone help with how to do it?  Section is one of the columns in the table.  Database is SQL Server 2005. I want to return the top 10 by date entered.  Sections are business, local, and feature.  For one particular date I want only the top (10) business rows (most recent entry), the top (10) local rows, and the top (10) features.


This question is inspired by an almost . My aim is to have the figure (placed in a figure environment) occupy the maximum place possible given that it has a caption (without generating any warnings of course) and that there are things like a frame title and a navigation bar. The idea from the linked solution is to use  \includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{picture}   However, this doesn't seem to take into account the fact that I have a frame title and a navigation bar (due to the Warsaw theme). Actually, even if I remove the theme, the frame title and the caption, it still results in a badbox. I've tried compiling with PDFLaTeX and lualatex from inside Texmaker.  Suggestions using additional packages (I already use tikz) or even lua are welcome. Here's the MWE.  \documentclass{beamer} \usepackage{graphicx}  \usetheme{Warsaw}  \begin{document}  \section{Introduction}  \subsection{General considerations}  \begin{frame}{Definition}    \begin{figure}     \includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{statesOfMatter}     \caption{Classical picture of the states of matter.}   \end{figure}  \end{frame}  \section{Placeholder I}  \begin{frame}  \end{frame}  \section{Placeholder II}  \begin{frame}  \end{frame}  \end{document}

I want to have an image take up as much as possible of the content area in a beamer presentation, without overlapping the title, the sidebars, or the footers. How can I achieve this?  The code below gives an example of what goes wrong using \includegraphics and setting the width and height from \textwidth and \textheight -- if you try it, you'll see that the footer at the bottom is covered.  One can, of course, do something like height=0.9\textheight but that is annoying and not particularly robust if one changes themes... I'm looking for a more elegant solution.  \documentclass{beamer} \mode<presentation>{   \usetheme{Marburg} } \usepackage[utf8x]{inputenc}  \begin{document} \begin{frame}{Header}{Sub title}   \includegraphics[width=\textwidth,height=\textheight]{tmp.jpg} \end{frame} \end{document}


Every Stack Exchange 2.0 site has a meta. So many metas! Which one should I post my bug report, feature request, or discussion in?

I'm mostly active on  and we have a separate . Most of my questions on IT Security meta have answers with links here. So my question is, where am I supposed to post what i.e. feature request, bug report, behavior questions?


EDITED QUESTION  I made a small sequential program in Java which can calculate my daily bonus for my job. It's not the most beautiful or optimized bit of code but hey it works!  Now it would be cool to have this actually save my input for that day somehow and even when I terminate the program the next time I open it should still have stored that end value somewhere. Maybe even go back to that specific day and check my PPH (productive hours) and maybe even calculate the whole month (which is actually the end goal and track my performance).  Any suggestions?

I'm trying to find the best way to save the state of a simple application. From a DB point-of-view there are 4/5 tables with date fields and relationships off course.  Because the app is simple, and I want the user to have the option of moving the data around (usb pen, dropbox, etc), I wanted to put all data in a single file.  What is the best way/lib to do this?  XML usually is the best format for this (readability & openness), but I haven't found any great lib for this without doing SAX/DOM.


In the MCU, the Eye of Agamotto houses the Time Stone, and Dr. Strange has demonstrated numerous powers, including:   ageing/deageing fruit trapping Dormamu in a repeating time loop seeing 14,000,605 possible futures    However, as I understand it, in the comics,  is not related to the Time Stone and imbues powers primarily related to mystical "seeing":     The Eye is a weapon of wisdom that can radiate a powerful mystical light that allows Strange to see through all disguises and illusions, see past events, and track both ethereal and corporeal beings by their psychic or magical emissions.    What time-related powers has Dr. Strange demonstrated in the comics?  Are they tied to objects in particular?  (This is somewhat of interest since it may set some precedent for what Dr. Strange can now do in the MCU given he no longer possesses the Eye.)

Doctor Strange can teleport. There's no question of this. Thus, by teleporting - he is theoretically capable of going FTL. Now  could cause causality paradoxes - i.e. an event where the effect happens before the cause.  Could Doctor Strange theoretically use this principle to change the outcome of an event or damage the timeline (as he could with the Infinity Stone) using only his teleportation? If he can, are there any examples of him doing this?


I have an iPad Mini that I have had sense the fall.  This morning I woke up and it was working fine.  Now it won't turn on.  I've tried all the regular fixes and nothing is working.  Will the manufacturer warranty cover this?  Should I take it to an Apple store?

My iPad mini retina is out of warranty,  I forgot to plug in my iPad after the critical battery warning and it went some minutes following the warning. I was not worried because same thing had happened a few times before and iPad was perfectly okay after charging it. However, this time I remember seeing a flash of blue screen immediately after it went black. Then, I plugged it in an waited for a while and tried starting it. Ever since, it fails to start hanging on the apple logo with white background screen.   I tried to connect to my Mac but nothing showed up in iTunes. I am worried now. Can I troubleshoot this or is it broken and needing repair?


I'm almost certain this is a Larry Niven short-story but I don't know how to identify it.  It's set in the equivalent of a NASA project station and they are receiving the telemetry from an interstellar probe as it encounters a star and contact is about to fade as the probe goes around the far side of the star. The alien in the audience apologetically explains that telemetry won't resume because they shot and destroyed the probe.  The alien explains that his race is deeply impressed by the humans' ability to create technology that can still work after the journey but the humans are depressed because the alien used ftl technology to easily achieve what was a monumental project for humans.

I'm trying to remember the name of the short story, or TV episode, where the plot is that it's set at a mission control centre on Earth somewhere, and they are awaiting the signal from a probe which has been sent to a world outside our solar system.  The twist of it is that one of the people there is an alien from that world; they saw the probe, and destroyed it and came looking for us after they realised it wasn't hostile, and are offering to swap their FTL technology for our probe technology if the signal is received etc.  Any ideas what this was?


I meet a problem when  using mingw32-g++ to compile a pj in codeblocks.       error msgs  obj\Debug\main.o||In function `main':| E:\project\test\main.cpp|15|undefined reference to `Stack<char>::Stack()'| E:\project\test\main.cpp|23|undefined reference to `Stack<char>::shiftL()'| E:\project\test\main.cpp|28|undefined reference to `Stack<char>::shiftR()'| E:\project\test\main.cpp|33|undefined reference to `Stack<char>::Del()'| E:\project\test\main.cpp|36|undefined reference to `Stack<char>::push(char)'| ||error: ld returned 1 exit status| ||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|   Stack.h  #ifndef STACK_H_INCLUDED #define STACK_H_INCLUDED  template <class Type> struct List {     Type content;     List<Type> *head;     List<Type> *end; };  template <class Type> class Stack { public:     Stack();     ~Stack(){};     void push(Type x);     void Del();     void shiftL();     void shiftR();     List<Type> *Front(){ return front; }     List<Type> *Back(){ return back; } private:     List<Type> *front;     List<Type> *back;     List<Type> *operate;     List<Type> F;     List<Type> B;     int pos; }; #endif // STACK_H_INCLUDED   Stack.cpp  #include"Stack.h" #include<stdio.h> template<class Type> Stack<Type>::Stack() {     F.head = B.end = NULL;     front = &F;     back = &B;     front->end = &B;     back->head = &F;     operate = back;     pos = 0; } template<class Type> void Stack<Type>::Del() {     if (pos>0)     {         List<Type>* temp;         temp = operate;         operate = operate->end;         operate->head = temp->head;         temp->head->end = operate;         pos--;     } } template<class Type> void Stack<Type>::shiftL() {     if (pos>0)     {         operate = operate->end;         pos--;     }  } template<class Type> void Stack<Type>::shiftR() {     if (operate->head != front)     {         operate = operate->head;         pos++;     } } template<class Type> void Stack<Type>::push(Type x) {      List<Type>* temp;     temp = new List<Type>;     temp->content = x;     temp->end = operate;     temp->head = operate->head;     operate->head->end = temp;     operate->head = temp;     operate = operate->head;     pos++; }   mian.cpp  #include<stdio.h> #include<iostream> #include"Stack.h" using namespace std;  int main() {     char c;     int k;     cin >> k;     getchar();     for (int j = 0; j < k; j++)     {         Stack<char> password;         while (1)         {             c = getchar();             if (c == '\n')                 break;             if (c == '<')             {                 password.shiftL();                 continue;             }             if (c == '>')             {                 password.shiftR();                 continue;             }             if (c == '-')             {                 password.Del();                 continue;             }             password.push(c);         }              List<char>* i;             for (i = password.Back()->head; i != password.Front(); i = i->head)                 printf("%c", i->content);             printf("\n");     }     return 0; }     But  If I add #include"Stack.cpp" in main.cpp(this is illegal,right?),the complier don't show any errors or warnings. Can you tell me why?Thanks a lot!  :)

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Version: Ubuntu 16.04.4 LTS 32-bit  I am unable to get settings in /etc/sysctl.conf to stick around after a restart.  Here are the settings I am trying to implement (taken verbatim from sysctl.conf):  kernel.core_uses_pid=1 kernel.dmesg_restrict=1 kernel.kptr_restrict=2 kernel.sysrq=0 net.ipv4.conf.all.log_martians=1 net.ipv4.conf.all.send_redirects=0 net.ipv4.conf.default.log_martians=1 net.ipv4.tcp_syncookies=1 fs.suid_dumpable=0   I've checked /etc/init/procps.conf (which contains essentially nothing) and /etc/init/procps-instance.conf (which does contain the appropriate commands) and have come up empty.  If I use sysctl -p, the settings are loaded properly, but before issuing that command and immediately after a reboot, the commands are not set properly.  Ex:  username@servername:/etc$ sudo sysctl -a | grep sysrq kernel.sysrq = 136 sysctl: reading key "net.ipv6.conf.all.stable_secret" sysctl: reading key "net.ipv6.conf.default.stable_secret" sysctl: reading key "net.ipv6.conf.enp2s0f0.stable_secret" sysctl: reading key "net.ipv6.conf.enp2s0f1.stable_secret" sysctl: reading key "net.ipv6.conf.lo.stable_secret" username@servername:/etc$ sudo sysctl -p net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 kernel.core_uses_pid = 1 kernel.dmesg_restrict = 1 kernel.kptr_restrict = 2 kernel.sysrq = 0 net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.log_martians = 1 net.ipv4.tcp_syncookies = 1 fs.suid_dumpable = 0 username@servername:/etc$ sudo sysctl -a | grep sysrq kernel.sysrq = 0 sysctl: reading key "net.ipv6.conf.all.stable_secret" sysctl: reading key "net.ipv6.conf.default.stable_secret" sysctl: reading key "net.ipv6.conf.enp2s0f0.stable_secret" sysctl: reading key "net.ipv6.conf.enp2s0f1.stable_secret" sysctl: reading key "net.ipv6.conf.lo.stable_secret"   I've also checked pm-utils, which is installed, but does not have any settings files in power.d other than 95hdparm-apm.  As my previous statement indicated, laptop-power does not exist in power.d, that issue is irrelevant -- please read the entire post before marking as duplicate.  One more thing I'd like to add, in /etc/sysctl.d, several files are present with a 10- prefix, but the 99-prefixed link to sysctl.conf is in place, so it should run last and the settings should still be set correctly.  I am stumped.  Tried adding a sysctl reload command to crontab as recommended in :  @reboot sleep 60 && sysctl --system   Still no dice.  What am I missing?

In a mission to reduce frequent memory flushes to filesystem, I added the following two lines to /etc/syctl.conf.  vm.dirty_background_ratio = 50 vm.dirty_ratio = 80   I then ran, sudo sysctl -p and the changes were in effect right way. Upon a system reboot, however, I still see old values for dirty_ratio and dirty_background_ratio.  new-sys-admin@ThinkPad:~$ sysctl -n vm.dirty_background_ratio  10 new-sys-admin@ThinkPad:~$ sysctl -n vm.dirty_ratio  5   I'm running Ubuntu 12.04.3 LTS 3.2.0-52-generic-pae. After looking at a couple of posts:         it looks like the upstart job, /etc/init.d/procps is supposed to run on system boot and reload /etc/sysctl.d/* and /etc/sysctl.conf contents via /etc/init/procup.conf but it doesn't seem like it does.  On the next reboot, I ran service procps start and the changes were in effect. I'm wondering how to make procps run consistently on boot time and if I am missing an additional step in making these changes persistent.  EDIT 1  Also tried having these values in /etc/sysctl.d/10-local.conf as per Bill's suggestion.  new-sys-admin@ThinkPad:~$ cat /etc/sysctl.d/10-local.conf  vm.dirty_background_ratio = 50 vm.dirty_ratio = 80   Upon restart, the values are reverted back.


I have this simple function:  def fu():     return "great"   I need to call it by using a string,  So I tried this:  print(exec("fu()"))   But the the output I got was:  None   How do i fix it?

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


Let $A$ be an arbitrary infinite set and $x\not\in A$. I want to find a bijection between $A$ and $A\cup\{x\}$.  Proof 1: A possible proof of that is to play with cardinal numbers as follows: Let $\kappa,\lambda$ be cardinal numbers such that $\kappa$ is infinite and $\lambda\leq \kappa$. Then  $$ \kappa\leq\kappa+\lambda\leq\kappa+\kappa=\kappa $$  and hence, Schroeder-Bernstein Theorem implies that $\kappa+\lambda=\kappa$, which for $\lambda=1$ implies the desired result.  Proof 2: Another way of proving it is the following: We know that since $A$ is infinite there exists a countably infinite proper subset of $B\subseteq A$. Then, it is easy to see that $B$ can be partitioned as $B=B_{1}\cup B_{2}$, where $B_{1},B_{2}$ are countably infinite subsets of $B$. In particular, there exists a bijection $g:B\to B_{1}$. Hence, by writing $A=B\cup(A\setminus B)$, we see that the map $f:A\to B_{1}\cup(A\setminus B)$ where  $$ f(x)=\left\{\begin{matrix} x, & x\in A\setminus B \\ g(x), & x\in B\end{matrix}\right. $$  is a bijection between $A$ and its proper subset $B_{1}\cup(A\setminus B)$. Then, using this fact we proceed of proving the desired result. Let $C\subseteq A$ be a proper subset of $A$ such that $|C|=|A|$. Let $h:A\to C$ be a bijection. Let also $y\in A\setminus C$. Obviously, we have that $|A|\leq|A\cup\{x\}|$. For the other direction observe that the map $f:A\cup\{x\}\to A$ where  $$ f(a)=\left\{\begin{matrix} h(a), & a\in A \\ y, & a=x\end{matrix}\right. $$  is 1-1 and so $|A\cup\{x\}|\leq |A|$. Then, again from Schroeder-Bernstein Theorem, we derive the equality.  Question: My question is whether I can prove this fact without relying in the axiom of choice. I know that Schroeder-Bernstein Theorem is independent from AC but the proofs of the facts:   if $\kappa$ is an infinite cardinal then $\kappa+\kappa=\kappa$, and if $A$ is an infinite set then it contains a countably infinite proper subset   rely in AC (as far as those proofs that I know). However, it seems to me that the statement $|A\cup\{x\}|=|A|$ is very simple to rely in AC and can be proven without it, though I may be completely wrong. Any comments?

Is it possible to prove the following fact without axiom of choice ?  " Every infinite set has a countably infinite subset".  Can it be proved that axiom of choice is necessary here ?


The object I downloaded from internet is covered in black spots. There is no texture or material on it. How can I delete them?

I have imported a mesh (AutoCad DXF) and I'm experiencing strange shading behavior. I've done the following to try and address the problem with no luck:  Recalculate Normals Remove Doubles Delete Loose Geometry Cleared Seam, Sharp, and Bevel Weights  There are no modifiers on the mesh.  The original imported mesh looks fine in smooth shading but I need the mesh to be in quads which causes the shading to mess up as shown in photo. I can add my .blend file but I'm not sure how to do that.


I installed  soft PhotoRec and recovery some files after I want to delete but i cant  how can I delete this files and folders? can somebody help me I am new user.  “recup_dir.1” can't be put in the trash. Do you want to delete it immediately?

A folder was created when I used a utility to recover pictures from a cd card that I deleted by mistake.  Now I can't delete it or move it. I am told I am not the owner of it even when I am logged on as root.  How can I delete the recup_dir.1 folder from my machine?


I would like to replace my current Android system with one connected to Ubuntu. Is that possible?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I'm about to start a Minecraft server, and I'd like to mimic some of the mechanics of a few larger servers on which I have played. For example I'd like to be able to set local game modes, so that one biome may be a survival area, while another is creative. I've been trying to find a way to do this, but unfortunately I haven't found anything. So I was wondering if anyone could help?

Is there a way to set an "Adventure Mode Boundary" in Minecraft?  I am trying to create this village where players can spawn in, and then set out to explore the world and build and do normal minecraft stuff. I don't want them to destroy this village, so I want them to be in adventure mode when they are in the village and then switch them to survival when they leave, and vice-versa. When they return to the village, they get switched back to adventure mode.  In other words, I want to set an "Adventure Mode Boundary" to protect buildings. I am working without mods. I am hoping there is an simple way using command blocks.


I want to generate 500 random numbers and display them next to their indexes. I want the numbers to be 1 though 10. But when I run my code it only generates 13 random numbers and the numbers are greater than 10. Please help.  public class RandomStats {      public static void main(String[] args) {          int [] stats = new int [501];         int numRolls;         int outcome;          for (int i = 0; i <=500; i++ ){             outcome = (int) ( 10 * Math.random() + 1)                     + (int) ( 10 * Math.random () + 1);             stats[outcome] += 1;         }          for ( int i = 2; i <=500; i++) {             System.out.println(i + ": " + stats[i]);         }      }  }

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


Is it a passive and means that we write it on the blackboard?  Or it is an adjective?

The park was covered with snow.      Mr. Smith is known to everyone in this town.      The legislator participates in the delegation and is involved in sweeping reforms.      English is spoken in the UK.    In these sentences, are the highlighted past participles acting as adjectives or passive voice?


In the definition, a positive definite matrix is usually referred to symmetric expressed in quadratic form.    So I am confused about is it always symmetric?  Why do they refer to the symmetric property in its definition? Please give me some examples and proof of this problem.

Do positive semidefinite matrices have to be symmetric? Can you have a non-symmetric matrix that is positive definite? I can't seem to figure out why you wouldn't be able to have such a matrix, but all my notes specify positive definite matrices as "symmetric $n \times n$ matrices."  Can anyone help me with an example of a non-symmetric positive definite matrix, or some insight into a proof for why it would need to be symmetric should that be the case? Thanks!


I am interested in evaluating the following limit: $$\lim_{n \rightarrow \infty} \sqrt[n]{2^n+3^n}$$ I realize it should be 3 because as $n$ approaches infinity, $3^n$ gets significantly larger than $2^n$. But numerically: $$\lim_{n \rightarrow \infty} \sqrt[n]{2^n+3^n}= \lim_{n \rightarrow \infty} \sqrt[n]{\frac{2^n+3^n}{1}}= \lim_{n \rightarrow \infty} \sqrt[n]{\frac{(\frac{2}{3})^n+1}{\frac{1}{3^n}}}$$ which is $\sqrt[\infty]{\frac{2}{0}}$ ..? Where is my mistake?

Prove that:  $$\lim_{n\to\infty} \sqrt[n]{a^{n} + b^{n}} = \max(a, b)$$  I don't have a clue even how to start the proof here. Any hint is appreciated!


I need to install drivers or update settings after completing the Ubuntu installation;  e.g. Installing the Wifi driver by using following commands in the terminal:  sudo dpkg -i dkms_*.deb     sudo dpkg -i bcmwl-kernel-source_*.deb   or adding languages to the keyboard layout, and etc.  Is there any way to change the 'Ubuntu installation sequence' in order to include those commands within the Ubuntu installation sequence?  Is there any file ( .sh or whatever), or script, or etc. in the Ubuntu installation USB containing commands that the system needs to run for proceeding and completing the Ubuntu installation?

I have to run a command (mounting Windows file system. Machine is a dual boot system). If Ubuntu is already installed, I can go to /etc and edit rc.local and put my mounting commands there. So the next my Ubuntu starts, it will execute those commands and mount the Windows file. But my problem is, right now Ubuntu is not installed. I want to run the commands automatically when the Ubuntu gets installed the very first time.


I've recently switched from Ubuntu 16.04 o 18.04, and there's one thing that bugs me.  The problem I have is the behavior of keyboard layout toggling in 18.04. I have 3 keyboard layouts, say [X,Y,Z] that I toggle in-between with Super+Space.  In Ubuntu 16.04, clicking Super+Space with pause in-between changed the layout from X -> Y, Y -> Z, Z -> X. So just to the next layout from the list [X,Y,Z].  In Ubuntu 18.04 , clicking Super+Space would change the layout to the most recent layout. So if I'm using layout X and changes to Y by tapping  Super+Space, next time I try to change layout the list would look something like [Y,X,Z], so if I would like to change to Z I have to double tap instead of once.  So my question is, how can I change the layout toggling behavior in 18.04 to match the Ubuntu 16.04 one?  I guess this difference is because of GNOME in 18.04, but I can't find a similar question/answer. I'm new here so I might just have missed something obvious, but help is appreciated!

Just installed Ubuntu 17.10 and it seems that the keyboard layout switching has changed its behavior.  In the previous version of Ubuntu (such as 16.04 Unity), if I have 3 different keyboard layouts (for example EN-TH-JA), hitting Super+Space would always cycle to the next layout in the same order (e.g. EN to TH to JA then back to EN).  However since Ubuntu 17.10, this is no longer the case. It cycles through the layout in the MRU (Most Recently Used) ordering. So suppose that the layout starts with EN, then I cycled to TH. Next time I hit Super+Space, it would give me EN instead of JA.   I tried to dig up and found that the culprit is the newly implemented DCONF settings inside org.gnome.desktop.input-sources and there seems to be no way to change this behavior.   So my question is: Is there a way to change this behavior to "static ordering" of keyboard layout switching?    (As a side-note, the new behavior is very bad when we have three or more layouts. Most of the time we as a user couldn't remember the MRU layouts, so layout switching is very inconvenient and much slower than already knowing what the next layout would be if static ordering is used.)  If there is no settings to change this behavior, where should I report this as a bug or a feature request?


In this case I am  using 4538 retriggerable mono-multivibrators, i have bought them from all over and i have HEF14538 CD14538 MC14538's   Is this representing the different internal technologies used in the chips? Does this make ANY difference for standard use? Can I work of one datasheet for all of them!   They also end in BP BC  and BCP in that order.  Does this indicate the tolerance like in BC range transistors or the package type or something?  If anyone has a comprehensive "how to read components guide" or rule-of-thumb syntax I would appreciate a link as similar occurs with capacitors, transistors and other ICs.

There are hundreds of prefixes in IC names,  lists a number of them. For some it's easy to see that they refer to the manufacturer's name, like AD for Analog Devices or LT for Linear Technology. Others can be found with several manufacturers, often three letter prefixes: SAA, SAF, SDA, TCA and TDA, to name a few. I wonder if there's some logic in this, like T** being a specific group with subgroup TD*, etc. Is there a logical structure?


Does $AA^T=I$ imply that $A^TA=I$?  The wiki article defines the orthogonal group as:  $$o(n,\Bbb C) = \{ A\in M_n(\Bbb C): AA^T=A^TA=I \}$$  My book writes:  $$o(n,\Bbb C) = \{ A\in M_n(\Bbb C): AA^T=I \}$$  I couldn't show it just by manipulationg:  $$AA^T=I\implies AA^TA=A\implies A^TAA^T=A^T\implies A^T=A^T$$  and so on, never helped. Thanks. I haven't done much linear algebra

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


Let $k\in\mathbb{N},~k>5$ be a prime number. Prove $(k-1)!+1$ has at least two different prime divisors. I am thinking on Wilson's Theorem, but I don't know how to use it.

A friend asked me this question:     If $p$ is a prime, prove that $(p - 1)! + 1$ is a power of $p$ if and only if $p = 2, 3$ or $5$.   Clearly one direction is obvious, namely that $p=2,3,5$ implies $(p - 1)! + 1$ is a power of $p$.  The other direction is not clear to me. Since by Wilson's theorem $p$ divides $(p - 1)! + 1$ so we need to show that if there are no other prime factors then $p=2,3,5$. Can someone give me a hint for establishing this?  Thanks


Consider a photon bouncing left and right between two mirrors in a photon clock. Seen from inside the clock, the photon bounces at a constant frequency. Time ticks regularly. No matter whether the clock begins moving relative to some outside observer, the clock continues to tick regularly. Light always moves at the same speed relative to the observer in the clock.  If the clock is moving forwards relative to an outside observer, we know that to that outside observer, the photon clock appears to tick more slowly. This happens because the speed of light relative to that observer is constant, and, since the photon is moving diagonally relative to the outside observer, the distance traveled by the photon in the clock between ticks is greater, so the photon must take longer to pass between the mirrors and the clock must tick more slowly.  But notice how, if you are inside the clock, it continues to tick at the normal speed.   This brings me to my question. It is widely reported (including on this very QA site) that a photon traveling uninhibited in a vacuum experiences no time. This seems to be because all the speed of the photon in the clock is now taken up keeping up with the forwards movement of the clock, so there is no speed left to deal with left/right bouncing and ticking. The clock stops ticking. Well, this is the thing. Surely the clock only stops ticking from the perspective of the outside observer. If you're inside the light-speed clock, time continues to tick normally. The photon continues to bounce. So why do we say a photon experiences no time? Surely we mean it appears to us as stationary observers to experience no time? If you're a photon, time is just the same as it is to the rest of us, right? Fair enough, your average photon might well feel that it got from A to B in no time at all, because distance was compressed to zero and all the other clocks appeared to have zipped along beyond the end of days in less than an instant, but its own clock, if the photon could observe it, is just ticking normally. This leaves my brain mushed, because now the photon has seen the entirety of an infinity of time in no time at all, yet its clock is still ticking. So what does that mean? What happens the moment after the infinity of external time has completely passed? Surely there is nothing left to happen?

I read with interest about Einstein's Theory of Relativity and his proposition about the speed of light being the universal speed limit.    So, if I were to travel in a spacecraft at (practically) the speed of light, would I freeze and stop moving?  Would the universe around me freeze and stop moving?  Who would the time stop for?


I've been trying to find a Linux distribution to fit my needs but I need something that seems to be more minimal then "minimal" distributions (Eg: Microcore Linux) seem to provide.  I don't need X, I don't need networking, I need something that can launch a bash script, which runs a modified version of , which talks to a serial device and outputs information to a user via the normal console and nothing else. It'll be booted from read only media (Probably a disc but could also be write protected SD card) and will run on x86 platforms. It'll need to access SATA/IDE hard drives. I don't have any memory limitations but anything that isn't being used needs to be gone.  Can anyone point me in the right direction or perhaps to a tool which can build something I am looking for? I'm hoping to spend as little time as possible on altering an existing distribution so I can focus on the application itself.

What are the bare minimum components for a Linux OS to be functional, and that I can use as a base to expand and improve as I learn Linux and my understanding and needs grow?


I tested a few numbers of the form $10^n+1$ (i.e. $100000001$) besides $11$ and $101$ and they were all composite. Clearly some of them if we have an even number of $0$'s in between are multiples of $11$, but is it just a coincidence that the ones with odd number of $0$'s are also composite?

Prove that there are infinitely many primes and non-primes in the numbers $10^n+1$, where $n$ is a natural number. So numbers are 101, 1001, 10001 etc.


It would be nice to view question revisions (edit history etc.) directly in the app.

I find revisions a really useful way to see full edit history of every post in Stack Exchange.  Can we please have it on the iOS app too? It will also let us see original time of the post submission which is missing, currently showing only last edit time.


Let $S =^nC_1 - (1+\frac{1}{2}) ^nC_2 + (1+\frac{1}{2}+\frac{1}{3}) ^nC_3 + … (-1)^{n-1}(1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+...\frac{1}{n}) (^nC_n)$ I have to prove that $S = \frac{1}{n}$, I thought of writing the general term like this,   $T_r=(-1)^{r-1}(1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+...\frac{1}{r}) (^nC_r)$ and then multiplying each term by $^nC_r$ and then take sum of each, but that led me nowhere. I tried the reversal method too, but the terms weren't adding up. I want to know if there is a easy way of doing this. Thanks.

Wikipedia has a proof of the identity $$ H_{n} =\sum_{k=1}^{n} (-1)^{k-1} \binom{n}{k} \frac{1}{k}$$    Curiously, there is also the identity  $$ \frac{1}{n} = \sum_{k=1}^{n} (-1)^{k-1} \binom{n}{k} H_{k} $$  Can the second identity be derived from the first one?


When I try running the update through the terminal in my server machine, I get the following error.  $ sudo apt-get update Err:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease                     Temporary failure resolving 'in.archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease              Temporary failure resolving 'security.ubuntu.com' 0% [Working]^C                    I checked the network too.  $ ping us.archive.ubuntu.com -c 4    ping: us.archive.ubuntu.com: Temporary failure in name resolution   sudo  apt-get update Err:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease Temporary failure resolving 'in.archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease Temporary failure resolving 'security.ubuntu.com' Err:3 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease Temporary failure resolving 'in.archive.ubuntu.com' Err:4 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease Temporary failure resolving 'in.archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic    /InRelease  Temporary failure resolving 'in.archive.ubuntu.com' W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Temporary failure resolving 'in.archive.ubuntu.com' W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Temporary failure resolving 'in.archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Temporary failure resolving 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.   I have edited the apt-get update command's output  ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. ping: sendmsg: Operation not permitted ping: sendmsg: Operation not permitted

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


So I have this code:   @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.favourites);     assert getSupportActionBar() != null;     getSupportActionBar().setDisplayHomeAsUpEnabled(true);      SharedPreferences prefs = getSharedPreferences("myFavs", 0);     Map<String, String> m = (Map<String, String>) prefs.getAll();     List<String> list = new ArrayList<>(m.values());      ListView listView = (ListView) findViewById(R.id.favsList);     ArrayAdapter<String> adapter = new ArrayAdapter<>(this,R.layout.listlayout, android.R.id.text1, list );     listView.setAdapter(adapter);   And it outputs this error in logcat:  10-08 08:48:44.114  19390-19390/com.example.me1jmo.insult_generator E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.example.me1jmo.insult_generator, PID: 19390 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:399)         at android.widget.ArrayAdapter.getView(ArrayAdapter.java:369)         at android.widget.AbsListView.obtainView(AbsListView.java:2346)         at android.widget.ListView.measureHeightOfChildren(ListView.java:1280)         at android.widget.ListView.onMeasure(ListView.java:1188)         at android.view.View.measure(View.java:18788)         ...   I have read the articles on why this happens but I can't figure out what bit of my code I need to change to get it working.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have a calculation using double and run into problems due to catastrophic cancellation (nearly equal values are subtracted). I am looking for a rearrangement to keep the loss of significance at a minimum.   My equation is that of a plane from which I compute z = z(x, y) (with a set of constants z0, x21, ...):  // (z-z0)*(x21*y31 - y21*x31) = (x-x0)*(y21*z31 - z21*y31) + (y-y0)*(z21*x31-x21*z31)  double z = z0 + (x-x0)*(y21*z31 - z21*y31)/(x21*y31 - y21*x31)               + (y-y0)*(z21*x31-x21*z31)/(x21*y31 - y21*x31);   One set of values for which I run into problems is given below. In this case it is due to y-terms all being close to zero (y21 ~= -0.0032, y31 ~= -0.0097, y-y0 ~= -0.0032):  (z-z0) * 9.3241e-18 ~= 0.1112*0.0830 + (-0.0032)*2.8428                     ~= 0.009234 - 0.009234                     ~= 5.2042e-18   The result is barely usable since I suspect both 9.3241e-18 and 5.2042e-18 to be affected by calculation errors.  I am looking for a way to deal with calculation errors due to subtraction in general and a smart rearrangement for the special case of y21, y31, y-y0 being close to zero in particular. The rearrangement I tried have not had success so far. How can I deal with those calculation problems (in C++).

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


Killing randomly spawned zombies at night is both dangerous and slow. Other methods - breeding animals, mining ores, smelting materials, fishing - builds up XP painfully slowly. Top level enchantment with the table requires 30 levels and uses up 3, that's 165 mobs to kill for first enchantment, and 34 mobs to recuperate from level 27 to 30. It's fairly hard to gather that much running at night and killing them as they attack you. For enchanting books, the top enchants may take up to 39 levels, and drain your levels to zero in the process. That's a whopping 350 mobs to kill, 1743 coal ore broken, or over half the levels obtained killing the ender dragon for the first time. Trying to gather enough XP for a good enchanted set of gear using these methods takes too long. Players in fully enchanted gear aren't uncommon, many of them even trade the good gear for prices that definitely don't look like worth weeks of grinding. How might they manage to obtain the XP necessary for dozens or hundreds of high level enchantments quickly and easily like that?

Now that experience does something besides render regions of a server uninhabitable due to  orb lag, what's the most efficient and safe way to get those excellent enchants?  A mob farmer may rank highly, but what about without tons of setup?


I need to display drop down list with headers  values are retriving from database i need to  display like  Maharashtra    Mumbai Nasik Pune    UttarPradesh   Lucknow Meerut Noida Ghaziabad   Uttrakhand    Dehradun Rishikesh   Haridwar

Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks


If you view the following picture, you can see when I try to flag there is a bug:      I use: firefox 31.6.0 Debian 9 (Stretch)

To reproduce:   Click Flag (question or answer) Click other (needs moderator attention)   The textarea is too wide:  StackOverflow        AskUbuntu        StackExchange        Most probably affects other sites, but didn't check. I think it's enough. :-)  Reproducing on:   Chromium Version 40.0.2214.111 Ubuntu 15.04 (64-bit) Google Chrome Version 41.0.2272.76 (64-bit) Firefox 36.0   (I'm using Ubuntu 15.04)


I need to install WinUSB but no matter what I try it doesn't work, I always get an error no matter what I do.  This doesn't work  sudo add-apt-repository ppa:colingille/freshlight sudo apt-get update  sudo apt-get install winusb

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


The case in point is .  Here, The edit was correctly rejected by one user and incorrectly approved by 3.  The underlying problem is that the three users (apparently) have little / no understanding of the language being used in the solution.  Editor 1: Approved     Total Rep 3721     Total Answers: 132     Objective-C specific¹ answers: 2     Objective-C specific score: 0   Editor 2: Approved     Total Rep 3134     Total Answers: 28     Objective-C specific answers: 0     Objective-C specific score: 0   Editor 3: Approved     Total Rep 2721     Total Answers: 151     Objective-C specific questions: 7     Objective-C specific answers: 1     Objective-C specific score: 4    Editor 4: Rejected     Total Rep 10746     Total Answers: 414     Objective-C specific answers: about 20, some duplicates between tags.     Objective-C specific score: >30, some duplicates between tags.   Here the pattern seems to be that those with low scores in the relevant tag, unsurprisingly, mistakenly approved an invalid flag.  Would a viable solution be to give higher weighting to those votes where the user voting has a given score in the answers tags?  ¹ Those with tags I associate with Objective-C, , , etc. I may well have missed some.

Over the past few weeks, there have been a number of complaints about users making suggested edits en masse whose quality was at least questionable.  Let an example of a low-quality edit be the addition of the web-frameworks tag to dozens of questions about the PHP web framework Laravel. No one is ever going to use it in a search, but Laravel is a framework, right?  (If you disagree about this being a low-quality edit, please  bear with me anyway - my point here is that the system through which such conflicts could be settled is broken.)   Examples          This is a toxic situation guaranteed to create strife because -   The new user is happy to have found a way to participate and earn some rep; they may be genuinely feeling that they are improving the site. The reviewers greenlighting most of their suggestions confirms them in their belief.   The reviewers usually see only one edit - and it's easy to see how they might go, "meh, this isn't a terribly useful edit, but hey, maybe it helps someone, and it's a new user. No point discouraging them."   The veteran users who check out the editor see dozens of what they perceive as low-quality edits, usually ignoring anything else that should be fixed in the post. To the veterans, the new user is systematically looking for excuses to make their pointless edits, creating a giant mess in order to  gain some rep - a mess they have to clean up, while there are no consequences for the editor, who gets to keep their ill-gotten points. While a bad question or answer can be downvoted - usually leading to a change of behaviour eventually - the edit system looks like it's wide open for gaming.   So tensions are high, and when there's dialog it can be angry. I'm not saying either side is completely right. I'm completely prepared to believe that many of these edits are in good faith, etc. But it's a mess because it's frustrating people. As said, there are no consequences for bad-faith mass editing; apart from commenting on some random post, there is no way to communicate with an editor. The outcome of a moderator flag is very much uncertain.  The absence of a clear set of rules means there's plenty of room for heated arguments.    Something needs to change here.  Either   We need super clear rules on what makes a good tag edit Tag-only edits should be allowed only for 2k+ users, or they should not gain 2 reputation points for <2k users The possible 1000 rep gain for suggested edits needs to be rate-limited (say, 200 per month) (this is my favourite!) The possible 1000 rep gain for suggested edits needs to be lowered, say to 500 or 250 Rollbacks of suggested edits should result in annulment of the 2 points gained (this is terrible) There should be a system to vote on edits (yes, that's been suggested before) There should be a defined and officially sanctioned pathway, and ruleset, for moderator flags cast about these users    ... or something else. But something needs to give.


Just need to tex a bmatrix like this:   Please tell me the SIMPLEST way of doing that. I only need to make one, not many of them in my presentation and it doesn't matter the size, font, etc.. just let the audience recognize it, that's OK. Thanks a lot!  I just tried this:  \[ \mb{A}= \left[     \begin{array}{c;{2pt/2pt}c;{2pt/2pt}c;{2pt/2pt}c}          &   &   &  \\          A_1 & A_2 & A_3 & A_4 \\          &  &  &      \end{array} \right] \]   Then I got   Is it right?

I need a vertically dashed line in my matrix, but my current solution looks like the dashes are going out of the array environment (and they are - i checked in photoshop). Can I manually shorten it by say 1 mm or 0.5 mm?  Here is MWE:  \documentclass[a4paper]{article} \usepackage{amsmath} \usepackage{arydshln} \usepackage{mathtools} \begin{document}  \begin{equation*} \setlength{\dashlinegap}{2pt} \left[\begin{array}{cccc:c} a_{11} & a_{12} & \cdots & a_{1n} & b_1 \\ a_{21} & a_{22} & \cdots & a_{2n} & b_2 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} & b_n \end{array} \right] \end{equation*}  \end{document}


When you edit a personal view, the radio buttons which were there to select the audience are missing. How do you make a personal view available for other users ?

It seems like I can't modify a private view to be public, or duplicate a private view to be public.  Am I restricted to copying by hand all the settings of my private view, then creating a fresh public view and selecting all the right columns in the same order with all the sort and filter options?


Live example:   Source markup:  <xf:macro name="breadcrumbs" arg-breadcrumbs="!" arg-navTree="!" arg-selectedNavEntry="{{ null }}" arg-variant="">     <xf:if contentcheck="true">         <ul class="p-breadcrumbs {{ $variant ? 'p-breadcrumbs--' . $variant : '' }}"             itemscope itemtype="https://schema.org/BreadcrumbList">         <xf:contentcheck>             <xf:set var="$position" value="{{ 0 }}" />              <xf:set var="$rootBreadcrumb" value="{$navTree.{$xf.options.rootBreadcrumb}}" />             <xf:if is="$rootBreadcrumb AND $rootBreadcrumb.href != $xf.uri">                 <xf:set var="$position" value="{{ $position + 1 }}" />                 <xf:macro name="crumb"                     arg-position="{$position}"                     arg-href="{$rootBreadcrumb.href}"                     arg-value="{$rootBreadcrumb.title}" />             </xf:if>              <xf:if is="$selectedNavEntry && $selectedNavEntry.href && $selectedNavEntry.href != $xf.uri && $selectedNavEntry.href != $rootBreadcrumb.href">                 <xf:set var="$position" value="{{ $position + 1 }}" />                 <xf:macro name="crumb"                     arg-position="{$position}"                     arg-href="{$selectedNavEntry.href}"                     arg-value="{$selectedNavEntry.title}" />             </xf:if>             <xf:foreach loop="$breadcrumbs" value="$breadcrumb" if="$breadcrumb.href != $xf.uri">                 <xf:set var="$position" value="{{ $position + 1 }}" />                 <xf:macro name="crumb"                     arg-position="{$position}"                     arg-href="{$breadcrumb.href}"                     arg-value="{$breadcrumb.value}" />             </xf:foreach>          </xf:contentcheck>         </ul>     </xf:if> </xf:macro>   I'm trying to grab the ul.p-breadcrumbs element via regex. I can grab the ul and everything after ok using:  <p.*class.p-breadcrumbs(.*[\s]*)*   And I can select the closing tag with  <\/ul>   However putting them together doesn't work at all:  <ul.*class=.p-breadcrumbs(.*[\s]*)*<\/ul>   I followed this answer:   But it doesn't work with multiline content. If you line break that example and enter more content it breaks the solution. Appreciate any pointers as I'm pulling hair out trying to solve the last bit!

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I don't know if this is true but I would like it to be: Suppose $(\Omega,\mathbb{B},\mu)$ is a probalility space, where $\mathbb{B}$ is atomless, and $\mathbb{A}$ is non tirvial $\sigma$-algebra contained in $\mathbb{B}$. If $f,g$ are two $\mathbb{A}$-measurable functions and for all $A\in\mathbb{A}$ we got that $\int_A fd\mu=\int_A gd\mu$ then $f=g$ a.s ?  If this isn't true I could say something about $f$ and $g$ ?

How to show $f=g$ almost everywhere  Let two real-valued measurable functions $f$ and $g$ be such that for any measurable set $E$ the integrals $\int_E f\,d\mu$  and  $\int_E g\,d\mu$ coincide.  Could you please help.  It seems obvious. we could define the integrals as charges. can we do sth from here. but I do not know how to approach.


I need to create two custom modules in Drupal 7. The two custom modules will implement the same hook. How can I guarantee the order of execution for the two custom module? I mean module1 will run first then module2 OR the reverse order?

if there is two modules A and B and both have same user_login hook. so when i log in. out of A_user_login() and B_user_login() function which one called first.and how drupal decide execution order of these two function


I am not sure if the error I get is related to my apt-get setup if I do the following:  sudo apt-get update ... sudo apt-get install openssh-server Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   ncurses-term openssh-client openssh-sftp-server ssh-import-id Suggested packages:   ssh-askpass libpam-ssh keychain monkeysphere rssh molly-guard The following NEW packages will be installed:   ncurses-term openssh-server openssh-sftp-server ssh-import-id The following packages will be upgraded:   openssh-client 1 upgraded, 4 newly installed, 0 to remove and 432 not upgraded. Need to get 0 B/1.222 kB of archives. After this operation, 5.133 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Preconfiguring packages ... dpkg: warning: files list file for package 'i965-va-driver:amd64' missing; assuming package has no files currently installed dpkg: unrecoverable fatal error, aborting:  files list file for package 'libcrystalhd3:amd64' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)   Do you have an idea how to fix this?

Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   apt apt-transport-https apt-utils dpkg libapt-inst2.0 libapt-pkg5.0 ntpdate   oracle-java8-installer oracle-java8-set-default thermald 10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/4,389 kB of archives. After this operation, 8,192 B of additional disk space will be used. Do you want to continue? [Y/n] Y Preconfiguring packages ... dpkg: unrecoverable fatal error, aborting:  files list file for package 'linux-generic' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)   I already tried the usual stuff like:   sudo dpkg --configure -a   sudo apt-get -f install  sudo apt-get clean  sudo apt-get update && sudo apt-get upgrade   Any help, thanks!  cat -net /var/lib/dpkg/info/linux-generic.list      1  ^LbM-BM-^FRq^MU^Evalueq^NK^HubU^Mcertificationq^ONU^Hoverviewq^PNU$      2  updated_atq^QNU^Vavailable_translationsq^RNU^Dyearq^SMM-CM-^]^GU^Fimagesq^TNU^Bidq^UNU^Ipaused_atq^VNU^Eindex


As we know, stem cells can convert to different cells of other organs, can male use their own stem cells to convert it into cells of female-only organs(and vice versa)?

This question is brought on by a Sci Fi novel I am thinking about writing. The plot device involves a colonist in charge of building a population on a new planet who loses his supply of embryos and so forth in the landing. With the artificial "wombs" intact, he populates the planet with clones of himself.  If he wanted to introduce enough variation (without making up new genes, only rearranging) in the population to allow them to be able to reproduce naturally without inbreeding problems, would he be able to? In particular, could he make a woman?  Alternately, could a woman (without a Y chromosome) do the the inverse?  At the risk of introducing bias into the answers, the plot as it stands assumes he is a male and he CAN'T do any of the above and he is restricted to clones.


I have problem when post data in php that contain special character:     String: ? < > ' - \" `´& % ‰ € ® 2011   that always display     String: ? < > ' - " `Â´& % â€° â‚¬ Â® 2011   i changed form attribute be:  <form  id="frmBlog"method="post" enctype="multipart/form-data">   and also i change html with meta attribute:  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   but the result still same. anyone can help to fix this problem. thank you  my simple code:  <?php if(isset($_POST['submit'])){     echo $_POST['content'];     exit; }  $content = "String: ? < > ' - \" ´& % ‰ € ® 2011"; ?>  <html lang="en">   <head>     <title>Test</title>      <meta charset="UTF-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   </head>   <body>     <form method="post">         <textarea name="content" rows="20"><?=         $content         ?></textarea>          <input type="submit" name="submit" value="submit" />     </form>   </body> </html>   output:  String: ? < > ' - " Â´& % â€° â‚¬ Â® 2011

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


From the movie  starring Leonardo DiCaprio who plays the role of the young King Louis XIV. d'Artagnan is responsible for security. Here's a short conversation between the two:     King Louis XIV: Perhaps l haven't met a woman with a heart like my own until recently.   d'Artagnan: Would that be Christine?   King Louis XIV: It is good that you watch me, but I fear you watch me too closely.   d'Artagnan: Did you send Raoul to the war so that you could be free to pursue her?   King Louis XIV: Do you question my honor?   d'Artagnan: No, I do not question your honor. It's you I care about.   King Louis XIV: Raoul will return soon. You have my word.   d'Artagnan: Thank you, Your Majesty.   King Louis XIV: I am a young king, but I am king.   d'Artagnan: Then be a good king, Your Majesty.   Can anyone explain why there is no indefinite article in front of the second "king"?

Example:     Peter Gulutzan, MySQL AB Software Architect, worked with stored procedures for a different DBMS for several years. He is coauthor of three SQL books.   Question #1: I asked a friend of mine who is from the United States and he said that coauthor is absolutely fine with no article. But I don't understand why that's true. I'd use an indefinite article, if I had to write that sentence. So, why do you think there is no indefinite article in front of coauthor?  Question #2: Do think the following sentence would sound grammatically worse? If so, why do you think it would?     Peter Gulutzan, MySQL AB Software Architect, worked with stored procedures for a different DBMS for several years. He is a coauthor of three SQL books.


I have a list of object that looks like this.  hand = [ Card(10, 'H'), Card(2,'h'), Card(12,'h'), Card(13, 'h'), Card(14, 'h') ]   Card(10, 'H) here is not a tuple, but an object. I know how to sort this list if each item in the list was in a form of tuple, like this,  hand = sorted(hand, key = lambda x: x[0])   but I have no idea how to sort a list of objects. I want to sort my list by the first input value, which is the number in Card()  How can I do this?   Edit: Here's the definition of Card().  class Card(object):      RANKS = (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)      SUITS = ('C', 'D', 'H', 'S')      def __init__(self, rank=12, suit='S'):          if (rank in Card.RANKS):             self.rank = rank         else:             self.rank = 12          if (suit in Card.SUITS):             self.suit = suit.upper()         else:             self.suit = 'S'      def __str__(self):         if (self.rank == 14):             rank = 'A'         elif (self.rank == 13):             rank = 'K'         elif (self.rank == 12):             rank = 'Q'         elif (self.rank == 11):             rank = 'J'         else:             rank = str(self.rank)         return rank + self.suit      def __eq__(self, other):         return (self.rank == other.rank)      def __ne__(self, other):         return (self.rank != other.rank)      def __lt__(self, other):         return (self.rank < other.rank)      def __le__(self, other):         return (self.rank <= other.rank)      def __gt__(self, other):         return (self.rank > other.rank)      def __ge__(self, other):         return (self.rank >= other.rank)

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


I decided to ignore a user everywhere in chat by using the "Ignore this user (everywhere)" feature, but I can still see their messages in the list of rooms in the chat user interface.    I chose to ignore badp, but I can still see the messages that they sent.

Well it might not be a huge issue to some (I suppose it depends on how you use the chat system) but when I "Ignore this user everywhere", their messages still appear on the sidebar for the 'other rooms you're in' if they say something. Albeit I can ignore this feature and the text within it, I just find it odd that I can still see it.   This is only a nuisance when you truly are annoyed by a user and ignoring them in the chat was the best possible alternative to leaving the room or starting an argument (no references here, but any long time chat user has been annoyed by some help vampire at one point in time or another and would just prefer to ignore them for good).   If you have no clue to the sidebar or preview I'm talking about: this is for you,    I have chosen to Ignore this user everywhere (Neal) and then switched to a new room, yet that users response appears in my 'preview' for the 'other rooms you're in' if he is also talking in them.  Note: My ignore of Neal was mostly due to jest, this in no way is to reflect on Neal but the chat feature (I hate to ever single anyone out here).


Can anyone help me understand on how to parse the response in to a JSON object from string.  String s = [{"id":"12345","Account":"31338","name":"Accounttest","subaccounts":[{"id":"39658"}]}]   I'm generating the above string Using JSON.createGenerator.

How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonString);     Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('response');     List<Object> reqs = (List<Object>) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map<String, Object> i = new Map<String, Object> ();     for (Object x : reqs) {          i = (Map<String, Object>)x; }     Map<String,Object> requests = (Map<String,Object>)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       }


If The Lord of the Rings and The Silmarillion took place in different ages than us, but on Earth, is there any suggestion in those works that some elements would or could have been immortal or invincible, and therefore lasted into our age (modern times)?   In works like History of Middle Earth did JRR ever hint at something that carried over into our times, beings or geographical features? Did he ever acknowledge a possible carry-over into modern day, or was it only the old ages he wrote about with no hint of the future (our present)?

In Tolkien's lore, they are many very old beings. Is there any indication that some or even one would have been truly immortal and survived into what we would call "our" history or Age? Galadriel, Cirdan, Ingwe, Bombadil, Ungoliant, or any Maia or Ainur? Anyone or anything? Seems there must be some kind of carry-over seeing as how "man" existed in this time.


I have 2 groups with 3 observations each.  Group 1: a=1, b=3, and c=2  Group 2: d=0, e=1, and f=0  I would like to understand which group has the higher values, but cannot use a t-test (neither non-parametric nor dependent t-tests can resolve the special dependency I have in my data).   A solution is to now create all possible combinations of observations. In addition to our data order abc-def, we create abd-cef, abe-cdf, abf-cde, etc. We want all possible permutations, but we don't count within group order differences (abc-def is not different from abc-edf and should be considered one permutation, because the same items belong to the same group).  We create a distribution of group differences across all permutations, and can find out whether our data is within the 2.5% on both ends to see whether the difference is significant on a 5% level.  How would I go about this in R? (I have many more observations but once this example code is setup I could adapt).

Background:  My software asks users for optional donations of any amount.  I split test donation requests among users to find the best way to ask: 50% get request version 1, 50% get request version 2, and we see which one does better.  Almost all users give $0, but a few donate.  The results might look like this:           Number of users  Number of donations   Dollar amounts donated GROUP A  10,000           10                    40,20,20,20,15,10,10,5,5,5 GROUP B  10,000           15                    50,20,10,10,10,10,10,10,5,5,5,5,5,5,5   I want to know if one group is a winner, or if it's a tie, or if we need a larger sample to be sure.  (This example, kept simple for discussion, almost certainly needs a larger sample to get significant results.)  What I measure already:   Did one group have a significantly larger number of donations?  How much larger?  I measure this p value and confidence interval using , using only the number of donations and number of users, ignoring dollar amounts.  Its methodology is described in the "What are the underlying statistics?" section of that link.  (It's over my head, but I believe it calculates the confidence interval by taking the difference between donation rates as normal random variables on the Agresti-Couli interval.) Did one group donate a significantly different amount of total money?  I measure this p value by performing a permutation test: repeatedly re-shuffling all 2N subjects into 2 N-subject groups, measuring the difference in total money between the groups each time, and finding the proportion of shuffles with a difference >= the observed difference.  (I believe this is valid based on this  doing the same thing for crackers instead of dollars.)   R's wilcox.test:  A few questions now about wilcox.test() in R:   If I fed wilcox.test(paired=FALSE) the above table of data, would it answer any new questions not already answered by my tools above, giving me more insight with which to decide whether to keep running my test/declare a winner/declare a tie? If so, what exact question would it answer?


$$\int_0^{2\pi} f(x)\cos(nx)dx$$  for $f(x)$ real valued and continuous on $[0,2\pi]$.  How can I show that the limit of the integrals, as n goes to infinity, is zero?  I have thought of and tried integration by parts, with not much insight gained.  I also thought that perhaps the Fourier transform is lurking in the background of this problem, but I'm not sure how to utilize it.

Source: Old comp./preliminary exam.  Let $f(x)$ be a Riemann integrable function on $[0,1]$. Prove that $$\lim_{m\to\infty}\int_{0}^{1}f(x)\cos(mx) \, \,dx=0$$  Thought  $(1)$ Because we don't know if $f(x)$ is differentiable, we can only use integration by part by setting $du=f(x)\, \,dx$ and $v=\cos(mx)$, the result is not quite helpful.  $(2)$ We don't know whether $f(x)\cos(mx)$ converges as $m\rightarrow \infty$ so those convergence theorems cannot be applied.  Side note: This exam assume no knowledge in measure theory and Lebesgue integral.


Let $I=[0,1]\subset\mathbb{R}$. Suppose that $f:I\to I$ is a continous   function. Show that exists a $x\in I$ such that $f(x)=x$.   If $f$ is a continuous function in $I$ then $\forall \epsilon>0$, there exists a $\delta>0$ such that whenever $|x-c|<\delta\Rightarrow |f(x)-f(c)|<\epsilon$ for any $c\in I$.  How can I ensure that this occurs for any function?

Suppose that $f$ is a function defined in $[a;b]$ to $[a;b]$ and continuous on $[a;b]$. The problem is I haven't the definition of the function, this is more abstract, but even if how can I prove that $f$ would have a fixed point?


Prove that any two cylic groups of the same ordr are isomorphic

Prove that any two cyclic groups of the same order are isomorphic.   Let the groups be $G,H$ with order $k$. Let $G=<a>$ and $H=<b>$. Thus we have $|a|=|b|=k$ and by definition, $G=\{a^0,a^1,...,a^{k-1}\}$ and $H=\{b^0,b^1,...,b^{k-1}\}$. Next I set up the bijection $\theta : G \rightarrow H: \theta(a^n)=b^n$. I think I should proceed by showing $\theta$ is an isomorphism but I'm not sure how to do that. What's a good way to go about showing $\theta$ is an isomorphism?