Prevent protecting questions under certain circumstances

I've found a trend that I'd like to discuss. There are users that have reached 15K+ reputation that are participating in a question and then protecting it so that low reputation users can't answer. This wouldn't be a problem if the question was attracting poor, low quality or spam answers from these low reputation users. However, in these cases, that's not what's happening.  The  privilege has the following guideline:     Questions should be protected when they are garnering lots of views and newbies are adding "me too!", "thanks!" and possibly even spam non-answers.   Some recent examples to consider:     This Q&A are by the same user. There are no deleted answers on the question. (14 views)   This Q&A are by the same user. There is a second answer that is not the highest of quality, but the user has 200+ reputation and wouldn't be affected by the protection anyway. (23 views)  This question was protected by the author of the only answer. There are no competing answers. (36 views)  This question was protected by the author of the only answer. There are no competing answers. (37 views)  This question was protected by the author of the only answer. There are no competing answers. (50 views)  This question was protected by the author of the only answer. There are no competing answers. (64 views)  This question was protected by the author of the question (not the answer). There is only one answer. (140 views)   Proposal  I'd like to propose a couple small changes to how a user can protect a question:  The question should not be able to be protected if all of the following are true   Has less a low number of views. We use 100 views to determine when . I think 100 would work here too. None of the posts have garnered low quality or spam flags None of the answers have a score less than 0 The user protecting the question is a participant   If any of those criteria are no longer true, then the participants should be able to protect it normally. I worked with  to spot check the flags on the above posts. There are not any low quality or spam flags.  This means that the final question in my example would be able to be protected by both participants.  If you haven't answered the question, you would be able to protect a question as normal. The idea is that the author of the question or answers can't protect if if the other three criteria are true  Motivation  The idea is to prevent locking out low reputation users from these questions. They are not gathering the types of answers mentioned in the  that require a post to be protected. Instead, it looks like a conflict of interest. The user protecting the post is one of the users that can benefit the most from preventing competing answers.


I can't understand what is the difference between the Pandemic 2012 and 2013! And do 2012 awards winning edition compatible with the expansions, or have a misprint issue?.


Present perfect for past action with present effect

If I seem tired, can I say: "I haven't slept last night"? If not, why have I been told that we use present perfect for actions that have present effects?


Display 0.3 instead of 10^-0.3 in logarithmic plot

I have a loglog plot where the ordinate only covers less than a magnitude. pgfplots will display the plot like this:    It is hard to make out the actual time it takes, it must be somewhere between one and a tenth of a second. Is there some way to label the ordinate with numbers between 0.1 and 1 like in a regular plot?


So, for some reason I'm having problems just USING a string input.  I don't know why. Maybe it's some incredibly stupid thing everyone knows, but I don't.  Here's the non-functioning code:  import javax.swing.*;  public class Thing { public static void main(String[] args) {     String input;      JOptionPane.showMessageDialog(null,"Welcome to the test...");     input = JOptionPane.showInputDialog("Do you wish to take the tutorial?" + "\n" +                                         "If affirmative, enter 'Yes'");     String i = input;      if(i == "Yes") {         tutorial();     } else if(input=="'Yes'") {         JOptionPane.showMessageDialog(null,"Don't actually put apostraphes around you're answer.");         tutorial();     } else {         JOptionPane.showMessageDialog(null,"Remember, you can pull up the tutorial at any time with 'T'");     } }   Yes, I actually do have a tutorial method somewhere else, and it works fine.  The main problem is that if I enter 'Yes' or Yes, it still goes to the final else.  I only put in the  String i = input;   and changed it from  if(input == "Yes") {   because it didn't work then, either.  So what am I doing wrong?


In R, the logistic regression output gives you predicted probabilities. Is there away of determining the threshold value $\alpha$, such that any $p > \alpha$ is classified as a $1$ and and $p \leq \alpha$ is classified as a $0$? Can the  caret  package do this?


How can I change the type of text in beamer as shown in the image.


I remember there was a cog in the menu in the uuper right corner of the screen The cog opened the app for editing the preferences Now the cog is gone and I can't open the preferences anymore What have I done ? How can I fix this ? :~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 20.10 Release:    20.10 Codename:   groovy


$\sum \cos$ when angles are in arithmetic progression

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


How to reinstall Ubuntu but keep /home folder?

I want to reinstall Ubuntu but keep /home.   I choose manual partitioning (Something-else  option), then select Ubuntu system partition and set its mount point as /home.   When I clicked on Install Now, I got the error message:   No root file system is defined. Please correct this from the partitioning menu.  What should I do to resolve this problem ?   Thank you


A weird relation for exponential function, is it really correct?

We written if $$f(x_1 + x_2) = f(x_1)f(x_2)$$ means that $f(x) =  a^x$ and this is a characteristic property of the exponential functions.  This to me seems really weird, I am sure that there exist more functions for which this is true. Did the professor make a mistake here?


How to rename multiple files that have different names to file1, file2, file3, etc?

Let's say I have these files in my folder:  cat.txt dog.txt house.txt tree.txt   I want to rename all of them to something like this:  file1.txt file2.txt file3.txt file4.txt   Is that possible to do via the command line?  I've only seen questions about renaming files that have some kind of pattern, like rename dog1.txt, dog2.txt -> cat1.txt, cat2.txt.


