In the image i have 5 rock at one side and a single red mark rock. I have done uv mapping to the red mark rock. I want the texture of the red mark rock on all rest of the 5 rocks. I have applied the material to the 5 rocks but the texture not applied. Im in cycle render now. How to get the texture on rest of the rocks


Every $R$-module is projective if and only if every $R$-module is injective

I am solving an exercise from Dummit, Foote. Let $R$ be a ring with $1$. Then the following are equivalent:   Every $R$-module is projective. Every $R$-module is injective.   Proof:  (1) implies that for any R-mod $A$ we have $Ext^i(-,A)$ is a zero functor. But this means that for any R-mod $Ext^i(L,A) = 0$ for all $A$ so $L$ is injective. I show $(2) \Rightarrow (1)$ exactly the same way.  It is quite easy so I am afraid I missed something. Is my proof correct?


Finding the integral of $\sin(x)\,dx$ using Riemann sums?

I'd like to know how to show that  $$\int_{0}^{\pi/2} {\sin(x)\;dx}=1$$  using Riemann sums.   If someone could please show me step by step and explain I would be very grateful! Edit: I did see the other question but I don't think I need to use trig identities on this. I'm still confused about how to go further than the setup.


How to add more vertices on my object (picture examples)

The video I'm following has more of those vertices (black dots), on their object and mine doesn't - it is required as I'm about rip open the object ,and since I don't have more, its impossible to rip where the video is asking.


Difference between Class destructor and Dispose

