Simplify limit problem $\lim\limits_{x\to 0}\frac{\sqrt{2+x^2}-\sqrt{2+x^2}}{x^2}$

This problem is from Calculus: A complete course 8 ed.(Adams/Essex). Problem no. 35 chapt 1.2.     Evaluate the limit or explain why it does not exist.      $\displaystyle\lim_{x\to 0}\frac{\sqrt{2+x^2}-\sqrt{2+x^2}}{x^2}$   So I multiplied the fraction with the conjugate of the numerator and ended up with this. I see that $x^2$ can be divided from both numerator and denominator. But after that I am not sure how I should continue.  $\displaystyle\lim_{x\to 0}\frac {2x^2}{x^2(\sqrt{2+x^2} + \sqrt{2-x^2})}$  The answer states that next step is   $\displaystyle\frac {2}{\sqrt{2} + \sqrt{2}}$  But I do not see how it got there. I tried looking up square root laws and how simplify but could not see anything that was useful for me.


"There is a kitchen and a bedroom in their house." "There is a table and 14 chairs in my room."


How determine the distribution of $S_{n-1}^{2}$?

If $ X_1,\dots,X_n $ is a random sample with $X_i \sim N(\mu,\sigma^2) $, how determinate the distribution of $S_{n-1}^2 = \frac{1}{n-1} \sum \limits_{i=1}^n (X_i - \bar{X})^2 $? I tried to apply the method of moments as follow: $S_{n-1}^2 = \frac{1}{n-1} \sum \limits_{i=1}^n (X_i - \bar{X})^2 = \frac{1}{n-1} \sum \limits_{i=1}^n X_i^2 - \frac{n}{n-1} \bar{X}^2 $ $$ M_{S_{n-1}^2 }(t) = E[ e^{t ( \frac{1}{n-1} \sum \limits_{i=1}^n X_i^2 - \frac{n}{n-1} \bar{X}^2 ) } ] =  E[ e^{t ( \frac{1}{n-1} \sum \limits_{i=1}^n X_i^2)} e^{t(- \frac{n}{n-1} \bar{X}^2 ) } ] = E[ e^{t ( \frac{1}{n-1} \sum \limits_{i=1}^n X_i^2)} e^{(-t \frac{n}{n-1} \bar{X}^2 ) } ] $$ $$= E[ e^{t ( \frac{1}{n-1} \sum \limits_{i=1}^n X_i^2)}] E[e^{(-t \frac{n}{n-1} \bar{X}^2 ) } ] = \prod_{i=1}^n E[ e^{t ( \frac{1}{n-1} X_i^2)}] E[e^{(-t \frac{n}{n-1} \bar{X}^2 ) } ]$$ But in this point I'm lose. Should I apply the following? $$ X_i \sim N( \mu,\sigma^2 ) \Rightarrow X_i = \sigma Z + \mu  $$ $$ Y = (\sigma Z+ \mu )^2 \Rightarrow M_Y(t) = \frac{1}{\sqrt{1-2t\sigma^2}} \exp\left(  \dfrac{\mu^2t}{1-2t\sigma^2}\right) , \ \text{if } \ 2\operatorname{Re}(t\sigma^2) < 1$$ Or isn't this the simplest way to determinate $S_{n-1}^2$?


I am a fan of  8 Ball Pool on Miniclip. Also I have dual boot OSs, so I play on Windows, but whenever I open it in Ubuntu in Chromium browser, I always get a white screen like this:    I even tried playing it on Facebook, but it is still like that.  I have installed Flash Player or plugin,. but I'm not sure it got installed or whatever. Can someone please tell me any way to fix it?


In FreeBSD there are an utility to support circular log files called .  This is very interesting for avoid the maintenance of the logs of some services (outside systemd and their journald).  Are there any alternative to do the same in linux and/or with rsyslog?


Do you keep your rewards and score etc when you are kicked from a server?