What is Wayland and how do I enable it? One extension that I installed said that it needs Wayland to work... Sorry if this is a stupid question. I am new to Ubuntu and the world of Coding. (I haven't even entered it. Still at the door... thinking and exploring...)


What is the difference between Marvel's Ultimate universe (Earth-1610) and the Cinematic universe (Earth-199999)?

Thaddeus's  got me wondering about what exactly is the difference between Marvel's Ultimate universe (Earth-1610) and the Cinematic universe (Earth-199999)?  After all from what I've seen of the Marvel movies (admittedly not all of them) they seem to largely draw from the Ultimate universe anyway.


Alternate proof that $\exists\ x \in \Bbb{Z}$ such that $ \gcd (a+bx,c) = 1$?

I came across this question in the book An Excursion in Mathematics:     Let $a,b,c \in \Bbb{Z}$ such that $\gcd(a,b) =1, c>0$. Prove that $\exists\ x \in \Bbb{Z}$ such that $ \gcd (a+bx,c) = 1$.   There is one proof that is easy enough: By Dirichlet's Theorem, there are infinitely many primes of the form $a+bx$ where $a,b$ are relatively prime, so we merely take the first prime of the form $a+bx>c$.   On the other hand, however, the book is a fairly elementary textbook on high-school math contests and Dirichlet's theorem is not mentioned. I am having difficulty coming up with another proof for this. I have tried to construct an $x$ such that $a+bx$ is relatively prime to $c$, but to no avail.  How would I proceed towards the proof?


Doing "ls" gives me absolutely no response. No "command not found", no "permission denied", absolutely nothing. I'm really confused. Please help.  Info: Running Ubuntu Server 16.04.4 on a Digital Ocean VM, 1 GB, 1 vCPU.


Chrome browser has started core dumping on Ubuntu 14.04

I have previously downloaded and installed the Chrome (not Chromium) Version 52.0.2743.82 (64-bit) browser. It has worked in the past (I use Chromium as my primary browser). But today it will not launch. I removed it and re-installed it and the problem continues. If I launch it from the command line it says that it core dumps. I don't know where the core file goes. It isn't in the directory where I tried to run chrome, or in my home directory (not that I would know what to do with it).  I need Chrome to watch Amazon Video (they won't allow Chromium as a browser). I could watch them on another computer, but it is disturbing that a program has all of a sudden stopped working. I don't believe that I installed any program between when it last worked and when it stopped working.  Edit:  I was asked to add the message that displays in the terminal. Here it is along with the command I issued:  google-chrome-stable Aborted (core dumped)   This output is coming from Linux, not Chrome, as redirecting the Chrome output produces an empty output.txt file and the same output on the terminal:  google-chrome-stable > output.txt  2>&1  Aborted (core dumped)   Edit2: I found a solution as the answer to this question:   The solution is to delete the file ~/.gtk-2.0  I don't know if it matters, but this is what was in that file:  include "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc"  gtk-theme-name="oxygen-gtk"


My question is the same as this one but for c#:   Please see the code below:  [HttpGet("{id}")] public ActionResult<byte[]> Get(Guid id) {     return System.IO.File.ReadAllBytes("Pictures\\" + id ); }   The filetype e.g. jpeg, gif etc is unknown.  How do I find the file without a file type?  Do I have to insist that all images are submitted in a particular file format?  What is the most elegant way of doing this?


Is it OK to reduce the charging current for a Li-ion 18650 battery?

I am using NCR18650 batteries with the tp4056 charging module.  When I connect the charger at 2.8 V (fully discharged), the tp4056 IC is getting hot at a 1 A charge current. Is it OK to reduce this charge current by changing the charge current selecting resistor? So the tp4056 IC heat would be reduced, wouldn't it?  For my application I don't need a quick charge. With a low current, charging time will be increased, but it does not matter for my application.  Will reducing the charge current affect the battery's lifetime? Or will it damage the battery?  I am trying to reduce the heat of the tp4056 IC by reducing the charging current, maybe from 1 A to 500 mA or less. The 18650 battery never heats for a 1 A charge current.


Let's say I have have the file asdf.tex which contains the code:  \documentclass{article} \newcommand{\asdf}{blabla} \begin{document}     \asdf is very cool! \end{document}   How can I compile my latex to a version asdf_standard.tex where only the standard latex is used, i.e.:  \documentclass{article} \begin{document}     blabla is very cool! \end{document}   I'm sure the compiler does this kind of procedure at some point anyway, so how can I get this as a file?  Thanks for your replies!


Where do I find a comparison of different STL containers complexity (performance)?

I googled quite a while in order to find out a comparison that shows the differences in complexity for all STL-Containers on insert/push erase/pop etc. I did not find any. Also not in all of my STL Books. Any hint?  I know some rules of thumb of course. But where is a definition?


drwxrwxr-x 2 xyz xyz 176128 Jul 29 02:03 20170429   drwxrwxr-x 2 xyz xyz 110592 Jul 31 01:22 20170430  cd 20170429   ls -lart   total 196   drwxrwxr-x   2 xyz xyz 176128 Jul 29 02:03 .   drwxrwxr-x 253 xyz xyz 20480 Aug  4 00:00 ..     du -sh 20170429 176K    20170429  du -sh 20170430 124K    20170430   Referring to the above information, I wanted to know for the empty directories 20170429, 20170429 , why is it still showing having memory space of 176128 and 176128 while we do ls -lrt. Where from do these information comes from? Is it from inode? Also note that even by du -sh they still shows 176k and 124k respectively for the empty directory.


How do faculty search committees evaluate candidates  for faculty or post-doc positions?   I am a PhD student I found that there is no fixed algorithm to judge a journal. But candidates publish in various journals in their PhD.  How will a researcher know where to publish his PhD so that he can get a Post-Doc or faculty position?  If a candidate does not understand which journal is good/average/bad,how will one decide where to publish?  This question is somewhat related to   NOTE:I am in search of a journal for my first ever manuscript.So I am asking a lot of questions,sorry for that


.bash_profile not sourced when running su

I have a user, say user1, which has modifications to its .bash_profile, one of them changing the PATH, e.g.: export PATH=/some/place:$PATH. This change works fine if I log on as user1 or do a su - user1.  But if I try to run a command via su as root, e.g.:  su -c test.sh oracle   (test contains echo $PATH)  It doesn't seem to have the modified PATH (or root's PATH, for that matter). I've also tried copying .bash_profile to .profile, to no avail.   Why is this happening?


I am being asked to find a matrix $B$ where $B^5 = A$  $$A = \begin{bmatrix} 1 & 3 \\ 3 & 1 \end{bmatrix}$$  In the first part of the question I was asked to find the eigenvalues & eigenvectors for the matrix which I found successfully. If someone could help me finish this then that would be great.


Anonymous downvotes ruining Stack Overflow for new users, driving them away from a meaningful contribution

I used to be very excited about Stack Overflow. I even started to make it a habit to routinely check for questions with certain tags to try to provide answers. And I did.  Then this happened:    In this question, I felt I had provided an answer exactly as the OP had requested it, where the other answers had not, and since this wasn't obvious, I took the time to point out the flaw or shortcoming of various answers. The end result was 4 downvotes and 0 explanations, of a perfectly valid answer which really was most faithful to what OP had asked.  Then this happened:    I provided a simple, concise, very efficient algorithm, completely from scratch and not depending on external libraries, that was faster than most other solutions posted (except one that just called an external library). I received 0 upvotes. The other answers, most of which were slow, and inefficient, and lazy, all received a number of upvotes (14, 7, 3, 0). The only difference is that the other answers had been posted by users of higher reputations, making them seem more "legit".  Today, this happened.    Two bad anonymous downvotes on a question on which I had taken every effort to make clear, detailed, concise, and so on. I have politely asked for an explanation, but none of the cowardly downvoters have cared.  Why is anonymous downvoting allowed, without a required, if anonymous, explanation? This can completely shatter the experience of new vulnerable users, possibly turning them away from the site as well as their potential contributions.  I have honestly mostly stopped looking for questions to answer, my reputation has stagnated, and I feel this can be the case for a lot of new users who do have a lot to contribute and are discouraged by the abuse of some of these features. I do not see it necessary to risk alienating them in this way during their vulnerable initial stages with SO.  Anonymous downvoting serves well the SO establishment, the users with already comfortably high reps who do not feel the pain of downvoting others. It also serves well the lazy who do not care to write even a short sentence on why they think the question/answer which they downvoted is bad or how it could be improved (which should be everyone's goal).  It also serves well cowards who downvote out of spite or retaliation.   Why is anonymous downvoting a feature in SO? In particular, the feature request here is to enforce a short, optionally anonymous explanation/comment required from the downvoter (something that doesn't have to take more than 2 seconds to type, maybe "misleading title", or "homework problem"). If you care enough to downvote the effort that someone else has put forth, then you can at least be bothered to give a short explanation of why. Such an explanation could be visible to only the downvoted user and to moderators, who could then use these to control the abuse of the feature.  Note: There is the argument that disclosing the identity of the downvoter could enable retaliative downvotes, but this is not necessary. Requiring a short, anonymous comment by the downvoter would keep his anonymity, as well as help the downvoted understand what he could do to improve. It would also deter unjustifiable (revengeful, spiteful) downvotes.


Word for shaking elbows (Covid-19 pandemic)

The recent epidemic has made people change a few habits. We no longer shake hands and a few of us touch each other  elbows as an alternative practice.   Has this kind of salutation a proper name?


What causes PDF file size to increase when saving in Preview?

It seems that making edits, annotations, or even just opening and saving a PDF file in Preview will cause a significant increase in file size. I've noticed that for some books I've scanned this also happens to improve page rendering time.  Can anyone shed some light as to what is going on to cause these changes? I am interested in synching annotations of PDF ebooks between Preview and the iPad (maybe GoodReader) but this may be too impractical with large PDF files.


If I have a cylinder that is 1 inch tall, how can I slope the top from the front to the back down to, say, a quarter inch evenly? If I select all the edges or all the vertices, they just move down together. Not sure if that makes sense.


What font is typically used for receipts?

Can someone please help me identify the fonts used in these two receipts. I'm looking for downloadable free fonts that I can use to reproduce the same looking results.  The two receipts used different fonts.


After installing Ubuntu 16.04LTS restart leads to Error: Grub Rescue screen

Two days ago I got a Install/Live DVD of Ubuntu. After Installing it the first time and restarting the computer I was hit with a "error: file '/boot/grub/i386-pv/normal.mod' not found." screen and when into grub rescue.  I have tried all the steps i have found online to do and I can't seem to get this thing to boot. I have tried the troubleshooting from this link:  . I have tried going into the Try Ubuntu session on the Live DVD and doing the boot repair but that didn't work either. I'm frustrated and stuck. Can anyone help? Please.


Which CMS written in Ruby or Python do you recommend me to choose for my blog? The requirements:   being able to upload the images without having them cut their size comments (not really necessary as I can use discuss) themes free


When to answer a question and when to comment on a question?

Often, I will go to answer a question, and I will notice that someone commented on the question, which basically the answer. Why not just answer instead of commenting? If the answer to the question is in the comments but provided as an answer, should I still provide an answer just for the sake of clarity?


How do you plot a catenary curve with two known points and a known length?

All the equations I've seen assume I know the sag, height, force, or the weight of the catenary I want to plot, but I don't. All I know is the total length ($L$) of the wire and the position of the two points it's attached to ($x_1$, $y_1$, $x_2$, $y_2$, respectively).    If I give it values so that $L = sqrt((x_2-x_1)^2 + (y_2-y_1)^2)$, I'd expect to get a straight line, since $L$ is equal to the distance between the two points. If $L$ was larger, however, I'd expect it to sag like a catenary normally does. $L$ will never be less than the distance between the two points.  How can I plot a curve knowing only this? Is it even possible?


$\sum_{n=1}^{\infty}\frac{1}{n^22^n}$ by integration or differentiation

There is an infinite sum given: $$\sum_{n=1}^{\infty}\frac{1}{n^22^n}$$ It should be solved using integration, derivation or both. I think using power series can help but I don't know how to finish the calculation. Any help will be appreciated!


can deductive system be strongly sound without being sound

If I've shown that, for a given deductive system, $$\vdash \alpha \Longrightarrow \nvDash \alpha$$ i.e the system isn't sound, can it be strongly sound? or in other words does strong soundness implies soundness?


10+ Years Old Website are Suddenly Showing 404 Cache Error

I am getting 404 errors while checking caching of old websites. I have research on this issue and found that Google may be collecting data for mobile index and i have check server log as well and found Google bot is visiting every day on my site but caching is not available of websites.  There are some references which i found for this issue research: Cache bug of not caching, Ajay have shared the reference:     Tracking of Mobile First Index Activity:       I am still in the middle of this issue and it is not get resolved.


possessive referring to behavior of multiple actors

In "Alice and Bob's contrary behavior served to" vs "Alice's and Bob's contrary behavior served to" Usually the choice between the two forms hinges on whether the two actors possess the subject in common. And usually behavior cannot be jointly owned. So my intuition is that this choice hinges on whether Bob and Alice are treated as a group or as individuals. Is that correct, or are there other considerations? So I might use the first form if Alice and Bob are acting united relative to a third party or the second form if they are behaving contrary to each other or to many other parties separately. This question is distinct from  because behavior is an uncountable noun that cannot usually be co-owned and because this question does not involve pronouns. The linked question does not answer this one.


$x^p-a$ either has a root or is irreducible

My book (A Book of Abstract Algebra, Pinter) is asking me to explain why if $x^p-a$ factors in $F[x]$ then $x^p-a=p(x)f(x)$ where $\text{deg } p,f \le 2$, here $F$ is a field and $p$ is prime.   It seems to me that this question has a typo, since $\text {deg} pf \le \text{deg}p +\text{deg} f\le 4$ so all primes greater than $4$ would not be accounted for in the result. The book makes no further assumptions about the field $F$, and the goal of the exercise is to prove that either $x^p-a$ has a root or it is irreducible. If I assumed that a typo occurred, I would guess that the question would morph into   Explain why if $x^p-a$ factors in $F[x]$ then $x^p-a=p(x)f(x)$ where $\text{deg } p,f \ge 2$, here $F$ is a field and $p$ is prime.   However, this still does not make sense to me because I can think of counterexamples (in both directions of the inequality) where the fact does not hold. Am I misunderstanding the problem or is it ill-stated?


Using HP charger on a Dell Inspiron 15R laptop

My Dell Inspiron 15R 5521 charger was stolen from my University desk.   I have an old (about 4-5 years old) HP charger of my previous HP laptop.   The Dell laptop on the bottom says: 19.5V and 3.34A / 4.62A.   The HP charger says on Output: 18.5V and 3.5A, 65W.   The plug fits fine. After I plugged it in, the laptop works fine, but the battery is not charging. On the battery icon (bottom right) it currently says "Plugged in, not charging".   I have talked with Dell and they said it might pose a risk to the motherboard and that I should buy an original adapter from them.   Can I use it temporarily or is it risky? Any help?   Thanks!!


Value cannot be null.Parameter name: key  I have started to get this error since i ve implemented the StructureMapControllerFactory as my DefaultControllerFactory.  Actually i copied the code from MVC Sample App StoreFront, but i couldn't figure out why this error keeps popping up. Even this error show up the application still runs.  What might be the reason of this error ?  Thanks for your time    System.ArgumentNullException was unhandled by user code   Message="Value cannot be null.\r\nParameter name: key"   Source="mscorlib"   ParamName="key"   StackTrace:        at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)        at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)        at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)        at StructureMap.Util.Cache`2.get_Item(KEY key)        at StructureMap.BuildSession.CreateInstance(Type pluginType)        at StructureMap.Container.GetInstance(Type pluginType)        at StructureMap.ObjectFactory.GetInstance(Type pluginType)        at Yacht.Web.Controllers.StructureMapControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) in D:\Documents\WebSites\JOBS\Yacht\Yacht.Web\Controllers\StructureMapControllerFactory.cs:line 16        at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)        at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)        at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)        at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)        at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)        at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()        at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   InnerException:    and this is the StructureMapControllerFactory class  public class StructureMapControllerFactory : DefaultControllerFactory     {         protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)         {             return ObjectFactory.GetInstance(controllerType) as Controller;         }     }


What is an example of a matrix that does not represent a tensor of rank $2$?

I often read that every tensor of order $2$ can be represented as a matrix (I do understand that). But not every matrix is the representation of some second order tensor. I am not sure, if I understand that correctly. Is it just that any matrix that represents a second order tensor has to be quadratic, i.e. a $n\times n$ matrix?


Is this integral exercise about calculating $\iint_{D}\exp({\frac{y}{x+y}})\,\mathrm{d}x\,\mathrm{d}y$ correct？

$\newcommand{\d}{\mathrm{d}}$My friend give me an integral exercise, which says that:  Give area $D$ which is edged by line $x+y=1$ and $x$ axis and $y$ axis. Now calculate $$\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y.$$  I find that when $(x=0) \land (y=0)$, $\exp(\frac{y}{x+y})$ is not defined, and I don't know if it is integrable. Additionally, I notice that $\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y = \iint_{D}\exp({\frac{x}{x+y}})\,\d x\,\d y$, and assume the result is $S$, we can know that \begin{align} S &= \frac{1}{2}\Bigg(\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y + \iint_{D}\exp({\frac{x}{x+y}})\,\d x \,\d y\Bigg) \\ &= \frac{1}{2}\iint_{D}\exp({\frac{y}{x+y}}) + \exp(\frac{x}{x+y})\,\d x\,\d y, \end{align} I try to use Green Theorem, and I try to calculate $Q=\int \exp(\frac{x}{x+y})\,\d x$ and $P=\int \exp(\frac{y}{x+y})\,\d x$, I try to construct the $\iint_{D} (\frac{\partial Q}{\partial x} -\frac{\partial P}{\partial y} )\,\d x\,\d y$. But I find that I can't calculate $P$ and $Q$. Now, I have two question:  Is this exercise integrable?  How to calculate it? or how to modify my try on calculating?   ps：Thanks @StubburnAtom for your reminders. However, I find the answer of @Quanto in my question is different from all of other answers under those similar questions. So, if anyone find this question of mine, you can try to find all of other questions and find the answers there, and you can also look at the answer under this question, it is also a very good answer.


I was trying to understand egreg's answer to , and I noticed that there were some problems when using lstlisting or tcblisting environments inside the solution environment proposed by egreg, while other environments like figureor proof seem to work fine.  I looked to several related questions (like  and ), and I think (but am not sure) that the conflict comes from the listing package which possibly defines a \BODY command, as does environ.  For example, a minimal non working example is the following :   \documentclass[10pt]{book} \usepackage{environ} \usepackage{listings}  \NewEnviron{solution}{\BODY}  \begin{document}  \begin{solution} This is an environment containing code. \begin{lstlisting} My code \end{lstlisting}  \end{solution}   \end{document}   With this code, I have the following error : Text dropped after begin of listing  Where does this error comes from, and how can I avoid it ?  My goal would be to have a solution environment, defined with \NewEnviron, and which could contain an lstlistingor a tcblisting environment.  Note : I am aware that in the code I have defined, I could use \newenvironment instead of \NewEnviron, but the environment I want (which is exactly the one in egreg's answer to ) really needs the features of \NewEnviron, especially the \BODY macro, since I want to store the content of \solution in order to display it later.