Simple question. What is the difference between class destructor and dispose. Lets say in my class I have a RegistryKey, a COM object and some more things which needs to be disposed when class object is out of scope. I have code which does this, and I have put this both in destructor and dispose method. What is the best thing to use here.  public MyClass : IDisposable {     public ICOMObject SomeCOMObject;     public RegistryKey registryKey;      MyClass()     { Initialize things; }      ~MyClass()     {         ClearThings();     }      public void Dispose()     {         ClearThings();     }      private void ClearThings()     {         // Clear things.     } }


Romulan ships, unlike Federation starships, run on quantum singularities rather than matter-antimatter reactions.  Although this provides a lot of energy and is extremely efficient, you can't exactly 'turn off' a quantum singularity.  This shouldn't be much of a problem when operating the vessel, but when it becomes old and is scrapped, or is in need of servicing, what do they do?  You surely can't leave a quantum singularity continue generating such massive energy!


From where can I download the latest Ubuntu portable on a USB stick?

I want to download Ubuntu portable and I searched on Google and results came showing Ubuntu remix.I was not sure if it was genuine or not. So please tell me.


second page starts with more indented margin

[![enter image description here][1]][1]as I applied the enumerate to generate the numbered list for my latex file, unfortunately the second page pdf output generate bit different than the first page. here is the MWE:   \documentclass{book} \usepackage{enumitem} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \setbox1=\hbox{1.} \setlist{noitemsep, topsep=0pt, parsep=0pt, leftmargin=1.8cm, labelindent=1.2cm, labelwidth=\wd1, itemindent=*, labelsep=\dimexpr0.6cm-\wd1}  \setlength{\parindent}{4em} \setlength{\parskip}{1em}  \begin{document} \pagestyle{plain}  \begin{enumerate} \item \textbf {What is Lorem Ipsum? }\\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.  \item \textbf {Why are you motivated?} \\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. \\  \item \textbf{Why is this topic interested?} \\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. \\  \item \textbf{Why do we use it?} \\  1. Where does it come from? 2. Where can I get some?  3. Why do we use it?  4. Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC is okay?  5. Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC is valid?   \item \textbf{Why do we use it? } \\  "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."\end{enumerate} \end{document}  ````     [1]: https://i.stack.imgur.com/Rnm7d.png


Python: How do I get rid of quotation marks on the last element of a nested list?

Here is the entire question I am trying to solve:  Implement a function getCustomerList that takes as argument filename to read the file and return it as a nested list, where each element is a list of [, <Clerk’s Desk>, ]. The filename argument doesn’t contain the extension (i.e. “input”), your program must automatically add the “.txt” extension. If the file doesn’t exist, the getCustomerList function will print the message: “Error!  not found.”, and should return None.  My Problem: I am having trouble in getting the last item (minutes) to return WITHOUT quotes. Here are my expected and actual results:  Name, Desk, Minutes   Here is my code:  def getCustomerList(filename):     current_file = filename + ".txt"     data = []      # write code to check if file exist and return List/None     try:         open_file = open(current_file, "r")             for aline in open_file:             values = aline.split(",") # Break each line into a list             lines = [(n.rstrip('\n')) for n in values]             data.append(lines) # Add the row to the list         return data[1:]         print(data)          except IOError:         print("Error! " + current_file + " not found.")


Java: How check if two arrays are in same order?

For example, I have two arrays:  String [] arr1 ={"You", "book"}; String [] arr2 ={"Do", "You", "like","book" };   I want to check if arr1 match the arr2 in terms of the same order. If arr1 is {"book", "You"}, then arr1 does not match arr2.  Alright, I think that my code is wrong, but anyway:  for (int i = 0; i<arr1.length; i++){   for (int j=0; j<arr2.length; j++){     if (arr1[i] != arr2[j]){       return null;     }   } }   But when I run it, it always return null even my arr1 does match arr2.


As many of you many know, In Europe we have a summertime and a wintertime. Twice a year, the clocks in all EU Member States are switched from winter to summertime (on the last Sunday in March) and back from summer to wintertime (on the last Sunday in October) (more info ). Now, the European Commision is about to propose to get rid of those clock changes. In Java, we have Calendars and, a calendar always knows the correct timeZone (i.e. GMT+1 for summertime and GMT+2 for wintertime). How does Java manage this? And, if it's changed, how would it affect to our systems? So, as I see on comments, there shouldn't be any changes because Java uses System Time and it's setted by NTP, right?


Why does Principle for least action hold for classical fields

Let $\mathscr L (\phi(\mathbf x), \partial \phi(\mathbf x))$ denote the Lagrangian density of field  $\phi(\mathbf x)$. Then then actual value of the field  $\phi(\mathbf x)$ can be computed from the principle of least action. In case of motion of particles, I know that principle of least action comes from Newton's second laws. But why does the principle of least action also hold for classical fields like EM field and gravitational field? Is there any deep reason why it holds for both EM and gravitational field?


$\sqrt{\lambda}$ is an eigenvalues of $A$

I'm not sure if it's true, but if it is, it can help me with another exercise:  Prove that if $\lambda$ is an eigenvalue of $A^2$ such as $A\in M_{n\times n}^F$, ($F=\mathbb{C} $ or $F=\mathbb{R}$), then $\sqrt {\lambda}$ is an eigenvalue of $A$.  I managed to prove to second direction but it's not really helpfull in that case.  Thanks all.


One multiline equation and many single line equations inside align environment

Here is a MWE.  \begin{align}   \label{eq:4}   \begin{aligned}     r'_0(s)       & =\gamma \Omega_{i} \exp(\gamma s \Omega_{i}) r_0(0)       \exp( -\mu s \Omega_{i} \\       & \qquad - \mu \exp(\gamma s \Omega_i) r_0(0)       \exp(-\mu s \Omega_{i}) \Omega_{i} \\       & = \gamma \Omega_{i} r_0(s) - \mu r_0(s) \Omega_{i} \\       \end{aligned} \\   {add another multiline equation like the first two lines here} \end{align}   But the output is not ideal because the equation number in the second line is below the actual equation. It is probably expecting another multiline equation. I would like to keep the equation number on the same line as the second equation. How can I fix this?  Edit: I intend to add a third line which once again will have a multiline equation. So I must use the aligned environment. Therefore simply turning off the equation numbers won't solve this problem. Therefore I do not think it is not a duplicate of . Actually, I got inspiration from the answer to this . This question has a parallel with that question if any.  Here is the output from the above piece of code


Deleting Triggers/Classes from Production

I was recently told (  ):     You cannot delete a class in production directly. You will need delete   the class from your sandbox and then deploy the deletions to your   production org.   When you deploy from sandbox to production, the   missing classes will come up in red and you can choose to deploy these   deletions to Production.   However, I'd like some clarification because finding information on how to do this is like pulling teeth, unfortunately.  Am I supposed to:   Delete the Trigger in Sandbox Make a deployment package in Sandbox Add the Trigger which is going to be listed in RED now Deploy (and that deletes it from Production)?   I am not seeing deleted Triggers in Red in Sandbox.  Are they NOT listed under "Triggers" for deployment, but elsewhere?   Frustrated = true.   Does this ONLY apply to Classes??  UPDATE:  I just tried again, with a CLASS, and it still doesn't show up at all as a Deployable package (red or not) after I delete it in the Sandbox.  UPDATE 2:  I was just able to delete a class, that I know was written via IDE from a third party, in both Sandbox and Production.  So now I'm wondering if it has to do with where it was originally deployed from (if from IDE, IDE can delete it - it from Sandbox, you have to jump through hoops).  :-(


Ring of order $n$ is isomorphic to $\Bbb Z/n\Bbb Z$, with $n$ square-free

Let $R$ be a ring of order $n$ and suppose $n$ has no square in its prime decomposition. How do I see that $R$ is isomorphic to $\Bbb Z/n\Bbb Z$?   I bet that the map $\Bbb Z  \to R, \, 1\mapsto 1_R$ descends to an iso $\Bbb Z/n\Bbb Z \to R$ but I don't see how $n$ having no squares implies the desired descent.


How to get ripped CD music onto my iPhone?

How do I get music which I have ripped from CDs into iTunes onto my iPhone so I can listen to it? It shows up in my library but I can't get it to sync to my iPhone.  I've clicked on the iPhone icon, clicked music and checked the album that was ripped. I've then synced the device but it but never shows up in my music on my iPhone.  Right now I'm dragging the songs to the iPhone icon but that doesn't look to be working ether. In my iTunes library the ripped album shows up in Compilations—I don't know what that means or how to get the album into the library itself I feel that's the problem because I've ripped a CD once before and it just showed up in my iPhone and library with no problem.


Can I Create USB 3.0 Flash Drive With Undeletable Files?

What is the method to make files in a USB Flash Drive undeletable? Does these method work with USB 3.0 interface?  (I have surveyed some Flash Drive manufacturers, and I only see undeletable files for USB 2.0 drives, and not 3.0 drives. One manufacturer claimed that USB 3.0 cannot do undeletable file, so I am curious whether the claim is correct...)


Why is the total energy of an orbiting system negative?

Assume it's an circular orbit. Object A orbits around object B. Take object B as frame of reference.  .$E=KE_a + GPE$  .$E=\frac 12m_av_a^2 +(-\frac {GM_bm_A}r)$  .$E=\frac 12m_a(GM_br)+(-\frac {GM_bm_a}r)$  .$E=-\frac {GMm}{2r} < 0$  What does negative total energy at any instant of time mean?


Why are the singular values of a standardized data matrix not equal to the eigenvalues of its correlation matrix?

Conceptually, aren't the eigenvalues of a correlation matrix and the singular values of the associated scaled data matrix supposed to be the same? The below illustration is saying that it isn't so. Please point out what I am missing.  > M      [,1] [,2] [,3] [1,]    1    6   11 [2,]    2    7   12 [3,]    3    8   21 [4,]    4    9   14 [5,]    5   10   34 > M.scale = scale(M) > M.cor.eigen = eigen(cor(M)) > M.prcomp = prcomp(M.scale) > M.svd = svd(M.scale) > M.cor.eigen$values     [1] 2.729542e+00 2.704577e-01 1.198779e-16     > M.prcomp$sdev ^ 2 [1] 2.729542e+00 2.704577e-01 5.960165e-34 > M.svd$d [1] 3.304265e+00 1.040111e+00 1.953076e-16


There are some MacBook Pros for example from 2013 which have an NVIDIA graphics card built in by Apple and they are supported under macOS Mojave or Catalina. But if you upgrade one of those models to Catilina, will you lose your NVIDIA graphics and be stuck with the Intel Iris one or does this only apply to eGPUs, user-upgraded GPUs and with Hackintoshs? To my mind, just losing your NVIDIA graphics is rather unlikely as Apple does not have any warnings regarding this on their website, but I am asking here so I can be completely certain.


Use "default" figure if file is missing?

I was recently in charge of organizing all of the references and labels in a very large scientific proposal document.  My workflow typically involved compiling the document, seeing a "There were undefined references." statement, and then searching the resultant PDF file for the usual "?" or "??."  Sometimes those missing references were in regard to labels for figures that were used throughout the text and not something in our bibliography.  It got me wondering:   Is it possible to have a "dummy" or "default" figure to use in \includegraphics statements if the requested file is missing?  Perhaps a use case would be if in the LaTeX document there were a command such as \includegraphics{scaling.pdf}, but scaling.pdf doesn't exist in the current directory, so we use the existing dummy.pdf automatically.  I assume this involves renewcommand'ing the includegraphics command, but how should one go about doing  it for this scenario?


Prove that this entire function $f$ is constant

I need help for this problem:  If $f:\mathbb{C}\to\mathbb{C}$ is entire function such that $f(z+1)=f(z)$ and $|f(z)|<e^{|z|}$, $\forall z\in\mathbb{C}$, prove that $f$ is constant function.  [Hint: Look function $g(z)=\frac{f(z)-f(0)}{\sin \pi z}$]


Although there's equal and opposite reaction, usually the force is not balanced Can you explain why?


Etymology of "quick" of a fingernail, as in "cut to the quick"

Part of a fingernail known as the  is informally known as the "quick".  It is referenced in the saying "cut to the quick".  What is the etymology of the word quick as in reference to the fingernail?


A rational number a/b with (a, b) = 1 is called a reduced fraction. If the sum of two reduced fractions is an integer, say (a/b) + (c/d) = n, prove that |b| = |d|.  I am having trouble to understand the solution i found of this exercise:  Note that (a/b) + (c/d) = (ad + bc)/(bd). This is an integer implies bd|(ad + bc), which by linearity implies d|bc and b|ad. However, since (a, b) = (c, d) = 1, this implies that d|b and b|d. Hence |b| = |d|  I don't understand how does the linearity apply here, i mean, it does not make sense to me to use it here. The only things i could conclude is that: $ ad = r$ mod $(bd)$ $bc = bd - r$ mod $(bd)$ Let me know if i am wrong, but linearity is not this?: if $a|m, a|n => a|(k_{1}n + k_{1}m)$ I mean, the solution used in the contrary way, the right side implying the left side. But, even if what the autor of the solutions did is right, why does " bd|(ad + bc), which by linearity implies d|bc and b|ad"?


Grammatical number agreement in a complex phrase using singular "they"

another question, I used the following phrase:     Your reader is [...], but they are a busy person.   I have two difficulties here:   In the first phrase, a reader, being singular noun, certainly implies is; In the second phrase, they, being a plural pronoun (regardless that it refers a single person), still requires are, but are implies the plural for busy persons which sounds awkward (a reader ⇆ persons);   Obviously, if I used "...but he is a busy person", everything works fine, but I'm trying to use a gender-agnostic form.  What is the proper number agreement here?


Travelling to London, UK for a 3 day competition from India. I am staying in UK for 5 days. I Want to apply for a general visa of less than 6 months. How much money should be in my bank account or in my parent's account? and what documents are required?


What are indeterminate forms? And how are some usual and unusual? I know that indeterminate forms can be the ratio of two functions where the functions have a zero limit tendency, but I do not fully understand the concept.


I get this error when I update the system:  W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 241FE6973B765FAE  is there something to work it out ?


For a function $g: X \times Y \rightarrow \mathbb R$ show that: $$\sup_{y\in Y}\inf_{x\in X} g(x,y) \leq \inf_{x\in X}\sup_{y\in Y} g(x,y)$$ My attempt: By definition: $\inf_{\bar x\in X} g(\bar x,y) \leq \sup_{\bar y\in Y} g(x,\bar y)$ for each $x,y$. In particular, this is true for the pair $(x,y)$ such that $y$ maximizes the LHS and  $x$ minimizes the RHS. So the claim holds. My difficulty In my proof, I've assumed that the infimum and supremum are attained. This isn't necessarily the case if $X,Y$ are not closed or if the infimum/supremum is at $\infty$. What is a way to clean up this argument? My thought is to instead consider sequences that approach infimum and supremum, respectively. Is there some more direct way?


What program can I use to decompile a class file? Will I actually get Java code, or is it just JVM assembly code?  On Java performance questions on this site I often see responses from people who have "decompiled" the Java class file to see how the compiler optimizes certain things.


Changing the name of the list of figures

In fact, I want to change the name of the listoffigures but I wasn't able to do it even if I have used the appropriate command  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{array} \usepackage[francais]{babel} \graphicspath{ {figures/} }  \renewcommand{\listfigurename}{Liste des figures}    \begin{document}     \listoffigures  \listoftables  \clearpage   \end{document}


Add Brightcove field through form in custom module

I'm using  module and I want to add field in my custom module.  I was tried with brightcove, brightcove_video and brightcove_field types and it is not working.  Example of my try:    $form['something_page_settings']['something_media']['my_module_bri_file'] = array(     '#title' => t("Brightcove"),     '#type' => 'brightcove_field',     '#default_value' => variable_get('my_module_bri_file'),   );   Can someone help me to add this field?


Ubuntu dual boot with Windows 10 on Intel Optane based computers

I am seeing some of the threads like this which are not fully resolved/closed. I am getting this .  and want to install Ubuntu on this PCIe NVME SSD like .  I am okay for a slow boot of bootloader but once I am linux...it's all faster PCIe NVME SSD.  Any suggestions/pointers?


How to do a chart with stacked bars, lines and "sections"

The problem  I need a chart like this (this was made in Libreoffice + some gimp):    Its caracteristics are bassically:   Some stacked bars (if it is a stacked area, better) with its Y axis at the left. A line with its Y axis at the right. Kind of "sections" in the X axis (as can be seen in the picture). I don't know how are they called. Legend in both Y axis.   I need several of these charts with different values, so it would be nice to make them with the same code but different chartX.dat files.  If you could make a minimal example I would appreciate it a lot.  What I have  Currently I have my csv files like this:     time,   Blue,    Red, Yellow,  Green,  Brown       0,      8,     20,     18,     19,    401       1,      7,     65,     13,     30,    914       2,     10,     88,      0,      0,   1215   And other with the section cuts (always starting with 0 and finishing with the biggest number):  0 3 10 22 24   What I have seen   This , but it is not stacked and do not have the "sections". Here a  chart, but I am having troubles merging them. Haven't seen those "sections"    Thanks for your time.


I am trying to download Ubuntu to an older laptop with windows on it from Ubuntu's website. I am new at Ubuntu and need some help. I tried watching some YouTube videos, but I get a completely different layout when I am trying to install it compared to the videos. Please help me asap! Thank you


Ubuntu 16.04 kernel 4.4.0-21 not loading nvidia/vboxdrv modules anymore (Required key not available)

The latest kernel for Ubuntu 16.04 (4.4.0-21) doesn't load the nvidia (and vboxdrv) module anymore.  $ sudo modprobe -v nvidia insmod /lib/modules/4.4.0-21-generic/updates/dkms/nvidia_361.ko  modprobe: ERROR: could not insert 'nvidia_361': Required key not available   With 4.4.0-18 it still works. What has changed? How do I fix the problem?


I can think of an example where this wouldn't hold.  Take 1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1.  But I can also prove that the statement holds.  Claim: $|f|$ is periodic then $f$ is periodic  Proof:  $|f(x+p)|=|f(x)|$  $f(x+p)=\pm f(x)$ if $f(x+p)=+f(x)$ then we are done, if $f(x+p)=-f(x)$ we get:  $f(x+2p)=-f(x+p)=f(x)$, so the period is twice bigger, but It still holds that $f$ is periodic.  Where is my mistake?


We have three years of data for online visits at a daily level. We want to forecast the daily visits for the next 90 days. What would be the best method to capture weekday seasonality , holiday seasons, and also the drift.  Can this be successfully done in R? We are currently using R. We have considered ARIMA but it does not capture seasonality.  While converting the data to a time series in R, what should be the "frequency"?  Should we use ARIMA with regressors?


I want to use "if not in" syntax in python but what I want to do is to if the element is found in list I want to get the index.  for example  if 3 not in [2,3,4]:     print "hello"   If 3 is found in list I want to get the index which in this case is 1.


Is there a "quarter" equivalent for something divided in 9 pieces?

Something is divided in four pieces. One piece is called a fourth or a quarter.  Something is divided in nine pieces. One is piece is called a ninth or a... What is the 'quarter' equivalent for something divided by nine?


How to implement a stack of game states in C++

I'm new to C++ and as a college proyect I'm building a 2D platformer with some classmates, I recently read that it's a good idea to have a stack of gamestates instead of a single global variable with the game state (which is what I have now) but I'm not sure how to do it.  Currently this is my implementation:  class GameState {     public:         virtual ~GameState(){};         virtual void handle_events() = 0;         virtual void logic() = 0;         virtual void render() = 0; };  class Menu : public GameState {     public:         Menu();         ~Menu();         void handle_events();         void logic();         void render(); };   Then I have a global variable of type GameState:  GameState *currentState = NULL;  And in my Main I define the currentState and call it's methods:  int main(){     currentState = new Menu();     currentState.handle_events(); }   How can I implement a stack or something similar to go from that to something like this:  int main(){     statesStack.push(new Menu());     statesStack.getTop().handle_events(); }


I'm using Debian 6, all patched up, but when I try to access crontab as root, I just get a permission denied:  root@server:~# crontab -e -bash: /usr/bin/crontab: Permission denied   Please note this isn't as a user, but as root.  I haven't even got the foggiest clue how to resolve this if root has no access to the crontab.  Any ideas?    edit: answers are correct in   a) yes there has been mischief (at least this is my suspicion)   b) that my permissions on the crontab were screwy:  root@server:~# ls -lha /usr/bin/crontab ---------- 1 root crontab 30K Dec 19  2010 /usr/bin/crontab   so trying the chmod answer:  root@server:~# chmod 2755 /usr/bin/crontab chmod: changing permissions of '/usr/bin/crontab': Operation not permitted`   and the package reinstall:  root@server:~# apt-get install --reinstall cron Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 93.2 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.debian.org/debian/ squeeze/main cron i386 3.0pl1-116 [93.2 kB] Fetched 93.2 kB in 0s (164 kB/s) (Reading database ... 86601 files and directories currently installed.) Preparing to replace cron 3.0pl1-116 (using .../cron_3.0pl1-116_i386.deb) ... Stopping periodic command scheduler: cron. Unpacking replacement cron ... dpkg: error processing /var/cache/apt/archives/cron_3.0pl1-116_i386.deb (--unpack):  unable to make backup link of `./usr/bin/crontab' before installing new version: Operation not permitted configured to not write apport reports  chown: changing ownership of `root': Operation not permitted  chmod: changing permissions of `root': Operation not permitted Starting periodic command scheduler: cron. Processing triggers for man-db ... Errors were encountered while processing:  /var/cache/apt/archives/cron_3.0pl1-116_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Is this going to take a complete reinstall of the system now to get this back up and running?  edit: This is not a duplicate question - I had suspicions of a compromised server, but I'm not going to flatten a live server and rebuild it without evidence.  My original question was about the permission denied as a root user, as I was sure that was an impossibility, and I can assure you that I did search for that question first.  Thanks to the helpful folks here, I now understand the permissions more, and if this happens to someone else, they too will also be able to narrow down what has happened.


how to find out mac addresses of all machines on network

Is there some easy way to find out mac address of all machines on my network rather than doing an SSH into each and ifconfig | grep HWaddr if there are 300 machines on network I really need some easy solution.


How come when x=abc, [[ $x > 123 ]] && echo yes || echo no returns yes?

I understand that it is a string comparison, however i dont understand how "abc" & "123" are compared against each other. Thanks in advance!


Where does the question mark go — inside or outside the parentheses?

I know that when brackets enclose part of a sentence, the full stop goes outside.     I tripped over this morning. I was distracted by a plane (which turned out to be Superman).   If it's a full sentence, the full stop goes inside.     I tripped over. (I was distracted by a plane that turned out to be Superman.)   What happens when there's a question mark and only part of the sentence is a question?     I tripped over this morning. I was distracted by a plane (or was it Superman?)      (or was it Superman?).      (or was it Superman)?   What happens to the full stop that belongs to the rest of the sentence, and why?


How to align all vertices so that they would be lying on one plane?

Sometime faces have vertices that not aligned in one plane.  For example if I have this (face should be flat here):    It rather should be like that:


What of Mei Terumi, the 5th Mizukage's marriage?

Mei Terumi, the 5th Mizukage is always angry and tensed at the thought of marriage.  Who does she marry anyway? Does Chojuro get her?


want to create a cron job to play video file?

But its showing -->  no crontab for vishal - using an empty one crontab: installing new crontab  any suggestions how to workout ?


I have training data that I have fitted with two types of Poisson models (one zero inflated and one standard) and I would like to compare each model's performance on a test set to see which one is better. How can I do this ? (I am using R if it makes a difference). I have already done chi-squared tests to determine that both fitted Poisson distributions are statistically significant with the training data.  Also, is there a standard way for testing the accuracy of a fitted probability distribution on a test set of data? E.g. like a mean-squared error reduction.


Showing that $E[X|X<x]$ is smaller or equal than $E[X]$ for all x

I would like to show that:  $\hspace{2mm} E[X|X<x] \hspace{2mm} \leq  \hspace{2mm} E[X] \hspace{2mm} $ for any $x$   X is a continuous R.V. and admits a pdf. I'm guessing this isn't too hard but I can't come up with a rigorous proof. Thanks so much.


Direct sum of Abelian groups and Isomorphism

I'm currently reviewing my algebra for my last prelim and came across the following problem that has me stumped:  If $A,B,C $ are finite Abelian groups such that $A\oplus B \cong A\oplus C$ then show that $B\cong C$.  I'm not really sure where to start; the only thing that comes to mind is the fundamental theorem of finitely generated Abelian groups, I'm not sure if that's useful though.   I really only want a good hint.


python 2D list appends the element to every list in it

i was doing an assignment using Python and i had to use a 2D list with a specific size.  my idea was to use this..  lists = [[]]*10 //output => [[],[],[],[],[],[],[],[],[],[]]   because i have used..  nums = [0]*10 //output [0,0,0,0,0,0,0,0,0,0]   so far so good, the problem was wwhen i do this..  lists[0].append(5)     //the result is [[5],[5],[5],[5],[5],[5],[5],[5],[5],[5]]   it appends the object i'm adding to every list in lists, while if i did this..  nums[0] = 5   //the result is [5,0,0,0,0,0,0,0,0,0]   i have figured a work around the problem by using   lists = [[] for i in range(10)]   but my question is: why it did that, in first case?


Correct usage of "persons" (vs. "people")

I had a little fight about persons vs. people.  Could you advise if both of the following are correct, if possible with reference to a dictionary?        A table for two people please.   A table for two persons please.      Besides that, how would you ask for a table in a restaurant?  I read  and , but they didn't really solve the question if both are correct.  I also found the last paragraph of , which suggests that (1) is "more correct", but doesn't say (2) is wrong.


Use mathematical induction to prove $ (2n)!\geq 2^n(n!)^2$ for $n \in \mathbb{N}$

I am trying to use mathematical induction to prove  $$(2n)!\ge2^n(n!)^2\quad\text{for }n\in\mathbb{N}$$  I am stuck at the $n=k+1$ point.


I am new to UNIX and am trying to learn basic level text processing in UNIX so maybe this question may seem very basic but I would really appreciate any guidance.  I have a txt file "data.txt" as below   A 1  B 2  C 9  D 1  A 5  B 3  C 9  A 6  C 7  A 5  C 1   for which I was able to piece together a code inside a shell script "script.sh" (with a lot of help) as below  #!/bin/bash  cat | awk 'BEGIN{OFS=FS=" "}!(($1,$2)in c){c[$1,$2]=1;r[$1]=r[$1] OFS $2} END{for(i in r){print i r[i]}}'   This script is called on the text file as below  cat data.txt | ./script.sh 7   to get it to print the format below:  A 1 5 6 5 B 2 3 C 9 4 7 1 D 1   My shell script will also take an argument k (=7 say)  In this case, my script should sample 1 element from each box(A,B,C,D) until have a total of 7 elements sampled. This will be like follows: First pick 1 from A, then 2 from B,9 from C, 1 from D, 5 from A,3 from B, 4 from C and display  A 1 5 B 2 3 C 9 4 D 1   If instead I had k = 9 as my input, then my output should be  A 1 5 6 B 2 3 C 9 4 7 D 1   Thank you in advance. Request you to please guide me from the awk pipe``


Why can't energy be below the minimum of the potential in a bound state?

I just stumbled across the problem and have no idea how to solve it: "Considering the Time-Independent Schrodinger Equation for a stationary state $\psi$ with energy $E$, that is $$\psi '' = \frac{2m}{\hbar ^2 }(V(x)-E)\psi,$$ prove that $E$ must exceed the minimum value of the potential, by noting that $E=\left\langle H \right\rangle $" My attempt: We assume firstly that $E<\min(V(x))$, and thus $V(x)-E>0$ for all $x$. Thus if define $\frac{2m}{\hbar ^2 }(V(x)-E) = A(x)>0$, as all the terms in the function are positive, we get: $$\psi '' = A(x)\psi$$ Since $A(x)>0$, we know that $\psi ''$ and $\psi$ have the same sign. I don't know where to go from here. Haven't even used the fact that $E=\left\langle H \right\rangle $. Any help would be appreciated!


Unbalanced distribution of sample size between groups in logistic regression: should one worry?

I need to fit logistic regression models to a dataset where infection (present/absent) is my dependent variable and neighborhood (three factors: Rich, Poor, Very Poor) my independent variable. According to a reviewer who (as I) is not well versed in stats, one potential problem with my data is that the variable neighborhood has a quite unevenly distributed sample size for each factor, such that: Rich = 853   Poor = 100   Very poor = 131  The reviewer suggested randomly subsetting the "Rich" group to get a sample of about 100 samples and then meet this alleged assumption of approximately equal sample sizes between groups within the same variable. Because of the hypothesis behind our study, I need to set "Rich" as the reference category against which to compare the remaining two. Is the reviewer's suggestion founded? AFAIK, there's no violation of assumption whatsoever in logistic regression if the two categories of the independent variable are unbalanced, or even sparse, and no violation assumption even if it's the dependent variable.


Any difference between implementing and implementation

I use the word "Implementing" sometimes as a noun. Does it have the same meaning as "implementation"? Are they interchangeable in all contexts?   Thank you.


How do you greet multiple recipients in an e-mail?  Assuming they're both male, I just use "Sirs", but it seems a bit informal.


Task manager shows RAM is full but with what? Numbers don't add up

There's 16 GB RAM and Task Manager shows it as full. The other tab where I can see the breakdown of what's taking the space doesn't show it. What is taking all this space and how can I actually see it? This is the host PC and I'm running virtualbox on it with Ubuntu guests. I suspect this is taking the space but I don't understand why can't I see it in the Task manager of the host. It only shows usage of few MBs of RAM for each guest.


I am running Ubuntu as a guest on an iMac with VirtualBox version 4.1.8.  What is the easiest way to resize the virtual drive?  Please provide as much detail as possible including the correct format for any commands.


How does backwards induction work to prove a property for all naturals?

I was reading a blogpost here:  () One thing that threw me off was that after the first four large displayed equations, there is the statement "it is sufficient to prove that if the theorem holds for $n=m+1$, then it holds for $n=m$." How is this type of induction valid? I browsed around for things like backward induction, reverse induction, and Cauchy induction, but couldn't find a justification for how this is valid. With the usual forward induction of verifying a base case and proving $P(n)\implies P(n+1)$, it's easy to intuitively understand how induction will show a property holds for all natural numbers (or at least starting at the base case). But with this reverse induction, it seems to me that if you prove $P(m+1)\implies P(m)$, then if you were able to verify a specific case like $P(15)$, then you would only know it's true for numbers up to $15$. How does it actually prove the property for all naturals?


I've a series in which the nth term repeats n times. For example see this : 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...    So the question which I want to ask is that is there any way (like a formula) to get the kth term from the series  (say 2000th term) except direct finding each and every term. I also request to tell the derivation. Note: This is not my HW question  (although it may look like! ), I rather prefer doing them by myself.


Show that $\mathbb{E}~|\xi - \mathrm{med}(\xi)| \leq \mathbb{E}~|\xi - \mathbb{E}(\xi)| $

Assuming $\mu$ is the median of random variable $\xi$, prove, that,  $$\mathbb{E}~|\xi - \mu| \leq \mathbb{E}~|\xi - \mathbb{E}\xi|  $$  The case when  $\mu =  \mathbb{E}\xi $ is trivial, but I have no idea what to do when they are not equal.


How can I straigthen vertices along a direction?

I want to get the bottom half vertices to follow the direction of the top half vertices. I tried with scaling along an axis to first straighten them, then rotate them, but it didn't work properly.


I have the latest google chrome but accidentally tried to install the .deb package i downloaded two years ago, then cancelled with ctrl-c when it was unpacking, now it keeps telling me its half installed (although i'm using the latest version) is there a way to fix this?  Reading a couple of similar questions i've found most of them rely on removing and installing again the package but i don't want to go through all of that trouble, this chrome installation has been running smooth for over a year and it has all my internet history, bookmarks, addons and configurations and it would be silly to spend so much time to backup all of that to fix a progam that is working fine just to remove that silly error message.  I already tried sudo dpkg --configure -a and sudo apt-get install -f without luck.  Is there anything else i could try or ill have to live with it?


I just started blender and one of the main things you have to do is to render to make an animation, but I can't seem to do that. Whenever I click Render and then render image or render animation, at the top of the screen it says 'No camera found in Scene "Scene". I don't know why this is happening.


how to fix ''nothing to repeat at position 2''

ı am trying to stemmize words in tex of dataframe  data is a dataframe , karma is text column , zargan is the dict of word and root of word   for a in range(1,100000):     for j in data.KARMA[a].split():         pattern = r'\b'+j+r'\b'          data.KARMA[a] = re.sub(pattern, str(zargan.get(j,j)),data.KARMA[a])  print(data.KARMA[1])   I want to change the word and root in the texts


jQuery: How can I trigger an event when a div comes into view?

Is there some way I can fire an event with jQuery when the page scrolls far enough for a div to come into view?


Getting pending suggested edit notification of my own tag wiki edits

As a  I get notification about pending suggested edit at the top bar. I can directly edit questions and answers. But as a less 20K reputation user I have to suggest edits for tag wiki and excerpt. I just suggested edits for . After suggesting edits, I got two pending suggested edits notification. So I clicked on it go review it. And I got this:        So I went to  to confirm whether there is actual pending edits or not and I got this:        But there were no pending suggested edits. But the top bar were still showing two pending edits.  So remove the notification for my own pending suggested edits for tag wiki from the top bar (same as the review page.)


C#: is there any better way to replace special character and compare

I have 2 similar string except some special character. Is there a better way to compare and check for equality?  string str1 = "Hello (T) How"; string str2 = "Hello [T] How";  if (str1.Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "") == str2.Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "")) {     Console.WriteLine("Equal"); }


What are these three references from episode 9?

In episode 9, there are these three references I didn't get:     The first one is around minute 5, when Tomoko goes to see Yuu-chan at her uncle's café. She sees the names of two cakes ("Tarte Chiboust au Caramel" and "Bijou des Rois"), and then says this:   The second is around minute 15, when Tomoko is cleaning her stuff up. She wonders why her brother is trying to be better than her at everything, then says the following:    She then says "I'm gonna make him cry for this." The third one is around minute 17, when Tomoko is cleaning her stuff up and finds the cicada shells. She remembers why they were there, says "A memory best left forgotten", and then:     What do these three different situations refer to?


i have a problem with some geometry.  When i run the check geometry validity i get an error coming back that the rings are not closed, so recangular forms that i have surveyed are showing up as triangles. When I put the layer in editing mode, the rectangles show their rectangular forms but go back to triangles when i turn off the editing, not sure if this is caused by the codelist on my total station. a solution i found was to use polygons to lines and then lines to polygons and replace my original polygons with these new ones.  This can be quite time consuming so was wondering if anyone has a quicker fix for this or if there is a way of preventing this. The problem only occurs with polygons (i use a codelist created on a Leica TC1200)


What is the default font in Ubuntu?  Could someone tell me please?


How can I select all creased edges with specific weight at once, can be with python

Technically simple thing, how can I check for exact crease weight edges and then select only them? Like only that one edge on the cube ?


According to  entry for Sawmill crafting; it requires the following:   10 Wood 2 Iron Bars 1 Iron Chain   As shown in the screenshot below, I'm meeting all the requirements(rather I've more objects than required)    As can be seen; I have 32 wood, 15 Iron bars and 1 Iron chain(3rd row, 5th column). Still no option to craft a sawmill is displayed either on workbench or on Anvil!  Is this a bug?  EDIT  I should mention that it is a multi-player instance(in case, it has anything to do with the issue).


