How to secure my laptop so that hacking by physical access is not possible?

I messed up my system earlier, I was greeted with a black screen, when booting in to Ubuntu. When I started up my laptop, I selected the recovery option from the grub menu, and chose fallback at root terminal. I saw that I was able to use the add user command, with it, I probably could use to create a privileged user on my machine.   Isn't that a security issue?  One could have stolen my laptop and at startup chose recovery and add another user, I'm fudged then. Including my data.  Come to think of it, even if you somehow remove that entry, one could boot from a live-CD, get a chroot up and running and then add another user, with the right privileges that allows it to see all my data.   If I set the BIOS to boot at my HD only, no USB, CD/DVD, Network startup, and set a BIOS password, it still wouldn't matter, because you'd still have that grub recovery startup entry.  I am fairly certain that someone from China, Russia can't hack my Ubuntu Trusty Tahr, from the network, because it's secure like that. But, if one has physical access to my - your - machine, then, well, that's why I'm asking this question. How can I secure my machine so that hacking through physical access is not possible?    Bug Report:


How to save Google Earth data for offline viewing

I need is to save an area of 300X300 Kilometers for offline viewing. When I disconnect the internet connection and open GE, the images don't load... I know that there is an option for this on mobile, but can this be done on Desktop?


Can I levitate an object without using an electromagnet?

I know that it's possible to make an object levitate using an electromagnet to hold it up.  But is it also possible to do this with regular magnets? Is there a special kind of magnet I need in order to have one powerful enough to hold an object up?  I'm asking because I have this idea in mind where I want to make a decorative item that is levitating an inch or so above its container.      A is the object I want to levitate. B is the container. C shows the magnetic field that is repelling A and B from each other achieving the levitation.    The size of this would be as small as a food plate, maybe even smaller. B is barely a pound or two in weight.    Is that possible?


I am starting an assistant professor job this fall. What do you recommend me to do during this summer before a tenure-clock starts?

The school I will be working at is a low-ranked R1 university.  Some people said, "just enjoy and have fun right now. It would be the last time you would ever have such enough free time".  But others said, "You should do research as much as you can before the school starts because you would not have enough time to do research for the first year because you would be busy with teaching for the first time as an instructor. You should start thinking about writing grant proposals or turning your dissertation into peer-reviewed publications."  Both seem to sound right to me, but are actually very opposite suggestions.  What did you do before you started your tenure-track assistant professor job and after you graduated your PhD? What do you recommend me to do for this summer?


Consider the following model of predator-prey dynamics :  $\dot x = x(\lambda − x − y),\ \\ \dot y = y(−1 + x − y)$  The number and type of equilibria of the system depend on the parameter $\lambda$, and there are essentially three different cases corresponding to three different ranges of $\lambda$.  Find these three ranges for $\lambda$ and the number, type and stability of the equilibria in each case. There are two values of $\lambda$ that give rise to borderline cases; one of these corresponds to a zero eigenvalue and may be ignored, but for the other borderline case you should make a careful analysis of the stability type.  I Seem to be quite a dunce at dynamics, I would appreciate some help on how to go about this problem.


Using the not equal operator for string comparison

I tried to check if the PHONE_TYPE variable contains one of three valid values.  if [ "$PHONE_TYPE" != "NORTEL" ] || [ "$PHONE_TYPE" != "NEC" ] ||    [ "$PHONE_TYPE" != "CISCO" ] then     echo "Phone type must be nortel,cisco or nec"     exit fi   The above code did not work for me, so I tried this instead:  if [ "$PHONE_TYPE" == "NORTEL" ] || [ "$PHONE_TYPE" == "NEC" ] ||    [ "$PHONE_TYPE" == "CISCO" ] then     :        # do nothing else     echo "Phone type must be nortel,cisco or nec"     exit fi   Are there cleaner ways for this type of task?


I have two files: A pdf file and a png file with my signature.  Now I want to put the png image file onto the pdf on a particular place.  Which GUI tool could help me here?


Any example of an ideal of a ring which is not commutative

An ideal $I$ of a ring $R$ is often defined as follows:  A subset $I \subseteq R$ is called an ideal if  (1) $(I,+) \leq (R,+)$   (2) $IR \subseteq I$   (3) $RI \subseteq I$  Here a ring does not necessarily contain $1$.  I know then every ideal is a subring, but I would also like to know if $R$ is always commutative or is there a ring which is not commutative but has a non-trivial ideal.


Is there an API in the C++ (or STL) to fetch the parent process id? if not then what could be the portable code to do so? I understand there linux api such as getppid can do the job on unix platforms but what is equivalent of the same on windows?  Thanks!


I would like to know what is the best way to store fresh baked sourdough so that it maintains a nice crunchy crust and a nice soft, slightly moist, light texture?  I usually store it at room temperature in a large tupperware with a loose fitting lid or on the countertop. I have finally succeeded in baking the perfect sourdough; I am very happy:) I now just need to know what storage method I should use. I know it stores well in the freezer.


Do Cuban citizens need transit visa for Canada when flying from the UK to Cuba and back via Canada?

As per the title, I'm a Cuban citien with the UK residence card. I would like to travel to Cuba from the UK via Canada and the same on the return journey. My question is: do I need to have transit visa to pass through Canada? I won't be leaving the airport. Thank you.


What can I use to monitor and log incoming/outgoing traffic to/from remote hosts?

I run a web server (Debian Squeeze on a VPS), and the graphs provided by the hosting company show consistently that around twice as much traffic is incoming to the server compared to the outgoing traffic.  I am a little confused by this, so I would like to run some kind of logging utility on the machine that will not only confirm the upload/download figures, but also split them up by the remote host involved, so I can see if a large proportion of the incoming traffic is from one particular source.  I suspect most of the outgoing traffic goes through Apache, but the incoming traffic may be mostly through Apache or could be dominated by other scripts and cron jobs, so I would prefer a tool that would monitor traffic at the interface level rather than something within Apache.  Ideally I would like a tool that I can leave running for a few days, then come back and get an output of "bytes per remote host" for both incoming and outgoing traffic.  Is this possible with a standard Linux tool and a bit of configuration (if so, how?) or with a specialist program (if so, which?)


How can I halt JVM, store the JVM state on HDD, and restart whenever required

I would like to halt running JVM and store its state in persistant storage like HDD.  Then i should be able to restart the JVM from the point where I had stopped. I would like to have windows hibernate kind a functionality for JVM.


Combinations with a certain number of symbol repetitions

Help please formulate a formula for calculating the number of all possible combinations for these conditions:   The string must contain the a certain number of characters (no more, no less )!  Symbol A - 2 count Symbol B - 3 count Note: characters and their count can be more than two (for example, C-1, D-2, E-32, etc)   I sketched all the combinations manually for an example:  aabbb abbba bbbaa bbaab baabb abbab ababb babba babab bbaba


How many CPU cores does Blender support and make sense?

everybody,  i want to "build" a new computer for myself. Blender benefits from several cores. How many does Blender support and how many do actually make sense?  Greetings  Ralf


Python script writes no output when stdout is redirected to a file

I got a python script running on startup on my raspberry pi (which works fine) where I want to append the output to an existing text file.  I got this code in my /etc/rc.local file (I tried the same with cron, but there it doesn't even start the script for some reason).  python3 /home/pi/script.py >> /home/pi/log.txt    Unfortunately, no matter what I try, the log file is always empty, except when I run the same command directly AND abort the script by pressing ctrl+c and not ctrl+z. It seems that the script has to shut down in a correct way before it writes anything to the file, but I want it to gradually save the file with every single output.  Edit: I solved it. Apparently it's normal that the file gets only written after a certain amount of memory is filled or the script is finished (Which it never was in my case, as I always restarted the pi before that could happen). Add the flag -u to instantly write to file.  python3 -u /home/pi/script.py >> /home/pi/log.txt


How to make a vf page with the same look & feel as salesforce1, any ideas?


How did I answer a question after a moderator had closed it?

I answered a question 8 seconds after a moderator had closed it. I thought answers on closed questions were not allowed. Is this a bug, or is it something special with mod-deleted questions?  is the question. I'm not sure if I can get the exact times of closure and answering, but I saw that when the question was under a minute old, I answered after the question had been closed


Confused about computer specifications regarding maximum RAM amount

Here is my . I have 2x2 GB RAM installed. Specification says that it can support 8 GB, but there is a note saying "At the time of this publication HP has not qualified SO-DIMMs larger than 2.0 GB for use with this motherboard. Higher capacity modules may be qualified at a later date."  So I can't have more than 4 GB?


Let $I\subseteq B$ be an ideal, we define the ideal norm of $I$ as the ideal in $A$ generated by the elements $N_{E/K}(\alpha)$ where $\alpha \in I.$ We denote it by $N_{E/K}(I).$  If $\mathfrak{p}$ is a prime ideal of $A$, then $A_{\mathfrak{p}}$ is a DVR. I want to see that the norm is multiplicative.  I know I have to use some kind of theorem that reduces to local cases, but I don't know how to manage this.  Of course if $I,J$ are principal ideals, then $N_{E/K}(IJ)=N_{E/K}(I)N_{E/K}(J)$ because of the multiplicity of the "number" norm, but, why this is happening when there are no principal ideals?  Thanks and sorry for my english.


Hole-and-nail paradox in special relativity

Yesterday we started relativity on our physics class, and my professor taught us a few concepts. We did some examples on how things changed by looking them from different reference systems, and a paradox came to my mind from an example he did on the blackboard:  Suppose that we have a bug inside a hole (and suppose that the height of the bug is $0$). This hole is $L$ meters deep. There's a man outside the hole that wants to kill the bug with a nail of length $l$, with $l<L$. Obviously, it's not possible for him to kill the bug by trying to push the nail in the hole. However, if the nail moves really fast, from it's reference system the hole will have a height $L_n<L$, and if it moves fast enough then it will happen that $L_n<l$, so he finally could kill the bug. On the other hand, the bug knows that from his reference system, the nail will have a lenght $l_b<l$, so it would never reach him.  Is it possible to quantify the problem? How is it possible that the nail reach the bug from it's reference system and from the bug's reference system it's even smaller than before?


How do I draw text with GLUT / OpenGL in C++?

How do I draw a text string onto the screen using GLUT / OpenGL drawing functions?


Rolle's theorem $\beta \cdot f(x)+f'(x)=0$

Prove that if $f$ is differentiable on $[a,b]$ and if $f(a)=f(b)=0$ then for any real $\beta$ there is an $x \in (a,b)$ such that $\beta  \cdot f(x)+f'(x)=0$. (Using rolle's theorem)   My attempt:  Using Rolle's theorem we can say that there exists some $c \in (a,b)$, where $f'(c)=0$ . Therefore one factor in the expression $\beta  \cdot f(x)+f'(x)=0$ is $0$ at $c$ but I am unable to prove that the other factor will simultaneously be $0$ at $c$.


Can not install libpng12.so.0 on Ubuntu 19.04 for Packet Tracert 7

