I'm having trouble using newcommand with the \href   I would like a newcommand like this:   \newcommand\link[2]{\href{#1}{\underline{#2}}}    This command works fine quite all, for exemple:   \link{htt://www.impa.br}{IMPA}    But it does not work when the URL name has code like #1. For example, it does not work in this exemple:   \link{http://matematica.obmep.org.br/index.php/modulo/index#1}{modules}   It does not work because the #1 in the URL name is used with the #1 in the newcommand.   How could I solve this problem?

I'm having a similar problem as described here:   However, I want to specify an URL with an # sign in it. I know that I should escape the # by \#, but as we have many links containing the #, it may be nice to be able to copy and paste the URL directly into the LaTeX code.  My current solution looks like this:  \documentclass{article} \usepackage{hyperref} \usepackage{ifthen}  \newcommand*{\myhref}[2][]{\href{http://myserver/#2}%                           {\ifthenelse{\equal{#1}{}}{#2}{#1}}}  \begin{document} \myhref{somewhere} % WORKS \myhref[LINK TEXT]{somewhere} % WORKS  \myhref{somewhere\#anchor} % WORKS \myhref[LINK TEXT]{somewhere\#anchor} % WORKS  \myhref{somewhere/#anchor} % WORKS NOT - BUT I WANT IT TO WORK !!! \myhref[LINK TEXT]{somewhere#anchor} % WORKS NOT - BUT I WANT IT TO WORK !!! \end{document}   Is there a way to automatically escape the # character in the argument to \myhref?


I'm doing a NAS data migration from a Celerra NS960 to a Unity 500. I have an SMB/CIFS file system I synced using EMCOpy in Windows environment. It's also an NFS (multiprotocol) file system. I have both file systems mounted on a Solaris 10 UNIX server can I just rsync the permissions only from the NS960 to the Unity and not have all the data copy again?