Should we use IS or Are with 'Fifty meters (is, are) the length of this pool.' etc?

Fifty meters (is, are) the length of this pool.  Ten dollars (is, are) too much to pay for a book.  One sixth of the cake (was, were) eaten.  One half of the students (is, are) going.  Kindly help me to answer those questions please..


Changing wallpaper via cron - difficulty with gnome-session PID

I'm trying to change the desktop wallpaper via cron/bash. I've read a lot of questions and answers on this site an apparently I have to do something like  #!/bin/bash  MY_FILE_PATH=/home/$USER/file.jpg  PID=$(pgrep gnome-session)  export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)  sleep 5  gsettings set org.gnome.desktop.background picture-uri file://$MY_FILE_PATH   But if run ./my_script.sh I get  grep: /proc/X1: Is a directory grep: X2/environ: No such file or directory   X1 and X2 are two different numbers and of course cron doesn't work  EDIT  If I manually set PID to one of the two numbers I get (on the line where export is made)  for X1 (829):  permission denied   for X2 (1394):   warning: command substitution: ignored null byte in input


In multiplayer MTG, what happens if a player attacking you dies before combat damage is dealt?

What happens if a player attacking you dies by triggered ability damage before blockers were declared and combat damage is dealt?  e.g.:  Player 1: Life 2: Declares attackers (2x 3dmg) to Player 2. Player 2: Life 5: Has no blockers however casts an instant flashback triggering an Enchantment ability causing 2dmg to Player 1.  Does the creature combat damage negate or resolve? Does Player 2 win or do both die?