I've faced this issue in the earlier Ubuntu's versions and was able to install libpng12.so.0 without any problem.   But in the latest Ubuntu 19.04 I cannot install it...  What I have tried:   Download and installed it locally  wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb && dpkg -i /tmp/libpng12.deb   && rm /tmp/libpng12.deb  Created a symlink  ln -s /usr/lib/x86_64-linux-gnu/libpng16.so.16 /usr/lib/x86_64-linux-gnu/libpng12.so.0  Added new repository and installed via apt  echo “deb http://mirrors.kernel.org/ubuntu/ xenial main” >> /etc/apt/sources.list apt update apt install libpng12-0    All these workarounds don't work.  Could someone help me to solve this issue?


I am a bit lost how to factor $a^{k} - b^{k}$. I know it links to the binomial theorem but I can't remember how to do it. Could anyone explain?


the tag in question is here: 'javascipt'     Just by reading the about:      This is tag created out of people misspelling JavaScript.     I do not believe this is an acceptable tag for the main site seeing how it is for a typo.


I am doing a table and need to make a cutout, but when I use the loop cut tool it doesn't make a straight line, but a curved one. How can I make a straight one?


How to split a vector into equal smaller parts in QGIS or similar?

i want to divide a shapefile with many tiles into a lot of smaller tiles. I am searching for a smart solution, because manual edits are out of questions    Anyone can help or know a nice function?


Modified text appears to expose voting behavior

Perhaps the circumstances are too specific for this to be a problem but I just noticed that you can tell how the last person to modify a post* voted if:   They did not ask, answer, or edit the question or answers AND   They are the first person to vote OR All votes are the same    Granted, you have to either have the privilege to see vote counts or be the person whose post was voted on to be sure of one of the last two but is this something that should be visible at all? Should a user who has just be down voted be able to look up their post in a list sorted by activity and get the user name who did it?  *To be clear, I'm not talking about just your own posts, though that would likely cause the most trouble. I noticed it here:   At the time I posted this question, it was modified by a user who had not edited the question or the answers, left an answer, or even left a comment. This means, unless there's another way to modify a post, that they voted on it. Since all of the votes on the question were up votes, it means they voted it up.  In this instance it was positive but should I be able to figure that out at all?


When someone receiving Social Security dies, does the estate have to give back their last "paycheck"?

When someone receiving Social Security in the US dies, I have heard that there are some cases where the estate must return the last payment made by Social Security.  It makes total sense to me that if someone dies on the 25th and gets a Social Security payment on the 26th that the payment needs to be returned.  But I have also heard that if someone receives a Social Security payment on the 26th and dies on the 27th they may also have to return it.  In what cases does Social Security money need to be returned at death by the estate?  What if the estate is bankrupt?


Using "they" in tag questions with everybody/nobody etc

When you want to add a tag question to "There is nobody in the garden." would it be "are they"? I just have read before that in tag questions we use (they) when the question include everybody/nobody etc.


Analogue of spherical coordinates in $n$-dimensions

What's the analogue to spherical coordinates in $n$-dimensions? For example, for $n=2$ the analogue are polar coordinates $r,\theta$, which are related to the Cartesian coordinates $x_1,x_2$ by  $$x_1=r \cos  \theta$$ $$x_2=r \sin  \theta$$  For $n=3$, the analogue would be the ordinary spherical coordinates $r,\theta ,\varphi$, related to the Cartesian coordinates $x_1,x_2,x_3$ by  $$x_1=r \sin  \theta  \cos  \varphi$$ $$x_2=r \sin  \theta  \sin  \varphi$$ $$x_3=r \cos  \theta$$  So these are my questions: Is there an analogue, or several, to spherical coordinates in $n$-dimensions for $n>3$? If there are such analogues, what are they and how are they related to the Cartesian coordinates? Thanks.


The below code executes karaf commands in the console,    public class DummyCallable {     @Inject     protected SessionFactory sessionFactory;     private Session session;     private ExecutorService executor;      private ByteArrayOutputStream byteArrayOutputStream;     private PrintStream printStream;     private PrintStream errStream;      public DummyCallable() {         byteArrayOutputStream = new ByteArrayOutputStream();         printStream = new PrintStream(byteArrayOutputStream);         errStream = new PrintStream(byteArrayOutputStream);          executor = Executors.newCachedThreadPool();         session = sessionFactory.create(System.in, printStream, errStream);     }      public String executeCommand(final String command) throws IOException {         byteArrayOutputStream.flush();         byteArrayOutputStream.reset();          String response;         FutureTask<String> commandFuture = new FutureTask<String> (new Callable<String>() {             public String call() {                 try {                     System.err.println(command);                     session.execute(command);                 }                 catch (Exception e) {                     e.printStackTrace(System.err);                 }                  printStream.flush();                 errStream.flush();                 return byteArrayOutputStream.toString();             }         });          try {             executor.submit(commandFuture);             response = commandFuture.get(10000L, TimeUnit.MILLISECONDS);         }         catch (Exception e) {             e.printStackTrace(System.err);             response = "SHELL COMMAND TIMED OUT: ";         }          System.err.println(response);          return response;     } }   I am getting "java.lang.NullPointerException" at the line     "session = sessionFactory.create(System.in, printStream, errStream);"   It's the detail info:  java.lang.NullPointerException     at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)     at java.util.concurrent.FutureTask.run(FutureTask.java:262)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)     at java.lang.Thread.run(Thread.java:745)   Can anybody help me ?


Novel About a Girl Who Realizes She is a Clone

So I remember reading this book in the early 2000's, and I'm pretty sure it was placed in my classroom, so it was obviously geared toward young adults. It was about a girl who wakes up one day with a birthmark (I think it might have been crescent-shaped).  At some point, it is revealed that she was either cloned or genetically engineered and that there are several duplicates of her, all with the same birthmark.  Its possible that the bad guys (who cloned/bred/grew her) want her back and try to take her from her parents, but I'm not sure. One thing I do remember is that the girl finds one of her twins or duplicates or whatever, and she's a Russian ballet dancer. I think it was a pretty short book, part of a much longer series that I couldn't find at the time, and I'd love help digging it up again.


Please add a link to the tag wiki on the tag popup

My primary reason for hovering a tag is to learn more about the tag. But when you hover a tag, that isn't one of the options on the popup. It has a link to questions tagged with that tag (with very misleading text), and buttons for following the tag or ignoring it, but not for going to the tag wiki to learn more about it. Before the redesign, the popup had an "info" link which I used all the time.  Two things which I believe fit within one FR:   Change the text of the current link to questions tagged with that tag. The current text is "View tag" which is odd, since it takes you to a list of questions, not the tag wiki. Add a link to the tag wiki.


Should I buy an original manufacturer battery, or is a generic brand OK?

I need another LP-E5 type battery for my Canon 450D. Should I buy an original Canon battery or one of the many generic brands available? There are loads of cheapos on , for example.  I should add that the new battery will be added to my existing Canon battery in a battery grip.  Does anyone have any experience (good or bad) of using generic batteries?


I have a  and I connected it to my servo () per these details:   PIC pin 1 to positive pin 8 to negative pin 2 to servo red wire (signal) servo brown wire to negative servo orange to positive (servo has three colors: brown, red and orange wires)   I programmed PIC with this code:      #include <xc.h>     #define _XTAL_FREQ 20000000     #pragma config WDTE=OFF , BOREN=OFF , PWRTE=ON , MCLRE=OFF , FOSC=INTRCIO      void main(){     TRISIO = 0b0000000;     GPIO = 0b000000;         while(1==1){             GPIO = 0b000000;             __delay_ms(1);             GPIO = 0b111111;             __delay_ms(19);         }  }   But servo does not move a bit. What is the problem?  Edit: i found out it rotate servo arm very fast to its end(the point it couldn't rotate any more then it sound like tick tick tick .....)  i changed my code to this(to reverse it back):              GPIO = 0b000000;             __delay_ms(1);             GPIO = 0b111111;             __delay_ms(19);             GPIO = 0b000000;             __delay_ms(2);             GPIO = 0b111111;             __delay_ms(18);   but it behave the same.


Why did Vader need a big control panel on his suit's chest?

After reading  and , I read  article on Wookieepedia. This passage made me frown :     The monitoring panel beeped frequently and for no reason, the lights seeming to serve only as steady reminders of his vulnerability. His electrical systems were woefully delicate, and he was forced to protect his vital chest panel when dueling. This system was so vulnerable that Antinnis Tremayne was once able to deactivate Vader's entire suit by pressing one button on his chest control plate.   The suit, and more specifically the helmet, use some high technology for the interface. But the chest control panel is made of huge lights and big freaking switches, just like if it was salvaged from an archaeological museum. It was even replaced on at least two occasions, but its odd design was globally kept.     Why incorporate such patent weakness to the armor? And why would Vader tolerate it?


Is it possible for a photon to be at rest?

I know it doesn't really make sense if looking at the photon from the wave point of view, but is there any law of physics which prohibits a photon from stopping completely? Thanks.


The "Does this answer your question?" banner persists. Why?

I had a suggested duplicate on a site-meta post, and the yes/no banner came up.  I chose "no" and a popup came up recommending editing the post.  I did so, by clicking on the popup's edit button, and, on reopening my post, the banner is still there (no additional close votes were applied).  Why does it persist? I already answered no and made the appropriate edit.


Why does Grindenwald still posses the Elder Wand?

At the end of Fantastic Beasts and Where to Find Them Gellert Grindelwald is overpowered by Newt Scamander and taken to prison. Why does he still posses the Elder Wand?


Ubuntu 16.04 Unknown Additional Driver: Processor microcode firmware for Intel CPUs

I have this device is not working since I upgraded Ubuntu from 14.04 to 16.04. Should I enable it? and how?


Violation of the Law of Conservation of Charge in black hole?

Hey I'm a noob to physics however after reading about black holes and Hawking radiation.  If a black hole made entirely out of negatively charged particles (say this black hole is made entirely of electrons) Then when it evaporates equal parts positive and negative particles (positrons and electrons for this example) are created. Doesn't this violate the law of conservation of charge?


I deleted my Ubuntu partition on Windows drive manager and then tried to install it again, after which I was getting this error:  Failed to open \EFI\BOOT\mmx64.efi - Not Found Failed to load image \EFI\BOOT\mmx64.efi - Not Found Failed to start MokManager: Not Found Something has gone seriously wrong: import_mok_state() failed : Not Found   After this went and deleted my boot settings and now I can't install Ubuntu from my bootable usb. It always gets stuck on the screen where it asks me if I want minimal or normal installation. However Windows is booting up perfectly. Please help.


I am really new to Ubuntu. I had it installed without me knowing what were the username or password. Now, I am trying to install skype, but ask me for authentication. I have read instructions on how to until I read this sudo. I follow commands but it ask me for password. How would I know what my password is?