I want to copy the attributes (ownership, group, ACL, extended attributes, etc.) of one directory to another but not the directory contents itself.  This does not work:  cp -v --attributes-only A B cp: omitting directory `A'              Note: It does not have to be cp.


In "The Dalek Invasion of Earth" she leaves the First Doctor to live on Earth with David Campbell. Which would have meant that she escaped the Time War. In "Father’s Day", the Ninth Doctor states that his family was killed in the Time War and in "The Doctor’s Daughter", the Tenth Doctor reaffirms this. Clara claims that the Twelfth Doctor had once had children in "Listen". The new series points to the idea that the Doctor’s family died in the Time War. But with Susan settling on Earth, she wouldn’t have died in the War. She lived long enough to meet the Fifth Doctor in "The Five Doctors" and the Seventh Doctor in "Dimensions in Time".

What happened to The Doctor's granddaughter, ? What was her ultimate fate?    Is it possible that she'll make an appearance in the new (2005) Doctor Who?


When a child loses his parents, he is referred to as an orphan.  If a woman loses her husband, she is considered a widow.  But if a parent loses their child, what do we call them? Childless? Childless doesn't make much sense, as if the parents never had children to begin with.

Is there a word that describes a parent whose child has died?   Along the lines of "orphan", "widow", and "widower", is there a single word for a parent who has lost a child (of any age)?


I'm trying to use VideoReader in MATLAB on an Ubuntu system and get the following error:  MATLAB is selecting SOFTWARE OPENGL rendering.     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.5)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.5)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libmirclient.so.9)     (MATLAB:4573): GStreamer-WARNING **: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /opt/matlab/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libzmq.so.5)    When I try the solution to set LD_PRELOAD using LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab  I get this error:   MATLAB is selecting SOFTWARE OPENGL rendering. libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)  (MATLAB:803): GStreamer-CRITICAL **:  Trying to dispose element tmwplaybin, but it is in READY instead of the NULL state. You need to explicitly set elements to the NULL state before dropping the final reference, to allow them to clean up. This problem may also be caused by a refcounting bug in the application or some element.  A related issue is that when I try to use Parole Media Player to open a video I also get an error:  GStreamer backend error Could not initialise Xv output  I read  and now I have the error in step 2   What can I do to fix this?

I am using Matlab for ubuntu R2014a and I am not able to run a code because I get the following error  /usr/local/MATLAB/R2014a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:version 'GLIBCXX_3.4.21' not found  when I run:  $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20 GLIBCXX_3.4.21 GLIBC_2.3 GLIBC_2.2.5 GLIBC_2.14 GLIBC_2.4 GLIBC_2.18 GLIBC_2.3.4 GLIBC_2.17 GLIBC_2.3.2 GLIBCXX_DEBUG_MESSAGE_LENGTH   Here you can see that I have GLIBCXX_3.4.21 but then also I get the error!


If i could get the source code for ubuntu phone os, i could compile a build of the os for the moto x, which a good number of people want.

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


Need your inputs on th closure function in javascript.  Give me one real time example where we implement the closure function in java script?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I want to get source code of specific URL in JavaScript. I can get source code of current web page with this code: document.documentElement;  But I don't know how can I get source code of specific URL. (I want to use documentElement anyway)

I need to do an  request in JavaScript. What's the best way to do that?  I need to do this in a Mac OS X dashcode widget.


The function below checks whether a number is even or odd - simple. My question is regarding the call stack. To make sure I understand it.  Is the second else if statement (number<0) calling the main function isEven(number) so it runs again from top checking if number==0 and so on? Is it recursion?  function isEven(number) {   if (number == 0)      return true;   else if (number == 1)      return false;   else if (number<0) {     number*=-1     return isEven(number)   }   else      return isEven(number-2) };   console.log(isEven(50)); // → true console.log(isEven(75)); // → false console.log(isEven(-1)); // → false

One of the topics that seems to come up regularly on mailing lists and online discussions is the merits (or lack thereof) of doing a Computer Science Degree. An argument that seems to come up time and again for the negative party is that they have been coding for some number of years and they have never used recursion.  So the question is:   What is recursion? When would I use recursion? Why don't people use recursion?


So, for whatever reasons, I like disabling Google services which I do not use. Since Android does not allow me to fully uninstall Google apps, I try to reply on the "Disable".  However, what I am noticing is that the Google app still shows a Force Stop button (see screenshot below). This suggests that the app is still running something. This does not happen with other (non-Google) system apps which I have disabled.  So, why do the stock Google App(s) continue to run? What do they do in the background? What is the whol point of disabling if they can still run? And is there a way to fully disable the app and stop it from running?  I am using an unrooted OnePlus 5. I have tried on a OnePlus 3T and a Nokia 7 plus with the same result. I do not intend to root my device.

I've noticed that apps (such as Google Contacts Sync) that have been disabled using the stock Android (KitKat) app manager still show up as running when using process observer tools.  This is true even after the device has been rebooted.  Why are disabled apps still running?  Is there an effective (and safe) way to actually disable them?  Solutions requiring root privileges are acceptable.   (Note that for the specific example above, you can tell Android not to sync your contacts, but it still runs the Google Contacts Sync process.  But let's not dwell on that example... it's just an example.)


I've searched and not found this question.  Long time Ubuntu user, and the last several years a Gnubuntu user (and happy about the switch to Gnome).  HOWEVER, how in the world do I get Activities to raise the desktops by just sending my mouse pointer to the upper left hand corner of the screen (like I used to do in Gnubuntu)?  Having to click on "Activities" to do this is really slowing me down.  I know, first world problems, but this is driving me batty.  Thanks.  Brand new Ubuntu 18.04 install, not an upgrade over 16.04.

I'm from Ubuntu GNOME 16.04 and I just installed Ubuntu 18.04 which contains GNOME by default, but there are a lot less preferences.  I want to open the selection of windows (as if we clicked on the 3 points or "Activities" button) but only when my mouse is in the (top-left) corner of my screen.  How can I do this?


I'd like to capture only the content of a twitter #hashtag, not including the #. So #hashtag becomes hashtag. My current solution involves stripping the # with javascript, which seems clunky. Is there a way to capture a full word after but not including a character using just regex? I'm looking for a 'yes' or 'no' here.  I have this string:  "This is an #awesome tweet with #amazing #hashtags all over the #place"   When I use this regex:  #(\w+)   I get this:  ["#awesome", "#amazing", "#hashtags", "#place"]   but I want to get this:  ["awesome", "amazing", "hashtags", "place"]   Is this possible to do in just regex or will I need to continue to strip the # via the rest of my javascript code?

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I have a program that were giving slithly different results under Android and Windows. As I validate the output data against a binary file containign expected result, the difference, even if very small (rounding issue) is annoying and I must find a way to fix it.  Here is a sample program:  #include <iostream> #include <iomanip> #include <bitset>  int main( int argc, char* argv[] ) {     // this value was identified as producing different result when used as parameter to std::exp function     unsigned char val[] = {158, 141, 250, 206, 70, 125, 31, 192};      double var = *((double*)val);      std::cout << std::setprecision(30);      std::cout << "var is " << var << std::endl;     double exp_var = std::exp(var);     std::cout << "std::exp(var) is " << exp_var << std::endl; }   Under Windows, compiled with Visual 2015, I get the output:  var is -7.87234042553191493141184764681 std::exp(var) is 0.00038114128472300899284561093161   Under Android/armv7, compiled with g++ NDK r11b, I get the output:  var is -7.87234042553191493141184764681 std::exp(var) is 0.000381141284723008938635502307335   So the results are different starting e-20:  PC:      0.00038114128472300899284561093161 Android: 0.000381141284723008938635502307335   Note that my program does a lot of math operations and I only noticed std::exp producing different results for the same input...and only for some specific input values (did not investigate if those values are having a similar property), for most of them, results are identical.   Is this behaviour kind of "expected", is there no guarantee to have the same result in some situations?  Is there some compiler flag that could fix that? Or do I need to round my result to end with the same on both platformas? Then what would be the good strategy for rounding? Because rounding abritrary at e-20 would loose too many information if input var in very small?     Edit: I consider my question not being a duplicate of . I get exactly the same result on both platforms, only std::exp for some specific values produces different results.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Let $I_n=\left(\frac{1}{n},1\right)$. Show that $(0,1)$ is not compact: show that any finite collection of $\{I_n\}$ will not cover $(0,1)$.  Give me a hint.

Let $(M,d)$ be a metric space, and $A\subset M$. By definition, $A$ is said to be compact if every open cover of $A$ contains a finite subcover.  What is wrong with saying that, in $\mathbb{R}$, if $I=(0,1)$, we can choose $G=\{(0,\frac{3}{4}), (\frac{1}{4}, 1)\}$, which satisfies $I \subset \bigcup_{U\in G} U$, but we can't extract a finite subcover, so $I$ is not compact. Is $G$ a finite subcover of $G$, so it is not a valid cover for proving this? I would take $\cup_{n\in\mathbb{N}} (\frac{1}{n},1)$ in order to prove this, can we conclude that every open cover is necessarily a infinite union of open sets $\neq \emptyset$?


I have an Ubuntu 18.04 installed on a 2 TB Seagate drive.  I have another 2 TB Western Digital drive formatted ext4.  I would like to copy the Ubuntu OS on the seagate drive (sda) to the  Western Digital drive (sdb).  Every so often I can boot to the western digital drive and run updates and all that.  The western digital will be a backup drive.   With 2 different drives I did not think anything would have to be changed but then I read something about the UUID. I read I would have to unplug the Western Digital drive because of the UUID??? I do not want to have to plug in and unplug a drive depending of the drives usage.  I understand I can use dd to copy drive sda to sdb.  I am asking whether I have to change something, the UUID or something like that, to be able to boot to the new OS on drive sdb.  How do I change the UUID or whatever it is I need to change? Thanks for your help!

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the .   Backup is incredibly important. Obviously there's no best backup tool, but a comparison of the options would be very interesting.   Graphical Interface? Command line? Incremental backups? Automatic backups? Install method: In standard repositories? PPA?


A couple of days ago I made an edit to a post, after a few minutes, I guess a reviewer, edited the post precisely how I edited the post and did not say I edited the post.   Is there anything that can be done from people stealing edits?

When clicking "edit" I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking "improve this question" or "improve this answer" shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the "Improve Edit" and "Reject and Edit" buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see "" in the .


Let $R$ be a subring of a field $F$ such that for all $x\in F^\times$, either $x\in R$ or $x^{-1}\in R$. Prove that if $I$ and $J$ are ideals of $R$, either $I\subseteq J$ or $J\subseteq I$. I am preparing for my qualifying exam and this is from one of our previous exams. I can tell that $R$ is an integral domain, but I couldn't go any further. Can anyone help? Thanks a lot. Here is the proof after reading the hints in the link below. Let $I$ and $J$ be two ideals of $R$. Suppose $I\not\subseteq J$. Then there exists $a\in I\backslash J$. Since $0\in J$, $a\neq0$. Now let $b\in J\backslash\{0\}$. Then in $F$, we have $b=(ba^{-1})a$ with $ba^{-1}\in F$. Claim: $ba^{-1}\in R$. If $b^{-1}a=(ba^{-1})^{-1}\in R$, then $a=b^{-1}ab\in J$ which is a contradiction. So by the definition of $R$, we have $ba^{-1}\in R$. Then $b=(ba^{-1})a\in I$. So all nonzero elements of $J$ are in $I$. Since $0\in I$, we have $J\subseteq I$.

There is the next characterization for valuation domains:  Let $D$ be an integral domain and $K$ its field of fractions. The following are equivalent:   For every nonzero $x$ in $K$, either $x$ in $D$ or $x^{−1}$ in $D$. The ideals of $D$ are totally ordered by inclusion. The principal ideals of $D$ are totally ordered by inclusion (i.e., the elements in D are totally ordered by divisibility.) There is a totally ordered abelian group $Γ$ (called the value group) and a surjective group homomorphism (called the valuation) $v :$ $K^×$ $→ Γ$ with $D = \{ x ∈$ $K^×$ | $v(x)$ ≥ $0 \}$ $∪$ {0}.   The equivalence between 1, 2 and 3 are clear, and I understand that the fourth can be found in Krull's article (1936), but I don't speak german and I can't find a proof anywhere. Any link or hint will be much appreciated.


This picture is really cute so I want to know what manga this is so please help me thank you for your consideration.

So I see an image that I believe is from either an anime or a manga. What are some ways that I can go about finding what series it's from? Try these options:   (browser built-in support and plugins)        Note: Please note that as of May 9, 2016, ALL  questions are now . Therefore, you can't ask an identification request question on this site. However, such questions are still welcome  for users with at least  (globally on StackExchange).    Protip: If you are using Google Image Search in a non-English language,  or just use  for better, more accurate results.


So I bought a used Specialized Sirrus 2011 model as my first bike (so I'm new here) recently and I love riding it, light weight, smooth handling and comfy to ride. Rear wheel was flat when I bought it so guy gave me some money to replace the tube.   I took the bike home and removed the tyre (tyre size is 700*28cc), took out the tube and I could see a puncture on the tube when I inflate it. Was quite happy as I found the reason for the flat tyre. I replaced the tube ride for about 30 mins and put it back in the garage. But on the very next day, the tyre was flat again.   I took the tube out, inflated it but couldn't find a puncture. So I left the inflated tube for few hours and could see that it's deflated a bit. I checked the rim to see if there are any spokes sticking out and no, seems it's all good. Couldn't find anything on the tyre as well.  So anyway, I inflated even more, hoping to find the puncture in the tube. I was squeezing the tube and it got BLASTED!    Now I'm wondering what to do? Should I try with another tube? Also the given that the rear tyre is quite worn out and could see wear marks (rubber on the top center has brown color here and there), and has fibres coming out from sidewalls.   If I put a new tyre and a tube, this should solve my issue right? As there are no visible spoke problem with the rim. This's driven me really impatient, what should I do?

I got a flat/puncture on my bike tube, how can I fix it myself without going to the nearest bike shop? What kind of equipment would I need?


Explicitly a support question. I do not intend to discuss the particular case here.  I have searched for an answer to this  and here, where I found , which unfortunately discusses a protocol for moderators only. I am wondering what is the preferred thing to do when you disagree with a community moderator (not an employee of SE, Inc), without going into specific details.  Of course, the first thing to do is to ask on Meta. Now suppose the moderator in question makes it very clear that he is not going to be constructive on this matter (doesn't want to explain or support his decision and in no way tries to work towards an agreement) - what can be done? Are there rules or guidelines to point to that say that moderators are accountable and should explain their decisions as far as reasonably possible?   Even if other moderators agree with the particular decision and that conflict is, through them, resolved, the issue remains that that particular moderator isn't constructive. What can be done about that?   Should a new Meta question be opened? Or is it better to handle this in private, in chat with the other moderators, or with the SE team?

One or more of the following things happened to me on a Stack Exchange site:   My post(s) were wrongly deleted or locked by a moderator A moderator posted a wrong comment on one of my posts I was suspended, but did not do anything wrong I asked a meta question, but the question was closed and/or deleted A moderator discredited me in public ...   I think a moderator has abused their power, but I feel powerless against them.  What recourse do I have now? What can I do when I feel that a moderator has abused their power, and has been repeatedly unfair in their dealings with me?


I need to take photos and upload them in a web page. A resolution of 800x600 would be enough for me.  I go to Settings > Photos & Camera, but I can only find a configuration for the resolution of the video recording, but not the Photos.  Anyone know if there is any way to take photo with the camera in low resolution?  I'm looking to avoid having to use an external app

I know that Android phones let you change camera resolution. How can I accomplish the same on iOS?


See the code below:  a()(alias x=echo\ hi;type x;alias;x);a   I have an alias inside a function, I do not want to change the external environment (that is why I am using () instead of {}), even the code saying the alias was successfully setted, it does not work, check the output out:  x is aliased to `echo hi' ... alias x='echo hi' x: command not found   I heard about doing shopt -s expand_aliases would solve, but not only it has not had any effect as well as I could not depend on bash because I am working with dd-wrt's busybox's ash.  Someone know this issue?

I want to run an alias inside a bash -c construct.  The  says:     Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt   In this example, why is the alias hi not found when setting expand_aliases explicitly?  % bash -O expand_aliases -c "alias hi='echo hello'; alias; shopt expand_aliases; hi" alias hi='echo hello' expand_aliases  on bash: hi: command not found   I'm running GNU bash, version 5.0.0(1)-release (x86_64-pc-linux-gnu).  Context: I want to be able to run an alias at idle priority, eg a script containing:  #!/bin/bash exec chrt -i 0 nice -n 19 ionice -c 3 bash -c ". ~/.config/bash/aliases; shopt -s expand_aliases; $(shell-quote "$@")"   I want to avoid using bash -i as I don't want my .bashrc to be read.


I'm using SPSS for binary logistic regression but one of my independent variables is non-dichotomous and categorical (genotype - there are 5 gene combinations possible). I'm trying to see if a particular genotype is associated with the presence of anxiety as well as if there is a sex-specific effect (i.e. males with a particular genotype are more likely to have anxiety). Independent variables:  Sex (male/female), Genotype (5 combinations)  Dependent variable:  presence of anxiety (yes/no)  I coded  male=0 and female=1, and no=0 and yes=1,  but I don't know how to code the genotypes for this analysis? I would greatly appreciate any help!