Fill between and soft clipping doesn't work as expected

I am trying to visualize the oriented area under a curve using pgfplots like in the following example. However the output is messed up. What's wrong here and how to fix it?  \documentclass[tikz,convert]{standalone}  \usepackage{pgfplots} \usepgfplotslibrary{fillbetween}  \pgfplotsset{ compat=1.13, axis lines=center, samples=100 }  \begin{document}  \begin{tikzpicture}   \begin{axis}[width=0.49\textwidth]     \addplot[name path = f] gnuplot {cos(x)};%     \addplot[name path = x] gnuplot {0};      %\addplot fill between[of=f and x,split,soft clip={domain=-2:4}];     \addplot fill between[of=f and x,soft clip={domain=-2:4}];   \end{axis} \end{tikzpicture}  \end{document}   Output:    The split options makes it a bit better but doesn't produce a correct picture too.


How to bash complete an alias as the command

I have an alias  alias gi=git   Unlike git, gi cannot complete on subcommands, paths, branches.  How can I tell bash to "complete X as if it were Y"?


Am not doing anything fancy, just trying to use  method of list.      List<Id> myIdList = new List<Id>(); myIdList.add('0060E000008PdMk');  Id oppId ='0060E000008PdMk';      System.debug(myIdList.contains(oppId)); //Returns false   To my surprise, I spent a few hours debugging and came with this problematic code. Are we not supposed to use contains for List<Id> ?  Changing the type from List<Id> to List<String> makes my code run, but I dont have any clue why it does?   Can anyone shed some light?  UPDATE : As per the suggestion of sfdcfox I have raised a case with SF support. Case number "19522568". I will keep you guys updated with the results.  UPDATE 2 : Salesforce reached out to me for this,   A bug W-4884673 already exist for this issue. SF R&D team is working on the same. Known issue link for reference:   There isn't any ETA for this to be fixed, so the case will be closed as "bug fix submitted"  UPDATE 3 : This has now been resolved


Regex: Select empty spaces from a particular tab and replace them with one single space

hello and Happy new year !  have a little problem with more then 2000 .html files. I need to select all empty spaces from the next particular tag, and to replace with just one space.
 This is my text    and all of  this I have    to go home .
  My regex is not very good :(  Search: (?s)(?:\G)|
).*?|.*(?=
)|+\h  Replace by: (Leave one space)


I'm trying to have a really deep understanding of quantum physics and so I went back to what is blackbody radiation until suddenly I realized that my understanding of  is that of... well, hotness or coldness.  Trying to come up with a more fundamental understanding I realized it's kind of density of energy but nobody actually refers to temperature as density of energy. Can somebody explain me in normal english what temperature is and how is it different from energy density?


Find the distribution of $X_1^2 + X_2^2$?