Java: Best way to remove duplicated list in a list

I have a list of list:  List<List<Integer>> myList = new ArrayList<>();   What would be the best way to remove the duplicated list in myList?  For example, in the following list of list:  [[-1,0,1],[-1,-1,2],[-1,0,1]]   I would like to reduce it to:  [[-1,0,1],[-1,-1,2]]   Thanks!


The recent license posts  and  generated some confusion over the interpretation of the voting under the first feedback question, resulting in some potential misunderstandings complained by  and  answers, requiring  and  reviews.  I am not a licensing expert, so, personally, I upvoted the question at first because I thought it was a good change (and a good topic to discuss), but after reading the answers disagreeing with the proposal, I changed my opinion, and wanted to disagree and downvote it, but I couldn't change my vote right after that since I had already voted and the question hadn't changed.  Moreover, I thought it wouldn't matter much, since I still agreed that the question was important regardless of my agreement with the proposal, so the upvote would still represent my intent. Many of others also thought that way, and it kind of created a false-positive voting feedback.  That's reasonable, because our current guideline leaves two open interpretations: vote for well-written, and vote for agreement or disagreement, as we can see in the  (italic emphasis mine):     Voting is different on meta sites      Your Meta Stack Exchange account functions like an account on any   other Stack Exchange Q&A site: your reputation score goes up when   others vote up your questions and answers, and you earn badges for   your activity here.      For most posts, votes reflect the perceived usefulness: well-written,   well-reasoned, and well-researched posts tend to get more attention   and more upvotes.      Unlike normal Stack Exchange sites, meta invites the community to   discuss, debate, and propose changes to the way the community itself   behaves, as well as how the software works. On posts tagged   , voting can indicate agreement or disagreement with   the proposed change rather than just the quality or usefulness of the   post itself.   Another point is that the first post was actually migrated from , which allowed anyone to give a real feedback regardless of reputation, but the migration prevented a lot of users to give a negative feedback properly (or, as you possibly were expecting), as we can notice ,  (deleted), and .  Those are just examples of how the feedback questions have currently a bad mechanism. It should be clearer if the question voting represents or not the voter acceptance and agreement. I guess that the default behavior is that is doesn't, and if it actually does, we are not aware of it! And worst: we can't freely vote in it, since it requires 125 of reputation here (and not in any of the network-wide sites), blocking users to demonstrate their feedback (such issue is well discussed at ).  We know that something simple like the community wiki checkbox that changes some behaviors or something separated like the elections were successful enhancements for their unique needs.  I guess we have solid indicators that it is time for to enhance the voting mechanism intended for getting community feedback. Just to explore some possible solutions:   implementing a new way to vote; tuning Meta's privileges reputation; updating Meta's Tour and other guidelines to be clearer; other.    What do you think?


Take the following 2 cases:  >>> a, b = [[None, None]]*2 >>> print(a, b)  [None, None] [None, None]   >>> a[0] = 1 >>> print(a, b)  [1, None] [1, None]   &  >>> a, b = [[None, None], [None, None]] >>> print(a, b)  [None, None] [None, None]   >>> a[0] = 1 >>> print(a, b)  [1, None] [None, None]    I don't understand why the first case does not exhibit the same behavior as the second case since [[None, None]]*2 == [[None, None],[None, None]] returns True.   I suspect it's because when the list is multiplied, the new components will point to the values from the first components. How sane is this?   How can I make the first case behave just like the second one?


Do moderators see the previous versions of edited comments?

I think it could be a useful feature. From an experienced usage of the site, I have the impression as if they didn't see that, but I am not sure. I know about : it asks for the visibility of the deleted comments. This is about the visibility of the previous versions of the edited comments.


Travel grant for undergraduate researcher for attending conference

I am an undergraduate student doing independent research. My research work is selected for presentation at a very reputed conference in the US. I am from India. I cannot afford to attend the conference at all. How should I fund my trip? The travel grant for students available from the conference is very low. It can hardly buy me a one way ticket. What are my options?