I'm not sure of the best way to code my categorical predictor variable for use in a hierarchical regression in order to test my specific hypothesis. This categorical variable has 3 levels representing 3 groups. I want to compare group 1 to group 2, group 1 to group 3 and group 2 to group 3. I know that for dummy coding I create k-1 variables, so 2 dummy variables in my case and code these variables with 0s and 1s while choosing one level of the categorical variable to be a reference category.   However, I'm not sure this is the best way of making the comparisons I wish to make as it appears I could only compare each group to the reference category, am I correct? So if group 3 was the reference category I could compare group 1 to group 3 and group 2 to group 3 but I could not compare group 1 to group 2. What alternative method of coding should I use to make these comparisons? My regression model will also contain continuous variables. I'm an undergrad psychology student and statistics are not my strong point simple answers would be best for me. I use SPSS. Thank you!


I'm trying to cite someone in a paper I'm writing whose name is "[First-name] de Soya". In my field it's common to cite papers using the "et al." style ("In their seminal paper, de Soya et al. […] present…"), however, "de Soya" is opening the sentence.  In that case, should I write "de Soya et al. […]" or "De Soya et al. […]"

In the book, "The Crystal Shard," by R.A. Salvatore, a character is surnamed "de Bernezan." Which of the following complete sentences uses the correct English-language capitalization:   de Bernezan entered the room. De Bernezan entered the room.   The  on "de Vries" capitalized "De Vries" as a standalone, but writes "Marc de Vries" when using the full name.  Edits in response to comments:   The book starts sentences as "de Bernezan," which seems incorrect. Hence my question. The Wikipedia page is neither authoritative nor clear. It seems to refers to "De Vries" as the correct capitalization of the surname, except when actually used as a surname. Since I am not Dutch, I do not know how their names work, especially when used in an English-language context. Again, hence my question.


I have seen that people use ls -alh in the Linux terminal. However, when I see the manual, I don't see -alh (i.e. when I type man ls).  Why do I not have it in the manual? Can someone explain what it does?

What is the -alhF flag in ls? I can't find it in the .


I have a web page set up wizard that guides a user through several steps to create an object.  One of the steps in the wizard requires the users to pick via check boxes a property to their object. They can bypass this stage if they choose not to select any. We are introducing a new object type that does not support one of the check box options; however it may in the future.  I would like to re-purpose the same set-up wizard so the UI and flow are similar, if not exact. However, I am unsure if I should disable the check box option that is unavailable or if I should hide it all together...   It would seem odd to me that this set up wizard is missing information compared to the previous set up wizard. However, there is no way to select this option anyway because it isn't supported. Would it be more confusing to the user when it's missing? Or more frustrating that it's shown but I cannot choose it? Thoughts?

In 2008, :     A long time ago, it became fashionable, even recommended, to disable   menu items when they could not be used.      Don't do this. Users see the disabled menu item that they want to   click on, and are left entirely without a clue of what they are   supposed to do to get the menu item to work.      Instead, leave the menu item enabled. If there's some reason you can't   complete the action, the menu item can display a message telling the   user why.   That's an interesting idea, but I wish he'd elaborated on what he meant by "display a message telling the user why."   Has anyone actually followed this advice? Are there any examples of menus that display a message instead of disabling a menu item -- perhaps something you designed yourself, or something out of Fog Creek?  I'm curious about the mechanism by which the message would be displayed and whether anyone has experience (good or bad) with showing a message instead of disabling a menu item.