Let $X_1$ and $X_2$ are independent $N(0, \sigma^2)$ which means (mean = 0, variance = $\sigma^2$) random variables. What is the distribution of $X_1^2 + X_2^2$?  My approach is that  $X_1\sim N(0, \sigma^2)$ and $X_2\sim N(0, \sigma^2)$.   Transforming $X_1$ and $X_2$ into standard normal, $X_1/\sigma\sim N(0, 1)$ and $X_2/\sigma\sim N(0, 1)$.  Then $X_1^2/\sigma$ and $X_2^2/\sigma$ have chi-squared distribution with 1 degree of freedom.   Then I found the moment-generating function for $X_1^2$ and $X_2^2$;$$m_{X_1^2} = (1-2t)^{-1/2}$$ and $$m_{X_2^2} = (1-2t)^{-1/2}$$  So the moment generating function for $X_1^2 + X_2^2$ is $$m_{X_1^2}(t) m_{X_2^2}(t) = (1-2t)^{-2/2}$$  So $X_1^2 + X_2^2$ has a chi-squared distribution with 2 degrees of freedom. My question can I treat $X_1^2/\sigma$ + $X_2^2/\sigma$ as $X_1^2$ + $X_2^2$ like I did above?


How to override logic of specific drush command?

I'm aware of // COMMAND hooks and I would like to replace the logic of the existing drush command on specific condition using  with something else, e.g.  /**  * Implementation of drush_hook_COMMAND_validate().  *  * Validate feature revert of specific module.  */ function drush_policy_features_revert_validate() {   if (strpos($args[1], 'rules') !== FALSE) {     drush_invoke_process('@self', 'rules-revert-all');     drush_print('Rules reverted in custom way!');     return drush_set_error('POLICY_DENY', dt('Rules features already reverted.'));   }  }   However the problem is when I return TRUE - the command which I want to override is called after than, on the other hand when I'm returning FALSE, the drush will fail with non-zero exit code which could cause some other issues (like breaking the deployment).  Is there any better way of overriding the logic of existing drush command without described side-effects? Secondly validation hook doesn't sound right to implement that kind of logic.


Where is Will Turner's heart at the end?

In Dead Men Tell No Tales, when the trident is finally divided, every curse in the sea disappears. So, Will Turner doesn't have to be in the Flying Dutchman forever. But he remains heartless?


Bootstrapping as a way of learning about the population

I have a small sample from an unknown, possibly non-parametric population. I would like to create a new, different sample from the population based only on what I can extract from the small sample I have.  Is there a way to do it, given that my sample is small? Specifically, can I resample from that sample using bootstrapping and hope I can get closer to the "true" mean and variance of the population? (Let's assume for a moment these two parameters are enough to characterize the population.)


How to change overall font size of minted?

While using minted I can change font size () on each individual place using the fontsize=\footnotesize:  \begin{listing} \inputminted[fontsize=\footnotesize]{javascript}{file.js} \end{listing}   Can I set this once for the entire document?


“Cannot execute boolean operation” when subtracting several spheres and cylinders from cube

This is a  as suggested by a commenter. What I'd like to do is to create a geometry with the following properties:  A cube with several spherical indentations carved out on top. 16 indentations are half-spheres. The 17th indentation has the shape of four half-cylinders that form a ring (with slightly rounded corners corresponding to the radius of the cylinders).  My plan of attack is as follows:   create and scale the cube create 16 spheres clustered around the center of the cube's top face create 4 cylinders, scale and rotate them to form the basic ring create 4 more spheres at the corners to complete the ring add 16 DIFFERENCE boolean modifiers to the cube with the 16 spheres from step 2 as targets; hide each sphere after adding the corresponding modifier add 4 DIFFERENCE boolean modifiers to the cube with the 4 cylinders from step 3 as targets; hide each cylinder after adding the corresponding modifier add 4 DIFFERENCE boolean modifiers to the cube with the 4 spheres from step 4 as targets; hide each sphere after adding the corresponding modifier   Steps 1 + 2 work as expected:    Steps 3 + 4 also work as expected:    And so does step 5:    And even step 6 for the 1st cylinder:    However when I try to subtract the 2nd cylinder the visual result is unexpected and the error message appears:      What is going on here and how can I obtain the desired geometry?   Could the problem be caused by the fact that the two cylinders I wish to subtract from the cube are themselves overlapping? (The Blender  mentions "concurrent Boolean operations for the same modified mesh, which in most cases is impossible to execute depending on the chosen target" but does not elaborate further.)  UPDATE Here's the (still expected) result when joining the 4 cylinders and last 4 spheres before subtracting the from the cube (see @Polosson's comment):


Prove $ \sin(A+B)\sin(A-B)=\sin^2A-\sin^2B $

How would I verify the following double angle identity. $$ \sin(A+B)\sin(A-B)=\sin^2A-\sin^2B $$ So far I have done this. $$ (\sin A\cos B+\cos A\sin B)(\sin A\cos B-\cos A\sin B)  $$But I am not sure how to proceed.


Why does Gmail hide email options under a '+' sign?

Why does Gmail website hide options like "links", "smileys" etc. under a '+' sign when there is clearly enough room along the footer? Am I missing something, or is google really pushing google+?  Example:    When you put your mouse over the + button, it looks like this (with the mouse being on the icon with the tooltip)


Expected Value of a Carnival Game Paradox

I was in my Algebra 2 class today, and we're learning basic probability. Talking with my friend, he proposed this carnival game. The game begins with two dollars in the bowl, and every turn you flip a coin. If the result is heads, the carnival doubles the money in the bowl, and if tails, you take the money out of the bowl. The question is, what is the  you would get from this game?  Starting from the first flip, you have a $1/2$ chance of getting 2 dollars. Multiplying these together, you get 1. Measuring the next flip, you have a $1/4$ change of getting 4 dollars, which multiply to 1 as well. Continuing this, you end up with the infinite sequence $1 + 1 + 1 + 1...$  How is this possible? Would you really statistically pay infinite money to play a game where you have a chance $50$% chance of getting $2?


I am getting this Error 99, when I turn the Power switch "Off" and then turn it back "On".  I am using an 18-55 Lens and I found somewhere that flapping the SD Card Slot will resolve this, it did. However now when I turn the Power switch to "Off" and then turn it back to "On", I do not get the display on the screen, only when i remove the Battery and put it back on, I get the display back. Is this a known issue in Canon 1000D ? Will a firmware update resolve the issue ?


, they  removed a moderator for repeatedly violating our existing Code of Conduct and being unwilling to accept our CM’s repeated requests to change that behavior.  As ,  Representatives of the company including executives, a director, and the Community Management team have failed to respond to my repeated requests to be shown these alleged violations and warning...  So, what did Monica actually do?  Previous content so comments make sense: What did Monica say, according to SO? What did Monica actually say that  (pending Monica's acceptance, of course)? We've heard a lot about how she did, but not what she did.


I'm creating a map where the player gets four pieces of wool ( Red Black Blue Green ) and I need it so if they place the block anywhere it will trigger a command block.  I have tried:   /testfor @a {SelectedItem:{id:minecraft:wool,Damage:14s}} < I wanted to manipulate this but I had no idea how. scoreboard objectives: the first thing I tried because I hoped there was a stat.blockplaced.wool:14 or something along those lines but i Had no luck. /testforblocks: So I am unsure of the way to use this. I would have hoped it was something like this: /testforblocks 1 1 1 -1 -1 -1 minecraft:wool 14 but no it didnt work that way. Instead it has this: /testforblocks x1 y1 z1 x2 y2 z2 x y z [mode] which I believe I have to make a clone of the map and then it will testfor a block placed? I am unsure  /testforblock: now this would probably work but it involves a lot of command blocks and when I tried to do it things started getting muddled up Instead of wool I thought there might be a way to implement the sign clickevent tag into different kinds of swords but to no avail. /execute @a ~ ~ ~ /testforblock: I though of this and then realised it would still need a region my other idea was to do this /testforblock <playername>[xd=,zd=,yd=] but i dismissed that thought.   So I've tried to this by myself and nothing has really worked. The most promising is just making a bunch of testforblock commands.  Edit  Just had a more promising idea of using armor stands with marker disabled to testforblock.  2nd Edit  Alright so I filled the area I need with no marker invisible armor stands. Then I used this command:  /execute @e[type=armor_stand] ~ ~ ~ /testforblock ~ ~ ~ minecraft:wool 14   I ran it in a repeating command block and got this error:     [12:55:37] Failed to execute '/testforblock ~ ~ ~ minecraft:wool 14' as testfor   So new question: How do I fix this error?


I'm looking at the docs for add_user_meta() vs update_user_meta().    If the current meta_key does not exist for a user, will update_user_meta() automatically add the meta_key for that user or do you have to define the meta_key with add_user_meta() first?


Use of Hot Spot Analysis (Getis-Ord Gi*)

I'm working with a polylines shape. I'm searching for a tool that could help me to define neighbourhoods using the values of the polylines.  I have good results with Hot Spot Analysis (Getis-Ord Gi*), because it creates new values depending on the neighbourhood. The doubt is about the possible use of all the values. I don't need only the hot or cold spot polylines, I want to use all the network, included the ones classified with a P-value as a non significant level.  ¿Is it correct or should I use other tool?


My question is about changing the font size.  I have to insert two figures side by side. Coming to inserting the captions for the figures individually:  Figure 3: blah blah.....................Figure 4: blah blah...   I am able to change the font size of "blah blah". What I want to know is how to change the font size of "Figure 3" or "Figure 4", say the figure headers or something. I do not know what they are called to search on-line.


When viewing a question in iOS Safari, provide a link to view it in the Stack Exchange app

I wish, when viewing a question in iOS Safari, that there was a link to view that question in the Stack Exchange app.


Find all solutions of ${\frac {1} {x} } + {\frac {1} {y} } +{\frac {1} {z}}=1$, where $x$, $y$ and $z$ are positive integers

Find all solutions of  ${\frac {1} {x} } + {\frac {1} {y} } +{\frac {1} {z}}=1$ , where $x,y,z$ are positive integers.  Found ten solutions $(x,y,z)$ as ${(3,3,3),(2,4,4),(4,2,4),(4,4,2),(2,3,6),(2,6,3),(3,6,2),(3,2,6),(6,2,3),(6,3,2)}$.  Are these the only 10 solutions? First, none of $x$, $y$ or $z$ can be $1$ ($x$, $y$ and $z$ are positive integers)  If I let $x=2$, then finding all solutions to $1/y+1/z = 1/2$    leads to $(4,4), (3,6)$ and $(6,3)$ which gives me $(x,y,z)$ as $(2,4,4), (2,3,6), (2,6,3)$ but this also means $(4,4,2), (4,2,4), (3,2,6), (3,6,2), (6,2,3), (6,3,2)$ are all valid triples for this equation. If I let $x=3$, the only different values of $y$ and $z$ are $(3,3)$ How do I prove these are the only ten solutions? (without using any programming)  Known result:  If we denote $d(n^2)$ as the number of divisors of $n^2$, then the number of solutions of ${\frac {1} {x} }+{\frac {1} {y} } = {\frac {1} {n} }$   =  $d(n^2)$  (For positive $x$, $y$)  For ${\frac {1} {x} } + {\frac {1} {y} } +{\frac {1} {z}}=1$  $z = \frac{xy}{y(x-1)-x}$ where $xy \neq 0$ What happens after that?  Question is: how do we sho there are the only ten solutions?  I'm not asking for a solution.  Assuming $x \le y \le z$  $1 \le y \le \frac{xy}{y(x-1)-x}$   $\Longrightarrow 1 \le x \le y \le \frac{2x}{x-1} $   Got the answer.  I'll probably call @mathlove's answer. (Any additional answers I'll view later) Liked @user44197 answer.