I have shapefile named `band-tailed_pigeon.shp which is fine and no problem on displaying or geoprocessing on Desktop but in ArcPy when I try to merge some layes to it I am getting this error   ExecuteError: ERROR 000354: The name contains invalid characters Failed to execute (Merge).  I tried to do the proccess with a simple name like sample.shp which it works but I HAVE TO keep the same name as we are using them in several projects. Here is the code which I have FinaloutLocation = "E:\\GIS\\Data\\Final\\band-tailed_pigeon.shp" inFeaturesToMerge = [dissolve_1, dissolve_2, dissolve_3, dissolve_4, dissolve_5] arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation)


Reference for homological algebra in abelian categories?

What would be nice references to learn about homological algebra in the context of abelian categories?  I have already some background in category theory however that would be my first contact with abstract homological algebra (although I have already studied some of it in particular categories).  Thanks.


Is the use of magic physically limited in some way in Harry Potter?

In Harry Potter, wizards can use any magic they know at any time, regardless of how many wizards there are, how tired they are, how long they've been casting spells or how much magic is used around them.   We have huge battles like the Battle of Hogwarts in DH, where hundreds of magic users are concentrated in a few square km and use massive amounts of spells. We have battles that last hours and where the combatants are doing lots of running, casting and talking, like the Battle in the Ministry of Magic in OotP. Magical abilities also don't seem to be negatively affected by general health or age. Dumbledore, who is well over 100 years old, is able to duel Voldemort to a standstill. Harry could keep up the Priori Incantatem spell in GoF for a long time, even after doing the 3rd Triwizard Cup challenge, taking a Portkey over a long distance, being tortured by Voldemort and all the other stress accompanied by that.   When I look at other fictional works involving magic, they all seem to have a limit of sorts. In The Dresden Files, magic requires preparation, both in making sure you have enough of it and having certain material parts ready, like protective circles, special reagents or even jewelry to act as a focus for the magic, and using magic tires you out. In many versions of D&D, casters are limited by how many spells they prepared. A huge number of videogames use mana to limit casters. Just about any fantasy series I've consumed involving magic has limits on how much magic can be used by a single person, either by making the user get tired from using too much, by making the amount of magic in a certain location limited, or by coupling it to preparations or emotions.  Has J.K. Rowling or anyone else who worked on Harry Potter related content stated whether there are any physical limits to how much magic a single Wizard can use in a certain timespan?


Identifiability for time invariant state space models

Kevin Murphy's Kalman Filter toolbox (for Matlab) contains an example where it's the fact that the state space system in not identifiable causes problems. I include the example in it's entirety but you won't actually be able to run the code without installing the toolbox first. See the comments between the code blocks where he notes the systems lack of identifiability.  Q1.) Can someone please explain why the system below is not identifiable. Q2.) Can someone please given general rules for determining whether a time invariant state space system is identifiable or not.  % X(t+1) = F X(t) + noise(Q) % Y(t) = H X(t) + noise(R)  ss = 4; % state size os = 2; % observation size F = [1 0 1 0; 0 1 0 1; 0 0 1 0; 0 0 0 1]; H = [1 0 0 0; 0 1 0 0]; Q = 0.1*eye(ss); R = 1*eye(os); initx = [10 10 1 0]'; initV = 10*eye(ss);  seed = 1; rand('state', seed); randn('state', seed); T = 10000; [x,y] = sample_lds(F, H, Q, R, initx, T);  % Initializing the params to sensible values is crucial. % Here, we use the true values for everything except F and H, % which we initialize randomly (bad idea!) % Lack of identifiability means the learned params. are often far from the true ones. % All that EM guarantees is that the likelihood will increase. F1 = randn(ss,ss); H1 = randn(os,ss); Q1 = Q; R1 = R; initx1 = initx; initV1 = initV; max_iter = 100; [F2, H2, Q2, R2, initx2, initV2, LL] =  learn_kalman(y, F1, H1, Q1, R1, initx1, initV1, max_iter,1,1);   Thanks  Baz


Unexpected result converting list to array

The below code outputs "February,February,February,February, February"  However I am trying to output the last 6 months on a rolling basis - can anyone help?  Thanks!        DateTime EndDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);//The AddDays function is self explanatory although you can have negative numbers in here            DateTime StartDate = EndDate.AddMonths(-1); //When do you want the meetings to start DateTime.Today will return midnight           DateTime m = StartDate.AddMonths(-6);            List<months> monthstore = new List<months>();            months monthdata = new months();            while (m < StartDate)           {               monthdata.month = m.ToString("MMMM");               monthstore.Add(monthdata);                m = m.AddMonths(1);           }         var publicationTable = new[] {     new[] { monthstore.Select(x=> x.month).ToArray()  }  };


Can cross references automatically include the environment type?

In my LaTeX document I've defined several environments for various types of entities: theorem, lemma, corollary, definition, notation, and example.    And in the text when I reference one of them I have to add a descriptive word such as the following.  As we see in Lemma~\ref{lemma.100} and Theorem~\ref{theorem.105}, any such set is finite.   The problem is that from time to time, I change my mind about whether a certain entity should be a lemma or a theorem or a corollary etc.  I can easily change the definition site from \begin{lemma}...\end{lemma} to \begin{theorem}...\end{theorem}, but then I need to change all the use-sites as well.  Is there a better way?   Can I somehow define my lemma, theorem etc environments so that I can use a reference such as \envref{ent.100} and that will expand to Lemma~\ref{ent.100} if ent.100 is a lemma, but expand to Theorem~\ref{ent.100} if ent.100 is a theorem?  The same problem exists for tables and figures, but somewhat less often.  I'm not sure if it is important, but here is how I'm defining my environments currently.  \documentclass[a4paper]{article} \usepackage{xcolor} \usepackage{amsthm} \usepackage{framed} \theoremstyle{plain}% default \newtheorem{prototheorem}{Theorem}[section] \colorlet{shadecolor}{orange!15}  \newenvironment{theorem}    {\begin{shaded}\begin{prototheorem}}    {\end{prototheorem}\end{shaded}}  \newtheorem{protolemma}[prototheorem]{Lemma} \newenvironment{lemma}    {\begin{shaded}\begin{protolemma}}    {\end{protolemma}\end{shaded}}  \newtheorem{protocorollary}[prototheorem]{Corollary} \newenvironment{corollary}    {\begin{shaded}\begin{protocorollary}}    {\end{protocorollary}\end{shaded}}  \theoremstyle{definition} \newtheorem{protonotation}{Notation}[section] \newenvironment{notation}    {\begin{shaded}\begin{protonotation}}    {\end{protonotation}\end{shaded}}  \newtheorem{protoexample}{Example}[section] \newenvironment{example}    {\begin{shaded}\begin{protoexample}}    {\end{protoexample}\end{shaded}}  \newtheorem{protodefinition}{Definition}[section] \newenvironment{definition}    {\begin{shaded}\begin{protodefinition}}    {\end{protodefinition}\end{shaded}}  \begin{document}    \section{Introduction}   \begin{lemma}   \label{ent.201}   If $V$ is a set of subsets of $U$, and $\exists X_0 \in V$ such that   $X \in V$ implies $X_0 \subseteq X$, then $X_0 = \bigcap V$. \end{lemma}  Intuitively, Lemma~\ref{ent.201} says that given a set of subsets, if one of those subsets happens to be a subset of all the given subsets, then it is in fact the intersection of all the subsets.  \begin{theorem}   \label{ent.188}  %% used   If $V \subseteq U$, and if $F$ is a set of binary functions defined on   $U$, then there exists a unique $clos_F(V)$, and it is closed under $F$. \end{theorem}  We can see from Lemma~\ref{ent.201} and also from Theorem~\ref{ent.188} such sets are always finite. 2 \end{document}


My desktop disappeared, how do I get it back?

I have Ubuntu 12.04 LTS. This morning when I logged into my Ubuntu, after login screen the complete desktop was empty, the only operation I could perform is right-click and open terminal.  What I've tried:   Ctrl+Alt+F1 unity --reset : didn't work From terminal unity --reset : didn't work And from login screen selecting Ubuntu 2D and that also didn't solve the problem.   My laptop is Toshiba SA-60 onboard ATI graphic card with 1 GB RAM.  Please tell me how to solve this problem. I don't want to reinstall Ubuntu as whenever I install a I/O error pops up, forget about that. I don't want to reinstall Ubuntu. Please help.


MYSQL - Find a record depending on row number

Is it possible to get a table record depending on the row number?  For example, I have a table with 40 records and I need to get the 27th record.  I need some query like SELECT * FROM my_table WHERE **ROWNUM** = 27.


Telegraphing Encounter and Obstacle Characteristics for Preparation Casters

(Note: I feel that this question is sufficiently different from  to justify a new post, as my question is about specific information informing Wizard spell preparation)  (Additional note: These same issues may be similarly relevant for other preparation casters. I chose to focus on Wizards because of my personal experiences as a player, my current needs as a DM, and the flexibility in access to spells that is unique to Wizards.  Please feel free to address this question for any preparation caster; Wizards simply have more opportunity to make "bad" choices in preparing spells due to their large spell list and greater number of spells known, while also having one of their key features be their versatility in what spells they can bring to a challenge)    One of the major class-balancing elements of the Wizard class is that they are only able to prepare a certain number of spells at a time. Among all magic using classes, wizards have access to the largest number of spells that they can learn, which makes them extremely versatile, but that versatility is tempered because they can only prepare a subset of those spells at any given time.  This can be very exciting-- it adds a degree of planning, creativity, coordination, and tension to playing a wizard. It is also valuable in that it helps prevent the wizard from overshadowing other spellcasters with less expansive spell lists.  However, it can also be frustrating, particularly at lower levels when fewer spells can be prepared at once. It's difficult to choose which spells to prepare if you don't have any idea what challenges you'll be facing, and even if you do have some information about that there may not be enough time to change which spells are prepared beforehand. It can be annoying to be completely mis-prepared for challenges.  Sometimes that's appropriate: surprises do happen, narrow windows of opportunity may appear, and being maximally appropriately prepared for every encounter is not a realistic goal. Often there will be a middle ground, such as knowing you'll be exploring an area rumored to be filled with undead enemies and so it might be a good idea to have spells that are useful against the undead.  But it's not much fun to only rarely be able to use spells that you've learned specifically to deal with situations in which you find yourself because you didn't (whether or not you couldn't) know anything about what you're walking into. Using magic to solve problems is largely what the Wizard class is about.  This has frustrated me as a player, and I'm having trouble balancing those concerns in a game I'm running now. If my approach to the issue is fundamentally that:   Surprising encounters can happen, particularly if my players drive those events Events which are known in advance may not offer enough time to swap out prepared spells before dealing with them Gathering advance knowledge about upcoming challenges won't always be equally possible or reliable Obtained knowledge about future challenges shouldn't be a how-to guide on min-maxing those challenges I don't want to do away with the preparation mechanic I don't want to elide the issue by providing abundant spell scrolls or similar items   My experiences playing a wizard have been plagued by this issue, often leading me to wish I'd just chosen a different class. I'd like to spare my players that irritation if I can.  How can I telegraph enough information to a player with a preparation caster character (especially at lower levels) that they can avoid being totally mis-prepared, and how often should I do so?


If we have integers $h$, $i$, $j$, and $k$, would it be true to say that $\gcd(h,i)\gcd(j,k)|\gcd(hi,jk)$? If so, how can we prove it?


Is is possible to study mathematics PHD with another bachelor degree like Business Administration?

Is it possible to enrol in a mathematics PhD program with a bachelor degree in Business Administration? Have you heard of someone doing something similar and if yes, how did they do it?   I am a BBA student. I found that I love mathematics after taking some analysis courses and want to keep on studying mathematics and doing research. However, since I didn't really enjoy studying BBA, I have a poor a GPA and I suspect I won't be able to enrol in a competitive mathematics PhD program.   I currently have some background in analysis, including metric space topology, some basic differential manifold, functional analysis, real analysis and of course some other basic math courses.   What is the best way to continue my academic career in mathematics coming from an unrelated field?


Installing AMD Catalyst 13.1 Proprietary Driver on Ubuntu 14.04

How can I install AMD Catalyst driver? (first time using ubuntu)  I was told to install fglrx but it froze when booting to desktop, so I fixed that issue and uninstalled fglrx. I followed , some commands were outdated/obsolete in addition to the posts being old and for versions before 13.10, I am on ubuntu 14.04. I was given this  and when I get to this partsudo apt-get install fglrx-legacy it cannot be found. I followed all the steps correctly previous to this part. I tried looking at other questions but they just take me back to these two links, there is the  on sourceforge does anyone have experience with it does it work? I'd rather do it myself, but I might try this.   My question is are there any up to date posts that I can follow to install this driver? Or could someone show me how to do it here step by step? Below is my graphics card info  01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV710 [Radeon HD 4350/4550]


Simple combination/probability question based on string-length and possible-characters

Assuming "complete randomness" and given a string with a length of 20 characters where each character may be one of 62 possible characters:    What are the total number of combinations possible? (Guessing 20 to the power of 62.)  Also, if new strings are randomly selected one after another and added to a list of strings selected so far, how many strings must be selected before the chance of selecting a string that has already been selected is below 1-in-100000 ($10^{-5}$)?   Note: 62 comes from: numeric digits (0-9), uppercase letters (A-Z), and lowercase letters (a-z).


How do I install WorldEdit for Minecraft 1.6.2?

WorldEdit 1.6.2 asks for the bin folder, but I can't find it. I tried putting WorldEdit in the versions folder but it didn't work. Can anyone help?


Cannot participate in meta sites unless previously having participated in regular sites on iOS

On the mobile app for iOS, you are unable to participate in the meta sites unless you have previously participated in the regular sites.  It gives the following error:  Error Could not perform this request with your account.  Please try logging back in.  If this persists, let us know on meta.   This happens when attempting to vote an existing question.  I am logged in.  (I have not attempting asking a question for fear of the repercussions of then deleting it.  I have not tested it on the Android app either.)  This is not an issue on the website.  This is not so much a question as a bug report, so I am not sure what kind of answer I am expecting here.


If you roll a fair six sided die twice, what's the probability that you get the same number both times?

So I know that rolling a fair six-sided die twice would mean the total possible outcomes would be 36, and rolling the same number twice would be 2/36 or 1/18, but I feel like that's wrong. What am I doing that isn't right?


How to simplify this equation: $1\cdot N + 2(N-1) + 3(N -2) + \cdots + i(N - i + 1) + \dots + N \cdot1$?

$$1 (N) + 2(N-1) + 3(N -2) + \cdots + i(N - i + 1) + \cdots + N (1)  $$  I need to write it in simplest form?  here 1(N) means 1 multiply by N


Prove:      If $f$ is a real-valued differentiable function such that $\lim_{x\to \infty}f'(x) = 0$ then $\lim_{x\to \infty}(f(x+1)-f(x))=0$.   Proof: We know $\lim_{x\to \infty}f'(x) = 0$.   (1)  By the mean value theorem there exists $c\in [x, x+1]$ such that $f'(c) = \dfrac{f(x+1)-f(x)}{1}$  $\iff \lim_{x\to \infty} f'(c) = \lim_{x\to \infty} f(x+1)-f(x) = 0$ by (1).  End of Proof.


I have a strange problem. Today I moved a site from staging to production and the site work fine but I cannot se the images.   I can see in ftp the picture but drupal do not serve it in the page. I already tryed to clear cache.  In the reports log I there is a lot of   Unable to generate the derived image located at public://styles/ensemble-small/public/anne ristorcelli s.png.   errors but I do not understand what I can do.  The GD tookit works fine.. I checked it.  I tryed to re-upload some images but do not work and I can't see they in the editing page too.  Can someone help me to solve this?  UPDATE:  I tryed to delete the images generaten in the staging server to verify the correct working of the images modules. The images was ok. So the problem is in server request?  If I try to see the image directly I have this error:        Internal Server Error  The server encountered an internal error or misconfiguration and was unable to complete your request.  Please contact the server administrator, postmaster@ensemble05.it and inform them of the time the error occurred, and anything you might have done that may have caused the error.  More information about this error may be available in the server error log.


If light cant escape from a gravity well, how can gravity escape? we see that gravity of one object attracts another, obviously attracts itself. Is there a point that there is so much gravity that it attracts itself so hard that it turns back on itself. Is it a time energy of zero, i.e. instaneous effect on all objects? or does it affect an object at $c$, time energy of 1. Then how can our galaxy stay together, as all the gravity we are currently wading through was 'emitted' tens of thousands of gravity years ago from a different relative position?


Dividing large number by 10 in python gives the wrong result

Say I want to remove the last digit of a number n. For that I use the code int(n/10). Sadly this gives the wrong result for large numbers. For example n = 4474630975855204960 divided by 10 gives 447463097585520512. What's the reason for this behavior? How can I fix it?


What are the possible ways of installing programs in Linux?

I do not focus specifically on how to install but the taxonomy of installations, so I am not aiming at some practical usage but the theory behind.  The first time I installed a programm on Linux,  I used a graphic interface put in a keyword and clicked onto the program to install similar to android,  than I learned to open the Terminal and type "sudo apt-get install xyz" and it worked as long as the program was in one of the official sources,  than I stumpled upon programs that are not within the official sources, but are included in a so called PPA, a non-standard kind of source, in order to use it I had to add it by typing "add-apt-repository ppa:somename/somename", after this I had to update the sources and could install it same way I used with the standard sources before, the last way of installing a program I met was called "binaries", it is said to do all the work manually like something called dependencies and such stuff which I did not master.  I would like to know if those are all possible Ways of installing in theory or if there are still others out there ?


Java Different between String s1 = "abc" and String s1 = new String("abc")?

I am reading some notes about how to compare equality between String in Java.   String s1 = new String("abc"); String s2 = new String("abc");   These two are allocated in different memory, so their reference are different.  When we call   if (s1 == s2){ .. } // Comparing the reference, so return false if(s1.equal(s2)){..} // Comparing content, so return true   So, what is  String s3 = "abc" String s4 = "abc"?  How is the memory allocated and when I do different equality check, what will happen?   For example :  s3==s4 s3.equal(s4) s3.equal(s1)


Run script when user logged out; Ubuntu 16.04

In Ubuntu 12.04 I used LightDM config parameter session-cleanup-script to run a script when a user logs out.  In Ubuntu 16.04 this script is also fired when a user types the wrong username or password. So the user wasn't even logged in.  How can I run a script in Ubuntu 16.04 only if a user logs out?  EDIT:  OK, I thought this is an easy one. But it seems to be more complex. I use this on public terminal PCs. At first LightDM is not loaded. The user has to choose between Windows (via VMware View), Ubuntu and a Kiosk browser. He clicks a specific button to login to Ubuntu. Now LightDM (and some other stuff) gets started. When the user logs out LightDM gets stopped from the script in session-cleanup-script.  I think the Upstart/systemd method wont work as I need some environment variables like $USER and $HOME, right?.  The DBus signal seems to fire when the user wants to logout. I need a event when the user already is logged out to clean some things.


This is a sentence in a book by Rudy Giuliani.     I could ensure my deputies and commissioners were working off the same   page and could carry a coherent message back to their staffs.   Isn't staff a mass noun with no plural when referring to people?


Turn off automatic preview in apple mail

Is it possible to turn off automatic preview of attachments when composing an e-mail?  NOTE: Yes I know that I can manually ctr+select the attachment and disable preview, but I want this done automatically


Site recommendation to ask Programmer SE related questions given a ban?

I want to ask a question related to HR and SE, however unfortunately my account has been locked from asking questions on Programmers. I feel an HR (hiring) type of question is inappropriate for SO.  Do I have better chances of creating a new account?  The question is:    If I am a first year University student who made small profitable projects in the past. Can I ask a small firm to say "I made it for them" so on my resume when I apply for an internship that company can see despite my young age I have job experience that they can use. Will HR find a loophole in this?


Homomorphic Encryption Notation Question

What does the following notation mean in a homomorphic encryption scheme?   ENC(x;r)   What does x and r refer to?


How to delete every two lines after 3rd lines in a file contains very large number of lines?

Like If I have :     1st line (keep)   2nd line (keep)   3rd line (keep)   4rth lines (delete)   5th (del)   6th (keep)   7nth (keep)   8th lines  (keep)   9th (del)   10th (del)   11th (keep)   12th (keep)   13th (keep)   14th (del)   15th (del)     etc....


A variable is being treated differently when used otherwise within a same method

I'm trying to print numbers within a method in a class. There is a function get_numbers() responsible to generate numbers should always be outside of the class.  If I try like this, the get_result method keep on printing numbers:  import time import random  def get_numbers():     numbers = [i for i in range(10)]     return numbers  numbers = get_numbers() random.shuffle(numbers)  class NumChecker:      def get_result(self):         print(numbers.pop())         time.sleep(2)  parse = NumChecker() while True:     parse.get_result()   However, when I try like the following, the script throws this error UnboundLocalError: local variable 'numbers' referenced before assignment pointing at if len(numbers)<=5 whereas I didn't get any error when I used this print(numbers.pop()) above:      def get_result(self):         if len(numbers)<=5:             print("updating numbers")             numbers = get_numbers()             random.shuffle(numbers)         else:             print(numbers.pop())             time.sleep(2)   Is it necessary to use global numbers within get_result() to avoid such error?


I have a ListView that fills from existing database, when user clicked on each item, one of the other columns, should be displayed on second Activity (Like dictionary App)   But I can't execute any queries on second activity.  I'm using SqliteAssetHelper library.  Database class:  public class MyDatabase extends SQLiteAssetHelper {  private static final String DATABASE_NAME    = "database.db"; private static final int    DATABASE_VERSION = 1;   public MyDatabase(Context context) {     super(context, DATABASE_NAME, null, DATABASE_VERSION); }  }   On the first activity, listView filled from the database:   private void fillFromDb() {     G.itemLists.clear();     Cursor cursor = mydb.rawQuery("select * from test order by title limit 0,50 ", null);     while (cursor.moveToNext()) {         StructNote test1 = new StructNote();         test1.title = cursor.getString(cursor.getColumnIndex("title"));         G.itemLists.add(test1);     }     cursor.close();     mydb.close();     adapter.notifyDataSetChanged();     }   but the problem is in the second activity; I can't execute any queries!  public class ActivityResult extends Activity {  private MyDatabase    MyDataBase; public SQLiteDatabase mydb;   @Override protected void onResume() {     G.currentActivity = this;     super.onResume(); }   @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.result);      Cursor cursor = mydb.rawQuery("SELECT * FROM test ", null);     while (cursor.moveToNext()) {         try {             Log.i("LOG", cursor.getString(cursor.getColumnIndex("title")));         }         catch (Exception e) {}     }     cursor.close();     mydb.close();  }   }   logcat: NullPointerException  Many thanks...  My question was not duplicate! Other answers that I found about NullPointerException were not fully addressing my question :)   Because my problem and solution was only in use of SqliteAssetHelper library, that I couldn't find anything about it ;)


Marketing Cloud IP Warming - is it critical that we send up to the weekly limits by domain?

For IP warming, is it critical that we send up to the weekly limits by domain?  For example, see screenshot below.  Notice each day as the max limit.  What if the customer only has a grand total 40,000 Yahoo email subscribers?


I am looking for a guide on connecting WiiMote with Unity 5 as an Input device. I found this library  but I do not understand how to install it and what the prerequisites are for it to work.


I need to write a condition so if the argument is 1 ( which is 2 ^ 0 = 1 ) it will jump over it.  For example:  powsnsums 1 2 8    2  powsnsums 1 16   1   #!/bin/bash  # loop over all numbers on the command line # note: we don't verify that these are in fact numbers for number do     w=0         # Hamming weight (count of bits that are 1)     n=$number   # work on $n to save $number for later      # test the last bit of the number, and right-shift once     # repeat until number is zero     while (( n > 0 )); do         if (( (n & 1) == 1 )); then             # last bit was 1, count it             w=$(( w + 1 ))         fi          if (( w > 1 )); then             # early bail-out: not a power of 2             break         fi          # right-shift number         n=$(( n >> 1 ))     done      if (( w == 1 )); then         # this was a power of 2         printf '%d\n' "$number"     fi done


Is there a rule to know when to pronounce letter c as a "soft c" (s) or "hard c" (k)?

Is there a rule that would help me to learn when to pronounce the letter c as an "s" sound or a "k" sound?  For example:  - cat (kat)  - center (sinter)  Are there any rules, or is it all memorization?


How do you "idiomatically" describe the instance of a person using their feet to traverse a road?  Is there any "wrong" way to do so?


The simplest way of printing a portion of a char[] in C

Let's say I have a char* str = "0123456789" and I want to cut the first and the last three letters and print just the middle, what is the simplest, and safest, way of doing it?  Now the trick: The portion to cut and the portion to print are of variable size, so I could have a very long char*, or a very small one.


Is the convolution operation some kind of group operation?

I'm just curious but will the convolution operation be any sort of group operation? A motivating example would be to see that the natural exponential family of distribution functions are closed under convolution (although I'm not sure about the inverse). I know the irreducible unitary representation is a possible link of convolution to groups, but its just a hunch.  If not, could it relate to any weaker structure? like a monoid, semigroup?


I have completed my PhD in chemistry in an area which doesn’t have scope to get job or a postdoc position.   Now I’m at the age of 29–30, I’m not eligible to write CSIR, a public eligibility test for lectureship and PhD admissions in India, but I’m eligible to write GATE-2016, (Graduate Aptitude Test for Engineering) another public test whose score (valid for 2 years) is also considered for PhD admissions in India and some other countries like Singapore. Shall do another PhD with a valued GATE score again, in my selected field of chemistry? The only stipend available for me is from GATE score.


Made external HDD bootable installation device by accident. How do I recover files?

So I messed up big time and ran:  sudo dd if=~/Downloads/linuxmint-19-cinnamon-64bit-beta.iso of=/dev/sdb bs=1M   while having my HDD still in and it made the HDD the bootable device instead of another USB I had plugged in.  Any simple tricks to reverse this or fix it? It isn't appearing as a HDD anymore.


I have three small recessed lights, set into a false ceiling where a mini-central air conditioning unit is set. The lights do not turn on.  The lights are small E14 base mini-spots   I replaced the bulbs, I definitely have 3 fresh bulbs I checked the fuse (of course), and in any case it shares a circuit with other lights which are working fine. I used a multimeter to check the AC voltage across the light switch itself, it shows a normal 230V when open and 0V when closed I checked the voltage across the contacts for each of the 3 fixtures. They show 230V (as expected) when the switch is on.   And yet, when I put bulbs in, they do not turn on. I could see how one fixture might become damaged, or the contacts bent, or a wire frayed, but all 3 is unlikely.  One strange reading. With the switch off, I thought I saw a ~50V reading across the terminals of each fixture, whereas it should be 0V. I thought I must have the meter wrong.  Working with 230V/50Hz AC European-style.  Any suggestions what I can do next?


Recurrent output of printf() to stdout each time fork() is invoked allthough printf() is invoked prior to fork(). And why does '\n' fixes this?

While I was playing around with fork() I noticed a rather strange behavior but I couldn't figure out myself why this happens.   In the example below, each time fork() is invoked the output from the printf() invocation prior to that is printed out to stdout. The value of test in the output shows that printf() does not really get executed again, otherwise this would increase test each time.  Even stranger - or maybe key to the solution - is the fact that this behavior doesn't occur when I add \n to the end of the format string of printf().   Does anybody know why this happens? Maybe it is related to the stdout buffer? I'm not really familiar with this stuff.  Or am I doing something horribly wrong??  #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h>  int main(char* args) {     pid_t pid;     int wstatus;     int test = 0;      printf("\n[%d] parent start | test = %d ", getpid(), test++);      // This works fine     //printf("\n[%d] parent start | test = %d \n", getpid(), test++);      for(int i = 0; i < 5; i++) {         if((pid = fork()) == 0) {             //printf("\n[%d] Child spawned ", getpid());             exit(0);         }         //printf("\n[%d] Printing with fork() commented out works fine", getpid());     }      while(wait(&wstatus) > 0);      printf("\n[%d] parent end\n\n", getpid());     return 0; }   Output:  [342470] parent start | test = 0 [342470] parent start | test = 0 [342470] parent start | test = 0 [342470] parent start | test = 0 [342470] parent start | test = 0 [342470] parent start | test = 0  [342470] parent end   In case it's of any use  $ uname -a Linux Aspire 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


Find max and print key, value pair of a dictionary

{'19': 3, '18': 7}   If I have a list like above, how do I find the max value and then print the key, value pair like:  (['18'], 7)


What is the utility of piping to `/dev/null`?

Seeing that /dev/null's utility isn't immediately obvious to me, what is the use of /dev/null piping?


Snapping points to crossroads using ArcGIS Desktop?

I have some points (370 points) in a layer . These points must snap to crossroad layer . I could'nt find any tools in arcmap to snap points to crossroad layer.   Is there any way to snap these points to the crossroads ?   I'm using ArcGIS Desktop 10.2.


I want to dual boot windows 8 and linux so, i need to create a separate partition for linux. All i wanted on the new partition is 15gbs. My computer wont let me "shrink volume" to create the partition. I didn't even get a suggested amount to shrink the volume. I can put in my suggested amount but the "Shrink" button is greyed out. According to what i read on a few post it's because i already have 4 partitions? My question is can i delete any of the existing partitions without screwing up windows 8 boot system.   The site won't let be post any images since i'm new.  Anyways, the four partitions showing up in the disk management log are:   Healthy (Recovery Partition)    400mb capacity, 400mb free space. Healthy (EFI System Partition)  100mb capacity, 100mb free space. Healthy (Recovery Partition)    11.72gb capacity, 11.72gb free space.  ACER C/ (Healthy (Boot,Page File,Crash dump etc) 106.91gb capacity, 41.22gb free space.   Any suggestion is appreciated.. Thanks


How do I detect and remove Python packages installed via pip?

I have accidently installed Python packages to my system using pip instead of apt-get. I did this in two ways:   using an older version of virtualenv, I forgot to append --no-site-packages when creating the virtualenv - after that when I called pip install, the Python packages where installed to the system rather than the virtualenv in a correctly setup virtualenv, I typed sudo pip install somepackage - the sudo installed to the system rather than the virtualenv   I happened to notice this because I typed pip freeze outside a virtualenv, and spotted some Python packages listed that shouldn't be there. So now my question is:   how do I identify all Python packages that have been erroneously installed on the system (that is, Python packages that appear in the pip freeze list, but were not installed with apt-get)? how do I remove them?


What is the physical principle behind the following behavior: When left with the remainder of a bag of chips, or cookie crumbs, etc., when shaking this container, the smaller particles will settle to the bottom and the larger particles will rise to the top


"One of the tools I use is/are magnet/magnets"

I'm trying to wrap my head around whether any of the following are correct (apart from #3):  1) One of the tools I use is magnets.  2) One of the tools I use are magnets.  3) One of the tools I use is the magnet.  For #1, I'm not sure if it's correct or not. The assumption I'm making here is that "magnets" could be a collective, but I could be wrong.  For #2, since "one" is the subject, I'm fairly certain it's wrong.  For #3, I'm sure it's correct, but it doesn't have the same effect of plurality that I want to convey.  Any ideas or advice? Would greatly appreciate it.


Does Champernowne's constant converge to the digits of $\pi$?  Clearly if you go far enough into Champernowne's constant you will find a string of the first $n$ digits of $\pi$ for any finite $n$.  For every finite set of $n$ digits of $\pi$ contained within the constant, $n+1$ digits are subsequently represented $a(n+1)$ digits later, for some $a\leq b$ where $b$ is the base.  By induction there is no string of digits which is not, ultimately, represented.  If it contains the digits of $\pi$, it cannot contain anything after them since they never end, so if it contains them, it must contain them at its end.  Could it converge to the digits of $\pi$?  However it would seem we can never reach them if it did, since they would occur at a length greater than the length of the digits of $\pi$.  Does this mean they are not represented?


I want to print 6.5 to 6.05. And 6.12 to 6.12.  How it could be achieved using java utilities?  I tried DecimalFormat as below:  DecimalFormat df = new DecimalFormat("##.0#"); System.out.println("sam --------- " + df.format(6.5));   But not working. Any help on this?


Which is correct: "we agree to notify you if any of our intentions has changed" or "we agree to notify you if any of our intentions have changed"?


I have an issue related to what server to approximate for the following scenario (a real situation):  I have a server where will be stored some videos that can be accessed through a web application running on this server. There will be about 100 (concurrent) users that will use it (generally through tablet or phones, but PC's will be also included).  Can you give me some thoughts on building the hardware configuration for this server? The OS running on it will be Linux.  Thanks in advance.    EDIT I:  The web server that I use is Apache HTTP, but it's very likely it will act as proxy for a Java server (installed on this machine of course).  Other applications that will run on this server will be:    an application for authentication  an application for administration.   This server will run also continually (24/7).


How to create and render clouds in blender cycles

I am creating an outdoor scene and need to create 3d clouds. What is the best way to go about this in blender cycles. I know you can't use the cloud generator addon since cycles doesn't have support for volumetric shading. Any help is apreciated.


How do I generate a 3D race track from a spline?

I want to generate a 3-dimensional race track around a spline that describes its shape.  .  The track should be an endless tunnel that sweeps along a 3D spline, with some obstacles thrown in.  My best idea so far has been to loft a circle shape along the spline.  I would also like some pointers into how to manage the geometry i.e. how to create it from the loft operation, manage its 'lifecycle' in memory, collision and texturing.


Monte Carlo simulation for grouped averages

Assume we have $N$ random variables $X_1, \ldots, X_N$. As an example, assume that these random variables describe test scores of $N$ students. I am interested in finding the distribution of average test scores within the best 20% of students, the second 20% of students, etc. via Monte Carlo simulation. The average score within 20% groups will be surrounded by some uncertainty for two reasons: First, the test scores themselves are uncertain as they are random variables. Hence, repeated sampling of test scores for each student and averaging over students will give a distribution of average test scores. Second, it is uncertain which students belong to the respective 20% groups as the distributions of individual test scores may overlap. For simplicity, I focus on the average test score distribution within the top 20% of students in what follows. A first naive approach may be the following: Simulate $M$ realizations of  $X_1, \ldots, X_N$, sort them and average the top 20% of the realized samples, resulting in $M$ samples of the top 20% average. However, this is not what I want for the following reason. Assume all $X_i$ are distributed as $N(0,1)$, i.e., there is no systematic variation in test scores. The naive approach will result in a distribution of the top 20% average that is centered around $1.4$. This is not the desired result as all students - including the top 20% of students - have a $N(0,1)$ test score distribution. Hence, the distribution of the average within the top 20% (and all other 20% groups) is expected to be centered around zero. I have been thinking about a two-step solution, but I doubt it's fully correct. In a first step, it is easy to compute a Monte Carlo approximation of the probability that a student belongs to the top 20% as follows. Simulate $M$ realizations of $X_1, \ldots, X_N$, sort each of them and construct a vector of binary variables $S_i$ taking the value of $1$ when a realized test score is above the 80% quantile of the distribution of the realizations. The average over these $M$ binary variables is an estimate of the probability that a student is in the top 20% group. Denote this estimate as $\pi_i$. I am uncertain how to proceed from here. One idea is to do $L$ additional simulation iterations where I iterate between the following three steps: 1) Sample a realization of $X_1, \ldots, X_N$, 2) Sample a realization of the binary variable $S_i \sim Ber(\pi_i)$ indicating top 20% membership. 3) Average the realizations of $X_1, \ldots, X_N$ for all students where the realization of $S_i = 1$. While this approach seems to give more useful results, I am wondering whether there is a more correct approach as I think that the sampling step of $S_i$ assumes independence of all $S_i$ which may not hold true.


Suppose all the Associated Primes are Minimal.

Let $R$ be a commutative Noetherian ring with unit and let $I$ be a fixed ideal. I am sorry if the following turns out to be a very silly question.  1) Suppose $\operatorname{Ass}(R/I)$ are all minimal, then what can we say about $R/I$?  One conclusion is that $I$ has a unique primary decomposition. If $R/I$ is CM, then $\operatorname{Ass}(R/I)$ are all minimal, but I don't think the converse is true. Can someone provide a counterexample?  2) Suppose $\operatorname{Ass}(R/I)$ are all minimal and have the same height. I still dont think we can conclude that $R/I$ is CM. Can someone provide a counterexample? Theorem 2.1.6 of Bruns and Herzog, CM Rings, gives a result in this direction but it needs additional hypothesis. It says that if every ideal $I$ is generated by height $I$ elements and $\operatorname{Ass}(R/I)$ are all minimal, then $R$ is CM.  It would be nice if someone can say something nice about the ring in the special situation described in 1) and 2).  Thanks.


what program should i use with a gzip archive

I am trying to download grub-1.99.tar.gz ,I do not know what program to use to open  a   Gzip file. please recommend


How do i put my password in to terminal?

How do i figure out/input my password into terminal? I just started using Ubuntu, and I want to get Netflix on it. When I put in the command line for that, it asks for my password,but I am unable to enter it. What can I do to enter it?


Create Account and Contact at the same time with Bulk API

I'd like to create an account and then a contact in the same call using bulk api. I've used composite api calls to create an account and contact in the same API request.  I would now like to do the same using the bulk api (as i'm trying to import millions of entries). I know i can create all the accounts first, retrieve the account ids, and then create the contacts with the account ids mapped to the correct contact (which would be two calls).  Is there a way to composite the account and contact creation in the single call with bulk api?  Cheers, Ankur


I am new to sculpting and I am trying to figure out how to make two meshes seem to be made as one. I have heard of the Boolean modifier, but I just get what I had before with extra dots all over one object. What am I doing wrong? Thank you. This is what I have. I found a good example for what I am going for in the Blender 2.83 Sculpting Time lapse- Gotic Witch by Guilia Marchetti. There is a before and after image. The technique used here was the grab tool in sculpt mode. I can't seem to get that to work.


How can I get the text from a large number of deleted posts?

I'm looking into running a machine-learning project on EL&U to detect low-quality posts. To do that, I need a large dataset - and to get that, I need to get the text from a large number of deleted questions.   I can't use the API; deleted posts aren't included in it. I can't use SEDE: the PostsWithDeleted table lists NULL for the Body field of deleted posts. I can't script it: not only do I have insufficient reputation on EL&U, but I also managed to get myself rate-limit-blocked while testing a script on Hardware Recs.   So, how else can I get this data?


Is there a way to switch off nether portals?

No matter how many fences I put up my villagers always fall into the portal and into the nether. Is there a possibility that there is a way to turn the portal on or off? I know you basically start a fire and the portal opens. Can I snuff out the fire without destroying one of the portal blocks?


Show that $n_0 = 32$ is the smallest value of $n$ for which the equation $5x+9y=n$ has a solution in $(\mathbb N \cup \{0\})^2$ for all $n \geq n_0$. Wouldn't $(x,y)=(1,1)$ be a valid solution for $n=14$? The example that appears before this question consider $(x,y)=(1,1)$ as a solution for $3x+5y=n$ in $(\mathbb N \cup \{0\})^2$ for $n \geq 8$.


What makes you lose the Field Upgrade Score?

When playing in a squad, you can get "Field Upgrades". However, sometimes when I die, it tells me that I have lost the "Field Upgrade Score".   Where can I see this score and what are the events that make me lose it?


I'm trying to add some images to those labels,but Eclipse throw me java.lang.NullPointerException and I don't know why?! Please help :}  public class LabelPanel extends JPanel {                        public JLabel[] bills;                                public LabelPanel() {                              setLayout(new FlowLayout());                                                                               init();                           labelOrder();                   }                                  private void init() {                            bills = new JLabel[4];                                for (int i = 0; i < bills.length; i++){                                                                       bills[0].setIcon(newImageIcon("C:\\users\\Acer\\Documents\\images\\1.jpg"));                                                 bills[1].setIcon(new ImageIcon("C:\\Users\\Acer\\Documents\\images\\2.jpg"));                                        bills[2].setIcon(new ImageIcon("C:\\Users\\Acer\\Documents\\images\\5.jpg"));                                        bills[3].setIcon(new ImageIcon("C:\\Users\\Acer\\Documents\\images\\10.jpg"));                                       bills[4].setIcon(new ImageIcon("C:\\Users\\Acer\\Documents\\images\\20.jpg"));                               }                                    }            private void labelOrder() {                                           add(bills[0]);                           add(bills[1]);                           add(bills[2]);                           add(bills[3]);                           add(bills[4]);                       }     }


When I tried to search with site:spgeeks.devoworx.com I got only the below 4 results!    I am facing this issue 2 months ago and I can't trace my issue and there's no error in the search console! (only excluded URLs (not post URL)) Could you please help me to know why my site is not indexed in google?     P.S: I am not facing the same issue in bing and yahoo only in google!


I just moved from where there wasn't much of a biking system infrastructure.  There were lots of trails though, so I bought an OK mountain bike ($350).  Now, I've moved to downtown Seattle and everyone bikes.  I'd love to get into it but not sure if a mountain bike is efficient for road-use.  Should I look into a conversion kit?  Should I just get a road bike and have one off-road and one on-road?


Prove that $|f(x)| \le \frac{3}{2}$ when $f(x)=ax^2+bx+c$


Drupal 7 has drupal_goto() that would allow redirecting to an external url.  The change record indicated that ControllerBase::redirect is the method to be called in D8.   This seems to work with internal drupal URLs but throws an error with external http urls -   [12-Nov-2014 21:00:22 Asia/Kolkata] Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "https://www.facebook.com/dialog/oaut....." does not exist." at /Applications/MAMP/htdocs/d8/core/lib/Drupal/Core/Routing/RouteProvider.php line 147   What would be the ideal equivalent of drupal_goto in D8 to redirect to an external URL?


How to add doi to elsarticle-num style bibliography

I'm using elsarticle documentclass and would like to add doi to bibliography.  \documentclass[preprint,12pt]{elsarticle} \usepackage{lineno,hyperref} \bibliographystyle{elsarticle-num}  \begin{document}  Palm oil is mainly composed of triglycerides \cite{Mba2015}.  \section*{References} \bibliography{SFC}  \end{document}   Reference example  @article{Mba2015, title = "Palm oil: Processing, characterization and utilization in the food industry – A review", author = "Ogan I. Mba and Marie-Josée Dumont and Michael Ngadi", journal = "Food Bioscience", year = "2015", volume = "10", pages = "26--41", doi = "https://doi.org/10.1016/j.fbio.2015.01.003", }


What does a "real" quantum computer need for cryptanalysis and/or cryptographic attack purposes?

The cryptographic world has been buzzing the word "quantum" for a while now (even the NSA is currently preparing itself for a post-quantum crypto world) and quantum-related hardware engineering is evolving constantly. For example: the 5-qubit quantum computer created at MIT by using the technique of ion traps succeeded in prime-factorizing 15. Does that mean that since it succesfully managed that, that it is a all-purpose quantum computer which could be used for cryptanalysis and/or cryptographic attacks?   If that's not the case, what exactly would a "real" quantum computer need (think: rough description of expected technical abilities, aka specs) to enable its users to use it for cryptanalysis and/or cryptographic attack purposes? And - ignoring rumours about potentially existing but confidential governmental projects - does any such system already exist today?


In swift is there a difference between a double and a float?

I wrote a basic program for calculating money. If I switch the data type of the functions to a float. The count for pennies is incorrect if I set my initial value to 16.16. If I switch it to a double it corrects it. I am not sure why this is happening. I know that a double is more precise but I didn't think that would affect my program.  import UIKit  func moneyCounter(initialValue: Double) -> Array<Any> {     var money = initialValue     func countsTypesOfMoney(moneyValue: Double) -> String {         var moneyTypeAmmount = 0         while money >= moneyValue {            money -= moneyValue            moneyTypeAmmount += 1         }     return String(moneyTypeAmmount)     }   return ["$" + String(initialValue) + " = " + countsTypesOfMoney(moneyValue: 1.00) + "          dollars + " + countsTypesOfMoney(moneyValue: 0.25) + " quarters + " +     countsTypesOfMoney(moneyValue: 0.10) + " dimes + " + countsTypesOfMoney(moneyValue: 0.05) + " nickels + " + countsTypesOfMoney(moneyValue: 0.01) + " pennies"] } print(moneyCounter(initialValue: 16.16))


How do I convert an int to a zero padded string in T-SQL?

Let's say I have an int with the value of 1. How can I convert that int to a zero padded string, such as 00000001?


In the theorem of , it is assumed that, given two sets $A$ and $B$, and  there is an injective map from $A$ to $B$ and an injective map from $B$ to $A$. It then concludes that there is bijection between $A$ to $B$.  My question here is based on hypothesis of the theorem, although it may not be closely related to the theorem, but it came to me when I first re-read the statement.  Question: Given non-empty sets $A$ and $B$, is it true that there is always an injective map from $A$ to $B$ or $B$ to $A$.


Diagonalizability of $A \in M_{n}(\Bbb{R})$ (Upper traingular matrix) with all diagonal entries 1 and $A \neq I$?

If $A \in M_{n}(\Bbb{R})$ is an Upper triangular matrix with diagonal entries $1$ such that  $A \neq I$, then what can we say about the diagonalizability of $A$ ?  I know that if the matrix has distinct eigenvalues or the set of eigenvectors are linearly independent then the matrix is diagonalizable.  And that the eigenvalues of the triangular matrices are given by the diagonal elements like  and , but they work nocely if we had distinct elements on the main diagonal.  But in my case I have same value 1 on the main diagonal, how can I approach about the diagonalizability of the matrix?


Escape angle brackets in a Windows command prompt

I need to echo a string containing angle brackets (< and >) to a file on a Windows machine.  Basically what I want to do is the following: echo some string < with angle > brackets >>myfile.txt  This doesn't work since the command interpreter gets confused with the angle brackets.  I could quote the whole string like this: echo "some string < with angle > brackets" >>myfile.txt  But then I have double quotes in my file that I don't want.    Escaping the brackets ala unix doesn't work either: echo some string \< with angle \> brackets >>myfile.txt  Ideas?


I can't seem to figure out how to get past this step. Any suggestions?


How can I format the header on every page displaying the title of the current chapter? In one of my chapters the title is too long so it is running out of the page.  Here's a minimal example of my document:  \documentclass[bibliography=totoc,version=first,listof=totoc,BCOR5mm,DIV12,index=totoc,numbers=noenddot]{scrbook} \usepackage{bibgerm} \usepackage[english,german]{babel} \usepackage[utf8]{inputenc} \usepackage{a4wide} \usepackage{wrapfig} \usepackage{caption}  \begin{document} \frontmatter \mainmatter \chapter{Very long title} \backmatter \end{document}   Here's a screenshot of my problem:


hi i don't have much knowledge of the jquery  i have some problem with the Checkbox attribute.  here below i mentioned some code  code : $( this ).html()   output :   <input name="cb_kot[]" class="cb_kot cb_1" id="cb_1" checked="checked" type="checkbox">1Fish Shorma Rs 195   in the code i am getting the above html. now you can see in above that there is a checkbox in html. now i want to check that this checkbox is checked or not so can anyone advice me how can i find it ?  thanks in advance  Thanks


What would this integral come out as? $\int_{-1}^1\frac{1}{x}\ dx $

What would this integral come out as? $$\int_{-1}^1\frac{1}{x}\ dx $$  Since the areas on both sides of the y-axis are equal, with one being negative, does that mean that the answer is $0$?


How can I change scroll direction in Snow Leopard?

I've gotten so used to the Lion natural scrolling that using (for lack of a better term) unnatural scrolling in Snow Leopard and earlier is very annoying. Is there any way I can reverse it for OSes before Lion?


Prove by induction that for all $n\in\Bbb N$.

Can anyone please show me how to solve this problem? I'm stuck $$\sum_{k=1}^n k = \frac{n(n+1)}{2}$$ $$ and $$ $$\sum_{k=1}^n k^3 = \left(\sum_{k=1}^n k\right)^2$$  To prove by induction, it has to be as following: 1) Base Case: Show that P(n) is true. 2) Induction Hypothesis: Assume P(k) is true. for $k\in\Bbb N$  3) Induction Step: Show that P(k + $1$) is also true.


Earth taken over by aliens who treat humans as livestock. Protagonist is fully sapient, but a pet to an alien

I read this in the 1990s, I think as a paperback. Aliens have taken over Earth. The main character lives with the aliens and does not consider himself as human, but as an oddly shaped alien. Somehow, he winds up in contact with some of the humans who are in rebellion, including an awkward sex scene where I remember the female kept referring to his "joystick". He learns how the humans are kept as livestock, involving what is essentially a pithing operation to ensure that they don't have higher brain function. For some reason, I want to say that either he or the aliens liken the livestock humans to pigs. The only other detail I remember is it being established that ruins of the major cities such as New York are now underwater... he's with the rebel female at the time, but I'm not certain if they're still in the alien ship, or if they're in their own ship.  I know that this is not I, Weapon which has a similar concept of humans raised as livestock, but a wholly different plotline.


what is the filename.js?m=1497883755 in script attachment src?

I am facing a issue to rectify a jQuery file.   It's integration code is like this below.  <script type="text/javascript" src="js/global.footc75d.js?m=1497883755"></script>   my question is what is the ".js?m=1497883755" in this? what is the use of this..? why it was used this way not normally..?  and this one is looking like this below in the chrome browser > Developer tool > Network tab.    Requested to share the full detail about it. Why this was used this way..? not just by file name only..? should I use the same way in the future if yes then which condition..?? and how to edit the code in this condition.. how do I find and remove the code which is loading loader_light.gif here..?  Thanks to all in anticipate..


One portable air conditioner - want to use it in two rooms

I have a Kenmore portable air conditioner model - 408.72012.  this particular model can be housed on the outside of the building and the A/C air is vented into the inside space (normally through a window).  Almost the opposite of what you normally do with a portable A/C unit.   I have an office right next to my LR and want to pump the A/C into my LR sometimes and other times into my office.  Because I did not have a window to have my A/C Air come into my office through a hole we cut and placed and  fit a flexible dryer vent pipe (the white floppy accordion style)through the wall and on the inside of my office I have the dryer vent cover with flaps (like you would normally see on the outside.  This prevents and critters from getting in.  I am trying to figure out how to split the out flowing A/C air though a "dual Y pipe of some type to flow into my office when I want it in there and my LR when I want it in there.   IS there any such  thing as a U pipe that is not rigid that I could use for this and also some how block them when I want it to flow in only one side or the other?


How to prevent a partition from being mounted?

I have two NTFS partitions that constitute a Windows 7 install. I am running Ubuntu and virtualize that Windows install off the physical disk. While the VM is working it could be disastrous if mount any of those partitions and make changes to them.  How do I prevent Ubuntu from mounting these partitions _at_all_?  Tried something along the lines of  /dev/sda none ntfs,ro 0 0    in /etc/fstab but that just gave me an error..  Thanks!


How do you make this symbol in math mode?

This question is as simple as it gets. There's a symbol used for certain polynomials in my area of expertise that I'm completely unfamiliar with, and I'm not sure how to look up the code for the symbol, so I figured I'd ask here.


Using one group separator for integer part and another for decimal part (siunitx)

I thought I was able to do something like this before, but I can't find my solution.  I would like to format my large numbers as follows:   12,504.3124 2359 3   I know I can use siunitx to partially set this up, but I'm not getting the results I want:  \documentclass{article} \usepackage{siunitx}  \newcommand\aenumA[1][4]{%%   \num[group-separator={,},        group-digits=integer,        ]}  \newcommand\aenumB[1][4]{%%   \num[group-digits=decimal,        ]}  \pagestyle{empty} \begin{document}    \aenumA{12504.312423593}    \aenumB{12504.312423593}  \end{document}   I would like a hybrid solution (commas in the integer part and spaces in the decimal).  I would actually also like to be able to group differently between the two: every three digits in the integer part, every four digits in the decimal part.  Is there a straight-forward way to do this with siunitx?  Or, do I need to split the number at the decimal and treat the two parts separately and then glue them back together?


After the attack on the Jakku village, Finn and the rest of the Stormtroopers return to the Star Destroyer Finalizer. There, he removes his helmet, and Captain Phasma calls him by his designation (FN-2187) without even seeing his face.  How did she know who he was? Are Stormtroopers' designations printed on their uniform? Some sort of HUD in their helmets? Was she really familiar with the back of his head in particular?


How do I book flights Boston area to St. Thomas to Seattle to Boston area?  Which site allows me to put in this A to B to C to A itinerary for cost and convenience comparisons?


I want to group this array. please help me..  Array (     [0] => dghfdih@hjuh.cvh     [1] => dghfdih@hjuh.cvh     [2] => dghfdih@hjuh.cvh )   And my expected output is   Array     (         [0] => dghfdih@hjuh.cvh      )


How do you handle an early death in Dread?

Starting prep for a game of Dread. I am wondering what is the best way to handle an early exit for a character in the game? I understand the ghost or doomed method of allowing the player to continue to participate, but he is no longer allowed to pull, especially if they knock the tower over doing something that should not be lethal. This seems like a pretty good method, but what about a bit later in the game when doomed is not a real option?   Does the player continue to stay at the table and just stay for the story? How do you keep players with dead characters interested in the game after their PC is dead?


Is there any account deletion option on Stack Apps

When I log in to stack apps to post a question via some website (gmail or facebook),after that it shows logged in so I have to click "log out" from its meta,Can you put a delete option there on my stack apps profile made recently?