Let $\Omega$ be open and connected. Suppos that a sequence   $$\{f_n : \Omega \to \mathbb{C} : f_n \mbox{ is holomorphic and injective in $\Omega$ }\}$$   Converges uniformly to a function $f$ on every compact subset of $\Omega$. Prove that if $f$ is not a constant in $\Omega$, then $f$ is injective in $\Omega$.   First I proved that $f$ is holomorphic.  Suppose that $f$ is not injective.  There are distinct point $z_1,z_2$ in $\Omega$.  Then there are path from $z1$ to $z2$ lying in $\Omega$. Then... I can't tell you How to solve.  Could you help me?


How to extract numbers from json string in apex

JSON Body {   "60":{"name":"test_Z","provider":"21","status":"enabled"},   "61":{"name":"test_S","provider_id":"21","status":"enabled"},   "62":{"name":"test_G","provider":"21","status":"enabled"} }  Result Expected: I need to get result like test_Z = 60 and test_S = 61 , and test_G =62 this number will change based on API calls


Which characters ARE allowed in file/folder names in SharePoint?


Eclipse 4.2 on Mountain Lion: gatekeeper rejects as unidentified developer?

Just updated the mountain lion, and download the latest Eclipse 4.2 to upgrade the old one. However when opening the application, it shows that it is from an unidentified developer and the gatekeeper refuses to open it.  I know that there is an option to change the security and privacy option to allow it, however I want to know whether there is a way to just add eclipse into the list. Any hint on this?  More information: before updating I have the Eclipse 3.7.2 on machine, and after updating it works smoothly (I think I have added it into the allow list). So is there a way to do this to Eclipse 4.2?  Thanks in advance!


How can I politely remind my professors about a recommendation letter they promised?

I am currently applying to a masters program, application is due on April 15, recommendation letters can be given until the 23.  I asked 3 professors to give me recommendation letters approximately on march 14. One of them already submitted it, but 2 haven't.  I don't want to be excessively insistent, because A) they did tell me they were busy when I asked, and B) I made a grave personal mistake towards one of the professors a long time ago, and the simple fact that he agreed to give me a recommendation letter is, I think, enough for me to never ask him for any favors in my life time.  However the due lines are coming, and I am getting a bit anxious.


Inductive proof of a formula for Fibonacci numbers

May someone help me? I am trying to use induction to prove that the formula for finding the $n$-th term of the Fibonacci sequence is:   $$F_n=\frac{1}{\sqrt{5}}⋅\left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}}⋅\left(\frac{1-\sqrt{5}}{2}\right)^n.$$  I tried to put $n=1$ into the equation and prove that if $n=1$ works then $n=2$ works and it should work for any number, but it didn't work. I need to prove that this formula gives the $n$th Fibonacci number.


I'd like to create a function that takes a template vector object as an argument, which is defined by two template parameters: a type and a dimension.  For example, Vec<float, 3> is a 3D float vector, Vec<int, 2> is a 2D int vector, etc.  I want to create a function that can take a float-type Vec of arbitrary dimension.  I began with this function signature which compiles:  template<int D> void myFunc(Vec<float, D> v);   I'd like to call it like this, which doesn't compile:  // for 2D myFunc<2>(Vec<float, 2>(x, y)); // for 3D myFunc<3>(Vec<float, 3>(x, y, z));   and so on.  Is this possible with C++? I suppose overloading the function is a possibility, but I'd like to know if this is possible/practical anyway.  Other details: in my real implementation, this function is a part of a class which is not a template class. I don't need to resolve which dimension I am passing in since the class already knows about the expected dimension from an internal parameter.  Here is the error produced:  Undefined symbols for architecture x86_64: "int MyClass::myFunc<2>(Vec<float, 2>)", referenced from:     _main in test-1e56b5.o     ld: symbol(s) not found for architecture x86_64     clang: error: linker command failed with exit code 1 (use -v to see invocation)     make: *** [all] Error 1   Thanks.


I can't put my equation in the center, i don't know if is related to be using the srcbook package.    I tried using the amsmath package, the nccmath package and fleqn command, also i used the align* command, but the equation is always as you can see in the image.  What can i do?


i have a problem whit c#, please someone convert this javascript function to c#.  function mycrc(str) {         var c;         var crcTable = [];         for(var n = 0; n < 256; n++){             c = n;             for(var k = 0; k < 8; k++){                 c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));             }             crcTable[n] = c;         }        var crc = 0 ^ (-1);     for (var i = 0; i < str.length; i++ ) {         crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF];     }     return (crc ^ (-1)) >>> 0; }


I'm sure this has been answered somewhere on here before (I even found kinda a guide , but seemed to be a bit spotty and incomplete) but I was wondering if someone could assist me or at least point me in the right direction to get what I'm trying done accomplished.  Basically I installed Ubuntu 14.04 (via "Guided - use the entire disk and setup LVM") on a 20GB disk. I then physically added a clean 80GB disk to the machine, which it detects as 'sdb'.  Basically my question is, I want to be able to add/combine the allocated amount of space from the new disk (80GB) to my machine so that instead of showing two drives (20GB and 80GB), it simply shows one drive (100GB). I'm not worried about RAID or any other special add-ons.  I'm somewhat new to Linux, but understand that I need to use LVM to accomplish this.  If there is anyone who can help me out or link me to a helpful guide/tutorial, it would be very much appreciated! Not sure if this is needed either, but here is my 'fdisk -l' and '/etc/fstab' output:  fdisk output (shortened):  Disk /dev/sda: 21.5 GB, 21474836480 bytes    Device Boot      Start         End      Blocks   Id  System /dev/sda1    *       2048      499711      248832   83  Linux /dev/sda2          501758    41940991    20719617    5  Extended /dev/sda5          501760    41940991    20719616   8e  Linux LVM  Disk /dev/sdb: 85.9 GB, 85899345920 bytes Disk /dev/sdb doesn't contain a valid partition table  Disk /dev/mapper/ubuntu--vg-root: 20.4 GB, 20392706048 bytes Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table  Disk /dev/mapper/ubuntu--vg-swap_1: 801 MB, 801112064 bytes Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table   /etc/fstab (shortened):  # <file system> <mount point>   <type>  <options>       <dump>  <pass> /dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1 # /boot was on /dev/sda1 during installation UUID=26710773-7a64-4f34-a34e-0057cb1739d7 /boot           ext2    defaults        0       2 /dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0


Will this series converge? $\sum \frac {1/2 + (-1)^n}{n}$  MY Try:  Dirichilet  , Abel , libnitz rules can not be used.   $\sum \frac {1/2 + (-1)^n}{n} = \sum \frac {1}{2n} +  \sum\frac {(-1)^n}{2n} $. Is it possible to write in that way? If yes the how?   Can anyone please help me out?


Bug in rep graph in activity page of profile?

The bottom of the reputation card on the activity page is all squished together:     The "next privilege" seems to be overlapping with the rep graph or something...is this on purpose? Has it always been and I just haven't visited my profile in forever? Or is it a bug?  I'm on Chrome on a Mac booting Windows. The track a tag badge is looking good for me on Sci-Fi and Fantasy (where the above pic is) but on Quantum Computing where I'm a mod there's no button to switch back to the rep-next-privilege dealio, which I guess is because there's no more privileges for me to get as mod? (But what about rep milestones?)


Where can I find open source graphics for print layouts?

I'm looking for some assets to decorate an Art Book I'm working on. Simple textures, board trims, etc are what I'm after.  Thanks!


Determine $\lim\limits_{n \to \infty}{{n} \choose {\frac{n}{2}}}\frac{1}{2^n}$, where each $n$ is even

For each positive even integer $n$, set   $$P_n = \displaystyle {{n} \choose {\frac{n}{2}}}\frac{1}{2^n}.$$  Show that $\displaystyle \lim_{n \to \infty} P_n$ exists and determine its value.   Here's what I have so far: each $P_n$ can be thought of as the probability of tossing a fair coin $n$ times, and obtaining exactly $\frac{n}{2}$ heads. My expectation is that $P_n \to 1$, since in any large trial, one would expect to record just about as many heads as tails. But I'm not sure how to mathematically justify this hunch.  Hints or solutions are greatly appreciated.


How much time dilation are we experiencing here on Earth?

We experience time dilation from speed and gravity, but we are in more than just the Earth's gravity field, but also the sun's and the galaxy's gravity field and we are both spinning at 1,670 km/h, orbiting the sun at 107,000 km/h and orbiting the galactic center at 720,000 km/h (these numbers are from space.com). What I want to know is what is our total time dilation compared to an observer far outside the galaxy and at rest compared to the milky way center?


Make it easier to delete profile from all sites

Thanks to the recent behaviour of SE, I have come to the conclusion I have no desire to remain part of it in any way shape or form, and have had to spend far more time than seems reasonable to delete (or rather schedule for deletion) my account on each site. Although now complete, so my request is unnecessary for me, in the interest of considering others can there be a way to delete a profile on all sites with a single click?


Will cooking meat in a slow cooker longer than the recipe calls for have any adverse effects?

I have a recipe for slow cooker beef curry that calls for beef chunks, coconut milk, and red curry paste.  It says to cook on low for 8 or so hours.  Suppose that near the end of the 8 hours I suddenly have to go somewhere else for a few hours and can't take the food out of the slow cooker until I get back.  Will cooking the beef for 10, 12, or even 15+ hours degrade the quality of the finished dish?  I've heard that the longer you cook meat the better it is - is this actually true, and if so is there a limit?


unit test a Java multithreaded socket server

How to do unit tests on a multithreaded server?  Assuming I have a server that extends a thread class and every connected client will be a subthread. This server accepts a new client using socket api.  What is a good way to do unit tests on this server?  What should the unit tests cover?  I wonder how to simulate clients.   Update: I decided to share my code on


Maximization of quadratic form on a sphere

I have to following problem $$\max_{x}x^TAx+b^Tx\quad \mathrm{s.t.}\quad  x^Tx\leq c,$$ where $A$ is real, symmetric and positive semi-definite.  Firstly I tried to solve the problem with the KKT, but that didn't lead to any good results for arbitrary matrices.  So now I argue in the following way  Since $x^TAx \leq \lambda_{max}x^Tx$, I get $x^TAx+b^Tx\leq \lambda_{max}x^Tx + b^Tx$ and with the constraint $x^Tx\leq c$ this leads to $$x^TAx+b^Tx\leq \lambda_{max}x^Tx + b^Tx \leq \lambda_{max}c+b^Tx$$ So my solution would be $$x=\sqrt{c}v_{max},$$ where $v_{max}$ is the unit-eigenvector corresponding to the largest eigenvalue $\lambda_{max}$ of $A$. The thing that confuses me about this solution is that the solution does not depend on $b$ at all, so I am sure it is not correct...


How can I get a list with the 2D screen coordinates of visible Vertices in 3D view without having to convert 3D to 2D?