I know that in MechWarrior Online if you quit (or crash, whathaveyou) that any scores or accomplishments you have made in the match will be awarded to you at its conclusion (even though you're not in it).  I was wondering if Battlefield 3 did the same. Like, it may do so if you quit (so the game has a chance to 'shut down') but what if you crash, are kicked, or otherwise disconnected abruptly?  I don't think it increases your scores (experience etc) whilst the game is running, but I don't know if it will still amend your profile if you aren't there when the match ends (I've logged back into a match before and found my score to be 0 with 0 kills and deaths as if I was never there).


Conflict between endfloat and figure floats included via macro

I use \newcommand to quickly include figures. But combined with endfloat, it throws an error. Any ideas how to send floats to end when included this way?  \documentclass{article} \usepackage{graphicx} %\usepackage{endfloat}  % this causes an error  \newcommand{\addfig}[1]{  \begin{figure}[htbp]  % when float environment is included here \centering    \includegraphics[width=\textwidth]{#1}   \end{figure}  }   \begin{document} \addfig{fig1} \end{document}


What external hardware allows a fingerprint to login/unlock a Mac?

I own a mid-2009 MBP with OS X Mavericks installed. I'm a hi-tech enthusiast who wants to use the fingerprint scanning feature made available by many scanners on the market to login into my account after boot and unlock the screen after the screensaver has started.  The scanner I'm willing to buy is a DigitalPersona U.are.U-5160 which is not only FIPS 201 PIV certified, but it's also designed to work in harsh environments and situations. See:   Please note that I've already read this article on StackExchange () which talks about the same, but I've found nothing interesting in it.  In particularly, supposed that I've gotten all the Smart Card Services/CAC Libraries:   How do I switch from password login to fingerprint login? Can I use fingerprint login with FileVault 2 too? (i.e. decrypting the HD using my fingerprint, with no passwords to type)   I think these features require dedicated API's or SDK's, and Apple stopped deploying them since it bought AuthenTec. Now, all fingerprint-scanning feature are officially unsupported by Apple except for the iPhone 5S.  I've read somewhere that LastPass does a very similar job indeed, and is used for the purposes I've listed.  How can I achieve this?


what is the fastest way to kill a troll in skyrim?

So in Skyrim going to one town near a river a regular troll is outside the entrance down the slope of the hill and you have to walk past him I ran using my whirlwind sprint you learn from the greybeards... After running I had made it to the town all the towns people pulled out weapons and it turns out the troll had followed me from the river to the town itself and this was when I was over encumbered yet the cool down was fairly quick so I was a ways ahead and on your way to the greybeards the first time you pass by a frost troll I would really like to level some skills against them yet I also want it to be quick any tips?


Using regex to match international/unicode alphanumeric characters in javascript?

I'm trying to use Javascript's string.match() function for a fairly simple task: extract all the words from a string and then count the number of occurrences of each word. The regular expression:  /\w+/g   works fine for this task except for the fact that it can't handle any sort of unicode/international characters. What's the best/cleanest way to be able to match accented characters, the Cyrillic alphabet, and any other major alphabets?  If it happens to matter, I'm currently coding in a Node.js environment.


What is rank deficiency, and how to deal with it?

Fitting a logistic regression using  ends with   Error in mer_finalize(ans) : Downdated X'X is not positive definite.    A likely cause of this error is apparently rank deficiency. What is rank deficiency, and how should I address it?


How to start Thunderbird minimized on start-up?

to set start Thunderbird in minimized mode at startup, but it wasn't helpful.   After following the instructions, I could not even start Thunderbird. So I was forced to start TB in safe mode to delete the "FireTray Plugin" and fix this issue. After that it started to work but it deleted all my email accounts and I had to do that chore all over again .  So is there any working way to start Thunderbird minimized on start-up?


In practical, how to find the friction of rubber vs plastic?

I did an experiment. The experiment was to use a gripper which had rubber fingers to grip a plastic rod which attached to a mass. After that I had a linear motor to move the gripper.   What I wanted to see was that the rod with a mass was moved by the gripper which was driven by linear motor.  Technically, the length of the rod which is gripped by the rubber fingers does not related to the area that gripped by the rubber finger because F=uN, friction force by the rubber gripper has no relation with the area.  However,it does make some different. It has higher chance to move the heavier mass.   Does there are more than just F=uN that I need to concern?


I created a text file with a wrong name called "a." on my Desktop and now I cannot moved, rename, nor delete it. I already restarted many times, and the file is still there "unlinked".  I am working on windows 7 Enterprise SP1 64bits.  Is this another glitch yet to fix, as the famous c:/con/con on win98 that MS miserably failed to fix yet to these days?


I know how to program Console application with parameters, example : myProgram.exe param1 param2.  My question is, how can I make my program works with |, example : echo "word" | myProgram.exe?


AJAX call using admin-ajax URL is returning 400 bad request

I am attempting to create an AJAX call to pass custom taxonomy into my WP_Query but I am getting 400 (Bad Request). I believe my data array is built correctly so I am not sure what's causing it. Does anything look off here? Is there a way for me to get a more detailed error of why it is returning error 400?  $.ajax({     type:'POST',     url:ajaxUrl,     data: {         taxonomy: 'products',         slug: 'shirts'     },     beforeSend:function(xhr){      },     success:function(data){       $('#response').html(data); // insert data     } });   I console logged ajaxUrl and I am getting the correct path to admin-ajax.php so I know that's not the issue. I think it has to have something to do with data.


Order of arbitrary element in $GL(2, q)$

If $A$ is an arbitrary element of the general linear group $GL(2, q)$, is there a way to determine the order of $A$ without having to compute matrix powers?  The "brute force" method works fairly well. There are $q (q + 1) (q - 1)^2$ elements in $GL(2, q)$. At worst, you could check all divisors of this. Using  it's possible to limit the search to the divisors of $q(q - 1)$ and $(q - 1)(q + 1)$. However, I am slightly unsatisfied at having to compute the order this way.


Is there ANY way to make it so that a MCEE .mcworld file can be played on MCBE?

I tried pretty much everything I know (which isnt a lot). Like just straight up importing, literally shoving it into the minecraft world files, and just kept changing a copy of the world to like .zip, .dir, and others. The world from MCEE is just a vanilla world and theres no mcee specific blocks since we don't use cheats.


I'm developping an application and I'm looking for some cool informations about protecting it against copy ! Do you guys know some book/articles/any informations about it ?  Thanks in advance for your advices !


Unity Launcher and panel Missing after update of Ubuntu 16.04 Xenial

I updated my Ubuntu 16.04 xenial and rebooted the system, but after the reboot no launcher and panel appear in screen. Mouse right click is working, even I can start any applications from terminal it's working fine, but no menu bar for applications are being displayed and many shortcuts are also not working(ex-ALT+TAB to switch between application). I googled it and got so many solutions but none of them worked for me. I installed CCSM tool, tried to delete .config/compiz-1/compizconfig directory, tried some Intel Graphics driver tricks but eventually I end up with no solution.  I created other accounts, for new accounts it's working fine.


calculate (find the type of isomorphism) of $ℤ_{p^n}/pℤ_{p^n}$ where p is prime.  I know that $ℤ/pℤ$ isomorphic to $ℤ_p$  and that  $ℤ_p/pℤ_p$ isomorphic to $Z_p$  any help and explanation on how to continue will be appreciated


How do I punctuate a series of quotes from TV shows?

I want to write this:      “Dy- No-Mite!” “Stifle it Edith.” “Good Night John Boy.” “Nanu Nanu.” “God will get you for that.” “Book em Danno.” “Da plane, da plane.” “Eizabeth, I’m coming.” “Kiss my grits!” “Marcia, Marcia, Marcia.”  “Who loves you, baby?” “Just one more thing.”   Do commas go between quotations or as part of the quotation? What if there is a question mark or exclamation mark as part of the quote?


Unable to install tor, access to directories denied

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   How to proceed? I'm trying to install tor and I'm not able to run the command  apt-get update   I'm getting the above errors.


4 is a mathematical expression . It has one term so it is a monomial.

I am asking  if 4 is a mathematical  expression  and  it is a monomial.  Monomials are polynomials with single term.  so 4 is a polynomial  expression .  which is a constant  polynomial  expression  because it can be written  in this form 4x^0.  all polynomial  expressions  are algebraic  expressions .  so 4 is an algebraic  expression  also. But 4 is a numerical  expression  rather than an algebraic  expression  because there must have a variable  to be called an algebraic  expression.  Its a paradox please solve.  one more question  what algebraic  expressions with  one  term is called if it is not a polynomial  eg.  root (x).


I have recently started studying graphs and their different traversal algorithms, and can't seem to be able to come up with answers to these two questions. I really need your help, I don't even know where to start.  (a) Prove that every connected graph G=(V,E) has a node v∈V such that removing vv and all its adjacent edges will not disconnect G.  (b) For a given connected graph G=(V,E), design an O(n+m)-time algorithm to find such a node.  I have found some answers , but they still don't make a lot of sense to me because I don't have a lot of experience in the topic.  Thank you so much in advance!


How is the derivative of an operator defined?

Studying quantum mechanics I have encountered several times in proofs this expression: $$ \frac{\mathrm{d}\langle\phi|\hat{H}|\psi\rangle}{\mathrm{d}t} = \biggl\langle\frac{\mathrm{d}\phi}{\mathrm{d}t}\bigg\rvert\hat{H}\bigg\lvert\psi\biggr\rangle + \biggl\langle\phi\bigg\rvert\frac{\mathrm{d}\hat{H}}{\mathrm{d}t}\bigg\lvert\psi\biggr\rangle  + \biggl\langle\phi\bigg\rvert\hat{H}\bigg\lvert\frac{\mathrm{d}\psi}{\mathrm{d}t}\biggr\rangle  $$  What does the derivative of an operator mean mathematically ? Is something that can be rigorously mathematically defined? Or is just the juxtaposition of the derivative and the operator?  Moreover I was wondering if it is possible to derive this form of Liebniz rule. If I explicitly do the integrals I can carry in the time derivative, but I don't understand how to apply a derivative to a mathematical object which is defined only by its action on a well defined function.


Vim writes to file without having permissions

$ ls sess.vim -lh               -rw-r--r-- 1 root root 11K Feb 26 18:52 sess.vim   I want this file to be readable for everyone and writable by no one (except by root). Thus I set its permissions to 644 and ownership to root:root.    $ echo "text" >> sess.vim       zsh: permission denied: sess.vim   Seems fine. After some changes in vim I do :w! (force write) and the file is saved successfully. Now:  $ ls sess.vim -lh -rw-r--r-- 1 MY_USERNAME users 11K Feb 26 19:06 sess.vim   Wt.. Why? How?


Show that a closed graph and compact codomain implies continuity.

Let $$f:X\rightarrow Y,$$ where X and Y are metric spaces and Y is compact. If  f  has a closed graph $$G_f=\{(x,f(x)):x\in X\},$$  then f is continuous.   My first instinct is to use the fact that if $${x_n}\rightarrow x \;\text{  and  }\; \{f(x_n)\} \rightarrow y$$ implies x is in X and f(x)=y, then showing the f is continuous at $(x,y)$, and so continuous on X. Having trouble getting direction on this.


How to extract "foo" from "foo-bar-baz" in bash?

I'm trying to extract foo from the string "foo-bar-baz" in bash.  Any ideas how to do it using string substitution or something similar (without external tools).  I tried this but it didn't work:  $ str="foo-bar-baz" $ echo ${str%-*} foo-bar   This also not work:  $ str="foo-bar-baz" $ echo ${str#*-} bar-baz   Any ideas how to get just bar?


String concatenation: concat() vs "+" operator

Assuming String a and b:  a += b a = a.concat(b)   Under the hood, are they the same thing?  Here is concat decompiled as reference. I'd like to be able to decompile the + operator as well to see what that does.  public String concat(String s) {      int i = s.length();     if (i == 0) {         return this;     }     else {         char ac[] = new char[count + i];         getChars(0, count, ac, 0);         s.getChars(0, i, ac, count);         return new String(0, count + i, ac);     } }


Are "trustmarks" such as McAfee Secure worth the cost?

There are a number of services that will scan a website for vulnerabilities and allow the display of a trustmark image if the site passes their tests.  This allegedly increases the level of trust a potential client feel toward the website and therefore makes them more likely to complete a purchase.    McAfee claims it has studies which show significant increases in sales. Should I take their word for it?  What sort of increase should I really expect, if any?  Are these types of services worth the prices they charge?


Java comparison with == of two strings is false?

String parts is String[6]:   ["231", "CA-California", "Sacramento-155328", "aleee", "Customer Service Clerk", "Alegra Keith.doc.txt"]   But when I compare parts[0] with "231":  "231" == parts[0]   the above result is false,  I'm confused, so could anybody tell me why?


I am puzzled by this question.  I tried all triangle angle formulas, and every time I end up reaching x + y = 130.    I am sure I am missing one essential property. If anybody please solve this and possibly remind me of which property I forgot to use.


What is the Earth truly rotating about/revolving around?

Earth rotates on its axis and revolves around the sun, , the galaxy is also moving. So Earth's net rotation as observed from a fixed inertial frame consists of all these contributions (and is rather complex). Now a  on earth is supposed to tell the experimenter whether the earth is rotating or not. See a recent question on this forum  Basically for a Foucault's pendulum, the plane of the oscillation of the bob rotates, as the Earth rotates. But, the Foucault's pendulum does not single out one type of rotation, it gets affected by all. Therefore the rotation of plane of oscillation can be used to measure rotation of Earth around its own axis, around the sun, everything. But the question is, around what is the Foucault pendulum measuring Earth's rotation with respect to? That is, finally what is the Earth rotating around/revolving around? Isn't it intriguing that the effect of the entire Universe on Earth can be measured by a pendulum? I understand that the effect on the pendulum due to say the revolution of solar system around the galaxy is going to be small, but still, it can be measured say in an experiment going on for 10 years. You can keep on increasing the accuracy by measuring for longer periods.


Adding a user who can only execute scripts remotely

I would like to create a user who can only do one thing: via ssh specify a script ( and commandline arguments to the script ) that resides in one particular folder ( for the purposes of this question let us call it /local/remote_only_scripts/foo ) and have that script execute and return it's output.  To be clear some examples of things I do not want the user to be able to do:   Locally log in to the account.  The login application is /bin/login. It is not a script in the /local/remote_only_scripts/foo folder, so should not be called by the user. Remotely log in to the account. Again login ( is that what is called by ssh? ) is not a script in the relevant folder. List the contents of the directory. ls is in /bin/ls. It is not a script in the appropriate directory. Edit a file in that directory. emacs, vi, gedit most other editors are not scripts in that directoy. View the contents of a file in that directory. Execute a file in that directory that he does not have permission to execute.   Note that these are examples there are many other actions which I do not want the user to be able to do. In considering an action, ask "is this being done by a script in /local/remote_only_scripts/foo?" if the answer is no the user should not be able to do it. If the answer is yes then the user should be able to do it.  PS: Let me clarify what I mean by "adding a user". I do not mean adding a user to some ssh subsystem. Rather I mean adding a user to the computer system. So, for example, I have a system running debian stable, call it by it's address, www.hg.bar.com. I want to add a user ( via kuser, users-admin or useradd or some similar way ) call him hg_guest. hg_guest cannot login locally or do any of the things in the above list. All hg_guest can do is execute scripts "remotely". I said he should be able to do so via ssh, but thinking about it now, maybe allowing him to use ssh may allow him to login in locally, so some other mechanism may be required.


How do I create a deb package for a single python script?

I have a single python script that I want to distribute as a deb package. It is a  which shows local date in Unity panel. I did follow  but I could not create a deb package because it fails.   Can someone give me a step-by-step instruction on what I should do? As far as I know this script depends on python-appindicator.   NOTE: I do not want any links to Debian/Ubuntu packaging instructions. I have seen most of them. I don't find them beginner friendly.


While receiving a phone call, the man on the other end of the call was looking for another woman. When finished asking for her, he said: "Are you she?" I've always heard "Are you her" and this was a first for me. "Are you she?"... is it proper English?


Would draining entropy make it easier to compromise a system?

Entropy is important for many security features like TCP sequence numbers and cryptographic key/parameter generation.  My understanding is that the entropy pool is drained by an operation as simple as cat /dev/random which could be hidden in an malicious or poorly written script.  This could also be done by an attacker who's taken over an unprivileged local account and is trying to get deeper into the system.  Since most systems use a cryptographically secure pseudo-number generator (/dev/urandom) instead of /dev/random, I'm wondering if a drained entropy pool has any security consequences.  To give an example: would it be easier to guess the private key of a newly generated SSL certificate if the entropy pool was low during the generation?  I read man 4 random but I'm still unsure on how entropy is handled by the system.


How would you prove $$\sum_{k=0}^{n-1}\cos\left(\frac{2\pi k}{n}\right)=0=\sum_{k=0}^{n-1}\sin\left(\frac{2\pi k}{n}\right)$$  We tried induction first, but it doesnt seem to work. Any help would be appreciated!


How would I implement the quantum oracle in Deutsch's algorithm?

I am trying to simulate Deutsch's algorithm (elementary case of Deutsch-Jozsa algorithm), and I am not entirely sure how I would go about implementing the quantum oracle necessary for the algorithm to function, without defeating the purpose of the algorithm and "looking" at what the inputted function is, by evaluating the function.


I have very specific questions regarding permissions. I have delved into the FilePermissions Wiki -   Recently I installed an ecommerce open source software on my LAMP server. It needed some permissions to be given.These were the two lines I executed ,blindly, in the terminal for all the permissions it needed-   sudo chown www-data:www-data * -R sudo usermod -a -G www-data $username   Please explain what these two lines of code did. The MAIN REASON I am posting this question is because now it has locked some of my folders How do I revert all those permissions back to normal? How would I know which folders' permission it has changed and what were their normal permissions? What is the difference between chmod and chown and which should be used here?


How do I separate hydraulic disc brake pads after pulling the brake while the wheel is off?

I take the front wheel off my mountain bike to get it in my car. When I get it out and try to put the front wheel back on, the space between the brake pads isn't wide enough for the rotor. Whoops! I must have pulled the lever on my hydraulic brakes.  How can I separate the the pads without damaging them?


Show that a connected simple graph for which every edge is in some perfect matching is a block.   It seems obvious to prove by contradiction. so Suppose such a graph $G$ has a cut-vertex $v$.  The direction from here seems to be taking two components $H_1, H_2$ of $G-v$, and let $e_1, e_2$ be the edges by which $v$ was connected to those respectively.$e_1$ and $e_2$ are both in some perfect matchings in $G$, but they must be different matchings since they share a vertex. Call them $M_1, M_2$. How to continue from here? I'm guessing I'm looking for some contradiction to arise when looking at $M_1\cap E(H_2)$ or vice versa, but I'm not sure exactly how.


Order of duplicates is reversed in iOS app

Users with gold tag badges can close a question as a duplicate of multiple other questions. When they do so they can also set the order that the duplicate displays in. I recently closed  and very deliberately arranged the list order:    However when I open the question in the iOS app, the duplicate order is reversed:


This is my first ever created program I've made. It's not very good but I'm pretty proud of it. If you have any suggestions I could add into the calculator I would gladly do that. using System; using System.IO; using System.Linq; using System.Collections.Generic;  namespace CSharp_Shell {     public static class Program      {         public static void Main()          {            try            {                 Console.WriteLine("--------------------------------");                 Console.WriteLine("Operators:");                 Console.WriteLine("+ = Add");                 Console.WriteLine("- = Subtract");                 Console.WriteLine("* = Multiply");                 Console.WriteLine("/ = Divide");                 Console.WriteLine("^ = Power");                 Console.WriteLine("--------------------------------");                                  Console.Write("Enter operator: ");                                  string op = (Console.ReadLine());                             Console.Write("Enter First Number: ");                 double num1 = Convert.ToDouble(Console.ReadLine());                            Console.Write("Enter Second Number: ");                 double num2 = Convert.ToDouble(Console.ReadLine());                 Console.WriteLine("--------------------------------");                                         if (op == "+")                 {                    Console.WriteLine(num1 + num2);                    Console.WriteLine("--------------------------------");                 }                 else if (op == "-")                 {                    Console.WriteLine(num1 - num2);                    Console.WriteLine("--------------------------------");                 }                 else if (op == "/")                 {                    Console.WriteLine(num1 / num2);                    Console.WriteLine("--------------------------------");                 }                 else if (op == "*")                 {                    Console.WriteLine(num1 * num2);                    Console.WriteLine("--------------------------------");                 }                 else if (op == "^")                 {                    double value1 = Math.Pow(num1, num2);                      Console.WriteLine("{0}", value1);                    Console.WriteLine("--------------------------------");                 }                 else                 {                    Console.ForegroundColor = ConsoleColor.Red;                    Console.WriteLine("error");                                        Console.ForegroundColor = ConsoleColor.White;                    Console.WriteLine("--------------------------------");                 }            }            catch            {             Console.ForegroundColor = ConsoleColor.White;                 Console.WriteLine("--------------------------------");                              Console.ForegroundColor = ConsoleColor.Red;             Console.WriteLine("error");                          Console.ForegroundColor = ConsoleColor.White;                 Console.WriteLine("--------------------------------");            }            Console.ForegroundColor = ConsoleColor.Gray;            Console.Write("Press any key to stop the program");            Console.ReadKey();         }     } }


How to copy and paste in Terminal using keyboard?

ctrl + c prints ^c in Terminal and does not work. It is same for ctrl + v (^v). Is there any workaround?


Is there any way to calculate the simple product of binomial coefficients

Given the sum $$ \sum_{k=0}^{m} {n \choose k} {m \choose k}, $$ where $ n > m$. Could it be somehow calculated into a shorter an nicer expression which doesn't contain the sum?  Thanks in advance!


Install Nvidia driver instead of nouveau

I've installed Ubuntu 14.04 and I'm experiencing a fuzzy/blurry screen and bad support for multiple screens.  I realized that Ubuntu installs nouveau as default, but I need to install nvidia drivers, so I tried this:   sudo apt-add-repository ppa:ubuntu-x-swat/x-updates apt-get update apt-get install nvidia-current apt-get upgrade       Now that nvidia is installed, you need to blacklist the nouveau driver   so it don’t pop out when you will reboot. Create or edit the following   file:  nano /etc/modprobe.d/blacklist-nouveau.conf       …and add these lines at the end:  blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off    I checked via the software & updates if nvidia driver got installed successfully, and it says the driver installed is nvidia 304.117  I then tried to run:  lshw -c video | grep 'configuration'   and the result is that the driver is still nouveau:  configuration: driver=nouveau latency=0   So how do I install and use the nvidia drivers?


Characters frequently say, "may the force be with you." Based on what we learn about midi-chlorians, isn't the force always with you?  These organisms exist in one's body, and they are responsible for one being force sensitive and able to use the force.   They are usually in the same quantity/proportion at all times, I would assume.   Why do characters use this phrase if it doesn't really make sense?


i am busy creating a simple blackjack game in C#.  Now for my cards i want to use an Entity Class "Kaart" because when i want to create other cardgames then Blackjack i can use this again.  So my Objects would consist of : kleur (aces,spades,..) , naam (A,K,J,10,...) and bjvalue (blackjackvalue).  I use this code for this :      class Kaart {     public Kaart()     {     }       public Kaart(string kleur, string naam, int bjwaarde)     {          this.Kleur = kleur;         this.Naam = naam;         this.Bjwaarde = bjwaarde;      }     public string Kleur { get; set; } // AutoProperty      public string Naam { get; set; } // AutoProperty      public int Bjwaarde { get; set; } // AutoProperty   Now my question is :  For use in my game i want to create an array which contains 52 items (0-51), all cards , which represent a full stack of cards. How should my method be to fill the array with all these objects .. i started like this :  public Kaart[] Vulstapel(Kaart[] Stapel) {   now the fastest way to add all these values to this array would be?  (the reason why i put them in an array is simple : because i want to be able to copy the array and than delete each card after its already thrown in game)


How do I mark a file as executable via a GUI?

How do I mark a file as executable using a graphical interface (GUI)?


I'm going to reinstall an operating system in my computer. I had Windows 10 earlier, and now I'm thinking of using Ubuntu. I haven't used Ubuntu before, so I have a few doubts.  Does Ubuntu run faster than Windows 10?


How to calculate spatial distance in space-time?

Pinning two test particles at two different points in space, how can I calculate their spatial distance, when the geometry is given by the Schwarzschild metric?  Let's say particle 1 is pinned at $r=R$, $\theta=\frac \pi 2$, $\varphi = 0$ where $R$ is a positive radius bigger than the Schwarzschild radius and particle 2 is pinned at $r=R+L$, $\theta=\frac \pi 2$, $\varphi = 0$ where $L$ is also a positive constant.   What is now the spatial distance between the two particles?  Do I have to calculate the length of a geodesic from one particle to the other? Is this equal to the distance?


ERROR : Unknown error when installing the application "-24"

Every time I try to download an app called  on my Galaxy note 3 an error message appears,  Unknown error when installing the application "-24 Can anyone please help me?


I'm looking to allow two cartridges to be inserted into a slot that normally only accepts one (more specifically, Nintendo 64 cartridges). I can't just toggle the power lines to each cartridges because of backfeeding. What sort of device would I need to use to switch a large number of lines from one cartridge to another (an N-pole single throw relay)? In this case, there isn't much power passing through the lines, but in a more general sense what component would one need to actuate multiple switches in a near-simultaneous timeframe?


How to solve this limit? $ \lim_{x \to +\infty} \frac{(\int^x_0e^{x^2}dx)^2}{\int_0^xe^{2x^2}dx}$

There's  a limit which confuses me:  $$ \lim_{x \to +\infty} \dfrac{(\int^x_0e^{x^2}dx)^2}{\int_0^xe^{2x^2}dx}$$  Is it possible to use L'Hôpital's rule here?


How do I set expiration headers for CSS, JS, and Images?

I have recently analysed my website with pagespeed addon on firebug. It suggested me to set expiration on CSS, JS and image files.  I am wondering how do i do this?


How to configure (Brother) Laser Scanner

I am not able to configure the scanner of my Brother DCP-7030.    After following all the steps mentioned on  Also, I implemented the solution provided in     When I try to scan the documents, the printer shows the display "Connecting to PC", but does not scan the document. I am however able to print the documents.  Any solution is much appreciated.


Java Program for uppercase/lowercase not working, help por favor

This program is short and sweet, just having the computer output if the letter is uppercase or lowercase, or not valid. But it seems to skip the code and go directly to "You did not type a valid input". How do I get it to recognize the other options and work correctly?  Here is the code:     import java.util.*;     public class StringTest2 {       public static void main(String[] args) {        System.out.println("uppercase (U/u) or lowercase (L/l)?");          Scanner console = new Scanner(System.in);        String input = console.nextLine();        if (input == "U" || input == "u") {        System.out.println("uppercase!" + input);        } else if (input == "L" || input == "l") {        System.out.println("lowercase!" + input);        } else {        System.out.println("You did not type a valid input " + input);        }     }    }


Bibliography not showing up, even when citing

I am unable to get my bibliography to show up in my LaTeX document when using bibtex. I have already debugged the .bib file, have cited papers so I shouldn't need a \nocite*{} (I think), and I'm not receiving any errors during compilation. Any time I do cite, it shows as a [?]. How can I fix this? Citation in paper: ... commercial or research purposes \cite{FAA-Aerospace-Forecast}.   What is in the bibtex: @misc{FAA-Aerospace-Forecast,     author = {{Federal Aviation Administration (FAA)}},     title = {{FAA Aerospace Forecast -- Fiscal Years 2019--2039}},     howpublished = {Online: https://www.faa.gov/data{\_}research/aviation/aerospace{\_}forecasts/media/FY2019-39{\_}FAA{\_}Aerospace{\_}Forecast.pdf },     year = {2019},     note = {TC19-0002}, }


Is there a difference in philosophy between the term self-consciousness and self-awareness?

I have seen the terms self-aware and self-conscious being used interchangeably in discussions of what distinguishes a person from a conscious animal. Is there a difference of meaning between them? I had previously thought the term self-conscious was used only to only to denote a feeling of being acutely aware of oneself in social situations, so I have always preferred using the term self-aware, as Singer does, to indicate the ability to consider oneself as a conscious individual human, existing in time. But is there a separate, philosophical meaning to self-conscious that is different from self-aware?  EDIT - 2021 03 13 - I have accepted @Conifold's suggestion that the linked question provides an answer, but only to the extent that the answer is "No, there is no widely accepted distinction between these terms and their meanings depend heavily on context".


Is it OK to let somebody know I refereed their paper?

It is not uncommon, especially for narrow fields, that you review papers authored by people that you might, at some point, come to interact with more or less closely. This can range from meeting them at a conference to even start a collaboration together.  Some times, when discussing with these people a point directly related to one of their papers it could be relevant to make a comment based on a discussion that came up as part of the reviewing process.  I have recently felt tempted to tell someone "hey, I refereed you paper, by the way, so I am particularly familiar with this and that..." but refrained myself because peer review is supposed to be anonymous.  Is it appropriate to bring up that I refereed somebody's paper when having a discussion with this person, in particular if it adds constructively to the discussion? Would it become "more appropriate" as time goes by and the review becomes "a thing of the past"?


Derivative exists when limit of derivative exists

Let $f$ be continuous on $(a,b)$ and let $c\in(a,b)$. Suppose $f'(x)$ exists for all $x\in(a,b)\backslash\{c\}$ and $\lim_{x\rightarrow c}f'(x)$ exists. Prove that $f'(c)$ exists.   I don't know what to do on this other than follow definitions. So for all $x\in(a,b)\backslash\{c\}$, the limit $$\lim_{y\rightarrow x}\frac{f(y)-f(x)}{y-x}$$ exists, and moreover, $$\lim_{x\rightarrow c}\lim_{y\rightarrow x}\frac{f(y)-f(x)}{y-x}$$ exists. To prove is that $$\lim_{y\rightarrow c}\frac{f(y)-f(c)}{y-c}$$ exists.


Equivalent of "former" and "latter" for more than 2 items

Former and latter are valid only when there are two choices.  If I have a list of more than two items, is there an elegant way to say the first one or the last one?


I have a DNA match of 1,723 cM with a male 6 years younger than me. His father is one of a twin, could my match be not my half-sibling but my 1st cousin.


Printing an array with slf4j only prints the first element

I have the following code:  private static final Logger logger = LoggerFactory.getLogger(Some.class); ... String[] splits=someString.split(".."); logger.info("The string was split into <{}>",splits); // prints first element   What is the right way to print the full content of an array with slf4j?


In the NBA, why is the sign-and-trade a thing?

The sign-and-trade is relatively common when stars leave a team that they've been with for a long time. I don't understand why this practice exists. Take Lebron going to the Heat, for example. He was a free agent. He could have gone anywhere, but he chose to re-sign with the Cavs so that they could trade him to the Heat and get draft picks in return. Seemingly, this weakens the team that Lebron had just signed with, as they had weaker drafts in his first (two?) seasons there than they likely would have if he had signed with them outright.  Why does this practice exist?


Delete folder with '.' as the last character in folder name

I was writing a program that had to create files and during testing I ended up creating a folder with the name '-disk.' I'd like to delete that folder but every time I try to Windows gives me this error.  Notice how the period character is missing from the error above?  Even If I try to rename the file I get the same error and I've tried the below command in powershell: DEL /F/Q/S *.* > NUL  Which gave the error: out-file : FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr. At line:1 char:2 +  DEL /F/Q/S *.* > NUL +  ~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : OpenError: (:) [Out-File], NotSupportedException     + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand  How can I delete this folder?


Rearranging equations using hyperbolic transcendental functions

I have tried and tried but cannot for the life of me see how one equation follows onto the other... can anybody help??  $$\Omega(\theta)=-b.\coth(\operatorname{arsinh}(\exp a\theta . \sinh(c_0)))$$  $$\implies \Omega(\theta)=\sqrt(c_1.\exp -2a\theta + b^2)$$  Note that: $$C_0=-\operatorname{arcoth}\left(\frac{\Omega_0}{b}\right)$$  Eichberger quotes (at the bottom of page 5) "By inserting (11) into (8), using identities of the hyperbolic transcendental functions and carefully observing ± signs, we obtain Ω as a function of θ."


1990s film, knockoff of Alien and Predator franchises, included a jetpack and a fanged frisbee

I remember a group of people (soldiers?) stuck in a jungle and attacked by two different sorts of aliens. One looked a lot like the Xenomorphs from the Alien movies, very bestial. The other was a humanoid armored creature  like in Predator films which I remember had a jetpack, and might have had a thrown weapon that looked like a fanged frisbee. I distinctly remember the jetpack bit happened on a bridge.  After that, my memory gets very fuzzy right up until the end credits which featured the aliens (both? Maybe just the Xenomorph ones) on a talk show. I vaguely remember TV Tropes mentioning this, and that vague memory suggests it was originally a Swedish movie.  I would have watched it on TV somewhere between 1994 and 1998, possibly on a premium cable channel as I think I watched it while at All State Choir, where they bunked us up in hotels and frequently forgot to shut down the premium channels.  I'm pretty sure that the English title had the word "Alien" in it, and I think it was just a two word title.  Trish Ling clued me in that the talk show bit is from a totally different movie than the first movie, which is the one I was really looking for, so I've struck out those bits.


show that A(T) is a group under operation of composition of functions

Problem:  Let T be a nonempty set and A(T) the set of all permuations of T. Show that A(T) is a group under the operation of composition of functions.  Permutation of the set T is the bijective function $f: T \rightarrow T $  For A(T) to be a group it must be closed, associate have an identity for every element and an inverse.  Since f is  bijection the composition of two bijective functions is itself bijective so A(T) is closed. Every bijective function has an inverse, and composition of functions is associative. What about the identity? Are we to take $ A(T) = S_n $ here, which would be assuming that $T$={$1, ..., n$}? In which case $ I = \begin{bmatrix}1&2&...&n\\1&2&...&n\end{bmatrix} $  Not sure what I'm supposed to be showing since $T$ and A(T) are arbitrarly specified here.


I have two files: one which is the dictionary, and the other one corresponds to the list of words that appear in a transcription. I need to output the words out of vocabulary words. This is:  dict.txt you  she apple banana strawberry eat  transcript.txt you strawberry and  banana <silence> for  breakfast   So, my desired output would look like this:  and for breakfast <silence>   Is there any command output such words that are not found in the dictionary? thanks in advance!


Paradox in deriving the area of an ellipse

We have an ellipse $x=a\cos(\theta)$ and $y=b\sin(\theta)$. We will find the area by adding sectors $\frac12r^2\;d\theta$. Now,  $$ \begin{align} \int_0^{2\pi}\frac12r^2\;d\theta&=\frac12\int_0^{2\pi}\left(a^2\cos^2\theta+b^2\sin^2\theta\right)\;d\theta\\ &=\frac12\int_0^{2\pi}\left(\frac{a^2+b^2}2+\frac{a^2-b^2}2\cos2\theta\right)\;d\theta\\ &=\left.\frac12\left(\frac{a^2+b^2}2\theta+\frac{a^2-b^2}4\sin2\theta\right)\right|_0^{2\pi}\\ &=\frac\pi2\left(a^2+b^2\right) \end{align} $$  Why is it not $\pi a b$?


Do i need a passport in order to travel across the EU via Flixbus

a relative living with me does not hold a EU passport because he is not a citizen, and moreover he has an expired passport of his origin country. He went to the consulate in order to renew it. We have to head in Belgium with FlixBys and come back in Italy, so is it possible for him to travel only with a receipt of passport renewal and Italian PR since there's no border control in EU and we'll be traveling via coach?


I would like to do button like Fly to Bern button in the below link.  Is it possible to do ?    var flyToBern = document.getElementById('fly-to-bern'); flyToBern.addEventListener('click', function() {   var duration = 2000;   var start = +new Date();   var pan = ol.animation.pan({     duration: duration,     source: /** @type {ol.Coordinate} */ (view.getCenter()),     start: start   });   var bounce = ol.animation.bounce({     duration: duration,     resolution: 4 * view.getResolution(),     start: start   });   map.beforeRender(pan, bounce);   view.setCenter(bern); }, false);


HP Spectre x360 Touch Screen Deactivation

I am currently using a Spectre x360 13' with Ubuntu and I would like to disable the touch screen because sometimes the cursor gets stuck on the screen. Is there a practical way to do so?


Why doesn't visual studio recognize my source files

I'm running into an issue where visual studio 2015 is saying that it can't find the definition for an object. The class that it refers too is in the project so I'm not sure why it can't find it. It's not in the project directory, but it's one outside of it. The visual studio solution is in Project1. The code files are in source and header files respectively. I keep getting this error  Error   LNK2019 unresolved external symbol "public: __thiscall DataCenter<float>::DataCenter<float>(void)" (??0?$DataCenter@M@@QAE@XZ) referenced in function _main Project1       I've uploaded a copy of my folder to google drive here:   Do you know what I would have to do to get this to link correctly?  Edit: According to   "Under MSVS, files added to a project automatically have their object files linked together and a lib file would be generated (in common usage)"  The files that are not linking are in the same project and thus there should not be any missed dependencies.


i've been struggling a lot with getting null context in Fragment.I've read all the problems in here with the same issue as mine but nothing worked out.I tried with onAttach and so on but nothing worked so far. I am getting my error here:     player = ExoPlayerFactory.newSimpleInstance(getActivity());   where getActivity() returns null  I will paste my fragment here so anyone can take a look and suggest me what to do  public class Fragment1 extends Fragment {  private Frag1LayoutBinding binding;  private PlayerView playerView;  private SimpleExoPlayer player;  private Button button;   private boolean playWhenReady = true;  private int currentWindow = 0;  private long playbackPosition = 0;   @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     binding = Frag1LayoutBinding.inflate(inflater, container, false);     binding.button2.setText("Live");     button = binding.button2.findViewById(R.id.button2);     button.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             initializePlayer();         }     });     return binding.getRoot(); }  private void initializePlayer() {     player = ExoPlayerFactory.newSimpleInstance(getActivity());     playerView.setPlayer(player);     Uri uri = Uri.parse("https://www.radiantmediaplayer.com/media/bbb-360p.mp4");     MediaSource mediaSource = buildMediaSource(uri); }  private MediaSource buildMediaSource(Uri uri) {     DataSource.Factory dataSourceFactory =             new DefaultDataSourceFactory(getActivity(), "exoplayer-codelab");     return new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(uri); }  @Override public void onDestroyView() {     super.onDestroyView();     binding = null; }  @Override public void onStart() {     super.onStart();     if(Util.SDK_INT >= 24) {         initializePlayer();     } }  @Override public void onResume() {     super.onResume();     hideSystemUi();     if((Util.SDK_INT < 24 || player == null)) {         initializePlayer();     } }  @Override public void onPause() {     super.onPause();     if (Util.SDK_INT < 24) {         releasePlayer();     } }  @Override public void onStop() {     super.onStop();     if (Util.SDK_INT >= 24) {         releasePlayer();     } }  private void releasePlayer() {     if (player != null) {         playWhenReady = player.getPlayWhenReady();         playbackPosition = player.getCurrentPosition();         currentWindow = player.getCurrentWindowIndex();         player.release();         player = null;     } }  @SuppressLint("InlinedApi") private void hideSystemUi() {     playerView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE             | View.SYSTEM_UI_FLAG_FULLSCREEN             | View.SYSTEM_UI_FLAG_LAYOUT_STABLE             | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY             | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION             | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); }   and the error i got is that     java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.exoplayer2.ui.PlayerView.setPlayer(com.google.android.exoplayer2.Player)' on a null object reference           at com.example.tv_1.Fragment1.initializePlayer(Fragment1.java:58)           at com.example.tv_1.Fragment1.onStart(Fragment1.java:79)


Active Directory member servers in the DMZ

I want to be specific about terms. When I say DMZ I'm talking about a place where you would put servers that expose a service to untrusted networks like the Internet, or in some cases merely networks that are less trusted.  I am attempting to shore up our network perimeter by auditing what we expose through our firewall. The firewall I am talking about is NOT a Microsoft ISA server and never will be. If any of you are in this situation you know that the ports required to allow a member server to connect to domain controllers is pretty extensive. Microsoft in attempting to address this provides several designs using RODC's to reduce the count of open ports, but even if it were just one port the Active Directory itself is a trove of intel for an unauthorized person who has compromised a DMZ member server.  What is the consensus about AD member servers in a DMZ? Too insecure, or acceptable risk? Assuming the former (where I'm leaning), aside from local account authentication are there any more secure options than AD for authenticating users who sign onto DMZ Windows servers? If not, then is there a mechanism that can associate a local account with a real person at login for auditing purposes? It seems like the only option for tracking users' behaviour in a standalone server DMZ would be to create local machine accounts for every user who logs onto the servers.  Of course, ideally you don't have people logging on to servers for normal operations; the whole thing should be managed by proxy using services accounts (that's a whole 'nother discussion). But right now our operation isn't "there" yet. We're hopeful that DSC makes that feasible.  The focus of Microsoft's recommendations are to me either impractical or missing the point.  An Active Directory for just a DMZ reduces an intruder's ability to gather intel, but still leaves the vector pretty much in-place.  The best their solutions can do is split the risk baby by limiting that intel to the DMZ (plus whatever else your DMZ AD might service).  The trade-off is an AD for every DMZ.  So now your admins are managing one account + N DMZ's.  Not that Microsoft is listening, but there needs to be a middle way that auths a windows user but doesn't require the use of credentials that can do things like enum LDAP users.


How to get a Static property with Reflection

So this seems pretty basic but I can't get it to work.  I have an Object, and I am using reflection to get to it's public properties.  One of these properties is static and I'm having no luck getting to it.  Public Function GetProp(ByRef obj As Object, ByVal propName as String) as PropertyInfo     Return obj.GetType.GetProperty(propName)  End Function   The above code works fine for Public Instance properties, which up until now is all that I have needed.  Supposedly I can use BindingFlags to request other types of properties (private, static), but I can't seem to find the right combination.  Public Function GetProp(ByRef obj As Object, ByVal propName as String) as PropertyInfo     Return obj.GetType.GetProperty(propName, Reflection.BindingFlags.Static Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.Public)  End Function   But still, requesting any Static members return nothing.  .NET reflector can see the static properties just fine, so clearly I am missing something here.


Typically we don't use articles with city names, e.g. "Seattle" and not "the Seattle." I know at least one exception though which is . Are there any other city names which we use with the article?


Advantages of SSD over a USB flash drive with similar capacity?

I'm looking for a portable storage fast solution.  If we look at some 128 GB SSD drives, you can see prices ranging (for internal drives) from 50 AUD to about 100 AUD. Couldn't find any external ones. So assuming I'll take an internal one I'll need some kind of adapter to make it work with USB.  And then, there are some 128 GB USB flash drives, that range from 40 to 60 AUD (at least in the local retailer I'm looking at).  What are the advantages of a 100$ SSD over any USB flash drives? Is it only speed? A fast USB 3 flash drive is fast enough for my requirements. Is there anything else?


Can I kill an indestructible creature with -X/-X and sufficient damage marked on it?

Can I hit a 4/4 indestructible creature with a  (3 damage) and give it -1/-1 with  to kill it? (Does it matter which way around I cast those?)  I read  here and it says, damage is removed in cleanup step, so it should be on the creature still after both spells.     702.12. Indestructible   702.12a Indestructible is a static ability.   702.12b A permanent with indestructible can’t be destroyed. Such permanents aren’t destroyed by lethal damage, and they ignore the state-based action that checks for lethal damage (see rule 704.5g).   702.12c Multiple instances of indestructible on the same permanent are redundant.


What happens when the function is called inside itself (Python)

In the below example what exactly is happening inside the function that is called inside of itself? What is being output at what point of the function? Is there something analogous to what is happening here that can be rewritten in a simple way? def mergeSort(myList):     if len(myList) > 1:         mid = len(myList) // 2         left = myList[:mid]         right = myList[mid:]          # Recursive call on each half         mergeSort(left)         mergeSort(right)          # Two iterators for traversing the two halves         i = 0         j = 0          # Iterator for the main list         k = 0          while i < len(left) and j < len(right):             if left[i] < right[j]:               # The value from the left half has been used               myList[k] = left[i]               # Move the iterator forward               i += 1             else:                 myList[k] = right[j]                 j += 1             # Move to the next slot             k += 1          # For all the remaining values         while i < len(left):             myList[k] = left[i]             i += 1             k += 1          while j < len(right):             myList[k]=right[j]             j += 1             k += 1  myList = [54,26,93,17,77,31,44,55,20] mergeSort(myList) print(myList)


What should dpi be when saving artwork for web?

When saving artwork made in Illustrator for web, what should the dpi be when saving it as a JPG or PNG?   For example, say I save my artwork at 500px wide, is it better to save it at 72 dpi or 300 dpi? What do people typically do? Thanks.


How to do typedef for shared_ptr of templated class?

I want to do like this:  template <class T> class MyClass { public:     typedef std::shared_ptr<MyClass> Ptr;   so I can use like this:  void do(MyClass<int>::Ptr ptr)   however I'm getting   error: ‘MyClass<T>::Ptr’ is not a type      void do(MyClass<T>::Ptr ptr);


How to select a threshold for logistic regression in case of imbalance in class distribution

Consider the model  fit2 <- glm(y~x+z,data=records,family=binomial)  I have about 42000 records, of which close to 38000 belong to class y=0 and the remaining 4000 belong to class y=1. In order for me to compute the confusion matrix, I need to select a threshold t against which I need to compare the probabilities of the above model. How do I select this t?  Assuming my positive class to be the rare class, the risk of predicting a positive instance as negative is higher than the risk of predicting a negative instance as positive.   Should I use the threshold that maximizes sensitivity alone? or should I use the threshold that maximizes both sensitivity and specificity?


I am trying to delete two lines ( 7 and 8) from a .txt file. For this I am using following code:-  #!/bin/sh Column="7" sed '"$Column",8d' myfile.txt > result.txt   on running this script, I am getting this error:-  sed: -e expression #1, char 1: unknown command: `"'   Please tell me how to use variable as a part of sed command.


How can I batch crop based on face location?

I've got 12,000 photos from an event where there's only one person in each photo. I need to crop these photos to apply rule of thirds. The idea of doing all of these individually is daunting and I can't just take 10% off the top of them all since every photo is a little different.  Is there a way for me to automatically crop all of these photos based on the position of the person?


How to force Google to not mind my location during search

I look for information about Tour de Pologne, the problem is that I want to know what foreign services say about it. I want to watch their videos with their comments but because I live in Poland I get a few pages of Polish websites.  How to force Google to treat my search phrase as I would be in UK for example?


How do I time a method's execution in Java?

How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.


memory management in C# for high speed applications

I am building an application that processes an incoming image from file or buffer and outputs results in the form of an array or doubles of fixed size. The application needs to be relatively quick. I ran into a problem with cycle time. I started recording cycle time while processing one image and it went from the minimum at 65ms and gradually started increasing to all the way  500ms which is way too slow. Sure enough, I checked on the memory usage and it was steadily increasing as well.   I'm running GC after every cycle and dumping unused variable as ofter as possible. I don't create new objects within the processing loop. Image processing is done on its own thread so that all the resources get dumped. It seems the majority of the cycle time increase happens when I'm pulling the image from file. What could I be missing?  here's the rough code, the full thing is pretty large. Main Function           private void button4_Click(object sender, EventArgs e)     {         Stopwatch sw = new Stopwatch();         sw.Start();          cogDisplay1.Image = null;          ImageFromFile.Operator.Open(Properties.Settings.Default.ImageFile, CogImageFileModeConstants.Read);         ImageFromFile.Run();          cogDisplay1.Image = ImageFromFile.OutputImage;         cogDisplay1.AutoFit = true;         Thread t = new Thread(Vision);         t.Start();         textBox3.Clear();         sw.Stop();         textBox3.AppendText(sw.ElapsedMilliseconds.ToString() + Environment.NewLine + "TS: " + t.ThreadState.ToString());         textBox3.AppendText("GC" + GC.GetTotalMemory(true).ToString());         GC.Collect(GC.MaxGeneration , GCCollectionMode.Forced, false);      }   Image Processing   public void Vision()     {         Stopwatch sw = new Stopwatch();         sw.Start();          try         {              AlignmentParams.ApproximateNumberToFind = 1;             AlignmentParams.SearchRegionMode = 0;               AlignmentResult = AlignmentPat.Execute(cogDisplay1.Image as CogImage8Grey, null , AlignmentParams);             Fixture.InputImage = cogDisplay1.Image;             Fixture.RunParams.UnfixturedFromFixturedTransform = AlignmentResult[0].GetPose();             Fixture.Run();             AlignmentResult = null;           #region FindLineTools          #endregion          #region FindEllipse          #endregion                    sw.Stop();                 SetText("V" + sw.ElapsedMilliseconds.ToString() + Environment.NewLine);             }         catch (Exception err)          {             SetText(Environment.NewLine + "***********Error***********" + Environment.NewLine);            SetText(err.ToString() + Environment.NewLine);            SetText("***************************" + Environment.NewLine);         }         }


Creating an encrypted partition to store private keys

I am using a BeagleBone Black board running Debian.   My intention is to create a separate encrypted partition to store private keys in the internal emmc. The keys are used for SSL communication. The main intention of course is to keep the keys secure so nobody can read them. I know that using a TPM or HSM is the right solution this , but I want to see if I can do something without one and just store the keys in normal flash.   The reason I need a separate partition is that sometimes I will want to completely upgrade the Linux OS on the device by over-writing the current image on one partition. I will not want to affect the private keys stored this way, and the new OS should be able to access the keys in the same way as the last one from the separate partition. Is this a common way to go about it?  Would dm-crypt work for this? I don't understand however how this works on the low-level. Will the new Linux OS in which I install be able to decrypt my private partition in the same way the previous Linux did? What is to stop anybody from decrypting and viewing my private keys if they hacked into the device?


Iterating over every two elements in a list in Python

How do I iterate over all pair combination in a list, like:  list = [1,2,3,4]   Output:  1,2 1,3 1,4 2,3 2,4 3,4   Thanks!


Big O, how do you calculate/approximate it?

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


Are electric linear solenoids the best option to push a capacitive screen button on a smartphone?

I'm trying to figure out if electric linear solenoids are the best option to activate an interface element on the touch screen of my smart phone.  I have also heard of linear actuators and pneumatics but wasn't sure if those are for different cases, even though they all operate in a similar fashion.   Also, does anyone know if there is a low power solenoid that exists? The lowest power consumption I saw is 5V-8V at 1 A but I'm looking for something that is really low power.


Which focal-length lens is usually used for portrait photography, and why?

What focal length or range of focal lengths are usually used for portraits?   What is used by professionals? Why would one select a certain focal length? What are the advantages and disadvantages of different choices, and are there certain situations where an unusual choice might be better?


How to ‘guess’ if a noun is countable or uncountable?

Not all the time I have access to dictionaries. In school, I learned that abstract nouns are not countable; however, English is an ever-evolving language and nothing can be so certain here including  Experts are of only one opinion – it depends on the context!  Now, when it comes to certain nouns, I'm not sure how do natives guess them countable/uncountable. As a non-native speaker, it's difficult for me.   Say – equipment! Now, for a non-native like me, equipment is certainly countable! Equipment for this and that...so two equipments. But then, I'm wrong! I can still guess mood or freedom to be countable - mood of romance, mood of dullness – there is more than one mood so ‘moods’. Likewise, freedom of speech, freedom of roaming here and there - so there's more than one freedom – freedoms!   Is there any way to guess whether a noun is countable? Especially in those cases where I haven't any access to a dictionary. Is there any trick– like I found those tricks for freedom/mood.?


Indentation in itemize list in Beamer class

Hi I usually write whole beamer presentations in bulleted list which creates automatic indentation which produce odd looking lot of left margin space. I want to start bulleted list like normal text without indentation. I tried packages like \usepackage{enumitem} which is not working in beamer. Kindly suggest some solution


Is there any way with CSS to target all inputs based on their type? I have a disabled class I use on various disabled form elements, and I'm setting the background color for text boxes, but I don't want my checkboxes to get that color.   I know I can do this with seperate classes but I'd rather use CSS if possible. I'm sure, I can set this in javascript but again looking for CSS.  I'm targeting IE7+. So i don't think I can use CSS3.  Edit  With CSS3 I would be able to do something like?  INPUT[type='text']:disabled that would be even better get rid of my class altogether...  Edit  Ok thanks for the help! So here's a selector which modifies all textboxes and areas which have been disabled without requiring setting any classes, when I started this question I never thought this was possible...  INPUT[disabled][type='text'], TEXTAREA[disabled] {        background-color: Silver; }   This works in IE7


How to destruct an object VERY LAST in C++?

I'm adding a singleton logging class that everyone will use in our current project. However we're facing a problem - the singleton global object has to be destructed VERY LAST because any other object can log in their destructor. If the singleton gets destroyed first, and some other global object calls the log function, it will lead to segmentation fault as logger has been destructed. Does anyone know if it's somehow possible to destruct an object very last int he program? I think that is not possible, so does anyone know a workaround in my particular case?


Projecting the raster and vector to the same place

I have 3 groups of raster layers all in the same place, but my group with my vector layer are located above... I am working in QGIS.  They all have the same CRS WGS 84 / EPSG Greenland Polar Stereographic, EPSG:5938.  The project, each vector layer and raster layer have the same CRS.  Why are they not on the same position and how do i get them to be that?


Cannot find hard drives after installing Ubuntu 13.10

Okay, I am not a much experienced Linux user.Recently my Windows 7 went bad and I installed Lubuntu, Xubuntu, Ubuntu 13.10 (a triple boot). This morning I thought that I should only keep one OS and put in the Ubuntu Saucy CD. I selected the "Erase everything and install" option in the install menu. I thought that would only erase the other OSs but when I booted into the recently installed Ubuntu, I found out that I could not find any mounted hard drive on nautilus. I am confused and do not know what to do. This is the output of sudo lsblk:   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 298.1G  0 disk  ├─sda1   8:1    0 296.1G  0 part / ├─sda2   8:2    0     1K  0 part  └─sda5   8:5    0     2G  0 part [SWAP] sr0     11:0    1  1024M  0 rom   sr1     11:1    1 102.3M  0 rom


Should I edit my deleted answer or add another answer?

I recently answered a question in haste by posting a link to the answer on my blog.  Before I had a chance to come back and expand on my answer, it was deleted by a mod.  I would really like a chance to post a well-written answer.  Should I edit my deleted answer or add a new one?


Where exactly we are hiding implementation details in Java (Abstraction)

public abstract class abs {     abstract void dance(); }   This abstract class was extended by Outer class.  public class Outer extends abs {      public static void main(String[] args)     {         Outer o = new Outer();         o.dance();      }      @Override     void dance() {          System.out.println("dancing from abstract class");     }   I didn't specify any implementation details of dance() method in abstract class but defined the dance() method in Outer class i.e implementation details are revealed in derived class (Outer). We gonna run this program from Outer class. So, where exactly we are hiding implementation details from the user? Where is abstraction achieved?


Tracking down Linux memory usage when not showing up in cache

Before you get your pitchforks out, I am having trouble tracking down on where the memory is going into the caching system in Linux. I have seen , and , and  but using those as examples, the numbers don't quite add up with the numbers I'm seeing on my system.   For this system I understand that it is probably "cached", or used by the programs, but the numbers aren't even coming close to adding up for me.  In top I see.  top - 09:04:09 up 19 days, 20:38,  2 users,  load average: 0.00, 0.10, 0.11 Tasks: 160 total,   1 running, 159 sleeping,   0 stopped,   0 zombie Cpu(s):  0.1%us,  0.2%sy,  0.0%ni, 99.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st Mem:  65974296k total, 43507804k used, 22466492k free,   305336k buffers Swap:  7548924k total,        0k used,  7548924k free,  1480836k cached   I get it, 43GB of ram "used" isn't really true, probably most of it is probably cached. So digging into it I ran:   $ free -m              total       used       free     shared    buffers     cached Mem:         64428      38845      25582          0        298       1445 -/+ buffers/cache:      37101      27326 Swap:         7371          0       7371   So this shows that 37GB of it is indeed used and only 1445MB is cached (this is where I would have expected to see 1445 being something like 20000). The websites I linked above show that the "cached" column is usually pretty high.  So digging further I went and did the following to check applications that were using memory.      sudo smem -t       PID User     Command                         Swap      USS      PSS      RSS 9468     21475 root     python /usr/bin/smem -t            0     6212     6234     6984      2431 root     /opt/OV/lbin/perf/coda             0     7156     8060    12068      2213 root     /opt/perf/bin/perfd                0    19056    19485    22032     20849 root     /opt/shiny-server/ext/node/        0    77244    77321    78616     21325 atpa     /usr/lib64/R/bin/exec/R --n        0  3729836  3733774  3739520     21287 atpa     /usr/lib64/R/bin/exec/R --n        0  4060136  4064074  4069820     -------------------------------------------------------------------------------        63 11                                            0  7947984  7970344  8054032   So two applications of R are using ~8GB of memory.   The other articles I linked above show that Linux was "reserving" the memory and keeping it in cache (e.g. free -m showed cache was high value on the "Mem:" line), whereas in my case it seemed to be actually in use but no applications actually seem to be reporting the usage of the memory and I can't seem to track down where Linux is using (caching/reserving?) the memory.  Where is this memory going? I am assuming Linux is using it, but I can't determine where it is being utilized.  /proc/meminfo shows  MemTotal:       65974296 kB MemFree:        24191624 kB Buffers:          305320 kB Cached:          1480760 kB SwapCached:            0 kB Active:          7769776 kB Inactive:         215532 kB Active(anon):    6199392 kB Inactive(anon):      476 kB Active(file):    1570384 kB Inactive(file):   215056 kB Unevictable:           0 kB Mlocked:               0 kB SwapTotal:       7548924 kB SwapFree:        7548924 kB Dirty:               116 kB Writeback:             0 kB AnonPages:       6172696 kB Mapped:            47400 kB Shmem:               652 kB Slab:             255468 kB SReclaimable:     225620 kB SUnreclaim:        29848 kB KernelStack:        1736 kB PageTables:        18780 kB NFS_Unstable:          0 kB Bounce:                0 kB WritebackTmp:          0 kB CommitLimit:    40536072 kB Committed_AS:    6455352 kB VmallocTotal:   34359738367 kB VmallocUsed:      247288 kB VmallocChunk:   34359487760 kB HardwareCorrupted:     0 kB AnonHugePages:   2586624 kB HugePages_Total:       0 HugePages_Free:        0 HugePages_Rsvd:        0 HugePages_Surp:        0 Hugepagesize:       2048 kB DirectMap4k:       10240 kB DirectMap2M:    67098624 kB


RegEx for extracting HTML Image properties

I need a RegEx pattern for extracting all the properties of an image tag.  As we all know, there are lots of malformed HTML out there, so the pattern has to cover those possibilities.  I was looking at this solution  but it didn't quite get it all:  I come up something like:  (alt|title|src|height|width)\s*=\s*["'][\W\w]+?["']   Is there any possibilities I'll be missing or a more efficient simple pattern?  EDIT: Sorry, I will be more specific, I'm doing this using .NET so it's on the server side. I've already a list of img tags, now I just need to parse the properties.


What items, gear, or other content is only available on the IOS version of Terraria?


How to properly Drape vectors over a DEM?

I have a DEM of my study area, and the streams in it.  Whenever I add both to ArcScene, and drape the vectors over the DEM, some of the vectors disappear from over the surface, and are visible under the surface. (see Image below).   Are there any specific settings to properly drape the vectors over the DEM? Are there any other options or software that produce a better result (visually) when you have to drape vectors over a DEM?


Can I ignore multicolinearity problem if all the regression coefficients are highly significant?  My data is large enough (i.e. I have several regression models where each of the data points for them ranges from 2958 to 11646 data points for every each 6 independent variables. so it is 6 times of these 2958 - 11646 data points for each independent variable to count the total number of data points) and all the resulting coefficients are significant enough in less than 0.01 level. The only thing I see is that one of the variable has the correlation of 0.9 (i.e. the correlation value of one variable to another one is 0.9 but I do not want to remove either of them.).  I am trying to see on unit increase effect of this variable while keeping all other variables constant. Can I keep this variable?  Besides, if I delete one of the variable with high VIF which is between 13 anad 14, all the other VIF are safe but the intercept becomes insignificant for all cases  I am also referring to the following website comment:   So, in sum, my ultimate goal is to use the final output from the logistic regression model generated from the independent variables and one binary dependent variable. If so, do you think I can ignore the multicolinearity problem?


Is there a free way to clone a full Windows 7 installation from HDD to SSD? (The free part is important, I know I can pay for Acronis True Image.)      SSDs are usually much smaller than HDDs which complicates matters. For instance, I have about 50GB data, my new SSD is 80GB but I still can't use Windows clone/restore system if my HDD is something like 300GB.  Therefore, I'm looking for a third party tool that will be able to:   Create a clone of my C: partition Store it onto an external USB drive Boot from some rescue / restore CD Load the image onto the new SSD   Acronis True Image seems like a tool that should support this but it's a paid-for software and the trial version cannot create clones. Acronis Migrate Easy is a fully functional tria for 15 days but need both the HDD and SSD connected at the same time which is a bit of a problem for me as a laptop user.  P.S. I almost got there combining Windows image backup combined with Acronis True Image restore CD (which can load .vhd's) but was not able to boot as some boot information were probably lost and could not be repaired using the Win7 installation DVD.


Upgrade from 16.04 to 18.04 bug work arround

Ubuntu 16.04 could not be upgraded to 18.04 due to ppa conflict. I have submitted the . The comment about this bug is not sufficient to solve this issue, simply, because I could not able to determine which ppa(s) responsible to this issue.  I also unchecked all ppa(s) like the following screen shot    Is there any suggested solution that allows me to upgrade 16.04 to 18.04?


What are the key principles that effective designs share?

You have arrived on this page because you are clearly curious about underlying fundamentals that you can incorporate into your thought process when designing.  According to many that came before us, there are key principles that can be considered when creating an effective design. In the following answers, you will find useful theories from a variety of respected sources.  Use this question as a reference for navigating the variety of topics:  Gestalt Principles                  Other Fundamentals and Useful Information                  If you know of a topic that hasn't been covered here, please add an answer with references to respected resources and it will be added to the list.  Of course direct quotes and paraphrasing from respected resources are a must, but should be limited to a small paragraph per topic at most and referenced back to their source as thoroughly as possible.  A  has been posted before, but not to create a collection of snippets that are enlightening for graphic designers of any and all skill levels.


Let $A\in M_{n\times n}(\Bbb R)$ so that $I\notin span(A,A^2,...,A^n)$. Prove that $\det(A)=0$.   I was thinking of showing $A$ is not invertible, meaning it has an eigenvalue of $0$. Since no matter the power you give to $A$, it is still not the identity, you can deduce that at least one eigenvalue is indeed $0$. However this doesn't work if you have different eigenvalues in the Matrix, so I got stuck.  Help will be most appreciated.


I would like to replace $fileWithPath in $file, however this doesn't work because (I think) path is not escaped. How to escape it?  sed -i 's/${fileWithPath}/HAHA/g' $file


How to set player specific spawn points in Minecraft? (PC edition, of course)

More specifically:  I don't want everyone spawning at the same place, I want it to not need to know who's playing (so "spawnpoint playername x y z" won't do it). I guess I'm thinking that when people log into the game it senses this person logged in first, they are player1, the second to log on is player2, etc.  Thus it would spawn people in respective spawn points:  spawnpoint player1   -100 10 -100 spawnpoint player2    100 10 100 spawnpoint player3    100 10 -100 spawnpoint player4   -100 10 100   The map i'm making should spawn each player in separate places, while part of the goal is to meet in the middle.  Also, if it matters, the game is for 4 people only, no more no less. Players can't leave spawn points until each has signaled he/she is ready. so somehow I need to set up a ready count of 4 to let the game begin.


How much beef broth can I make with 800g (1.75 pounds) of bone marrow bones?

I got 800 grams of raw bone marrow bones from grocery store. There are 5 bones, cut in about 2 inch lengths. How much beef broth can I make with these bones? Presumably I can't make 15 litres of broth from 800g of bones, but I am also hoping to get more than a litre... What is a reasonable bone to water ratio?


TikZ: Node fill which is opaque to entities in tikzpicture but transparent to background color/image?

Inside a tikzpicture, I am using a white fill for the label of nodes and lines.  This generally works well for my needs, but I realized it is not perfect after putting a picture on top of a background image.  For my question and MWE here, I am using a simple background color for illustrative purposes.  However, I hope that the answer can also be used where there is a background image (e.g. in beamer), hopefully without any modification.  MWE - works with white background only    \documentclass{article}  \usepackage{tikz}%  \begin{document}  \begin{tikzpicture}  \tikzset{mwe/.style={inner sep=1.15ex, text depth=0ex, text height=1ex, text width=0.5em, minimum size=0.5em}}%  \node (A) [mwe,fill=white] at (0,0) {A};% \node (B) [mwe,fill=white] at (4,0) {B};% \draw[bend right=45,line width=0.25mm,-]  (A) to node [midway,fill=white, text height=1.25ex] {ab} (B);%  \node (C) [mwe,fill=white] at (0,4) {C};% \node (D) [mwe,fill=white] at (2,-4) {D};% \draw[bend left=15,line width=0.25mm,-]  (C) to node [midway,fill=white, text height=1.25ex] {cd} (D);%  \node (E) [mwe,fill=white] at (-2,2) {E};% \node (F) [mwe,fill=white] at (4,-2) {F};% \draw[bend left=15,line width=0.25mm,-]  (E) to node [midway,fill=white, text height=1.25ex] {ef} (F);%  \end{tikzpicture}  \end{document}   MWE - different background color    \documentclass{article}  \usepackage{pagecolor}%  \usepackage{tikz}%  \begin{document}  \pagecolor{red!30}  \begin{tikzpicture}  \tikzset{mwe/.style={inner sep=1.15ex, text depth=0ex, text height=1ex, text width=0.5em, minimum size=0.5em}}%  \node (A) [mwe,fill=white] at (0,0) {A};% \node (B) [mwe,fill=white] at (4,0) {B};% \draw[bend right=45,line width=0.25mm,-]  (A) to node [midway,fill=white, text height=1.25ex] {ab} (B);%  \node (C) [mwe,fill=white] at (0,4) {C};% \node (D) [mwe,fill=white] at (2,-4) {D};% \draw[bend left=15,line width=0.25mm,-]  (C) to node [midway,fill=white, text height=1.25ex] {cd} (D);%  \node (E) [mwe,fill=white] at (-2,2) {E};% \node (F) [mwe,fill=white] at (4,-2) {F};% \draw[bend left=15,line width=0.25mm,-]  (E) to node [midway,fill=white, text height=1.25ex] {ef} (F);%  \end{tikzpicture}  \end{document}   Obviously, it would be simple enough to change the fill color to be the same as that of the page background.  However, this is not possible to achieve this if you have a background image which has multiple/various colors in it.  Therefore, I am aiming for something like a fill that is effectively opaque to (or blocks out) other elements in the tikzpicture but is actually transparent/invisible to everything outside of the tikzpicture.  It may be better to say that the fill is completely transparent...however it maintains the effect of erasing the lines, nodes, and any other elements in the tikzpicture behind/underneath.  Is this possible with tikz?  Perhaps not possible using fill per se, but through any mechanism(s)?  edit: I wrote "translucent" originally...I meant "transparent".  Sorry for the confusion!  Bonus: If the labels could also make foreground lines "disappear", that would be good.  Except that labels should not be able to make other labels disappear.  For example, in the first MWE, cd is underneath the ef line, so it would be nice to have that section of the ef line erased.  The same is true for the ab label underneath the cd line.  This would be a bonus, but is not necessary for an answer.  The intended image would look something like this, where any background/color would appear behind/around the labels:


I uninstalled Ubuntu, but UEFI manager still shows two boot options. Is it ok to delete them?

I installed Ubuntu some time ago, and it went bad. I then uninstalled it, and a few weeks later reinstalled it and it went fine. Later I uninstalled it also because of some problems, and after all of that I saw that I had still two Ubuntu boot options on my UEFI manager (image below). Windows booting is functioning well.  Now I want to install the newest version of Ubuntu, but first I want to correct all things. So, what I would like to know is if it's ok to just select the Delete boot option for both of them.


adverbs like inefficient, inexpensive, unnbelievable..., imbossible  Is there any roule? When to use? What to do


I have one .blend project where I've imported objects via .dae files. I've set up a scene and made animations etc...  Now there is a request to modify details of one or more object.  Question 1: Is there a way that I can replace my existing model with a newer version where I keep the location, rotation, scale and animations? Because now I need to delete the object, add it again and animate it again.  Question 2: For future projects, how do you set up a blender project to overcome such problems?


'Ubuntu software' wrongly seems needing to update

The icon suitcase of Ubuntu 20.04 shows now a downward arrow seeming a need to update. But it seems that there is nothing to update and also when I click on Ubuntu Software the application shows a transparent windows difficulting what to chose.  I think this is happening after a problem with a broken package that I removed using sudo dpkg --remove --force-remove-reinstreq <package_name> . First I updated from 18.04 where the problem initially appeared to 20.04.  The result of sudo apt update and sudo apt upgrade is:  Hit:1 http://pt.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://pt.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://pt.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done Building dependency tree        Reading state information... Done All packages are up to date. (base) sergio@hug:~$ sudo apt upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I got bus error from following code:  char *my_string = "Hello"; my_string[0] = 'Y';   What could be the problem (bug)?


Is there any significance of selecting one Pokémon from the list of nearby Pokémon?

There can be many nearby Pokémon in the list but one of them show before other in the right bottom corner without clicking on it and it's mostly one of the unlocked one. So is there any significance of changing it?


What is wrong with this command block code?

I'm trying to get whenever you hold an item (diamond sword) it will give you particles. I know how to do this but not when something has a custom name.  /scoreboard players set @a HoldSword 1 {SelectedItem:{id:"minecraft:diamond_sword"{display:{Name:"&4FadedSharp's Sword"}}   I don't know what is wrong with this code; can someone please help me?


How to make numbered list where the number is not the first part of the title

I would like to make a list of goals like so:  Goal 1: Do some stuff.  Goal 2: Some other stuff.  Goal 3: etc   I can use \begin{enumerate} to make a numbered list, however I would like each number prefixed with the text "Goal", and I would like it as a different line, more like a section heading. I would rather not type out "Goal 1:" etc for each item as these items will likely be reorganised at some stage.  Is there a way to make a numbered list with text titles for each item which include the item number?


Prove that $|A| \geq |B|$ implies $|B| \leq |A|$

If $|A| \geq |B|$, then there exists an onto function $f: A \rightarrow B$.  If $|B| \leq |A|$, then there exists a one-to-one function $f: B \rightarrow A$.  My issue is that I don't think that $|A| \geq |B|$ implies $|B| \leq |A|$. If there is an onto function from A to B, there isn't necessarily a one-to-one function from B to A.


Filter close-vote queue by specific offtopic reason

Please add possibility to check any set of offtopic reason. They are very different to group.  For example I'd review general offtopic/custom offtopic/belongs to other site but I don't like  reviewing "please post SSCCE" and "minimal understanding reasons.


How can I find multiple of the same format in Python?

For a little idea of what the project is, I'm trying to make a markup language that compiles to HTML/CSS. I plan on formatting links like this: @(link mask)[(link url)], and I want to find all occurrences of this and get both the link mask and the link url.  I tried using this code for it:  re.search("@(.*)\[(.*)\]", string)   But it started at the beginning of the first instance, and ended at the end of the last instance of a link. Any ideas how I can have it find all of them, in a list or something?


How can I assign the same drive letter for any USB thumbdrive connected?

I would like to know if there's a way to do this:  My PC has 1 usb port, if I connect thumbdrive1, it will get drive letter M: (example), then I remove it. I then connect thumbdrive2 and it will get drive letter M:. How can I configure Windows to achieve this behaviour?  So that any usb drive I connect stays in the same letter?


What is the 'physical' explanation of a division by a fraction?

For example, dividing by 2, means we cut something in two.  But dividing by 0.5, can only be explained with multiplying something by 2.  So, is there a "physical" explanation of dividing by 0.5? Is it "I divide by an entity that internally multiplies' or something as so bizarre?


Is there a way to create a script and make it executable in less code than this?

My code to create an executable script  touch script.sh && echo "echo 'Hello World'" > script.sh && sudo chmod +x script.sh


How to simply convert video files (i.e.: MKV to MP4)?

I simply want to convert files, any format to any format (at the moment, I need to convert MKV to MP4-h264), without losing quality. I don't want to resize (scale) the video, I don't want to change its aspect ratio and I don't want it to lose quality (this is very important); all I want is "to change the format", that's all. Reason: my DVD player won't recognize any formats other than AVI or MP4. I don't care about file size, unless the difference between the input and the output files is absurdly huge. So, how do I do that?  I've already tried programs such as WinFF, Arista, Format Junkie, but their presets always change something which I don't want to be changed (size, aspec ratio, etc.). I'm not really sure, but I think the best way to get what I want is to go with the pure ffmpeg commands. But how?  By the way, Ubuntu 13.04 (64-bit), here. Thanks for your time, guys.


Since we say when the live wire touches the metal casing of the appliance, the appliance gets live and touching it we feel a shock. Now let's think about the same situation having a earth wire. Here the live and the earth wire complete the circuit and I am still touching the metal casing. I was touching that before it's getting live. Now, why don't I feel a shock since the live wire connects the earth wire by the metal casing and I was touching the metal casing since the beginning before it was damaged?


How would I prove this strange combinatorial identity: $\sum_{i=0}^m \binom mi (-1)^i \frac{1}{i+1} = \frac{1}{m+1}$?

I came across a combinatorial identity today but have no idea how to handle the $\frac{1}{i+1}$ term:  $$\sum_{i=0}^m {m \choose i} (-1)^i \frac{1}{i+1} = \frac{1}{m+1}$$  How would I prove it?


Angular Velocity at different points on a rigid body

Why is it that Angular Velocity of a body about any point the same ?  Eg: If a rod hinged at one end rotates with an angular velocity W the angular velocity about its center is also W.  Also is it true for points out of the body ??


Automatic bounty reward in 100% amount in certain cases

I think there are cases when the bounty placer just forgets or can't award the bounty (out of email/internet etc.), but it's perfectly justifiable to award 100% of the bounty automatically for him.  If the bounty placer accepts an answer within the time-frame of the bounty and doesn't award the bounty in time, award 100% of the bounty automatically to this answer, regardless of the number of upvotes, in the name of the bounty placer (not Community).  I think that accepting an answer is enough to say - "This is what I wanted!". Then he just keeps the bounty open (once he paid for the attention, why would he give up earlier), but might not be able to come back to it in time.


Significance is poor after lasso regression

I did lasso regression for feature selection, and then I test the significance using logistic regression. But I wonder if I should do logistic regression after lasso regression, if not I don't know how to interpret my results. I did lasso regression in R using glmnet package.


Given an enum parameter list as PHP string, eg $list = "'A', 'B'" how to verify this is  1) valid and  2) safe?  What kind of characters are allowed in an enum? Can I verify this with a regex?


Split polygons into equal areas within each region

I've a set of regions within a city. I'd like to split each region into five subregions and then get the centroid of each one of them.  I know how to make a vector grid, but the problem I have is that the generated points are not taking into account the regions, they're only related to the general map.  I have this:    And I want to split each region in five equal size areas. Something like this:    I'd like to build a visualization similar to this one: . In order to accomplish that, I need to split each region, because the original ones are pretty big.


When I type mount <device> <folder> I get message "mount: only root can do that", how so? if mount has -rwsr-xr-x. permissions?


Why would one mark local variables and method parameters as "final" in Java?

In Java, you can qualify local variables and method parameters with the final keyword.  public static void foo(final int x) {   final String qwerty = "bar";  }   Doing so results in not being able to reassign x and qwerty in the body of the method.  This practice nudges your code in the direction of immutability which is generally considered a plus. But, it also tends to clutter up code with "final" showing up everywhere. What is your opinion of the final keyword for local variables and method parameters in Java?


Why is the Moon white? What is it's geological composition and how does that relate to it's apparent "color"?


So I built a nether portal from my house and went to the nether. When I entered back I spawned in an entirely new portal about 300 blocks from my house in an inconvenient location. How can I fix this?


How to set Generic Type T as string in C#

I Have the full name of a type as string and I would like to use this string to tell type of a generic method. see this        string typeStr ="Dll.NameSpace.MyType";       var list = new List<Dll.NameSpace.MyType>();//should put typeStr here       var result = call.SomeGenericMethod<...>(obj);//should put typeStr here    didn't help me. If you try visiting , it does not satisfy my needs.  EDITS:  The generic method I'm trying to call is an extension one. I have unsuccessfully tried the following code,  method remains null       var result = repo.Get();      Type elementType =               Type.GetType("x2o_Care.Models.ViewModels.PatientViewModel");      MethodInfo method =typeof(AutoMapper.QueryableExtensions.Extensions)                        .GetMethod("ProjectTo", new[] { typeof(IQueryable)});         MethodInfo generic = method.MakeGenericMethod(elementType);          var model = generic.Invoke(result.OrderBy(e => true).Take(20), null);


Add syntax highlighting and line breaks to comment formatting

Hello  I would like to see changes in the comment section. Presently, we cannot start a new line. Everything gets posted in one line. Even the code looks horrible.   Also, to color the code in comments.


Calculate sample size for linear regression

I have a total of 9 independent variables (IVs) and 1 dependent variable (DV). 2 of the IVs are binary and the other IVs are continuous ranging from 0 to 5. The DV is continuous ranging from 0 to 5000. My hypotheses look like the following:  IV X1 is positively associated with the DV Y IV X2 predicts DV Y indirectly through IV X3  I have multiple hypotheses of the first version (1.). The mediator model (2.) is the main hypothesis of my study. I want to use a hierarchical regression to test for my hypotheses. How can I calculate the needed sample size (using G-Power)? In G-Power: Do I use 'Linear multiple regression: Fixed model, R2 increase' to calculate the sample size? If yes, what effect size should I use to calculate the sample size?


string.split and string.join in Python 2.7

I was reading from the book How to Think Like A Computer Scientist: Learning with Python when I came across the following question:  As an exercise, describe the relationship between string.join(string.split(song)) and song. Are they the same for all strings? When would they be different? (song had been defined as "The rain in Spain...")  After checking it out, however, I found that both are different strings. I tried using string.join(string.split(song)) is song and f is song where f had been assigned the value string.join(string.split(song)) and both evaluated to False. Why is it so?