At school, we've been taught that human infants produce rennin/chymosin (which aids in the digestion of milk). More specifically, it is the peptic cells in the stomach which secrete prorennin, the inactive form of rennin (in addition to pepsinogen, the pepsin proenzyme).  User @another'homosapien's answer  also seems to concur with this (excellent answer by the way, I enjoyed reading it).  However  According to Mod. @AliceD's answer  (yet another excellent answer):     ...in humans there is only a chymosin pseudogene present...   Which (probably?) implies that humans (infant or otherwise) do not produce rennin.  I managed to get my hands on the Textbook of Medical Physiology (Guyton and Hall, South-Asian edition), and according to the book (Chapter Gastric secretions, page 406) peptic cells produce a large quantity of pepsinogen. There is, however, no mention of prorennin. I even flipped over to the Appendix at the back to look up "Rennin", but it turns out there is absolutely no mention of rennin in the book.    My questions,   Some sources claim that rennin is produced in human (infants). Is this true? Other sources claim that rennin is not produced in humans ( we have a pseudogene for it though). Is this correct (I mean the "rennin-is-not-produced" bit, not the "pseudogene" bit)? If rennin is produced in humans only during infancy, what stops it from being produced as we mature? (I'm asking this because every source I've seen that claims that rennin is produced in humans, explicitly states that is done so during infancy...which would suggest that rennin is not produced in adults)


Sketching base characteristics of first order pde

$$xu_{x} - uu_{t} = t$$   with intial data: $u(1,t) = t, −\infty < t < \infty$  So I want to sketch the base characteristics and I'm not too sure what I'm doing.  characteristic equations: $\frac{\partial{x}}{\partial{\tau}}=x$, $\frac{\partial{t}}{\partial{\tau}}=-u$, $\frac{\partial{u}}{\partial{\tau}}=t$  initial conditions:  $x(0)=1$, $t(0)=\xi$, $u(0)=\xi$  $x=e^\tau$ so $\tau=lnx$  Notice that:  $\frac{\partial^2{u}}{\partial{\tau^2}}=\frac{\partial{t}}{\partial{\tau}}=-u$,  This gives me the second order ODE  $\frac{\partial^2{u}}{\partial{\tau^2}}+u=0$  Solving I get:  \begin{align}   u&=c_{1}\cos(\tau) + c_{2}\sin(\tau)\\ t&=c_{1}\sin(\tau) - c_{2}\cos(\tau) \end{align}  From here I don't know what I'm doing?


Game of Thrones: Alternate reading order for Books 4 and 5?

I'm still working my way through the third book, but as I understand it, books four and five (A Feast for Crows and A Dance with Dragons) occur at the same time -- both picking up immediately after A Storm of Swords ends -- but taking place in different locations.  I've read that the original publication of a A Feast for Crows was met with some disappointment, with some fans being unhappy having to plough through a whole book before finding out what happened to their favorite characters after A Storm of Swords.  With this in mind, I was wondering if a different reading order might be permissible? For example, could someone chose to read A Dance with Dragons first? Or, even more audaciously, would it be possible to read both books simultaneously? I.e. A chapter from one book, followed by a chapter from the other?   Are either of these viable reading orders, or are there important reasons why A Feast for Crows should be read first?


Is the theory of electromagnetism very incomplete in physical interpretation?

Just like in Newtonian gravity, do we simply accept charge being naturally attracted to the opposite charge with a very similar Newtonian style force? (Coulomb) Shouldn't there be a meaningful theory of electromagnetism like in the interpretation of general relativity? Where we understand that gravity is an effect of space-time distortion attributed to mass.


We have a client/server application that consists of multiple EXEs. The data access layer is on the same physical tier as the client in a library shared by our EXE modules. ODBC and OleDB connection pools are managed per-process; are there techniques for sharing DB connections across processes (other than moving the data access layer to a middle tier)?


A female elephant is called a cow, a male elephant is called a bull. When talking about this animal we use the gender generic term, elephant. The plural of this is elephants.   Now think about cattle. A female is called a cow, the male is called a bull. The gender generic term is cattle. However, this only hold true for the plural form.   Is there a gender generic singular word for cattle?


Can the sum of the first $p$ factorials ever be a perfect power for $\ p>3\ $?

Has $$\sum_{j=1}^p j!=q^r$$ , where q,p,r are positive integers, and r > 1 , a solution ?   I solved partially, if r is even, then RHS is a perfect square, and there is no doubt in that. Therefore, the left side must be a perfect square as well. But for p>3, the last digit of LHS is 3 which is not the last digit of any square. Hence, p<4, and hence manually checking, only solutions are p =1,3. But i cannot generalize when r is odd.  Any solution to the next part would be helpful!


How to store record attachments and documents in external storage

is it possible to use external storage to store Attachments?   As a company we have large files that sales need to upload and associate to opportunities. We also want to save on the Salesforce storage costs.  To the sales user it would appear that the attachment is being uploaded into SFDC but behind the scenes it would saved on something like Sharepoint, or Dropbox. SFDC Links to Edit/View/Del the attachment would be redirected to do the operation on the file in external storage.


Prove that $\sqrt {n − 1} +\sqrt {n + 1}$ is irrational for every integer $n ≥ 1$

This question is from Apostol's Mathematical Analysis. I have a solution for it at   The question is:  Prove that $\sqrt {n − 1} +\sqrt {n + 1}$ is irrational for every integer n ≥ 1.  And the proof I have is  Now, I can't understand how to get h=$3/2$ and k=$1/2$ ?  Please help.


Beyond the second derivative in the study of a function