The bgl module allows us to obtain various information displayed in 3D Blender view. For example, I made a script that gets the 3D coordinate where the mouse cursor hits a object:  import bpy import bgl  """Functions for the mouse_coords_to_3D_view""" def get_viewport():     view = bgl.Buffer(bgl.GL_INT, 4)     bgl.glGetIntegerv(bgl.GL_VIEWPORT, view)     return view   def get_modelview_matrix():     model_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])     bgl.glGetDoublev(bgl.GL_MODELVIEW_MATRIX, model_matrix)     return model_matrix   def get_projection_matrix():     proj_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])     bgl.glGetDoublev(bgl.GL_PROJECTION_MATRIX, proj_matrix)     return proj_matrix   """Function mouse_coords_to_3D_view""" def mouse_coords_to_3D_view(x, y):         depth = bgl.Buffer(bgl.GL_FLOAT, [0.0])     bgl.glReadPixels(x, y, 1, 1, bgl.GL_DEPTH_COMPONENT, bgl.GL_FLOAT, depth)     #if (depth[0] != 1.0):     world_x = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])     world_y = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])     world_z = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])     view1 = get_viewport()     model = get_modelview_matrix()     proj = get_projection_matrix ()        bgl.gluUnProject(x, y, depth[0],                       model, proj,                      view1,                      world_x, world_y, world_z)     return world_x[0], world_y[0], world_z[0]   """drawing point OpenGL in mouse_coords_to_3D_view""" def draw_callback_px(self, context):     # mouse coordinates relative to 3d view     x, y = self.mouse_path      # mouse coordinates relative to Blender interface     view = get_viewport()     gmx = view[0] + x     gmy = view[1] + y      # draw 3d mouse OpenGL point in the 3D View     mouse3d = mouse_coords_to_3D_view(gmx, gmy)             bgl.glEnable(bgl.GL_BLEND)     bgl.glColor4f(1.0, 0.8, 0.0, 1.0)     bgl.glPointSize(30)         bgl.glBegin(bgl.GL_POINTS)     bgl.glVertex3f(*(mouse3d))     bgl.glEnd()      context.area.header_text_set("hit: %.2f %.2f %.2f" % mouse3d)  class ModalDrawOperator(bpy.types.Operator):     """Draw a point with the mouse"""     bl_idname = "view3d.modal_operator"     bl_label = "Simple Modal View3D Operator"         def modal(self, context, event):         context.area.tag_redraw()           if event.type == 'MOUSEMOVE':             self.mouse_path = (event.mouse_region_x, event.mouse_region_y)                      elif event.type == 'LEFTMOUSE':             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')             context.area.header_text_set()             return {'FINISHED'}           elif event.type in {'RIGHTMOUSE', 'ESC'}:             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')             context.area.header_text_set()             return {'CANCELLED'}           return {'PASS_THROUGH'}       def invoke(self, context, event):         # the arguments we pass the the callback         args = (self, context)         # Add the region OpenGL drawing callback         # draw in view space with 'POST_VIEW' and 'PRE_VIEW'         self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')         self.mouse_path = []         #self.wx = bpy.context.window.width         #self.wy = bpy.context.window.height         context.window_manager.modal_handler_add(self)         return {'RUNNING_MODAL'}   def register():     bpy.utils.register_class(ModalDrawOperator)   def unregister():     bpy.utils.unregister_class(ModalDrawOperator)   if __name__ == "__main__":     register()   But now I want to get a list with the 2D vertices in screen. How can I get it without having to convert 3D to 2D? If anyone knows, please tell me. Can be the Vertices index too


Different seed gives different LASSO output

So I am using LASSO in order to reduce the amount of independent variables (~150) I have for my logistic model (n=1200). However, when doing so, the end result (i.e. number of predictors) it chooses varies depending on the seed I provide. 2-3 predictors are consistent, but then sometimes others are added. I guess this is due to the cross-validation for the best lambda parameter often used for LASSO. However, it just seem so inconsistent.  I mean I am using bootstrap in order to validate my results. So in the end I end up with meaningful standard errors, frequency of predictors, corrected statistics etc., but that doesn't change the fact, that the main model, defined on the original data, is kind of random depending on the seed.  How does one "solve" this ? Run the "main model" (i.e. original data) with 100-1000 different seeds to see which predictors are most frequently chosen, and then chose the model that actually has these predictors, or is there anything else that could be recommended ?