This looks like a great launcher (although I can't tell what the name of it is. Please edit this question and title to reflect its real name if you like).  I wanted to run Sublime Text.  How can I remove these advertisements from my launcher search results?  Please Canonical, don't enable this stuff by default. It's awful and unexpected. I was curious and clicked through, and regretted it. Feels gross.    Great answers from 3 years ago over at

How can I disable Amazon search results in the Dash?


This night, I've noticed nginx was not responding to requests. After some investigation, I found that it was using 100% of the CPU and error.log was full of messages like this one:  2013/05/28 00:11:31 [alert] 31211#0: accept() failed (24: Too many open files)   But more importantly, checking access.log discovered requests like this one:  193.169.124.92 - - [28/May/2013:00:11:46 +0300] "h50bno34mx9943tz0i2lvhpq8um396v66k4oosu0l78e8q3x0gz4up5a57h744z24y7l4y27q6f9731zgg9jhv536ny9n7nl25p4t4885luo4148gu8ha18yu9eqvir1qr771k959hm6vzqkv45i790dy3bl3dcjqdi6o52kwp31zxkvb229sb67ee8l24534067365l5xy1e3t5h368ek9681cvw907463s8t06m1u09x7fce1zt192tjod9e9enp279203liw50oz7ij94i7gv6921kgv74onc56dh4933r4agaxfwaaq2q45w345846kkxy21w557yxv249j71803frw53j080fmlm0510ae0m6p238d23junzma6y6q6x762a4358mdxc57i4lnh4ei1810y040hzc02m5ha3g5e7s058os5px399f24988a429yd3g36090x524u3ep1n0wpjeny533859dl837358w9u74y3qlr24f565572se7qw914y4ed1gugx711bgb5145232h05kf1vphr6c2ycc313hk664ldwgx707t06k3gf79345770n0t050e97c966y7925z06725f7ph9126yiv22u96d7fsugjagilc09670kts5h7w90f33hwptdjp27u1n0o34028n8j2z1474h0au7sda41z654s0uoqjd1ehji7101862we13srsz5xb1gf11z91t5jc3r4c447u5d018h9s3666cb3g5pts5120rt5fe7g598bnxcaf506y213de4lalsy51d80dg6wncw571ys5466wy28078js27y1ren6ph75jlq54h86su6f2765b1it0h21mp6h6vu5fzk0q75q1d2ad6z4eo6hs44885xt6f4io98xhgd21h9178qr0r43019ek570to59p99i3bxq39mro6qi02wzb92lx614r247rx35x6q191u0iq1wrlp7c21c5u1m30j14c5g57fk91by06896m3" 400 173 "-" "-"   What would you suggest? How to prevent this types of attacks? Is this a known pattern?  UPD. I now can say the requests were sent from about 50 IP addresses for about 20 minutes. There were 2510 requests all in all. That's what I got from nginx logs. I suppose not all the requests were logged. And I don't see requests like this before in the logs. (I have logs since 6th Apr).

My VPS is under a DDoS attack.  I cannot access RDP, and I cannot take it offline, or access it in any way at all.  What can I do?  They are not trying to bruteforce, just trying to stop access to the VPS.  I don't know if maybe the datacenter messed up or something, but the VPS is online and denying all requests as is normal when under DDoS.  Is there anything that I or my dedicated hosting provider can look at in the logs?  How should I approach forensics after the fact?  I don't know much about DDoS attacks, do they usually stop after a few days?  Is there an existing anti-ddos program or something?


""  In the above link I found a way to add fade between 2 videos, but losing the audio. How can I do the same without lose the audio?  This is the command line I'm currently using, which is working very well, just losing the audio:  ffmpeg -i in0.mp4 -i in1.mp4 -filter_complex "[0]fade=t=out:st=0:d=1:alpha=1,setpts=PTS-STARTPTS[va0];[1]fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS/TB[va1];[va0][va1]overlay[outv]" -map [outv] -crf 10 out.mp4

This Super User answer  has got me so far, but now that I have tried many solutions and seen every SO link out there, it's time to ask you all for help.  I am trying to crossfade 2 videos that are 10 seconds each in ts format with audio and video at the same time.   The steps are:   Add complex filter black screen Fade out video 1 after 9 seconds, with 1 second fade duration Fade in video 2 at 9 seconds, with 1 second fade duration Trim black filter output to 19 seconds   This works fine for just video alone, but when I attempt to add audio, I can't get past this error message:     Output pad "default" with type audio of the filter instance "Parsed_asetpts_4" of asetpts not connected to any destination   It appears I'm not connecting the audio output properly. I think I need to alter the [over] lines to include audio. But how do I do this?  `ffmpeg -i vid1.ts -i vid2.ts -f lavfi -i color=black -filter_complex \ "[0:v]format=pix_fmts=yuva420p,\ fade=t=out:st=9:d=1:alpha=1,setpts=PTS-STARTPTS[v0];\ [0:a]\ afade=t=out:st=9:d=1,asetpts=PTS-STARTPTS[a0];\ [1:v]format=pix_fmts=yuva420p,\ fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+9/TB[v1];\ [1:a]\ afade=t=in:st=0:d=1,asetpts=PTS-STARTPTS+9/TB[a1];\ [a0][a1]amix=inputs=2;\  [2:v]scale=720x406,trim=duration=19[over];\ [over][v0]overlay[over1];\ [over1][v1]overlay=format=yuv420[outv]" -vcodec libx264 -y -map [outv] final.ts`


I need to create a generic object based on a type that is stored in a database. How can I acheive this? The code below (which won't compile) explains what I mean:  string typeString = GetTypeFromDatabase(key); Type objectType = Type.GetType(typeString);  //This won't work, but you get the idea! MyObject<objectType> myobject = new MyObject<objectType>();   Is it possible to do this kind of thing?  Thanks

The title is kind of obscure. What I want to know is if this is possible:  string typeName = <read type name from somwhere>; Type myType = Type.GetType(typeName);  MyGenericClass<myType> myGenericClass = new MyGenericClass<myType>();   Obviously, MyGenericClass is described as:  public class MyGenericClass<T>   Right now, the compiler complains that 'The type or namespace 'myType' could not be found." There has got to be a way to do this.


Screenshot (click to enlarge):    I was browsing the Help Center of PPCG when I found this "Moderator Abilities" tab. When I clicked it, .  ... does this mean that moderators no longer have any abilities? Eeeek!

Most moderator tools and policies are public, and should be discussed in public for the sake of transparency. But there are a few aspect that cannot be discussed in public, this concerns mostly the tools and policies concerning sock puppets and vote fraud. Revealing the tools at our disposal would make it much easier for users to cheat the system, so this has to stay somewhat secret by necessity.   The policies surrounding sock puppets and vote fraud are not actually secret, but it is rather hard to formulate them in a way that doesn't reveal specific information about the moderator tools. So while the general policies are public, there is still a lot of information that would be very useful for new moderators that is not available at any easily accessible place.  The way it works at the moment is that a new moderator just asks in the moderator-only chat room when they have such an issue and some moderators or SE employees will walk them through the process. One significant disadvantage here is that regular moderators don't have access to the tools on other sites, so we have to advise blind, as we can't really see the information the moderators on-site see. It is far easier for comm team members to walk a mod throught the whole procedure, but they are not always available and very busy in general.  I propose to have a part of the new help center that is only accessible to moderators. The content of that help center would be identical across all sites, and it would be created by the community team and the moderators. I'd let moderators suggest edits and let the comm team have the final say on the page, but other variants are possible. This mod-only help center would host pages on topics that can't be discussed in public without compromising the effectiveness of our tools. I can only think of two topics right now, sock puppets and vote fraud, but there might be more. But even those two topics alone are rather important, and having some clear guidelines would be very useful.


How do I tackle my problem as I have mentioned in the title?  I tried to check many times but I could not install Google Play Store.  I have a Micromax a77 Canvas.

I've been having an issue with my apps where an error "" keeps appearing. I read a tutorial somewhere which told me to "uninstall updates" for the Google Play Store application. I was told doing this would uninstall the application, and then the device would automatically reinstall Google Play Store.  I did this, restarted my phone, but the application never reappeared.  I think tried downloading an .apk file to install this manually, but on install the application wouldn't load.  Has anyone done this before? How can I reinstall this application? I believe I need it for all future downloads and updates to my applications.  For the record, my phone is not rooted.


Below is a problem I've been thinking about - it is a textbook problem:  Find the many roots the equation $$2z^4-3z^3+3z^2-z+1=0$$ has in the right half-plane $\Re z>0$  I have two thoughts: use Rouche's Thm directly using "large" semicircle, and using the Cayley transform to convert the question to "How many zeros are in the unit disk?" and then use Rouche's Thm. However, when I do this it doesn't work out as nice as I expect and I think I may be missing the intended solution.

How many roots has $2z^4 -3z^3 + 3z^2 - z + 1 = 0$ in each quadrant?    What I've thought so far is that the polynomial has real coefficients. So we can either have There is one root in each quadrant. There are two roots in the first and fourth quadrant. There are two roots in the second and third quadrant.      However, I am stuck in finding which of these cases hold.


\documentclass[aps,amsmath,article,amsfonts,11pt]{revtex4} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{epsfig,graphicx}  \usepackage[english]{babel} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{latexsym} \usepackage{graphics,bm} \usepackage{dcolumn}  \usepackage{bm} \usepackage{natbib} \usepackage{rotating} \usetikzlibrary{arrows} \pgfarrowsdeclarecombine{twotriang}{twotriang}% {triangle 90}{triangle 90}{triangle 90}{triangle 90} %\setlength\topmargin{0.0005 in}   \begin{document}   C1  \xleftrightarrow{\text{\hspace*{1cm}   }} C2    I am using this code but nothing happening. I want to make a two sided arrow between two function like this:-                   C1 <----------------> C2                                                            I am using here dash line. but i need solid line here.                                  If anyone can figure it out, most welcome.

If I inline a bounded line segment like this:  the distance \tikz{ \draw [|-|] (0,0) -- (5ex,0); } overarching the activities   how can I make the line appear vertically centered on the line (automatically taking into account the line height).


I have an old compaq presario 32 bit laptop which previously had mx linux installed originally windows vista, I now want to use Ubuntu and have wifi access, please can you advise the best download and how to install wireless...thank you

I need to find the 32-bit version, and all I keep finding is the 64-bit. Can anyone provide me with a link?


Moderators currently have access to a nifty list of all a user's comments (500 at a time), which . Unfortunately, we still have to visit the post where the comment was made before we can do anything about those comments, even if there is a pending flag.  The two-step process makes sense when we're trying to figure out if, say, a comment is obsolete; we need the context. It doesn't make sense if, for example, we're just trying to delete the user's 60 comments that all say something like, "You people suck," or "This isn't a homework site. Go RTFM." It's pretty safe to nuke those on sight. After all, moderators are, by definition, trusted users. We should trust them to be able to figure out when to do more investigation and when to nuke from orbit.  I propose fixing this by giving ♦ moderators the ability to edit or delete comments directly from the last-500-comments list. As far as I can tell, this was last , but never got any traction. I think it's time.

A while back, a new dashboard was added to the user moderation tools to .  It's great for scouring a user's comment history to find certain comments, but I can't do anything from this dashboard except filter by flagged1, deleted, or active comments, and visit the posts to which the comments are attached where I can then edit or delete them.  Can we have the ability to edit and delete comments from this dashboard just as we're able to from the flag queue? It gets particularly tedious to have to open 100 tabs just to delete 100 spam comments from the posts they're attached to (and no, I'm not making that number up2...).    1 .  2 Alright, fine, I made that up; the actual number of spam comments I had to delete was 111.


I am trying to write my own version of the reversed() function and I don't quite understand how the suggested solution works.  a="sample string" # my solution reversed_a=a[len(a):-1:-1]   #suggested solution reversed_a=[::-1]    Shouldn't [::] mean [0:len(a)]? If so, how does it work then? I though it would go from 0 to len(a) with a step of -1 and raise an exception due to the negative index value.

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have found something really weird which compelled me to put up this post. I wish I could resolve this problem but was unsuccessful.   Consider a positive integer say 7 , now is it possible to prove that it is equal to 8 and 8 is equal to 9 and so on? Quite puzzled! Have a look at this picture.       \begin{align*} 7  &= 7-\frac{15}2+\frac{15}2 = \sqrt{\left(7-\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{7^2-2\times7\times\frac{15}2+\left(\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{49-105+\left(\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{-56+\left(\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{64-120+\left(\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{8^2-2\times8\times\frac{15}2+\left(\frac{15}2\right)^2}+\frac{15}2 \\ &= \sqrt{\left(8-\frac{15}2\right)^2}+\frac{15}2 \\ &= \left(8-\frac{15}2\right)+\frac{15}2 = 8 \\ \end{align*}   If this is correct, we would be able to show that all positive integers are equal.   I am sure that it is not correct but I would appreciate if someone can point out what the mistake is? Or is there something to be pondered about?

$$\begin{align} 2+2 &= 4 - \frac92 +\frac92\\ &= \sqrt{\left(4-\frac92\right)^2} +\frac92\\ &= \sqrt{16 -2\times4\times\frac92 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{16 -36 + \left(\frac92\right)^2} +\frac92\\ &= \sqrt {-20 +\left(\frac92\right)^2} + \frac92\\ &= \sqrt{25-45 +\left(\frac92\right)^2} +\frac92\\ &= \sqrt {5^2 -2\times5\times\frac92 + \left(\frac92\right) ^2} + \frac92\\ &= \sqrt {\left(5-\frac92\right)^2} +\frac92\\ &= 5 + \frac92 - \frac92 \\ &= 5\end{align}$$  Where did I go wrong


If we have two bipartite quantum states, one maximally mixed (2) and the other maximally entangled(1):  $  |\psi_{1}\rangle  =1/\sqrt{2} ( |00\rangle+|11\rangle) \rightarrow \rho_{1} =  |\psi_{1}\rangle  \langle \psi_{1} |$  $ \rho_{2} = 1/2 (|00\rangle  \langle 00 |+|11\rangle  \langle 11 |)$   In both cases, if we measure one of the qubits, it seems like that the other one would be determined too. In the first case, entanglement does the work for us, and in the second case, we have prepared the ensemble in such a way that this happens. The question I have is that what is the physical difference between these two systems? they seem to behave in the same way in the experiment.

According to , if a system has $50\%$ chance to be in state $\left|\psi_1\right>$ and $50\%$ to be in state $\left|\psi_2\right>$, then this is a mixed state.  Now, consider the state  $$\left|\Psi\right>=\frac{\left|\psi_1\right>+\left|\psi_2\right>}{\sqrt{2}},$$ which is a superposition of the states $\left|\psi_1\right>$ and $\left|\psi_2\right>$. Let $\left|\psi_i\right>$ be eigenstates of the Hamiltonian operator. Then measurements of energy will give $50\%$ chance of it being $E_1$ and $50\%$ of being $E_2$. But this then corresponds to the definition above of mixed state! However, superposition is defined to be a pure state.  So, what is the mistake here? What is the real difference between mixed state and superposition of pure states?


Today I upgraded to Ubuntu 17.04. I get to the login page and type my password correctly, then the sign in message disappears, it stays for a few seconds, then returns and asks me to type the password again.  I am sure I am entering the password correctly since when I tried entering a wrong password, the computer displayed "Wrong password. Try again."

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I am traveling from Paris to Bangalore via London Heathrow on British Airways as I don't have to change the terminal at LHR   Kindly advise if I will need a transit visa, as my onward is booked to US from bangalore

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


Optional is used to avoid NullPointerException in Java 8.   But code has NullPointerException when I use Optional flatmap.  Code as below:  import java.util.Optional; public class test2 {   public static class Car {     public Optional<Insurance> insurance;      public Optional<Insurance> getInsurance() {       return insurance;     }   }    public static class Insurance {     public String name;      public String getName() {       return name;     }   }    public static class Person {     public Optional<Car> car;      public Optional<Car> getCar() {       return car;     }   }   public static String getCarInsuranceName(Optional<Person> person) {     return person.flatMap(Person::getCar)             .flatMap(Car::getInsurance)             .map(Insurance::getName)             .orElse("Unknown");   }   public static void main(String[] args) {     Person person = new Person();     Car car = new Car();     Insurance insurance = new Insurance(); //    insurance.name = "test"; //    car.insurance = Optional.of(insurance);     person.car = Optional.of(new Car());     String result= getCarInsuranceName(Optional.of(person));     System.out.println(result);   } }   Console information：  Exception in thread "main" java.lang.NullPointerException     at java.util.Objects.requireNonNull(Objects.java:203)     at java.util.Optional.flatMap(Optional.java:241)     at test2.getCarInsuranceName(test2.java:29)     at test2.main(test2.java:41)   person variable indeed has no insurance. But the result I want to get is Unknown, not NullPointerException.  Java version:  openjdk version "1.8.0_192" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)   When person has insurance and insurance hasn't name, I got Unknown.  I want to know Why?

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


I'm trying to create Code 128 Barcodes within Microsoft Excel. I have tried all VBA Makros and Fonts I found on Google, but none give's me a scannable result (usually there are weird characters like ó's mixed in). Does anybody have a working solution?

Is there a way to create Barcodes (128 standard) on a Mac, preferably via an add-in?  I need it to create barcodes in Excel sheets (or moreso a friend of mine needs it).   I have tried all VBA macros and fonts I found on Google, but none give me a scannable result (usually there are weird characters like ó's mixed in). Does anybody have a working solution?


I know that static variables are part of class and not part of the Object . How can the following lines of code work without any problem  class M {   static int i=0;   void Inc()   {     System.out.println("Global "+M.i);     System.out.println("Local "+this.i);   } }      public class StaticTest {    public static void main(String args[])    {     M m1=new M();     m1.i=99;       //How can the m1 object access i variable of the class     m1.Inc();    }   }   The output i get is   Global 99 Local 99   How can the m1 object access i variable of the class?

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


When I run git remote show origin on terminal, it shows the following -  Local out of date. How can one update it? I think that this is the probable reason why I am not able to push changes to the repository.         * remote origin   Fetch URL: https://github.com/tono/emotion-detection.git   Push  URL: https://github.com/tono/emotion-detection.git   HEAD branch: master   Remote branches:     master tracked     tono tracked     boro tracked   Local branch configured for 'git pull':     master merges with remote master   Local refs configured for 'git push':     master  pushes to master  (local out of date)     boro pushes to boro (local out of date)

What are the differences between git pull and git fetch?


The standard deviation of a population $[a_1, a_2, \dots a_N]$ is defined as follows: $$ \sigma = \sqrt{\frac{\Sigma_{i=1}^{N} (a_i - \mu)^2}{N}} = \frac{\sqrt{\Sigma_{i=1}^{N} (a_i - \mu)^2}}{\sqrt{N}} $$  The numerator is the (Euclidean) length of the following vector: $$ [a_1 - \mu, a_2 - \mu, \dots, a_n-\mu] $$ We may imagine that this vector lives in some $N$-dimensional configuration space which describes the dispersion of the population.  As we go into higher dimensions, this vector will naturally get longer, because we are adding more coordinates without changing the values of the existing coordinates.  So clearly we have to divide by some scaling factor to normalize this between different population sizes.  Why is that scaling factor the square root of $N$ instead of some other expression?  Does it have anything to do with the $\sqrt{m}$ that appears in ?

Basic Question  Is there an intuitive explanation of standard deviation in terms of Euclidean distance in $n$ dimensional space?  Longer Version of Question  To begin a more detailed sketch of my question, for simplicity let's just focus on the simple case of a discrete random variable that is uniformly distributed. In this case, the variance is given by the following formula, which I've abducted straight from Wikipedia:  $$ \frac1{n}\sum_{i =1}^n (x_i - \mu)^2$$  where $\mu$ is the mean. The standard deviation is then the square root of this. Now, I can't help noticing that the square root of the sum returns the euclidean distance from the vector $X = (x_1, x_2, \dots, x_n)$ to the vector $\vec \mu = (\mu, \mu, \dots, \mu)$. That is, the standard deviation can be expressed as:  $$ \frac1{\sqrt{n}}|X - \vec \mu |$$  So I wonder, is there any significant conceptual relationship between this distance $|X - \vec \mu |$ and standard devation or is this just a coincidence?  Even More Details...  I have looked up many explanations of standard deviation and its cousin variance. Here are some that I've seen already, each sort of following from the previous one:   We square the values before summing to get rid of the sign, which is obviously not important. This explanation is often criticised by hardcore statisticians and I can sort of see why: it doesn't explain why squaring beats taking the absolute value. We square the values so that we pay a greater price for greater deviations. This explains why squaring beats taking absolute values. But why not raise to the power of $4$, or $6$, or any other even power before summing? What is so special about $2$? The thing that is so special about $2$ is that it's the second moment of intertia, whereas the mean is the first moment, so mechanically it makes sense. I don't follow this. My intuition is totally OK with the mean: the point where, if I put my finger, the weights on either side will balance. But the second moment is harder for me to imagine physically like this.   Note, this is a question about intuition. I "understand" the mathematical formula at a shallow level: what all its terms mean, how to calculate it given a dataset. But I am not comfortable with my grasp on why this formula is "the best" one to use in so many applications e.g. the least squares method to fit data. I'm particularly confused as to why squaring is chosen as opposed to raising to some other even power e.g. $9234324$.   And this is where my intuition steps in and tries to provide an explanation that goes right back to the fundamental theorem of Pythagoras: euclidean distance. Here is my thought process: "The number $2$ is special. It's the unique power that makes Euclidean distance work. So maybe it's also the unique number that makes variance work." But then why the multiplying factor of $\frac1{\sqrt{n}}$? Is it just simply a case of: swallow it up and accept the definition, or can this intuition be resolved somehow?


What are the exact conditions of "Active" questions?  I guess:   OP posted a question. OP edited the question. OP commented on the question. OP added an answer. Others voted on the question. Others edited the question. Others answered the question. Others commented on the question.   Which are correct and which are't?

In any post there are three attributes:   Asked  Viewed Active   What is the meaning of the active in a post?


Suppose there is a set of vectors $\{v_1,v_2,v_3,v_4\}$. Are $v_1-v_2,v_2-v_3,v_3-v_4,v_4-v_1$ linearly independent?  If $v_1,v_2,v_3$ and $v_4$ are linearly independent, then $v_1-v_2,v_2-v_3,v_3-v_4,v_4-v_1$ span the same subspace and the dimension is the same. So, $v_1-v_2,v_2-v_3,v_3-v_4,v_4-v_1$ are linearly independent. However, the question does not provide whether or not $v_1,v_2,v_3$ and $v_4$ are linearly independent so I'm lost.   Is this question missing a necessary condition to answer or am I missing something? Thank you in advance.

In the $n$-space $\Bbb R^n$ determine whether or not the set $\{e_1-e_2,e_2-e_3, \dots, e_{n}-e_{1} \}$ is Linearly Independent.  I tried solving it using the definition of a LI set, taking $e_1, e_2$ etc to be the standard basis of $\Bbb R^n$. Finally equating it to the zero of $\Bbb R^n$, I get all the scalars $a_1=a_2=\cdots=a_n$  So should I conclude that they are not necessarily zero and hence the given set is Linearly Dependent?


Show that every $n >6$ is the sum of two coprime numbers each greater than or equal to $2$.  I solved the case $n$ is odd by using $n = 2 + (n-2)$, but I don't see how to do the other case. Reference: Exercise $4.19$ in Exercices de mathématiques: oraux X-ENS (Algèbre I), by Francinou, Gianella and Nicolas.

I need some help in a proof: Prove that for any integer $n>6$ can be written as a sum of two co-prime integers $a,b$ s.t. $\gcd(a,b)=1$.  I tried to go around with "Dirichlet's theorem on arithmetic progressions" but didn't had any luck to come to an actual proof. I mainly used arithmetic progression of $4$, $(4n,4n+1,4n+2,4n+3)$, but got not much, only to the extent of specific examples and even than sometimes $a,b$ weren't always co-prime (and $n$ was also playing a role so it wasn't $a+b$ it was $an+b$).  I would appriciate it a lot if someone could give a hand here.


I want to get a replacement head (possible a tilt head) for this monopod.  It seems like on most online stores, the size of head is exclusively quoted in inch. Since I live outside US and I am also new to the world of photography, I am not entirely sure if I will get it right. I hope you may be able to tell me if I interpreted the size correctly.  So here is my question:  The screw in the photo is about 1 cm wide in diameter. I suppose I can fit 3/8" tilt head to it? My camera is a Fujifilm xt-20.

I was gifted a tripod creatively named: PT-TPM665-C  I am quite happy with it but the head can be frustrating to work with. It feels more geared towards videography rather than photography and needs some fighting to get into desired angle. I am thinking a ball-head will be great upgrade for it.  The problem is, I am a noobie and have no knowlage of different tripod mounting systems. From what I can tell it's a 1/4"ish screw.  Is it a standard size? Does this mount size have a name?


I just try to install nvidia-410 but after I added the ppa with  sudo add-apt-repository ppa:graphics-drivers/ppa and then apt-update it just doesn't find the driver. I tried to remove the files from the sources.list.d/ directory and add them into the base sources.list but that doesn't work, too.   Any ideas?

I have a GTX 660M and Ubuntu 18.04 64-bit.  According to , the latest graphics driver for this card is version 410.66.  The  says  Current long-lived branch release: `nvidia-410` (410.66)   I have nouveau drivers installed at the moment according to lsmod and, apt-get purge 'nvidia*' does nothing.  I have done add-apt-repository ppa:graphics-drivers and apt-get update and a reboot.  Running ubuntu-drivers devices gives this output  == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00000FD4sv00001028sd00000551bc03sc00i00 vendor   : NVIDIA Corporation model    : GK107M [GeForce GTX 660M] driver   : nvidia-304 - third-party free driver   : nvidia-driver-390 - third-party free driver   : nvidia-340 - distro non-free driver   : nvidia-driver-396 - third-party free driver   : nvidia-driver-410 - third-party free recommended driver   : xserver-xorg-video-nouveau - distro free builtin   Note this line:  driver   : nvidia-driver-410 - third-party free recommended   It looks like everything is ready to go to install driver version 410, but autocompleting apt-get install nvidia- indicates the highest available version is nvidia-390, and trying apt-get install nvidia-410 directly fails.  Why does apt not list the version 410 that the PPA and ubuntu-drivers both say is there?  And if I can't apt-get install nvidia-410, how can I install this version?


For example:  tar xvf test.tar.gz ;  rm test.tar.gz   Is there a faster way to reference the file name on the second execution?  I was thinking something like this (which is invalid):  tar xvf test.tar.gz ; rm $1   Anything possible?  I'm fully aware of wildcards.

On a git conflict, I can currently do:  git diff path/to/some/file.txt   ... after reviewing the diff, usually I want to do:  git checkout --theirs path/to/some/file.txt && git add path/to/some/file.txt   It's painstaking to edit both paths each time, so I'd like to be able to do the following:  git checkout --theirs <ref> && git add path/to/some/file.txt   Where the <ref> refers to file.txt.  Any way to do this in bash?


I am trying to download turtl, I download the tar.gz then I run  sudo sh install.sh put in my password but I don't see anything working. Are these steps correct or am I missing something? If you experience or similar problems please let me know, I am kind of new to installing software on Ubuntu.

I am trying to install git-lfs package and it looks like expected paths are not Ubuntu friendly. From  I choose Linux AMD64 file name git-lfs-freebsd-amd64-1.2.1.tar.gz, because .deb files are not available for Ubuntu, just Debian 7,8.  I am getting error: install.sh: 19: install.sh: PATH+=:/usr/local/bin: not found when executing install.sh.  Does anyone have a working solution on how to install git-lfs?


I'm passing in a list as a string to a stored proc of format "('Value1', 'Value2', 'Value3')" and storing it in @Type.  For the life of me, I can't figure out how to say something like  Select * from whatever where colName in @Type where @Type is that formatted list.   I know this is going to be simple enough that I'll facepalm but "How do?"

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


Actually, thats it. The question is: Is it possible to write 1 as the sum of the reciprocals of x odd integers? x is the odd number.  For  x - even the impossibility is obvious. But what to do for x - odd?  I have seen some of the similar questions, but almost everywhere there were odd numbers in a row (2n+1,n=1,2...) And the answer was using the Harmonic number. Somewhere it is mentioned that the difference of harmonic numbers can't be an integer, but i don't know if it is true... If it is, then it is possible to write this (finite) series as a combination of harmonic numbers.  Please, correct me if i'm wrong.   Thank you for your attention.

Is there a positive number $n$ of distinct odd integers $z_1,z_2, \ldots, z_n \geq 3$ such that $\frac{1}{z_1} + \frac{1}{z_2} + \cdots + \frac{1}{z_n} = 1$?


Another toggleClass() problem. There are dozens question about this jQuery function but I could not find this specific one.  I have 2 buttons. One toggles the class of the other on click. This works fine since the colour changes, however when I use a click() event on the 'new' class nothing happens.  html  <button type='button' id='button1'>button 1</button> <button type='button' id='button2'>button 2</button>   css  .pushed {     background-color: salmon; }   js  $('#button1').click(function () {   $('#button2').toggleClass('pushed'); });  $('.pushed').click(function () {   alert('pushed!') });   you can try it here:

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


It is about installation. I bought a new laptop. Dos was already there but no other os.i tried to installing Ubuntu. It was installed and asked to restart now. It restarted and the dvd tray ejected. now when i start it  is showing the system is running on low graphic mode.  What to do now?!

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


I am wondering the differences between the likelihood function in Maximum Likelihood Estimation and the likelihood function in Bayes' Theorem. To me, the likelihood function in Bayes' Theorem depends on the prior probability distribution because values of parameters come from the prior distribution and used in the likelihood function. On the other hand, we do not have any prior probability distribution but we can still do Maximum Likelihood Estimation. It is quite confusing.

Some sources say likelihood function is not conditional probability, some say it is. This is very confusing to me.  According to most sources I have seen, the likelihood of a distribution with parameter $\theta$, should be a product of probability mass functions given $n$ samples of $x_i$:  $$L(\theta) = L(x_1,x_2,...,x_n;\theta) = \prod_{i=1}^n p(x_i;\theta)$$  For example in Logistic Regression, we use an optimization algorithm to maximize the likelihood function (Maximum Likelihood Estimation) to obtain the optimal parameters and therefore the final LR model. Given the $n$ training samples, which we assume to be independent from each other, we want to maximize the product of probabilities (or the joint probability mass functions). This seems quite obvious to me.  According to , "likelihood is not a probability and it is not a conditional probability". It also mentioned, "likelihood is a conditional probability only in Bayesian understanding of likelihood, i.e., if you assume that $\theta$ is a random variable."  I read about the different perspectives of treating a learning problem between frequentist and Bayesian.   According to a source, for Bayesian inference, we have a priori $P(\theta)$, likelihood $P(X|\theta)$, and we want to obtain the posterior $P(\theta|X)$, using Bayesian theorem:  $$P(\theta|X)=\dfrac{P(X|\theta) \times P(\theta)}{P(X)}$$   I'm not familiar with Bayesian Inference. How come $P(X|\theta)$ which is the distribution of the observed data conditional on its parameters, is also termed the likelihood? In , it says sometimes it is written $L(\theta|X)=p(X|\theta)$. What does this mean?  is there a difference between Frequentist and Bayesian's definitions on likelihood??  Thanks.    EDIT:  There are different ways of interpreting Bayes' theorem - Bayesian interpretation and Frequentist interpretation (See: ).


Does anyone know where to find shapefiles of businesses such as grocery stores or gas stations?

I use foursquare because it contains a lot of POIs. Which database do you use when you need a point of interest in North America?


I am fairly new to number systems and notations. I have a problem where I need to find $c$ when it is an exponent: $a ≡ b^{c} \mod 43$ given that $0 \leq c < 43$ and, $a ≡ 27 \mod 43$ and $b ≡ 19 \mod 43$. ($a$ and $b$ are integers). I know that the procedure is to solve the right-hand side, by replacing the values: $ 27 ≡ 19^{c} \mod(43) $ But then, $c$ is on the right-hand side. Any approach arithmetic approach to take in this case? is it allowed to do:  $27^{-c} ≡ 19 \mod 43$ ???

If values $a$, $b$, and $c$ are known, is there an efficient way to find $x$ in the equation: $a^{x} \bmod b = c$?  E.g. finding $x$ in $128^{x}\bmod 209 = 39$.


I´m having trouble with the while statement. I´ve narrowed it down to my use of the "!=", because if I try it with "==", then the program works, except opposite to how I want it to. What do I use to make it so that if the user types in "v", then it won´t display the user´s input, since there´s no such thing as "!==" :)      Scanner scannerUi = new Scanner(System.in);     String userInput = scannerUi.nextLine();     while (userInput != "v") {         System.out.println(userInput);         userInput = scannerUi.nextLine();     }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have a shapefile loaded into QGIS.When i apply filter i can quickly see all the unique values in that column. Is there a quick way to extract that for use in code? I know i could load the shapefile into a geo database and extract from there but for a single file that seems a lot of setup

I have a shapefile whose features I can filter by specifying a where clause in the query dialogue. F.x. I have a field named 'city_name' and by stating 'city_name = "London"' in the where clause only London is displayed. What I would like to do now is to fetch all values in 'city_name' from the attribute table.   Something like that:  select distinct city_name from [attribute table]   I found several tools in QGIS apparently dealing with SQL and I also had a quick look at the different Plugins. But I fail at connecting to a database or the table name ... what database or which table in that case?   In the end I want to export the result list and use it for further processing.  I am using QGIS 1.8.


Are the Magic Items Compendium and Spell Compendium both for 3.5e, or are they based in 3rd version and need conversion before being used in 3.5?

I'm new to d20. I recently acquired a bunch of D&D books and I'm sure they are all either 3.0 or 3.5, but it doesn't say in the book which version it is. How can I tell which version the book is?  For instance, I have "Complete Warrior - A Player's Guide to Combat for All Classes". It's hard back, published in '03. Is it 3.0 or 3.5?  Another example, I have "Sword and Fist - A Guidebook to Fighters and Monks". Perfect Bound, published in '01. Is it 3.0 or 3.5?


I am trying to do a task of looping through an arraylist of objects of type item. Each item object has a code variable. If there is already an object with the code then it is removed from the list.  Code:  //Search list for item based on code.  //If item with code is found, it is removed/deleted from the list.  //Else user is told "No item Found"  public void deleteItem(String code) {     boolean found = false;      for(Item item : items)     {         if(item.getCode().equals(code))         {             found = true;             items.remove(item);         }     }      if(found)     {         System.out.println("Found and removed item with code: " + code);               }     else     {        System.out.println("No item with code" + code + "found");     } }   I get java.util.ConcurrentModificationException  Any help please?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Assuming I have two tables : users and products.   users  uid | name ------------- 1   | Peter 2   | Mary 3   | Ben   products  pid | product | uid ------------------------- 1   | apple   | 2 2   | lemon   | 2 3   | banana  | 2 4   | orange  | 3   What is the difference between:  SELECT p.*, u.name FROM products p INNER JOIN users u ON p.uid = u.uid   and  SELECT p.*, u.name FROM products p, users u WHERE p.uid = u.uid    Are they "logically" the same? (which both gives the intersection of the two tables)  Also, is there any performance difference between them?

Is there any efficiency difference in an explicit vs implicit inner join? For example:  SELECT * FROM table a INNER JOIN table b ON a.id = b.id;   vs.  SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id;


Which Ubuntu is better to install on HP 530 notebook?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am going to write a paper for "International Journal for Numerical Methods in Engineering", published by Wiley. I have downloaded the LATEX package from the website of the journal. It gives the above-mentioned error. Some people say that "do not use 'dvips' option". But this is the standard format of the journal and I think we cannot change this option. Could you please help me to solve this problem without making any significant change in the sample file of the journal?

I'm having this Error when I try to compile my .tex file with xelatex:  ! Package hyperref Error: Wrong DVI mode driver option `dvips', (hyperref)                because XeTeX is running.  See the hyperref package documentation for explanation.   This is my LaTeX header  \documentclass[10pt, a4paper, dvips,]{moderncv}  \moderncvtheme[grey, roman]{classic}  \usepackage{ifxetex} \ifxetex % only for xelatex \usepackage{xltxtra} % this should load both fontspec & xunicode \usepackage{fontspec} \setromanfont{Helvetica Neue} \else % \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \fi % \ifxetex   Any ideas?  EDIT:  I removed the 'dvips', now I get:  ! Package hyperref Error: Wrong driver option `pdftex', (hyperref)                because pdfTeX in PDF mode is not detected.  See the hyperref package documentation for explanation.   Now my first latex line  \documentclass[10pt, a4paper]{moderncv}   Any clues ?


I need to modify driver of specific version of ubuntu (kernel 4.15.0-47) and i need to access source code of this kernel version. I've installed the kernel source code in the /usr/src directory with below command: apt-get install linux-source-4.15.0  Now i need to know that this package contains source code of ubuntu with kernel v4.15.0? What about patch ubuntu patch(uname -r returns 4.15.0-47-generic and so this is patch 47)? How can i download source code of this specific version?

I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package


This is the error message I get every time I try to enable the cube surfer addon:   What am I doing wrong?

Every time I have tried to enable the Cube Surfer addon but this error message comes up. FYI I have the correct versions of everything.  I have had this problem with some other add ons as well. Sometimes it's when I have tried to click a button in an addon (after 'successfully' installing)


I recently saw the 1998 film Pokémon: The First Movie (I can't recommend it), which from my understanding is a direct tie-in to the show. What I don't understand about this film is that all of the Pokémon can only talk using their name... except for two. Mewtwo can talk, and so can this cat-like Pokémon whose name eludes me (he works with Team Rocket). Oddly enough the cat-like Pokémon’s clone cannot speak but I assume that because it was just 'born' it just hasn't learned how yet. I assume that Mewtwo's ability to speak is because the engineers made him that way since Mew can't speak, but I still don't know about the other one. Is there an explanation for this?

Inspired by Detective Pikachu, I was wondering which Pokémon can "speak" with humans.  I would like to include  Pokémon like Meowth in the anime that speak English/Japanese with their mouths, Pokémon like Mewtwo in the anime/movies that speak telepathically, or other Pokémon we've seen like Lugia/Entei that seem to speak without moving their mouths but still out loud for all to hear (presumably).  The format doesn't matter (manga, anime, video games). And while this is inspired by Detective Pikachu, it's not about it, as the movie is not out yet      And it seems like the human character has the special ability, not the Pikachu


I own a MBP 2019 and iMac 2017 5k. Mostly I use the MBP for my programming as it is having an SSD. Is there any way to use the iMAC as a secondary display or mirrored display using the type c cable or other cables? I do not prefer wireless methods as it may get slow. Both are running in Big Sur

I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen?


Is there any significant difference in how the new DOM element is created? Are there any advantages/disadvantages of using one way over another or does it come down to personal preference? I usually use the first way and only recently found out about the second one.  var test1 = $('div#test1'),     test2 = $('div#test2') ; // first way $('<div/>')     .addClass('mainClass subClass')     .attr('id', 'someId2')     .attr('data-extra', 'extraInfo')     .text('some text')     .appendTo(test2) ;  // second way $('<div/>',    {       'class': 'mainClass subClass',       'id': 'someId1',       'data-extra': 'extraInfo',       'text': 'some text'   })     .appendTo(test1) ;

Recently I've been doing a lot of modal window pop-ups and what not, for which I used jQuery. The method that I used to create the new elements on the page has overwhelmingly been along the lines of:   $("

");   However, I'm getting the feeling that this isn't the best or the most efficient method of doing this. What is the best way to create elements in jQuery from a performance perspective?   has the benchmarks to the suggestions below.


Given a real number $x$, and a real number $\epsilon>0$ arbitrary small as possible, can we find an integer $n$ such that $|nx-\left \lfloor{xn}\right \rfloor |<\epsilon$ or or $|nx-\left \lceil{xn}\right \rceil|<\epsilon$. ? and if so- can we find either an exact number $n=f(x,\epsilon)$ or even an upper bound over $n$?  Edit:  proved that such $n$ exists. However, I wish to know any upper bound\exact formula for $n$ :)   I know that the above is true by replacing the above constrain by $|nx-\left \lfloor{xn}\right \rfloor |<\epsilon\cdot n$. This follows simply as for each irrational $x$ number there is a series of rational numbers converging to $x$. However, I wish to prove\disprove a more generalized statement.

Let $x\in \mathbb{R}$ an irrational number. Define $X=\{nx-\lfloor nx\rfloor: n\in \mathbb{N}\}$. Prove that $X$ is dense on $[0,1)$.    Can anyone give some hint to solve this problem? I tried contradiction but could not reach a proof.  I spend part of the day studying this question   and its answers. Only one answer is clear and give clues to solve the problem. This answer is the first one. However, this answer does not answer the question nor directly, nor the proof follows from this answer.   This answer has some mistakes, he use that $[(k_1-k_2)\alpha]=[k_1\alpha]-[k_2\alpha]$ which is not true. Consider $k_1=3, k_2=1, \alpha=\sqrt{2}$ we have $[(k_1-k_2)\alpha]=2\not= 3=[k_1\alpha]-[k_2\alpha] $. We only can assure that $[k_2\alpha]-[k_1\alpha]-1\leq [(k_2-k_1)\alpha]\leq[k_2\alpha]-[k_1\alpha]$.   Who answered said something interesting about additive subgroups of $\mathbb{R}$, but unfortunately the set $X=\{nx-[nx] : n\in \mathbb{N} \}$ is not a subgroup. Considering the additive subgroup $G=\langle X \rangle$, if we prove the part (a) of the link, we get that indeed $G$ is dense on $\mathbb{R}$ but we can not conclude that $X$ is dense on $[0,1)$.  I think this problem has not been solved.  Thanks!


General input  normal group use $\unlhd$ or $\trianglelefteq$,     I want to get the two symbols in LaTeX:    (I see it at P.Grillet. "Abstract Algebra". 2nd ed, GTM242)  It's like another symbol $\leqq$ and $\lneqq$, and I hope know that how to get I hope them seem like adding a vertical line to $\leqq$ or $\lneqq$, so that the size is relatively close to $\leqq$ or $\lneqq$.  I want to know how to get these two symbols in a simple way.

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


How can I drag file to the running application on Dock?  For example, I have running and minimized Chrome but I want to drag file to imgur or askubuntu topic for upload.  In Windows I just simply drag file to the app on taskbar and app maximize and I can drag file to the browser. Do they possible on Ubuntu 18.04+ without extensions?

Since Ubuntu 18.04 I can't drag a file e.g. image file to an open application such as Inkscape or  email message window. In Ubuntu 17.10 I was able to select the image file by clicking on it, and while holding down left mouse button I would hit the supper key displaying all open windows where for there I could then drop the file in any open app or folders. This is no longer possible/default behaviour since Ubuntu 18.04. Is there a workaround that would allow me to achieve this or even a way to recreate the same behaviour like in 17.10?


My Ubuntu dock was only displayed on my primary monitor. Then, I set Settings > Appearance > Dock > Show on: All displays Now, I can't change it back to my primary monitor. I have 3 monitors. When I try to select either of my 2 secondary displays with the mouse, it stays on "All displays". When I select my primary monitor, the selection shows my primary monitor, but the dock is still displayed on all monitors. If I close the window and reopen it, or try navigating to a different page and go back to the Appearance tab, it shows "All monitors" again. I assume there's a settings file somewhere where I can manually fix it since the GUI is broken. But I don't know where.

I updated to Ubuntu 18.04 a few weeks ago with little to no problems until now. After an update I installed and a reboot, my sidebar (Ubuntu dock) shows on the secondary screen, which is my Laptop, while my HDMI monitor is saved as the primary and has the top bar with time, battery and so on.   How can I get the sidebar back to my primary screen?


I have a complicated formula field that calculates the months between a start / end date on an OpportunityProduct. This formula takes into account many edge cases, and is subsequently used in our calculation of UnitPrice.  no_of_Months__c =  (  (Year_End_Date__c * 12) /* Calculate years as Number of Months */  + Month_End_Date__c /* Add Number of Months */  + (  DAY(End_Date__c) /* Add Day of Month / Number of Days in Month. Returns month percentage as a Decimal */  / DAY(DATE(  IF(Month_End_Date__c = 12, Year_End_Date__c + 1, Year_End_Date__c),  /* Can't create a date with 13 months so need to add a year if in December */  IF(Month_End_Date__c = 12, 1, Month_End_Date__c+1),  1) -1) /* Need to find number of Days in Month by taking the Day from the 1st of next month - 1 day */  )  )  - (  (Year_Start_Date__c * 12)  + Month_Start_Date__c  + (IF(DAY(Start_Date__c) = 1, 0, (  DAY(Start_Date__c) - 1) /* Slight Difference here to subtract a day. We want to go from Start of day on StartDate to End of Day on EndDate*/  / DAY(DATE(  IF(Month_Start_Date__c = 12, Year_Start_Date__c + 1, Year_Start_Date__c),  IF(Month_Start_Date__c = 12, 1, Month_Start_Date__c+1),  1) -1)  )    When a new OpportunityProduct is being created on the fly, I am unable to reference this formula field for obvious reasons (the record doesn't exist yet), so I have to manually calculate the number of months and use that in the UnitPrice calculation. Is there a way to copy this formula logic into my apex class easily, or do I have to rewrite this calculation using entirely new syntax? I am not the original author of the formula, so I would like to avoid the latter if possible.

I have an "invoice" custom object which has a couple of summarising formula fields in. I also have a complicated and dynamic visualforce page for building the invoice objects.  As the user is completing this form, different areas are dynamically updated to show "latest" values. This is all fine where I am copying data about or performing bespoke lookups and maths, but - in what is really the simplest case - a formula field, I can find no way to get the value to update, without performing some weird cyclic save + reload of the whole object.  This is inappropriate for a couple of reasons (the object should not be saved until the invoice is complete + accepted) and the other option I have found online is to spoof the value by duplicating my formula field maths into the custom controller and re-executing them there - also unacceptable from a code/logic location/duplication perspective.  Is there anyway to "force" an object/page to recalculate it's formula fields, either through standard or extended controllers?


Calling a dlete method from the Book class from the main method gives a NullPointerException. Works fine when running the delete method from within the Main class.  Exception in thread "main" java.lang.NullPointerException     at algorithms/algorithms.Main.main(Main.java:20)  What am I missing?  Main:  private static Book book;  public static void main(String[] args) {      Book[] bookArray = {new Book(123, "Book1"),              new Book(321, "Book2"),              new Book(456, "Book3"),              new Book(654, "Book4"),              new Book(789, "Book5")};      System.out.println(bookArray.length);     bookArray = book.removeBook(bookArray, 456);     System.out.println(bookArray.length);      }   Book class method (left out attributes, getters and setters):   public Book[] removeBook(Book[] books, int findISBN) {      Book[] newArray = new Book[books.length - 1];     int j = 0;      for (int i = 0; i < books.length; i++) {         if(books[i].getISBN() != findISBN) {             newArray[j] = books[i];             j++;         }     }     return newArray; }

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


Happy New Year to you!  I am trying to create a Beamer document, and I realised that the foot-line's alignment is off. Is there any way to fix this? Since some TexLive update, I realised all my new typeset documents are misaligned - it used to be normal in the past.  \documentclass{beamer} \usetheme{Boadilla}  \title[Title]{This is the title}  \author[Name]{Author's name} \institute[Institute]{Author's Institute} \date[Date]{\today}  \begin{document} \begin{frame}     \titlepage \end{frame}  \end{document}

I just uninstalled TeX Live 2016 and installed TeX Live 2017 and I noticed that the vertical alignment of author and title in any beamer presentation with Warsaw theme has been disrupted. In this example the author is JESTIN and the title is Beamer Intro. How can I vertical center them?  Moreover, I just found the same bug in the beamer guide obtained writing texdoc beamer in the command prompt, in the part of a warsaw presentation.    Here is my code:  \documentclass{beamer}  \usetheme{warsaw}  \title[Beamer Intro]{Beamer - Introduction to \LaTeX{} presentation making} \author[JESTIN]{Jestin Joy}  \begin{document}  \begin{frame}   \titlepage \end{frame}  \end{document}


I know that  I can write $aabb=1000a+100a+10b+b$, $a,b\in \{0,1,2,3,4,5,6,7,8,9\}, a\neq 0$, so $aabb=1100a+11b=m^2$, where $m\in \mathbb N$, I notice that $m^2=11(100a+b)$ so I need to find some number that $11\mid m^2$ and $11\mid m$,$1100<m^2<9999$ or $33<m<99$ so I just put number in calculator and 88 is answer, so $aabb=7744$, but is there any other better solution?

What is the method for finding numbers $a$ and $b$?


I have made a bootable USB. I have made 100s of them before. I have a dual boot pc, Kali and Ubuntu.   I want to reinstall Kali from USB (alongside my UBUNTU), but the computer will not boot to USB anymore. Burning ISO to DVD is really absurd.  Why can't I boot to USB anymore?

I can't boot via USB after installing Ubuntu.   Yes, the BIOS lists USB, but it is disabled.  Yes, USB is at the top of the boot priority in the BIOS, but it is disabled.  Yes, user Da1T, I'm looking in the BIOS.   Burning an image to disc is a waste of time and money.


I have tried to solve it but my answer is wrong. I did the following-  using $$2\cos b\sin a = \sin(a+b) + \sin (a-b)$$  $$2\sin5\theta\cos3\theta = 2\sin6\theta\cos2\theta$$  $$\sin 8\theta+ \sin 2\theta = \sin8\theta+\sin4\theta$$  $$\sin2\theta - \sin4\theta = 0$$  $$\sin2\theta - 2\sin2\theta\cos2\theta=0$$  Case $1-$ $$\sin2\theta=0$$  $$\sin2\theta=\sin0$$  $\therefore$ $\theta = \frac{m\pi}{2}$  Case $2-$  $$2\cos2\theta =1 $$ $$\cos2\theta=\frac{1}{2}$$  $\therefore$ $\theta = n\pi \pm \dfrac\pi{6}$  In the solution they have used the identity of sinA -SinB in step 4.Then Sin2θ-Sin4θ had changed to 2cos3θsin(-θ).  But I have used sin2θ = 2sinθcosθ and converted sin4θ to 2sin2θcosθ. This very step made my answer incorrect. Why did they did so??

I have tried to solve it but my is wrong. I did the following-  using $$2\cos b\sin a = \sin(a+b) + \sin (a-b)$$  $$2\sin5\theta\cos3\theta = 2\sin6\theta\cos2\theta$$  $$\sin 8\theta+ \sin 2\theta = \sin8\theta+\sin4\theta$$  $$\sin2\theta - \sin4\theta = 0$$  $$\sin2\theta - 2\sin2\theta\cos2\theta=0$$  Case $1-$ $$\sin2\theta=0$$  $$\sin2\theta=\sin0$$  $\therefore$ $\theta = \frac{m\pi}{2}$  Case $2-$  $$2\cos2\theta =1 $$ $$\cos2\theta=\frac{1}{2}$$  $\therefore$ $\theta = n\pi \pm \dfrac\pi{6}$  So where I did wrong ????


What does ln -T do? I know the flag does not exist in the BSD version of ln, and it only exists in the GNU version, and I have read the documentation that it will make ln "treat LINK_NAME as a normal file always", but what does that mean and why does the BSD version not have it?

Why do some GNU Coreutils commands have the -T/--no-target-directory option? It seems like everything that it does can be achieved using the semantics of the . (self dot) in a traditional Unix directory hierarchy.   Considering:  cp -rT /this/source dir   The -T option prevents the copy from creating a dir/source subdirectory. Rather /this/source is identified with dir and the contents are mapped between the trees accordingly. So for instance /this/source/foo.c goes to dir/foo.c and so on, rather than to dir/source/foo.c.  But this can be easily accomplished without the -T option using:  cp -r /this/source/. dir  # Probably worked fine since dawn of Unix?   Semantically, the trailing dot component is copied as a child of dir, but of course that "child" already exists (so doesn't have to be created) and is actually dir itself, so the effect is that /this/path is identified with dir.  It works fine if the current directory is the target:  cp -r /this/tree/node/. . # node's children go to current dir   Is there something you can do only with -T that can rationalize its existence? (Besides support for operating systems that don't implement the dot directory, a rationale not mentioned in the documentation.)  Does the above dot trick not solve the same race conditions that are mentioned in the GNU Info documentation about -T?


So far i have been using $\text{supp} u$ but that is very cumbersome and probably wrong, do we have an equivalent of \lim for $\lim$?

Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log.  How can I define additional such commands?


I am not able to solve this problem  Show that the integer just greater than $( \sqrt{3} + 1 )^{2m}$ contains $2^{m+1}$ as a  factor.  Any help would be thoroughly appreciated

Show that $ \left\lceil( \sqrt3 +1)^{2n}\right\rceil$ where $n \in  \mathbb{N}$ is divisible by $2^{n+1}$.     I wrote the binomial expansion of $ ( \sqrt3 +1)^{2n}$ and  $( \sqrt3 -1)^{2n}$ and then added them to confirm that the next integer is even. Afterwards I applied $AM \ge GM$ on the two terms to get $ ( \sqrt3 +1)^{2n} + ( \sqrt3 -1)^{2n} \ge (2^{n+1})$.  Now I'm unable to figure out the next step. Any help would be appreciated. :)


On my less-than-ideal internet, updates such as XCode take many hours to download, and basic browsing (e.g. stack exchange) slows to a crawl while they're loading. I'd like to be able to pause the download and resume it later.  I know I can cancel downloads by pressing the download ring in the App Store app, but I can't find any way to pause downloads in a way which can be resumed later without re-downloading the whole thing. The internet leads me to believe that this used to be possible by right-clicking the app's icon in the dock and selecting 'pause', but this doesn't appear in Mojave (neither on the app being downloaded nor on the app store itself).  What do I need to do to pause an update?

I am downloading macOS Sierra from Mac App Store. But I have electricity problem here. Due to which my iMac will lose power after 2 hours. Now I want to pause the downloading so that I can resume the download later on. How can I do that?  Here is a screenshot.