I was wondering about the analysis of derivatives in the study of a function. We know that  $f'(x) = 0$ can give us the critical points $x_k$ (maximum, minimum and sometimes inflection points), not always but it's not the point.  $f'(x) > 0$ lead us to find the intervals in which the function is increasing or decreasing.  $f''(x_k)$ can be useful to classify the critical points as maximum, minimum or inflection points.  $f''(x) = 0$ gives us the inflection points.  $f''(x) > 0$ lead us to find the interval in which the function is concave or convex.   Now my question is: is there some useful/interesting reason to study the derivatives beyond the second one? I mean what could $$f'''(x) = 0$$ give us? What kind of points, if any? And what $$f'''(x) > 0$$ could give us in terms of intervals? (Clearly my question is related to those functions that can admit/have a third, or higher, derivative).


I use biber for citations as follows:  \usepackage[     backend=biber,     style=authoryear,     natbib=true,     url=false,      doi=false,     eprint=false,     maxbibnames=99     ]{biblatex}  \renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def     \ifboolexpr{         test {\ifnumequal{\value{listcount}}{\value{liststop}}}         and         test \ifmorenames     }     {\ifnumgreater{\value{liststop}}{1}         {\finalandcomma}         {}%         \andothersdelim\bibstring[\emph]{andothers}}     {}}  \addbibresource{bib/refs.bib}   And I have in my refs.bib two differnet authors with the same name. Biber now alwas prints something like this: (D. Name et al., 2017) when using \parencite(Name2017). If I \parencite() an author with a unique surname I only get (Name et al. 2017). How do I change the setting of biber to get alwas only (Name et al. 2017), no matter how often this name is in my bibliography?  Thanks for any help!


What is the use of considering non-reduced schemes?

According to Liu's "Algebraic Geometry and Arithmetic Curves", Proposition 2.4.2, if $X$ is any scheme, there is a unique closed subscheme $X_{red} \to X$ with the same underlying topological space, and this satisfies the property that each morphism $Y \to X$ from a reduced scheme $Y$ factors uniquely through $X_{red}$. Of course, it is also true that any morphism of schemes $X \to Y$ can be extended uniquely to a morphism $X_{red} \to Y$ by composition. Since "nice" schemes are usually required to be reduced, I wonder what the use of considering reduced schemes is. More in detail, I have the following questions:   Is the purpose of having non-reduced schemes solely to make definitions clearer and more consistent? (For instance, if $A$ is a non-reduced ring, we would need to change the definition of $\mathrm{Spec}A$ to make it a reduced scheme) Is it true that one can, for all practical purposes, just assume that all schemes he's dealing with are reduced? This seems reasonable in view of the fact that morphisms to and from $X$ can be seen as morphisms to and from $X_{red}$. But is it possible to have two different morphisms from $X$ to a reduced scheme $Y$ that become the same when we compose them with the "inclusion" $X_{red} \to X$? Is this a major problem that hinders us from assuming that all schemes are reduced, or not?


I want to show the following:  $$ \sum_{r=1}^\infty \frac{1}{r(r+1)} = 1. $$  I've found this series as part of a calculation to prove a formula for the Gamma function. I know it converges to 1 because of the result of this calculation, but otherwise I wouldn't even know how to find this value, so any help is appreciated with how to find out the series converges to 1 and/or how to prove it converges to 1 (in case these steps are done separately).


We all carry two copies of each gene (outside of male sex chromosomes).  If the two differ from each other often one is dominant and one recessive.  How does this mechanism work on a molecular level?  What mechanism determines which gene gets expressed?


$n! =$ the product of consecutive integers.

Can $n!$ be the product of $k$ consecutive integers for $k > 1$? (Not including the degenerate cases such as when $k = 2$, then $1\cdot2 = 2!$ and $2\cdot 3 = 3!$, and so on.)  I am asking not for $n!$ to be divisible by $n$ consecutive integers, I am asking for $n!$ to equal the product of $k$ consecutive integers, implying that $n$ is not necessarily equal to $k$ (And when $n = k$, then clearly there exists an answer, namely $n! = (1)(2)(3)...(k)$)


Is there in QGIS a function or a plugin that works similar to Legend Limiter in ArcGIS? The attribute I want to show in my legend has many possible values, I want my legend to only show those values that are visible on my view in the print composer.


Can people PLEASE spell out their slang acronyms

I keep seeing new acronyms internet slang everyday on Stack Overflow.  Such as the following         Is it possible to make a stack rule guideline (or frequently asked questions entry) that, when you are answering a question, you spell out whatever acronym Internet slang you are using, because not all of us know what a lot of these mean?


Here is an extract from my Galois Theory notes proving that $\mathbb{Q}(\sqrt{5}, \sqrt{6}) = \mathbb{Q}(\sqrt{5}+ \sqrt{6}) $  My question is after rearranging equation (1) has my lecturer omitted an $\alpha$ that should be on the denominator? I think this may be a typo but solutions to the general case in one of our assignments have been released and it is also missing the $\alpha$ in the denominator.  If it is not a typo then how does this equation hold  thanks in advance


Let $a,e$ and $f \in \Bbb{Z}^+$ and p is prime number. If $\phi(p^e) | f$ then show $a^f \equiv 1 \pmod{p^e}$ $(gcd(a,p^e)=1$


What is a function to represent a diagonal sine wave?

I need to be able to plot pixels in this pattern. To me, it looks like a sine wave pattern that is both diagonal and convergent.      What would a function for that look like?  Thanks.


So I understand that this has happened in the past: , but all of the "duplicate" posts are marked as  so here is a new bug report: On the , I am listed twice:  While that's fun and all, it isn't exactly right.


Can regular expressions be used to match nested patterns?

Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times? For example, can a regular expression match an opening and closing brace when there are an unknown number of open/close braces nested within the outer braces?  For example:  public MyMethod() {   if (test)   {     // More { }   }    // More { } } // End   Should match:  {   if (test)   {     // More { }   }    // More { } }


I created a simple login based on PHP only. I wanted to combine them with a code that automatically logout the user after 10 minutes, but probably something I broke down.  <?php         session_start();         if(!isset($_SESSION['simple_login'])){             header("Location: index.php");             exit();         }                 $idletime=600;      if (time()-$_SESSION['simple_login']>$idletime){         session_destroy();         session_unset();     }else{         $_SESSION['simple_login']=time();     }      //on session creation     $_SESSION['simple_login']=time();   ?>


Should we `enable` the Systemd User service `pulseaudio.service`?

Checking my pulseaudio config, I just realized there is a /usr/lib/systemd/user/pulseaudio.service provided by the pulseaudio package. It is disabled, but pulseaudio works completely fine without. Have been using it for a year. Don't need to do anything after boot to start the actual executable. (It's an Ubuntu shipped-in package after all.) Why is it so ? Should I enable the service ? If so, why doesn't Ubuntu do this by default ? Also, what will change from current operation ? Thanks in advance PS: The Ubuntu wiki page doesn't give any information.


How to throw exeption from some method using c#

What are key words from throw exeption like this?  public void methodOne() throw SomeExeption {      try{          doSomething();      catch(SomeExeption se) {          throw se;      } }  public void startThere() {    try{        methodOne();    catch(SomeExeption se) {        Console.writeln("FAIL");    } }   I don't know, how to write it. I am getting syntax errors.  Thank you for your help.


Let $f:X \to Y$ be a function such that it is differentiable on the interval $[x ,y] \subseteq X   (x < y).$ If $a \in (x , y)$ and if $\lim\limits_{z \to a^+}f'(z)$ and $\lim\limits_{z \to a^-}f'(z)$ both exists, then $f'$ is continuous at $a$. I tried using Darboux's Theorem and the property of limit but was not able to bring a complete proof. Is there any hints to tackle this?


How to edit files in EFI partition on Windows 10

I want to edit my Clover boot entries from within Windows 10 to add back my linux mint listing in clover. I could boot my Linux Mint from clover until I was forced to reinstall my Linux mint instance (moved to Linux Mint 20 [Ulyana], at which point it disappeared from Clover's boot menu items list. As I can no longer access my Linux Mint installation, i find my self stack i Windows.


O-notation of a linear function has an infinite number of solutions?

“Formally, O-notation expresses the upper bound of a function within a constant factor. Specifically, if g(n) is an upper bound of f(n), then for some constant c it is possible to find a value of n, call it N, for which any value of n ≥ N will result in f(n) ≤ cg(n).” This is a quote from a textbook I’m reading on algorithms. By this definition, O-notation would be meaningless? If the running time of some algorithm is T(n) = 5n+10 then T(n) is O(n). But it is also O(n^2) and O(2^n), etc. f(n) ≤ g(n) 5n+10 ≤ n^2 for n>6 5n+10 ≤ 2^n for n>5 I understand the concept of worst-case analysis. It just seems the notation has barely any link to algorithm complexity? It is very confusing.


How to remove a page from the Google search results

Google says one can use the following method to remove a page from the search results: by putting -http://www.example.com/outdated.html into the sitemap. But what if the site does not exist anymore.


Why do photons have spin of 1 when they have no mass?

How can a photon have a spin of $1$ when it has no mass? Since the spin is intrinsic angular momentum, if $m = 0$, then the spin must be zero.


I'm failing at the most basic of creating a tree with tikz-qtree. If I copy the correct string with correct formatting into Overleaf everything works fine. But if I do change too much it just breaks. Resulting in an Emergency stop within the compiler. This is my current attempt: \begin{tikzpicture}[grow'=up]             \Tree[.$\emptyset$ [.B                  [.A [.E]                     [.F] ]                         [.C ]]                             [.D ]] \end{tikzpicture}  Did I mess up the formatting or something else? I'm just clueless!


Let $\sum_{n=1}^{\infty}a_n$ be a converging series with $a_n>0$,  $\forall n\in \mathbb N$. I want to prove that $\sum_{n=1}^{\infty}a_{2n}$ also converges.   I know intuitively since all the terms in the sequence is positive, then the sum of $a_{2n}$ has to be less than the sum of $a_n$, but how would I show this rigorously? Or using a convergence test?


i’m trying to get into film/photography i think just photography right now and then move over to film. anyways i need a camera obviously but i have no idea where to even start. so could someone please send me some camera recommendations? i have another question too! i would like to start editing these pictures but again there’s so many things to choose from i have no idea which would be best so what should i download?? i have a macbook pro


Why do we write "The shop is open" and not "The shop is opened"?   The passive voice is formed this way: verb + ed. On the other hand, we write "The shop is closed".


Audio was working fine until I tried to use qjackctl and qsynth to play a MIDI keyboard. I followed * to setup the keyboard and it worked. But then I noticed other applications couldn't play audio (VLC, Rhythmbox, etc.). After a reboot it was fine again. And then I set up the keyboard and the problem was back. This went on for a few days and I thought I could live with it as it fixed itself on reboot. But then it didn't. I couldn't play audio, except via qsynth and the MIDI keyboard. Now not even that audio will play.   *Mostly. qjackctl wasn't exactly as described, but I believe I found all the mentioned controls.  I'm not sure what I really did with qjackctl, or how to get back where I was. I tried removing (with apt-get purge) qjackctl and qsynth but that didn't help. Now I've reinstalled qjackctl and have tried changing the which driver is used by qjackctl, all to on avail.  Ideally I'd like the MIDI keyboard to work, but far more important is getting the audio back like it should be.  I've checked all volumes using alsamixer.   I believe JACK makes pulseaudio stop (see  and , but I don't know how to stop jack and get it back to normal.    How can I make the audio work again?


How to extract Time from Date/Time field within formula

I am working on a formula based on a date/time value to extract the time for the field. This field is based on the Pacific Time Zone and as is appears as  04/04/2016 9:00 PM  I set up this formula below  LEFT(RIGHT(text(  HOC__End_Date_Time__c ),9),7)  However the return result is based on GMT and returns based on a 24-hour clock, is there a way to adjust so it can simply display as 9:00 PM rather than as 24:00.  Hope it helps.


find class of array (String[].class --> String.class)

I've got an array of any class and I need to get that class at runntime.  I'm thinking of something like that:  String[] stringArray = new String[10]; Class<?> clazz = stringArray.getClass(); if (String.class.isAssignableFrom(clazz)) {     System.out.println("Won't happen"); }   The class of the array is not known at compile time.  I've found something simular but the other way  (String.class --> String[].class)


What kind of file should send to client?

I don't want to send editable file or native file (i.e. Ai.) to client. I read some articles and found out that people send pdf file to client. Do I need to add password to it? because when I open pdf file on illustrator, I still can edit it and see all the layers.   Please advice


Java Accessing method from alternate class

I have classes A and B, I want to access a method from class A in class B but it isn't working, I'm getting the following message:     Exception in thread "main" java.lang.NullPointerException   The particular part that is causing this is when accessing ba:  ba.getBalance() >= LIM         ba.debit(LIM);   I'm not sure what I'm doing wrong as I've created the private field and initialised it within main.  Class B:   public class B {          private A ba;         private long balance;          public B(long amount, A ba){         }          public boolean testCase(long amount){            //..         }      public long getBalance(){         return balance;     }   Class A:  public class A {       private long balance;       public A(long amount){     }      public boolean debit(long amount){         //.. simple arithmetic      }      public long getBalance(){         return balance;     }   Main  A aa = new BankAccount(amount1); // where amounts are user input B bb = new GoCardAccount(amount2, aa);


Can I recover changes after git stash pop followed by git checkout .?

I accidentally run git checkout . and lost the changes I made on my local repo.   I remember that once I had those changes stashed but I used git stash pop to retrieve them (sadly, I didn't know about git stash apply at the time), and now I can not find these changes on my stash.  I searched on SO but most of the answers were for git stash apply, or told me to retrieve the SHA-1 outputted after the git stash pop, but I don't have that information.  Is there any way to recover my changes?


Windows 10 locked in automatic repair but no administrator account

My notebook was shut down and entered automatic repair. But when it loaded it requested an administrator account, which it resolved it was non existent. Nevertheless I had already registered and activated an administrator account using the following command:  net user administrator /active:yes  I guess it should turn the admin on, but it didn't. Does anyone know how can I login and repair my Windows?


In Java, what is the best way to determine the size of an object?

I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.


We know that the moon rotates around the earth  due to gravitation. But both moon and earth attract themselves towards them. So why doesn't earth goes round the moon? It is feeling a force too. So it should also accelerate around the moon.


Do light color codes work across all distros and terminals?

I use \033[1;34m for light blue. I am using Debian and Putty and it works for me.  However, I've heard that it may not work for all users (using different distros and terminals). Is that true? Do they have different codes for light colors?  I want to add an option to the configuration file of my program to display light colors instead of regular ones.


How can I install Play Store on Anbox on Ubuntu 16.04

How can I install Play Store and log in to my Play Store in Anbox? I'm looking for a tutorial. I am using Ubuntu 16.04 64-bit.


Linear Algebra Question on Equivalent Systems

Prove that two 2x2 homogenous systems having the same solutions are equivalent.    This is from Hoffman and Kunze where Equivalent Systems are systems where all equalities in one system are linear combinations of equalities in the other.   My attempt-  I split the problem into 3 cases of 3 different ranks: I made an observation that for the null space to be the same (and hence the homogenous systems to have the same solution), the rank of both matrices had to be same. If it wasn't the dimension of the solutions for the two equations wouldn't be the same and hence would contradict the given data.  If the matrices are rank 0, then they are both null matrices and hence are trivially equivalent.  If both matrices are rank 2, then both of them are invertible and hence, the systems are equivalent since the row space of both spans all of $R^2$. Hence, any equality can expressed as a linear combination of the equalities of the other.  If both systems have rank 1, then I am in a confusion. That only implies that all of the four fundamental subspaces have dimension 1. How do I show that the two systems are equivalent from this?


scp prints some weird characters and doesn't copy files


How can I predict if water will stick to the outside wall of a container when pouring at a certain angle?

I want to predict if water will spill while pouring it from one container to another due to it sticking to the outside wall of the pouring container and running down through it.  I know the angle at which I'll pour the water, what other factors do I need to consider to predict if spilling will occur?


Converting Linux into a Router- Traffic from eth0:0 to eth0

So I have been trying to convert my linux box which is running Mint into an router. eth0 has a public address that has 71.xx.xx.xx for an IP addr. I created an eth0:0 and set it an IP address , 10.0.0.100. I started a DHCP server that is on eth0 ( because it wont use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux via a switch and its able to receive an ip addr via the DHCP server. Problem is how do I route traffic from and to eth0:0 to eth0 and vice versa so that computers on the private network that is 10.0.0.x can access internet via the static IP on eth0.


Prove that there exists 5 consecutive numbers, each of which is divisible by a cube of a positive integer greater than 1.

I have trouble even starting on the question because I cannot create any relationships between those 5 numbers.


I accidentaly changed file system type and wrote a couple files. How do I get my old files back?

So, I had a windows laptop that I installed Linux onto. Fedora onto the storage drive, and Kubuntu on a separate NVMe drive. A lot of my data was on the Fedora drive, then I put the old Windows drive back into the laptop, and it apparently thought the Fedora drive was supposed to be an NTFS storage drive because now the drive is called DATA, all that's on it is: $RECYCLE.BIN     S-1-5-18         desktop.ini     S-1-5-21-4039987853-288116331-4186372247-1001         desktop.ini Recovery     Logs System Volume Information     AadRecoveryPasswordDelete     ClientRecoveryPasswordRotation     EDP         Recovery     IndexerVolumeGuid     tracking.log     WPSettings.dat  What's not there is my personal files or Fedora system files. If you could help me get my personal files back, that would be great.


If the voltage doesn't kill you, does the current capability matter?

Trade electricians often work on live household circuits carrying 120V AC.  I've gotten shocked by accidentally touching such hot wires often enough to recognize the 60Hz AC buzz.  Fortunately, human skin has pretty high resistance: even when drenched in sweat, mine measures in the hundreds of kΩ.  If we assume a lower-end skin resistance of 120kΩ, then through unbroken skin 120V service will only pass 1mA through my body.  Conventional "wisdom" says that working in a main panel calls for more caution because one might make contact with 400A service, as compared to the 20A one is facing working at the end of a typical circuit.  But this sounds incorrect:  If skin has significant enough resistance that at 120V only milliamps flow through it, then is a 200A service supply any different from a 20A breaker in terms of the experience of touching a hot wire (holding all else equal)?  Does ground contact matter in terms of skin contact with residential electric service? E.g., at 1mA, 120V, and half a 60Hz cycle would an insulated 20-gallon vat of saline take enough charge to slow the current significantly relative to the current it would receive if it were connected to the ground?


Prove that $\int_0^\infty \frac{x\,\log x}{(1+x^2)^2} = 0$

I have been asked to prove that $$\int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx = 0$$  I tried proceeding as follows: \begin{align} \int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx &= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_1^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx \\ & = \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_{u=1}^0 \frac{u\,\log u}{(1+u^2)^2}\,du\quad (\text{where }u=1/x) \\ &= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx - \int_0^1 \frac{u\,\log u}{(1+u^2)^2}\,du \\ &=^? \int_0^1 0 \,dx \\ &= 0 \end{align}  But I think that I should first show that the improper integral $\int_0^1 {x\,\log x}/{(1+x^2)^2}\,dx$ is convergent.  Do I need to show it? If yes, how to do so?  (I have been taught basic methods such as comparison, limit comparison and Dirichlet test.)


do downvotes on meta indicate disagreement with the question's premise

I read the comments on  question and somehow stumbled over this comment:     Downvotes on meta indicate disagreement with the question's premise,       not that you asked a bad question.   as it indicates that if you want to get some reputation (which is for example needed for mod-elections) you actually have to ask questions that are not individual, and maybe controversy but, those which represent the masses opinion and this completely contradicts my opinion of a valuable question, especially if discussions (and therefore different opinions) are ok.  Now I am wondering if this comment can be applied on most meta-users or is just a single opinion.


I am confused about the next badge. Here is mine        We can see the rule of next badge  . It said that "Progress to next badge" bar automatically selects the badge you're closest to earning (or that's most logical to go for next). Now my next badge is "Critic" and maybe it is most logical to go for next. Why not "Benefactor", "Citizen Patrol" or "Cleanup"? They seems to be most logical to go for next too.


How to convert the date time in given format to epoch using python?

I have datetime in following format:      Tuesday, 14 February 2017, 4:10 PM   how to convert it to epoch using python ?


Can't remove unneeded keyboard layouts - no such setting anywhere

After I have installed Office 2016 Home and Student (en-us version) it automatically added two new keyboard layouts - English UK and English International in addition to my existing other layouts (English US and Russian). I'm trying to get rid of these new keyboard layouts but I absolutely cannot find an option to remove them ANYWHERE - not in Control Panel, not in Settings...  I have no "languages" section in Control panel, no "choose your langauge preferences" or whatever. In the new Settings thing these new languages are not shown in the list of languages, I can't remove them!  Does anybody know how to remove these new keyboard layouts? And why did Office add them in the first place?  Screenshots of my settings:      None of these solutions worked for me:


Add margin to the "Communities" block on the profile activity page

Actually, h tags have margin:  h1, h2, h3 {     margin: 0 0 1em; }   But "Communities" block has class .gs4, which overides this rule:  .gs4 {     margin: -2px; }   Could you fix it?


i'm new to drupal (just installed v9) and want to add a bunch of content. like in the question asked years ago () i want to add taxonomy terms on the fly while adding new content and not having to add them first in the taxonomy module. the links provided in the old thread are for v7 and v8 and seem not to work if the code thats posted there is still a valid solution can one tell me where to add it? thanks


Negative number of votes needed to undelete an answer

I know Will was using his answer to  for testing, but I still think this is a bit odd:    I tried voting to undelete, but it just gave me the "nice try puny mortal, this was deleted by a mod" error popup.


.NET - Adding multiple generic types to a linked HashMap

I have a generic C# interface as follows:  public interface ISerialiser<TV> {     void Write( BinaryWriter output, TV value );      TV Read( BinaryReader input );      Type GetValueType(); }   of which I have several implementations, this being one of them:  public class BooleanSerialiser : ISerialiser<bool> {     public void Write( BinaryWriter output, bool value )     {         output.Write( value );     }      public bool Read( BinaryReader input )     {         return input.ReadBoolean();     }      public Type GetValueType()     {         return typeof(bool);     } }   This and the other implementations need to be added to a linked list - something like this:  private readonly LinkedHashMap<Type,ISerialiser<?>> theSerialisers =                   new LinkedHashMap<Type, ISerialiser<?>>();   As you can see, I'm using the Java-style wildcard to signify that there are different types of serialiser to add - I realise this won't possibly compile in C# :)  My question is: how do I 'change things around' so that I'm able to populate the HashMap with whatever type of serialiser I wish, and call the interface methods in the same (or similar) way when I eventually pull the objects out of the HashMap?


OSB3 (particle board) got wet during roofing - does it need to be replaced?

I'm putting up a large GRP flat roof. The builder has been AWOL for a while, and so the roof has been left with just OSB3 with no waterproof covering. It's been rained on for months and swelled to twice its original thickness.   Is this board still OK to use for the roof if I can let it dry? I can still walk on it with no problems.


I have a model I created with bones from Mixamo. The FBX has embeded textures. I want to rename the bones in the model to get rid on the Mixamo in the beginning of each bone name. (this is find with Mixamo). I removed the Mixamo from the names, but then I export as FBX, the textures are gone. I am wondering how to reapply the textures to the model, or how to save the FBX with the textures. Thanks for any help.


Why is there no friction at the top and bottom of loops?

A beginner's question: Why does friction vanish at the top and bottom of loops? If friction works in the opposite direction of motion, then surely there must be some element of friction that is in the same direction as the normal force at the top of the loop? Or does friction have to always lie on the plane on which the motion occurs? Edit in attempt to improve the question: Given a motorcycle travelling in a looping, then when it's at the right-most point of the looping there are three forces acting upon it - its weight due to gravity, which points downwards, friction, which is exactly opposite in direction and equal in magnitude to its weight, and centripetal force, which coincides exactly with the normal force. My understanding is that, as the motorcycle moves from the right-most point to the very top of the looping, the friction gradually decreases (because the part of the weight vector it needs to compensate gets smaller) until, at the very top, there is only the centripetal force acting on it, which is now the sum of the normal force and its weight. What happens with the friction at this point?


overlapping alpha textures - shading problem

I'm working on a bird that has an object particles system with transparent hair textures. When the textures are not overlapping is not a problem.  There are some weird artifacts going on as soon as they start overlapping.  I guess its shading the full mesh without the transparency in this case. Does anyone have a solution to this?  non overlapping feathers = good shading    overlapping feathers = bad shading


Scale invariance symmetry as a simple argument in an electrostatics problem

In the comments to this , it was hinted that proving that the force acting on a charge at a vertical distance from a uniformly charged plane is independent of that distance can be done by recalling the scale invariance symmetry. Can someone explain that to me?