I am preparing Html table on Dom ready and trying to click the button in particular row. Below is my code.   $.ajax({     url:            Url + token,     method:         "POST",     async:          true,     data:           JSON.stringify(data),     contentType:    "application/json; charset=utf-8",     success: function (Result) {         var editButton = '<input type="button" class="EditRole" value="Edit">';         $.each(Roles, function( key, Role ) {             var Action = PrepareTd(editButton);             var tr = '
' + Action + "
";             tbody.append(tr);                    });     },     error: function (jqXHR) {         ErrorCallback(jqXHR);     } });  $(document).ready(function() {     $('.EditRole').on("click", function() {         debugger;         console.log($(this).parent());     }); });   This never hit debugger. Am I missing something?


What is the practical difference between a differential and a derivative?

I ask because, as a first-year calculus student, I am running into the fact that I didn't quite get this down when understanding the derivative:  So, a derivative is the rate of change of a function with respect to changes in its variable, this much I get.  Thing is, definitions of 'differential' tend to be in the form of defining the derivative and calling the differential 'an infinitesimally small change in x', which is fine as far it goes, but then why bother even defining it formally outside of needing it for derivatives?  And THEN, the bloody differential starts showing up as a function in integrals, where it appears to be ignored part of the time, then functioning as a variable the rest.  Why do I say 'practical'? Because when I asked for an explanation from other mathematician parties, I got one involving the graph of the function and how, given a right-angle triangle, a derivative is one of the other angles, where the differential is the line opposite the angle.   I'm sure that explanation is correct as far it goes, but it doesn't tell me what the differential DOES, or why it's useful, which are the two facts I need in order to really understand it.  Any assistance?


How are accounts sorted in Network Profile if they have the same rep?

How are accounts sorted if they have the same rep?    I don't see any logic.


You can make a mostly empty comment/post using link Markdown

If  you type the following in a comment, you can post an (almost) empty comment:  [.](http://about:blank)   Here's an example of that:        I've also included an example of that code in the comments of this question.  In posts, since you can use HTML, you can use empty strikethrough to make a completely invisible link (which is useless):  [<s></s>](http://about:blank)   Here's an example of that:


Sci fi novel about alien invaders to earth that can jump high like grasshoppers

I'm looking for a novel that I think was published before 2006; it was a great read.   From what I can remember there was an aggressor alien species that came to earth and put the human race into something like castes to control them. They gave black people power and made whites more like slaves. This alien race were like giant grasshoppers or bugs and could jump high.  There was another friendly alien race that befriended humans; they were very short and might have been a slave race. Humans taught them military tactics and tech, and both these friendly aliens and humans were able to defeat their mutual enemy.


I have a structure like ths (using IntelliJ  When I try and access items in the resources folder I get a null pointer exception: private Icon bishopB = new ImageIcon( getClass().getResource("icons/bishopb.gif") );  exception: Exception in thread "main" java.lang.NullPointerException     at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)     at chess.GUI.<init>(GUI.java:21)     at chess.ChessGame.<init>(ChessGame.java:14)     at chess.ChessGame.main(ChessGame.java:28)  when debugging it seems to be looking for the resource chess/icons/bishopb.gif


Why does the Mac ABI require 16-byte stack alignment for x86-32?

I can understand this requirement for the old PPC RISC systems and even for x86-64, but for the old tried-and-true x86? In this case, the stack needs to be aligned on 4 byte boundaries only. Yes, some of the MMX/SSE instructions require 16byte alignments, but if that is a requirement of the callee, then it should ensure the alignments are correct. Why burden every caller with this extra requirement? This can actually cause some drops in performance because every call-site must manage this requirement. Am I missing something? Update: After some more investigation into this and some consultation with some internal colleagues, I have some theories about this:  Consistency between the PPC, x86, and x64 version of the OS It seems that the GCC codegen now consistently does a sub esp,xxx and then "mov"s the data onto the stack rather than simply doing a "push" instruction. This could actually be faster on some hardware. While this does complicate the call sites a little, there is very little extra overhead when using the default "cdecl" convention where the caller cleans up the stack.  The issue I have with the last item, is that for calling conventions that rely on the callee cleaning the stack, the above requirements really "uglifies" the codegen. For instance, what some compiler decided to implement a faster register-based calling style for its own internal use (ie any code that isn't intended to be called from other languages or sources)? This stack-alignment thing could negate some of the performance gains achieved by passing some parameters in registers. Update: So far the only real answers have been consistency, but to me that's a bit too easy of an answer. I have well over 20 years experience with the x86 architecture and if consistency, not performance, or something else concrete, is really the reason then I respectfully suggest that is a bit naive for the developers to require it. They're ignoring nearly three decades of tools and support. Especially if they're expecting tools vendors to quickly and easily adapt their tools for their platform (maybe not... it is Apple...) without having to jump through several seemingly unnecessary hoops. I'll give this topic another day or so then close it... Related


Why should an investor care about a company that never pays a dividend?

If a company never pays a dividend, as a shareholder, why should I care if it's doing great and has positive media coverage and hype?  What's in it for me?  Is the fact it's reported, and analysed positively, as doing swell, enough for fund managers and retail investors? To put a higher value on its share price, since it's winning the popular vote, without the need to share it's wealth with stockholders? Are we all just clapping our hands louder and louder at how much money they are making?


Taylor series gives $$\frac 1 {(1+x)^2}=1-2x+3x^2-4x^3+\cdots$$  is there a nice expression for $1-4x+9x^2-16x^3 + \cdots ?$  It would be helpful for a problem I am trying to solve.


How to generate an en-dash (–) other than "--"

I am preparing a poster based on a specific template I have to use. The template uses Arial as font. Strangely, typing "--" (for example for page ranges in references) does not result in an en-dash (–), but rather two visible hyphen characters "-"'s. Is there an alternative way to generate an en-dash directly?


Per User Named Credential and External Identity Users

My question is almost similar to one mentioned in 'Auth Provider with per-user Named Credential' (). I am trying to authenticate and make a API call when a new or existing Salesforce community users try to log in. The Authentication is provided by 3rd party (Cognito). So, the requirement is :  User to be authenticated using the 3rd party system for login. After successful authentication and before community page is displayed, the API call is to be made to 3rd party system to get more details about the user.  In order to achieve this:  Created an Open ID Connect Auth. Provider Use the registration handler on the Auth. Provider to create/link a new/existing user. Use a login flow for API call. Use Per User Identity Type Named Credential to make API calls.  No, where I am having issue is once the user has authenticated successfully, how do I allow the user to make API call without authenticating it again. I am getting the error: An Apex error occurred: System.UnexpectedException: You don't have permission to view this data, enter credentials for the named credential in your personal settings. Or ask your Salesforce admin for help. I believe this error is due to the fact that the user is not listed under 'Authentication setting for External Systems'. My requirement doesn't allow me to authenticate the user again, so how do I achieve this using either APEX or any other way?


Prevent Padding is Invalid Exception when Brute Forcing

Im using this code to decrypt AES data:  public static String decrypt(String ciphertext, String password) {     byte[] cipherdata = System.Convert.FromBase64String(ciphertext);      byte[] iv = new byte[AESBlockSize * 4];     Array.Copy(cipherdata, 0, iv, 0, iv.Length);      byte[] input = new byte[cipherdata.Length - iv.Length];     Array.Copy(cipherdata, iv.Length, input, 0, input.Length);      Rfc2898DeriveBytes passwordDB = new Rfc2898DeriveBytes(password, iv, PBKDF2Iterations);     byte[] keyBytes = passwordDB.GetBytes(256 / 8);      RijndaelManaged symmetricKey = new RijndaelManaged();      symmetricKey.Mode = CipherMode.CBC;     symmetricKey.Padding = PaddingMode.ISO10126;      ICryptoTransform decryptor = symmetricKey.CreateDecryptor(keyBytes, iv);      MemoryStream memoryStream = new MemoryStream(input);     CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read);      byte[] plainTextBytes = new byte[input.Length];      int decryptedByteCount = cryptoStream.Read(plainTextBytes, 0, plainTextBytes.Length);      memoryStream.Close();     cryptoStream.Close();      return Encoding.UTF8.GetString(plainTextBytes, 0, decryptedByteCount); }   I get the exception Padding is invalid and cannot be removed on the call to cryptoStream.Readwhen the wrong password is supplied.  Is there any way to prevent this exception when using the wrong password, because I'm trying to make a brute-forcer, and the exceptions are very slow to handle.


Whenever a question pops up on SO about Java synchronization, some people are very eager to point out that synchronized(this) should be avoided. Instead, they claim, a lock on a private reference is to be preferred.  Some of the given reasons are:    (very popular this one, also has an "accidentally" variant)     Other people, including me, argue that synchronized(this) is an idiom that is used a lot (also in Java libraries), is safe and well understood. It should not be avoided because you have a bug and you don't have a clue of what is going on in your multithreaded program. In other words: if it is applicable, then use it.  I am interested in seeing some real-world examples (no foobar stuff) where avoiding a lock on this is preferable when synchronized(this) would also do the job.  Therefore: should you always avoid synchronized(this) and replace it with a lock on a private reference?      Some further info (updated as answers are given):   we are talking about instance synchronization both implicit (synchronized methods) and explicit form of synchronized(this) are considered if you quote Bloch or other authorities on the subject, don't leave out the parts you don't like (e.g. Effective Java, item on Thread Safety: Typically it is the lock on the instance itself, but there are exceptions.) if you need granularity in your locking other than synchronized(this) provides, then synchronized(this) is not applicable so that's not the issue


Is it possible to prove that a massless string has the same tension throughout, through contradiction? I've looked through several proofs online, such as     Consider a massless string being pulled horizontally towards right. The forces acting on a tiny bit of the string having mass Δm will be T1 towards right and T2 towards left.The force equation will be T2-T1=Δma where 'a' is the acceleration of the tiny bit of the string .Now since Δm=0 ∴ T2=T1 i.e tension on either side of any arbitrary mass of the string is zero.In other words tension throughout the string is constant.   Reference   This proof didn't make sense to me, because all it seemed to do was proove that T2=T1 when the mass was 0.


I was asked the same by my friend.  I said that gravitational attraction also occurs for high energy particles .  My friend said photon is not so very high energy particle which I found on net. He said some of light gains mass after event horizon and gets pulled. I said that the space time is bent due to huge mass of the black hole. So light has to take bigger curved paths so the light does not come back. Why does not light gets exactly come back from black hole ?


Is there any time difference when we see distant a object?

I was just wondering that We see objects thru our eyes and light has to reach our eyes so that our brain can process that light.   But then there must be a time difference between that object which I see and me,  as light has to travel from that object to me, let us assume the difference is in milliseconds.      Does that mean that every object I see, is past in time?


I seem to have put too much detailed information in my previous question, confusing the masses.  My apologies.  Let me try again from a different angle.  I want to rotate labels interactively/visually, using edit tools.  I don't want to use the Data defined Rotation method, found under Layer Properties > Placement.  Is there a way to interactively rotate labels in QGIS using any of the edit tools?  While Data defined Rotation works well, it is tedious to set the text rotations for a feature, having to manually enter and "guesstimate" the text angle value into the attribute fields.  Especially for point and polygon features.


Integral closure of $\mathbb{Z}$ in $\mathbb{Q}(\sqrt3)$

I know that $x = a+b\sqrt{3}$ is a root of $X^2-2aX+a^2-3b^2$.  I found the trace of $a+b\sqrt{3}$ it's $2a = tr \begin{pmatrix} a & b \\ 3b & a \end{pmatrix}$.  Now I see that $a$ should be half-integer for $x$ to be in the closure. The closure contains $a+b\sqrt{3}$ for integer $a,b$.  That is all I can say for now.  What can I do next?


recursive functions in pgfplots using 'declare function'

I would like to use pgfplots to create a figure where I plot curves that have a recursive formula. I tried a very simple case that uses the declare function command to see whether this is possible, and I can't compile (TeX capacity exceeded). Is it even possible to do this?  \documentclass{standalone}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}[   declare function={test(\p)=ifthenelse(\p>1, test(\p-1), 0.5);}, ]     \begin{axis}[]     % use TeX as calculator:     \addplot [mark=none] {x};     \addplot [mark=none] {test(0)};     \end{axis} \end{tikzpicture}  \end{document}


How do I view all of the entries in man?

How am I supposed to explore all of the commands available in my terminal? I'd like to be able to browse all commands/documentation that is currently documented within the man command, how do I do that?


How to skip replacing first occurrence of a character in each line?

I have some files in the format  Y15-SUB-B04-P17-BK_M02734_4_000000000-ANNUF_1_1111_24724_4878;size=1; Y15-SUB-B05-P22-LM_M02734_4_000000000-ANNUF_1_1111_20624_14973;size=1; Y15-SUB-B05-P22-LM_M02734_4_000000000-ANNUF_1_1103_11326_10379;size=1;   I wish to replace every occurrence of the underscore (_) with a colon (:) EXCEPT for the first one. I want an output like this:  Y15-SUB-B04-P17-BK_M02734:4:000000000-ANNUF:1:1111:24724:4878;size=1; Y15-SUB-B05-P22-LM_M02734:4:000000000-ANNUF:1:1111:20624:14973;size=1; Y15-SUB-B05-P22-LM_M02734:4:000000000-ANNUF:1:1103:11326:10379;size=1;   I know I can use sed -i '' 's/_/:/g' old_file to replace ALL (or sed 's/_/:/g' old_file > new_file), and that I could add numbers to replace only the 2nd, 4th or so occurrence:  sed 's/_/:/2' old_file > new_file   But how to replace every occurrence on each line BUT the first?


Why we say Happy New Year without an article "a", but we say "I wish you a Happy New Year" using the article?

I was wondering if there is any rule in English that forbids us to say A Happy New Year when we wish someone Happy New Year? I know that we just say it like that, but I was trying to find the rule which would explain this. Thank you for your help.


'ping' is not recognized as an internal or external command operable program or batch file error

When I type these:   ping yahoo.com    or   ping -n or ipconfig   The answer is just this     'ping' is not recognized as an internal or external command operable    program or batch file   or      'ipconfig' is not recognized as an internal or external command operable    program or batch file.    i tried these 2 solutions.   Go to Properties in My computer, Advanced system settings → Advanced → Environment Variables Select 'PATH' from the list of system variables and edit and set PATH to c:\windows\system32 ; this will solve your problem.  If still you have a problem, do the below steps  Control Panel → System and security → Windows Firewall → Advanced settings → Inbound rules → New rule → custom rule  Im Protocol and ports: Protocol: ICMPv4 on the same panel go to customize, choose "Specific ICMP types", check the box "echo request"  but it is still a problem, how can I solve it?


How can I get Ubuntu 14.04 back to pure Unity?

I installed kubuntu-desktop and that can't be removed, since it is a metapackage.  All of the commands I have seen do not work, including ones that use aptitude and ones that simply state the packages to be removed via apt-get.  How can I make my kubuntu-desktop be completely removed in the latest version Ubuntu 14.04?


macOS Catalina File Structure: Cannot remove

> sudo rmdir /sw rmdir: /sw: Read-only file system  > mount | grep read /dev/disk1s5 on / (apfs, local, read-only, journaled)  > sudo mount -o rw / > mount /dev/disk1s5 on / (apfs, local, journaled) > sudo rmdir /sw rmdir: /sw: Operation not permitted     root />$ mkdir a root />$ rmdir a root />$ rmdir sw rmdir: sw: Operation not permitted root />$ rmdir opt rmdir: opt: Operation not permitted root />$ rmdir mnt rmdir: mnt: Operation not permitted root />$ rmdir home rmdir: home: Operation not permitted   What exactly is preventing me from removing these directories even with SIP disabled?


Instantaneous angular momentum of a disc

Suppose we have a disk of radius $r$ and mass $m$ travelling at velocity $v$. I want to calculate the instantaneous angular momentum with axis through the edge of the disc (on the circumference).   Angular momentum $= I \omega$. $I = \frac{1}{2}mr^2 + mr^2 = \frac{3}{2}mr^2$ by the parallel axis theorem. $\omega = \frac{v}{r}$. Therefore, angular momentum $= \frac{3mrv}{2}$.  Alternatively, angular momentum $=p\times r= m r \times v = mrv$.  Why do these two methods differ? Which, if any, are correct?


Studying General Relativity I found, in a demonstration, this vectorial identity :  My question is, what does it mean $(\textbf{A}\cdot \nabla) \textbf{A}$  ? It can't be $\textbf{A}\cdot \nabla \textbf{A}$ because it would be a scalar. Sorry but it's the first time i saw that kind of product. Thanks a lot in advance.


For questions like  where code works perfectly fine and there does not seem to be an issue, is is ok to answer the question with a different form of the question just because:     The question is ambiguous... Waiting for more details from the OP, and then I will can update my answer.     ?


What it means that there is only one electron in universe?

Could someone explain if this statement is and what could possible mean?


What happens to an Animagus's old clothes?

In both media, when Animagi transform from beast to human, they are fully clothed. In the Prisoner of Azkaban film, we see Wormtail leave his clothes behind, as he transforms into a rat. What happened to them?


I want to redirect [not blocking them] all the ip's in between 83.116.119.0 to 255.255.255.0 Please help me to write a pattern in my code(IPTOBEBLOCKED). Am a newbie in web.config , Here is my code  <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite>     <rules>         <clear />         <rule name="Redirect Japan Users" enabled="true" stopProcessing="false">             <match url=".*" />             <conditions>                 <add input="{HTTP_HOST}" pattern="IPTOBEBLOCKED"/>             </conditions>             <action type="Redirect" url="http://www.example.net/jp/" redirectType="Permanent" appendQueryString="false" />         </rule>     </rules> </rewrite> </system.webServer> </configuration>


Integrating $\int_{-\infty}^{\infty} e^{-2b x^2} \, dx$

I need help in integrating this integral:  $$\int_{-\infty}^{\infty} e^{-2b x^2} \, dx$$  Knowing the value of $\int_{-\infty}^{\infty} e^{-x^2} \, dx$, and the integral for $e^{bx}$, I'm guessing that it would go out and evaluate into something like:  $$\int_{-\infty}^{\infty} e^{-2b x^2} \, dx= \frac{\sqrt\pi}{-2b}$$  But Wolfram gives the integral out as:  $$\int_{-\infty}^{\infty} e^{-2b x^2} \, dx= \frac{\sqrt\frac{\pi}{2}}{\sqrt{b}}, Re[b] \gt 0$$  Which has $b$ under the radical sign and a factor of $\sqrt{\frac{1}{2}}$ on the numerator.


Vertical alignment of align* in enumerate

Related (but not the same):         Earlier today I asked a question about aligning equations in an enumerate environment and got an answer that seemed to work for the example I gave, but it turns out I wasn't really specific enough for my problem.  I'm using align* environments, often as the only part of a list item. (If you're wondering why I'm not using more words to introduce the align*, these are mostly homework solutions where most of the work is algebra, etc.)  Here's my code and what it makes (above the middle line):  \begin{enumerate}   \item \begin{align*}     x^2 + y^2 &= x^2 + (iy)^2 \\               &= (x + iy) (x - iy)   \end{align*}   \item \begin{align*}     \frac{1}{n^2-4} &= \frac14 \frac{4}{(n-2)(n+2)} \\                     &= \frac14 \left( \frac{1}{n-2}-\frac{1}{n+2} \right)   \end{align*} \end{enumerate}     I'm trying to make the baseline of the first line of the align* environment the same as the number's baseline—I want the first line of the align* to have the same vertical position (centered horizontally in the same way) relative to its number as in the second half of my picture. (Side question: why is there so much space before the align* starts?)


C - strncpy segfaults when using pointer

I've got the following piece of code:  #include<stdio.h> #include <string.h>  int main(void) {     char *src = "This is my string.";     char *dest, *ret;     //char dest[64], *ret;     ret = strncpy(dest, src, 5);     size_t s = strlen(ret);      printf("src: %s\n", src);     printf("dst: %s|\n", dest);     printf("ret: %s|\n", ret);     printf("len: %d\n", s);      //for (int i = 0; i < 5; i++) {     //    printf("i: %d\n", i);     //}      return 0; }   for loop disabled  $ gcc -g -o test test.c; ./test  src: This is my string. dst: This | ret: This | len: 5   for loop enabled  $ gcc -g -o test test.c; ./test  Segmentation fault (core dumped)   I wonder why this is failing only when the for loop is enabled.  Is this just an undefined behavior because I'm using a dangling pointer for the dest argument or there is another explanation for this?  By looking at the gdb session, it crashed when trying to assign a value from ecx to rdi register?  (gdb) bt #0  0x00007ffff7f4a1a7 in __strncpy_avx2 () from /lib64/libc.so.6 #1  0x000000000040116e in main () at stack.c:8 (gdb) x/i 0x00007ffff7f4a1a7 => 0x7ffff7f4a1a7 <__strncpy_avx2+1591>:    mov    DWORD PTR [rdi],ecx (gdb) x/i $rdi 0x401060 <_start>:  endbr64 (gdb) p $rdi $7 = 4198496 (gdb) p $ecx $8 = 1936287828


How would someone think if he/she was born without any senses?

Can thought originate from nothing? I was thinking about this last night and got me wondering what would happen if someone was born without senses.


How to change the system date in Linux ?  I want to change:   Only Year Only Month Only Date Any combination of above three


Where does apt store downloaded packages?

I know that apt-get ( as in sudo apt-get install vim) stores downloaded packages in /var/cache/apt/archives. However, when using apt (as in sudo apt install vim) instead, there are no packages stored in /var/cache/apt/archives.  Where does apt store packages?


So recently, I decided to change my password and used the provided password ubuntu gave me, which I wrote down in my notebook so I don't forget it. In order to see if it worked, I suspended the laptop and it locked itself. So when I tried to use the password that I wrote down to unlock it, it kept saying "incorrect password, please try again" but I was certain it was right. So I looked up online to see how to change passwords from the outside and I was able to change my password. Here's the problem, ever since I changed my password (from the grub menu and not the settings) the "Authentication required" window keeps popping up, especially when I'm doing school work on my browser. It says that "the password you use to log in to your computer no longer matches that of your log in keyring". Can someone please help me figure out how to get rid of this? I don't want to re-install the software again.


Help! Unable to connect to Upstart: Failed to conenct to socket/com/ubuntu/upstart: Connection Refused

I'm using Ubuntu 16.04.6.  I noticed yesterday the Dropbox automation stopped working.  I am now getting the following error message:  Unable to connect to Upstart: Failed to connect to socket/com/ubuntu/upstart: Connection Refused  Does anybody know why this would happen and how I can fix it?


is not a real problem but more a curiosity, what's more I do not want some stupid question, the point is playing with Visual Studio (x64), I have noticed that if a Structure is present a wchar*  #include <iostream>  struct {     wchar_t* pTest;     unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 16  will not have to be 12 ?  #include <iostream>  struct {     wchar_t* pTest;     //unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 8   #include <iostream>  struct {     //wchar_t* pTest;     unsigned int uTest; } Test;  int main() {     std::cout << "sizeof(Test) - " << sizeof(Test) << "\n\n"; }   sizeof(Test) - 4   I understand that behind there a logic, but I'm confused about who are the rules relating to this.


How are logic gates created electronically?

So we have AND, NOT, NAND, NOR, OR gates, but how are they created electronically/electrically?  For example, what makes NOT gate reverse the value?


How to build the table as image attached? I want exactly this table and format.

Hello I have tired to build this table attached   following code is my try..I do not know how to bring the same setting    \documentclass[preprint,12pt,authoryear]{elsarticle}   \usepackage{epsfig}  \usepackage{graphicx} \usepackage{placeins} \usepackage{siunitx}  \usepackage{amssymb}  \usepackage{amsthm}  \usepackage{amsmath}  \usepackage{tabularx}  \usepackage{siunitx} \usepackage{booktabs} % <-- To get prettier rules in tables \usepackage{caption} % <-- To set caption width etc. \begin{document}  \begin{table}   \centering   \captionsetup{width=10cm}   \caption{Silicon Nitride Height Measurements}   \label{tab:2}   \begin{tabular}{l *{4}{S[table-format=4.0]}}     \toprule            {Transformation temperatures} & {Transformation constants}&{Maximum residual strain} &{Effect modulus}\\             & \si{nm} &  &\si{nm}\\     \midrule      $M_f$  &       145 &        55 &        140& 55 \\      $M_s$     &      130 &        50&        135& 60\\      $A_f$    &       145 &        60&        125& 60\\      $A_s$  &       190 &        90 &        230& 100\\          &  185 &        85&        180&  75\\           &195 &        85&        200& 65\\     \bottomrule   \end{tabular} \end{table} \FloatBarrier  \end{document}


I want to define two different UV maps for one object.  One will have the nodes pushed around to match features in an image for dents and scratches, intended to affect the displacement of the material.  The other provides color, a pigmentation pattern, and mapped in a way unrelated to the scratches/dents.    I found how to create multiple UV maps by going into the mesh properties, UV Maps, and click the + button.  I have pushed nodes and am convinced I have two separate UV maps, named ScratchyUV and PigmUV, each arranged on its appropriate image in the UV/Image Editor as I like.  For the material, I have two Texture Coordinate nodes. One feeds an Image Texture for the scratch/dent image, which feeds the Material displacement input.  It actually works!  Yay.   The other Texture Coordinate node goes to a Diffuse Shader and that goes to Material surface.    Where I am stuck: How do I choose which UV map gets used for which Texture Coordinate?  What would make sense to me is the Texture Coordinate having a list or something to choose a UV map.  This is probably all wrong, but I have nothing better than guesses!   What is the trick to choose UV maps in this kind of setup?  I could show a screenshot my nodes setup, but there's a lot of extra stuff for tweaking the details, and it's not as I described.  What I described should be enough for the purpose of the question, though.


Does a surjective ring homomorphism have to be surjective on the unit groups?

I know ring homomorphisms map units to units, which made me curious about the following. Suppose $f:R\to R'$ is a surjective ring homomorphism, mapping $1$ to $1'$. Is it necessarily surjective from $U(R)\to U(R')$?  I know if $f(u)$ is a unit in $R'$ with $f(w)$ its inverse, then $f(uw)=f(wu)=1'$, but I see no reason to conclude $uw=wu=1$ in $R$ without assuming $f^{-1}(1')=\{1\}$. But I can't find a counterexample, so I'm not sure whether it's true or not.


Adjusting the distance between the x ticks in tikz

I would like to manually adjust the distance between the x ticks in my plot. I am changing the value in xtick distance without any visible effect. Since my labels are quite large, I would like to spread the x axis on most of the page width, something like 0.75\textwidth.  \documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots}  \begin{document}  \begin{figure}[!htbp] \centering \begin{tikzpicture} \begin{axis}[axis y line=middle,     axis x line=bottom,     x axis line style={dashed},     xlabel={Time steps},     ylabel={State and input variables},     xtick distance=30,     xtick={-4,-2,0,2,4,6},     xticklabels={$k-2$,$k-1$,$k$,$k+1$,$k+2$,$k+3$},     ytick={},     yticklabels={},     xmin=-8,     xmax=8,     ymin=0,     ymax=1.1] \addplot[const plot,no marks] coordinates {(0,0) (1,0.25) (2,0.4) (3,0.5) (4,1) (4.49,1)}; \addplot[draw=blue,const plot,no marks] coordinates {(-4,0.15) (-2,0.05) (0,0.2) (2,0.45) (4,0.7) (6,1)}; \addplot[const plot,dashed,no marks] coordinates {(-8,1) (8,1)}; \end{axis} \end{tikzpicture} \end{figure}  \end{document}     Any ideas ?  Thanks in advance


What is this thinking type effect called?

In Naked Gun 33 1/3: The Final Insult (1994), Scene where Frank tries to take the  gun out of his pouch, but it was not there. Then he thinks past what  really happened to his gun. While thinking this effect used.    What is this effect called ?


How long can HDD survive without power. I have three Samsung HD103SJ HDDs none of them were powered for few years. I took them from RAID 5 array and all of them were functional. Now I tried to make new RAD 5 array but they are death. All of them.  Im not asking about data retention.  I thought maybe some electrolyte capacitor died or some internal batery that helps actuator arm to get in safe position after sudden power off.


StringCharcaterIterator is not saving the characters to characters array or List

I am trying to iterate through a string and save the characters in a character array. It iterates perfectly and prints the characters but when I try to save the characters in the Array or in a List, it gives me NullPointerException. Can anyone point out the mistake I am doing here?     try {                      List<String> result = Files.readAllLines(Paths.get("C:\\Users\\Rehan\\Documents\\NetBeansProjects\\Marks\\build\\classes\\marks\\input.txt"));                     List<Character> marksC = null;                                          for(String line : result ){                       System.out.println(line);                       //Reversing each line of string                                               StringBuilder sb =  new StringBuilder(line);                       sb.reverse();                       String RS = sb.toString();                       System.out.println(RS);                       //To read first sequence of integers in reversed string                                                   StringCharacterIterator si = new StringCharacterIterator(RS, 0);                         for(int i = 0; i <= RS.length() ; i++){                             while (si.current()!=' '){                                 char c = si.current();                                 marksC.add(c); //This line giving NullPointerException                                 System.out.println(c);                                 si.next();                             }                             break;                         }                     }                     JOptionPane.showMessageDialog(null, result);      }


ssh settings `permitopen="localhost:4000"` does not limit remote port forwarding

I have a special user on my server, let's call it foo. I use it only for port forwarding.  The user's .ssh/authorized_keys2 is set up to prevent login and to open only a specific port:  no-pty,no-X11-forwarding,permitopen="localhost:4000",\ command="/bin/echo do-not-send-commands" ssh-rsa <long public key> bar@foobar   Additionally, the foo has its shell set to /bin/false in /etc/passwd.  I can't log onto the machine (that's what I want):  $ ssh foo@remote PTY allocation request failed on channel 0 Connection to remote closed.   But I can open ports. Interestingly, I can open port 4000, but also other unprivileged ports:  $ ssh -N -R 4001:localhost:22 foo@remote > # connection established   On remote with user bar, I can connect:  $ ssh -p4001 bar@localhost bar@localhost's password: Last login: Fri Sep 26 09:23:45 2014 from localhost.localdomain ...      Why can user foo open port 4001, when I limited it to permitopen="localhost:4000"?


Invertible matrix if the sum of the absolute values of a column is lower than the absolute of the diagonal value

I've been trying to prove that if I have $A=[a_{ij}]_{n \times n}$ therefore, if;    Then the matrix is invertible.  Can anyone help me and give me some vocabulary (If I'm not wrong, there is a name for this type of matrix, isn't there?)


Infinite series of converging sequence: $\sum_{n=1}^{\infty}\frac{1}{n2^n}=\ln 2$

How can I prove the following equality; $$\sum_{n=1}^{\infty}\frac{1}{n2^n}=\ln 2\,.$$


Pipe blocks with the following sequence of commands

I have a script that reads a file that contains urls and then prints out the ip addresses. However, I am unable to find resources as to why the pipe blocks when I add the command   cut -d" " -f4    at the end of the pipe. Here is the full command.   for url in $(cat urls); do host $url; done | grep "has address" | cut -d" " -f4   The output is printed asynchronously till the grep command. Any command that comes after the grep has its output blocked till all the urls have been processed by the host command. Can anyone give me insight as to why this happens?


What is the point of the body terminal in a MOSFET?  If we assume Vsource=0 and Vdrain>0 then we will have a linearly changing voltage from drain to source. Then if Vgate>0, depending on the difference between Vgate and the voltage on each point in the MOSFET below the gate, we might, or might not, have an inversion channel.   So what is the actual purpose of the body being connected to source? Why don't we simply let it float? I know that if the body voltage is different than the source voltage, the threshold voltage will change, but what if the body terminal is left to float?


How did this question end up status-review?

Only moderators should be able to add status tags. However, it seems a normal user  to .  I have tried to reproduce this, but I wasn't able to do it as normal user or anonymous user.  The user seems to be an employee but it seems he is missing his diamond. He is able to make the tag change, but he still goes through review...


Is there a variant of mathtools's \DeclarePairedDelimiter that works for unpaired delimiters?  EDIT:  To be clear, I'm looking for a command that can be called as \command{delimited}, \command*{delimited}, or \command[\big]{delimited}, with the syntax of DeclarePairedDelimiter.  \usepackage{article} \usepackage{mathtools} \newcommand\tall{\rule{0pt}{10ex}} \DeclarePairedDelimiter\withblank{}\rvert \DeclarePairedDelimiter\withdot.\rvert \DeclarePairedDelimiter\withrelax\relax\rvert \begin{document} \(\withdot*\tall\) produces the same result as \(\left.\tall\right\rvert\), but \(\withdot{}\) does not produce the same result as \({}\rvert\).  \(\withblank{}\) and \(\withrelax{}\) produce the same result as \({}\rvert\), and \(\withblank*\tall\) and \(\withrelax*\tall\) both give errors (but eventually produce the same result as \(\left.\tall\right\rvert\)). \end{document}   EDIT:  To be clear, as @Werner points out , the behaviour of \withdot{} is not literally a bug; it's just not what I want.


How can two zero-dimensional black hole singularities have different masses?

(This question is not a duplicate because it is primarily concerned with how different zero dimensional objects/singularities with zero volume, are able to contain differing information on black holes such as their differing masses.) If a non-rotating black hole singularity is a zero dimensional point with zero volume, and if different black holes have different masses, then how can the differing masses be represented by the same singularity? There would seem to be no space to encode any differences at all between black holes of different masses? This would seem to suggest that non-rotating black holes have something larger than a singularity at their cores. Perhaps there is a state of matter with non-infinite density that is denser than a neutron star, or even a theorized quark star. If the "singularity" in a rotating black hole is a ring with zero dimensional thickness, and thus again zero volume, then the question is the same. How are the differences between differing black holes stored in an object of zero volume, differences such as mass and charge. Zero volume seems to preclude the storage of any information since there is no structure in which to store information. Where have I gone wrong in my understanding?


I need to write a script to test if a service inside of an Android emulator is ready for apk installation or not using this command adb -s emulator-5554 shell pm list package | grep package:com.android.  If the command does not output any one of these substrings in the first line, then the avd is not ready for apk installation  Is the system running? Can't find service online  This is my script if [ $(adb -s emulator-5554 shell pm list package | grep package:com.android. | head -n 1) = *"Is the system running?"* ] ||    [ $(adb -s emulator-5554 shell pm list package | grep package:com.android. | head -n 1) = *"Can't find service"* ] ||    [ $(adb -s emulator-5554 shell pm list package | grep package:com.android. | head -n 1) = *"online"* ] ; then   echo "could not find package service" else   echo "found package service"     fi    but I get this error ./script.sh: line 4: [: =: unary operator expected ./script.sh: line 5: [: =: unary operator expected ./script.sh: line 6: [: =: unary operator expected


Electrons flow from low potential to high potential in DC, i.e. from negative terminal to positive terminal. But how do they flow in AC, as the polarity changes every 10ms for 50Hz?


I Erased my hard drive from mac utilities from the recovery mode, but now i am not able to install Mac OS Mojave as it doesn't shows my mac hard drive to install and when i checked it in utilities, it shows the drive as UN-formatted. So now i cannot install mac os and my ssd has been erased. What can i do for it ?  I am attaching a image that it is showing in the disk utilities.


Rather than seeing this screen    I hope to see Ubuntu 16.04 booting process. How should I see that?


Could I map (Swap) the channel at run time.  I am using the ffmpeg to record the both video and audio from two logitech cam/mic and bluetooth mic. Now currently at the starting of recording bluetooth is off the audio of both the logitech are coming from the left_channel as well as right_channel.And if bluetooth is ON then only the bluetooth audio coming from left_channel and both logitech audio coming from right_channel.  And again off the bluetooth the left_channel gets blank the both logitech audio coming from only right_channel. So if bluetooth is turned off then I wanted to replace the logitech audio to both the left_channel and right_channel.   Also if the bluetooth is ON then I set it as default, I have used the following command to set it default:  pacmd set-default-source bluez_source.00_1D_DF_44_DB_A6 > /dev/null   Also if bluetooth is off then I set the one logitech as default. I used the following command to set it default:  pacmd set-default-source alsa_input.usb-046d_0823_D81A0330-00-U0x46d0x823_1.analog-stereo > /dev/null   I am using the following ffmpeg command to record the audio and video. This command is generated if at the starting the bletooth is OFF:  ffmpeg -loglevel warning -y -f v4l2 -s 544x288 -i /dev/video0 -vstats -vstats_file '/home/left_cam-stats' -f pulse -name 'Unknown source 0' -i alsa_input.pci-0000_00_1b.0.analog-stereo -filter lowpass -f pulse -name 'left_mic 0' -i alsa_input.usb-046d_0823_D81A0330-00-U0x46d0x823_1.analog-stereo  -f pulse -name 'right_mic 1' -i alsa_input.usb-046d_0823_4B709030-00-U0x46d0x823.analog-stereo  -f pulse -name 'default 0' -i default  -f mpegts -crf 20 -r 24 -pix_fmt yuv420p -vcodec libx264 -vprofile baseline -t 02:00:00 -map 0:0 -map 1:0 -map 2:0 -map 3:0 -map 4:0 /home/left_cam.mp4   If bluetooth is ON at starting the following ffmpeg command is generated.:  ffmpeg -loglevel warning -y -f v4l2 -s 544x288 -i /dev/video0 -vstats -vstats_file '/home/left_cam-stats' -f pulse -name 'Unknown source 0' -i alsa_input.pci-0000_00_1b.0.analog-stereo -filter lowpass -f pulse -name 'left_mic 0' -i alsa_input.usb-046d_0823_D81A0330-00-U0x46d0x823_1.analog-stereo  -f pulse -name 'right_mic 1' -i alsa_input.usb-046d_0823_4B709030-00-U0x46d0x823.analog-stereo  -f pulse -name 'default 0' -i bluez_source.00_1D_DF_44_DB_A6  -f mpegts -crf 20 -r 24 -pix_fmt yuv420p -vcodec libx264 -vprofile baseline -t 02:00:00 -map 0:0 -map 1:0 -map 2:0 -map 3:0 -map 4:0 /home/left_cam.mp4   I want to replace the logitech audio to both left_channel and right_channel if bluetooth is off and if bluetooth is On then only the bluetooth audio from left_channel and both logitech from the right_channel.


Prove that $b\cdot\aleph_0=b$, where b is an infinite set.

Prove that $b\cdot\aleph_0=b$, where $b$ is an infinite set. I tried by multiplying $1\le\aleph_0\le b$ with $b$ but then I have to prove that $b\cdot b=b$  and that seems harder than my original problem.


What does $\sum_{n=0}^\infty 1/n^n$ converge to?

Let $0^0 = 1$.  It can be shown by the inequality introduced below that "my number" $\sum_{n=0}^∞ \frac{1}{n^n}$ is strictly between $2$ and $e$:  \begin{align} 2 & =\frac{1}{0^0}+\frac{1}{1^1} <\text{“my number''}=\frac{1}{0^0}+\frac{1}{1^1}+\frac{1}{2^2}+\frac{1}{3^3}+\cdots \\[10pt] & = \frac{1}{1}+\frac{1}{1}+\frac{1}{4}+\frac{1}{27}+\cdots<e=\frac{1}{0!}+\frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}=\frac{1}{1}+\frac{1}{1}+\frac{1}{2}+\frac{1}{6}+\cdots \end{align} Desmos.com () shows that this number is equal to approximately 2.291. My questions are:   Can this number be expressed by any other way(s) than this one? Is this number rational, algebraic irrational or transcendental?


I'm trying to show that the following set is an algebra: Let $X$ be some set. We define a system of sets $\mathcal{C}\subseteq \mathcal{P}(X)$ by $$\mathcal{C} = \{ S \subseteq X : \text{for all } E \subseteq X \text{ we have } \mu^*(E) = \mu^*(E \cap S) + \mu^*(E \cap S^c),$$ where $\mu^*:\mathcal{P}(X) \to \overline{\mathbb{R}}_{+} $ is an outer measure, i.e.   $\mu^*(\emptyset) = 0$, For all $A \subseteq B \subseteq X$, $\mu^*(A) \leq \mu^*(B)$, For any sequence $A_i \subseteq X, i =1,2,\ldots$ we have $$\mu^*\left( \bigcup_{i=1}^{\infty} A_i \right) \leq \sum_{i=1}^{\infty} \mu^* (A_i).$$   Show that $\mathcal{C}$ is an algebra.  So I only need to show three things:   $X \subset C$ $A \subset C \implies A^c \subset C$ $A,B \subset C \implies A \cup B \subset C$   1: Letting $X=S$, we see that in order for $X \subset C$ to be true, $$\mu^*(E) \geq \mu^*(E \cap X) + \mu^*(E \cap \emptyset) = \mu^*(E \cap X) = \mu^*(E).$$ Since $\mu^*(E) \geq \mu^*(E)$ is trivially true, $X \subset C$.  2: Suppose $A \subset C$. Then $\mu^*(E) \geq \mu^*(E \cap A) + \mu^*(E \cap A^c)$. Now consider $S=A^c$, then $$\mu^*(E \cap A^c) + \mu^*(E \cap (A^c)^c) = \mu^*(E \cap A^c) + \mu^*(E \cap A) \leq \mu^*(E),$$ so $A^c \subset C$.  3: I'm a little stuck with 3. We have that $$\mu^*(E) \geq \mu^*(E \cap A) + \mu^*(E \cap A^c),\\ \mu^*(E) \geq \mu^*(E \cap B) + \mu^*(E \cap B^c).$$ How can I use this to show that $$\mu^*(E) \geq \mu^*(E \cap (A \cup B)) + \mu^*(E \cap (A \cup B)^c)?$$ I have tried doing some adding and subtracting but nothing seems to bring anything. Some other trick maybe?


I think I overwrote my Windows 10 by Ubuntu. I still can see my installed software on Data C: and also on D:. But I can't open it. How can I solve it?


I have been looking a bit around for a way to retrieve the phone number of an iOS device but without too much sucess as I've seen mixed reports  According to this link it's a no :   Also here  I don't see any information about the phoneNumber for iOS.  However, as these links aren't brand new, I would like know if things have changed since


Are maester's always high born, or is there some other process for applying to be a student?   Samwell Tarly and Aemon Targaryan were definitly high born, but how do others such as Luwin apply if they don't already have a high born level of education?


Removing dynamically added HTML element by jquery

The below code is adding dynamically a html input element[type = file] for selecting another file[without replacing the current one] and displaying the name of selected file, with a remove icon.   On click of remove icon, it should remove the corresponding input element [type = file], input element [displaying name of file] and remove icon.  Suppose if I add 3 files, on click of third remove icon, it should only remove corresponding dynamically added elements.  Please have a look at :      $(document).ready(function(){          $(".filetype").change(function(){                 var file = this.files;                 var  nametext =file[0].name;                               $(this).parents('.mdl-list__item').find('.mdl-button').append(' <input id="file_input_file2" name="replyfiles2" class="none filetype" type="file"/>');                 $(this).parents('.mdl-list__item').find('.attachment_name').append('<input class="file_input_text mdl-textfield__input" type="text" name readonly id="file_input_text" />').append('  remove ');              $(this).parents('.mdl-list__item').find('.file_input_text').last().val(nametext);          });                    $(".removeicon").click(function(){              // 1. remove input which is displaying the name of file              // 2. remove input which is holding the file [input type=file]              // 3. remove the remove icon          }); });   <form id="responseForm" action="#" class="right mdl-form mdl-form-registration demo-registration" >

                                      file_upload                 <input name="replyfiles1" class="none filetype" type="file" />

 </form>


How to make a USB BOOTABLE for windows 7 from linux ubuntu?

I need make a usb bootable for windows 7 for GPT partition and UEFI, mi desktop computer loss the boot file and now i need fix it... someone know a good software highly configurable for this that work on linux ubuntu?.


Send Gmail calendar invite from alternate email

I've seen a lot of questions around this topic but most of them are about receiving invitations to your alternate email.  I'm specifically looking for a way to send a calendar invite from my work email address which is not a Google account but is set up as a "Send mail as" option in my main Gmail account.  I've tried all the suggestions I've seen out there including:   adding my second email as an alternate email address. This still doesn't give me an option to create an event as the new account. changing the owner of the event to this second address, and then sending a subsequent invitation from it. The owner still comes through as my main Gmail account.   Any help greatly appreciated.


How to translate the Hadamard gate matrix into Dirac notation?

Hadamard gate matrix is:  $$\frac{1}{\sqrt 2}\begin{bmatrix}1 && 1 \\ 1 && -1\end{bmatrix}$$ The Dirac notation for it is:  $$\frac{|0\rangle+|1\rangle}{\sqrt 2}\langle0|+\frac{|0\rangle-|1\rangle}{\sqrt 2}\langle1|$$ I am unable to understand, how this gate matrix is translated into dirac notation?


POSIX compliant way of writing conditional operators

In bash you can do  if [ $(echo $UID) != 0 ] then     echo "Run as root"     exit fi   This returns an error message when I run the script with dash or other POSIX-compliant shells. How do you do this in POSIX?


Techniques for embedding images with transparent backgrounds in LaTeX

I am trying to embed an image with a transparent background in my LaTeX poster. However a quick google search has taught me that it is not possible to do so. However I intend to know any clever workarounds as I believe LaTeX is frequently used for making scientific posters, which require inclusion of transparent images.  Exact problem. I am trying to include a logo (with transparent background) in a textbox with gradient fill. Any method to accomplish this without getting a white (or any other) background is appreciated.  My current work around is the brute force technique of copying the gradient pattern in the background of the image.


How can I get the free out IPs in our IDC?

Our company have a IDC (Internet Data Center), and in our IDC, there are many host machines, every host has 1-3 IPs.   There is a situation, such as one host machine has 3 IPs(eg. 102.23.33.1 -> 102.23.33.3). (means in the host machine, have configured the IPs to it)  If the host machine only use 102.23.33.1, and there free out the 102.23.33.2 and 102.23.33.3. We want to find out the free IPs.  How can I do that? I tried to use the forloop to ping the whole IPs, but this is not accurate, because some host machine are baned  for ping.    EDIT  I means the host machine if has 3 IPs, and all can ping them, but the host machine only use the first IP to connect with public network, how can I find the other 2 IPs host machine do not use (or do not often use)?    EDIT-2  I mean the IPs all configured on the OS but may not be actually using them.    EDIT - 3  So, all the before, there can be understood as bellow:  I have a Router, and under it, there are many host machines, and every host machine have some IPs, and how can I record the IPs that go through the Router everyday.  Is there a tool for record the IPs which get through the Router? Or how can I realize my requirement ?


Prove that if $W_1\subseteq V$ finite-dimensional, then there is $W_2\subseteq V$ such that $V=W_1\oplus W_2$

Prove that if $W_1$ is any subspace of a finite-dimensional vector space $V$, then there exists a subspace $W_2$ of $V$ such that $V = W_1 \oplus W_2$   What I have done so far is to note that since $V$ is finite and $W_1$ is a subspace of $V$, we have $\dim(W_1) \leq \dim(V)$. If we have equality, then let $W_2 = \{0\}$, so that we have $V= W_1 \oplus W_2$. So now I need to look at the case when $\dim(W_1) \lt \dim(V)$.  What I have tried for this case is to let $$\beta = \{v_1,v_2,..,v_n\}$$ be a basis for $V$ and $$\gamma=\{u_1,u_2,..,u_m\}$$ a basis for $W_1$. My idea was to extend $\gamma$ to a basis for $V$, so let $$\alpha=\{u_1,u_2,..,u_m,w_1,w_2,..,w_{n-m}\}$$ be the extension of $\gamma$ to $V$, where $w_1,w_2,..,w_{n-m}$ are basis vectors for $W_2$. If I'm doing this right then I would just have to show that $W_1 \cap W_2 = \{0\}$ and $W_1 + W_2= V$   Am I heading in the right direction? Any hints would be greatly appreciated.


$x^2 \equiv 1 \pmod{p^\alpha}$ - number of solutions

I have the following problem:  Let $p$ be prime, $\alpha \in \mathbb{N}$ and $x \in \mathbb{Z}_{p^\alpha}$. What is the number of solutions to the equation $x^2 \equiv 1 \pmod{p^\alpha}$?  What I've got so far is $p^\alpha|(x - 1)(x + 1)$ but I don't know what to do next.


The value of d which is a double when compared to 0.01 is not satisfied due to presence of some digits at the end of the number which I found using flags . Why does this occur and how do we overcome this ? Thank you . Code for this :


How to interpret this rejection email from Journal of American Math Society? Anything to read between the lines?

I had submitted a paper manuscript to JAMS (J. of Amer. Math Soc) and recieved the following email 2 months after the submission. Can you help me interpret this email, as to what the situation is and what would be the best way moving forward. Are there any positives/negatives that can be taken. I have not received any referee reports or any technical points on my work, which is what disappointing me. I would like to understand the circumstances/rationale behind this decision.  I am new to journal publishing. I want to know how i can take this decision moving forward, while choosing another journal for submitting. And also self evaluating my work from this. Is there anything to loose heart?  email : (names and references removed for privacy reasons)     Dear Professor XXXX,      This message concerns the manuscript       XXXXX    by XXXX      submitted to the Journal of the AMS.       We regret to inform you that we cannot accept this paper for   publication in JAMS. The reviewers who evaluated this submission did   not think that it meets the acceptance standards at JAMS.      JAMS is the premier journal of the AMS, with extremely selective   acceptance criteria. A paper must be truly exceptional to obtain the   unanimous approval from the editors, which is required for   publication. We publish fewer than 30 papers per year in all of   mathematics. As a result, less than 10% of submissions are accepted   for publication, and many excellent papers are rejected.      One reviewer suggested that the discussion in your paper should   include a comparison with the following reference:      XXX, XXXX, XXX. XXXX: XXX.XXXXX XXXXX XXXX, Journal of XXXXX.   5555;5(XXX):5555-4444.      Sincerely,      XXXXXX, Editorial Assistant Journal of the American Mathematical   Society      --- Sent via EditFlow by JAMS Editor  <journal.american.math.society@gmail.co        Dear Professor XXXXX,      The reviews we received were intended for the editors' eyes only, so   we are unable to send them to you.       Apologies, XXXX


/usr/bin/perl install-module.pl --all ERROR: Using install-module.pl requires that you install "make".   I need to install make on my ubuntu on AWS EC2. How can I do that ? I could finally install build-essential also successfully.  # make make: *** No targets specified and no makefile found.  Stop.