I need to implement an update loop in C# similar to an update loop in a game engine which periodically executes a sequence of tasks.  I already searched for some documentation googling around and reading some SO discussions and  from game programming patterns, however my situation may be a little different and I didn't really found a solution to my problem. Here's my situation:  1- The update loop must process its tasks up to 1000 times per second (1000 is not an hard constraint, if the loop runs 999 or 1001 it would be fine anyway)  2- Tasks are synchronous, so if I have task1 that requires 100 seconds to execute, task2 will wait 100 seconds  3- The program executes only on Windows, so If needed I can use PInvoke to call Windows native functions  4- It's ok if the thread that starts the loop is the same that executes it and stays blocked inside it  5- The loop must not consume the entire core if there are no jobs to do or if the jobs can be processed faster than 1000 times per second. Basically the loop can sleep / wait if it needs to (more on this later)  I found here  a solution which implements an event loop in C#, however tasks there are asynchronous and it violates point 2.  I also found  a solution which uses System.Timers.Timer to execute a task.   HOWEVER:  Windows is not a realtime OS and timers have a frequency of about 15ms by default, which means about just 66 updates per second.  I know from  that timers can be set to 1ms, but since the setting is global it can create problems with other programs and if possible i would like to avoid this.  Finally I saw  that I can use Windows message pump to fire my updates using the Idle event, but I didn't found if it can be fired up to 1000 times or if it has side effects like generating garbage.  So far I have thought about these "solutions" (that are not valid since they violate points 1 or 5)  while(isRunning) {    startTime = stopWatch.Elapsed;     ProcessTasks();     Thread.sleep(timeToWait - (stopWatch.Elapsed - startTime)); //variant below }   But since the default minimum sleep time is about 15ms (or far more than 1ms anyway) Thread.sleep can't be used, so i tried  while ((stopTicks = this.stopWatch.ElapsedTicks - startTicks) < this.sleepTicks) {    Thread.SpinWait(x); //OR Thread.Yield(); }   Where x is a variable that ensures enough precision and using constants inside Timespan struct I can convert ticks in milliseconds or another time unit and make the loop execute 1000 times per second. However this approach ends up consuming an entire core (100% core usage) which is bad since this code may run on battery powered laptops and in general it doesn't seem clean to me (but I may be wrong on the "clean" statement). The code is also a simplification of the real code.  So this is my situation, any ideas or am I missing something?  Also: another thing I noticed is that game engines like Unreal, Unity3d etc manage to get more than 66fps (so sleeping/waiting less than 15ms) while at the same time not consuming an entire core if it's not needed. Of course their core is mainly written in C++ and not C#, but how do they do that?  Many thanks


LOGCAT Erorrّّّ      java.lang.NullPointerException: Attempt to invoke virtual method   'java.lang.String a.thebook.m_Model.new_book1.getnamebook()' on a null   object reference   in java Class  package a.thebook;  import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.EditText; import a.thebook.m_Model.new_book1; ....   public class my_book  extends AppCompatActivity {         private new_book1 model;     private EditText  bookname1;        @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.my_book_activity);           EditText bookname1 = (EditText) findViewById(R.id.editTextbookname2);          bookname1.setText(model.getbookname()); ...    }   get values from firebase Database.  new_book1  package a.thebook.m_Model;   import java.util.Objects;   public class new_book1 {       public String author;     public String bookname;      public new_book1() {     }     public new_book1(String bookname ,String author) {         this.bookname = bookname;         this.author = author;      }     public String getauthor(int author) {          return this.author;     }     public String getbookname() {          return this.bookname;     }  }


Dynamically send Attachment from Marketing Cloud

I'm wondering if it's possible to dynamically send an attachment with an email from marketing cloud. In the marketing cloud, we will have contact details, based on certain criteria I want to pick a pdf file by matching the pdf name with some contact parameter, and if the pdf file matches, I want to send it as an attachment to that contact. Also is it possible to keep all my attachments in the Marketing cloud or I need to keep in outside marketing cloud?


How do I get my PCs to not be a bunch of murderous cretins?

Most RPGs teach you that casual violence is the best solution to all your in-game problems. This is so well established a part of the vast majority of RPGs that there are entire satire RPGs like Greg Costikyan's  and John Tynes'  dedicated to showcasing the issue. Even now that the '80's anti-RPG hysteria is past, you see more sober critiques of endemic violence in RPGs in places like . In most RPGs, PCs become inured to murder and other antisocial activities very quickly, and enter the depths of depravity that wouldn't be appropriate in the worst parts of the world. Armed robbery, mass murder, and genocide become routine parts of an adventurer's day, something only stick-in-the-mud characters with the most extremely stated ethics object to. , even though it is not properly applied to just any conflict, is a PC's friend and they generally escalate any conflict in that direction. The sophistication of the gamer mindset towards introspection on this issue can be demonstrated in that the most meaningful question usually debated about in-game violence is some variant on "but should we kill the noncombatant children" or "can we just murder people out of hand as long as they're from a typically evil race?" In the real world, we generally a priori regard anyone having to have this discussion as a monster already. (P.S. The "wipe out a given evil race" thing isn't the point of this question; it is only mentioned to indicate that it's only "that far" that usually causes ethical handwringing from players, when that is a really quite extreme case and we should be uncomfortable with casual violence a lot sooner. ) What I'd like to have is a more realistic in-game treatment of conflict.  People getting wounded and giving up, taking and ransoming of prisoners, not always escalating a fistfight to weapons, not always escalating weapon combat to killing, etc.  Heck, as I write this, I'm watching an episode of Adventure Time with my daughter and the protagonists snuck in and rescued a princess kidnapped by the Ice King and then exit right next to his sleeping form. I thought, "If this were D&D they'd all be carefully coordinating a coup de grace to kill him in his sleep on the grounds that he inconvenienced them."  The problem isn't limited to D&D of course, sci-fi PCs are happy to neutron bomb planets for convenience too, for example. I'm not part of the "D&D is Satanic" crowd obviously, but I frankly do have compunctions about continually playing in games where the taught behavior is uncomfortably equivalent to the worst examples of human behavior we see on the nightly news. How can I give my PCs a newfound respect for human life?


Can't save settings after copying site to new server

I just recently copied a Drupal 7 site from one server to another, everything looks like it works fine except that I cannot save any settings.  Here are some other symptoms:   I can't disable or enable modules Overlay doesn't work Once I log out, I can't log back in When trying to log back in with the wrong criteria, I don't get a message about the user/pass being wrong admin_toolbar doesn't work (except immediately after clearing cache via drush) Status report doesn't show anything being wrong   I've got varnish running on the server and I'm not quite sure if that would have anything to do with it.


Given 4 integers, $a, b, c, d > 0$, does $\frac{a}{b} < \frac{c}{d}$ imply $\frac{a}{b} < \frac{a+c}{b+d} < \frac{c}{d}$?

We were trying to come up with an easy way to generate a rational number in between two existing rational numbers with a fairly low numerator and denominator (the way we were doing this earlier was to find the average of the two rationals, but that results in a denominator of up to $c * d$. Does this inequality hold for all values of $a, b, c, d$?


How do I use regedit so as to store some deatails of my program ? I would like to use this to store some data like the program folder, some user cofigs and also some extensions that the computer should recognize as my program's extension.


What is the proper community for GPL licence question?

I would like to ask a question about a licence (GNU GPL) but, I am not sure which is the right community. I have already read many sources, including the official one and also the most frequent asked questions section. However, since this is a delicate matter and I would not want to ruin things, I want to make sure that I understood correctly. Also, not being a native english speaker causes me trouble when it comes to specific topics - like licences for example. Someone suggested me Superuser, but It did not seem like the right place.


Why wont this div center vertically using relative positioning?

Hey so I have this div and inside the div I have a button. I wanted to center the div horizontally and vertically. Also I wanted to center the button horizontally and vertically inside the div. Here is my code.    <div style='position: relative; left: calc(50% - 250px); top: calc(50% - 100px); border: 1px solid black; width: 500px; height: 200px;'>   <button style='position: absolute; width: 100px; height: 30px; left: calc(50% - 50px); top: calc(50% - 15px);'>     Submit   </button> </div>     The button positioning works fine inside the div. However I am curious why the div will center horizontally but not vertically? I am assuming it has something to do with the position: relative? But I am not sure.  Thanks for your help!


Relation between Electric field and potential

I am unable to understand from this - sign comes. Which step I have done wrong?


How to solve $\lim_{x\to\infty}\frac{x+\sin x}{x-\sin x}$ using L'Hopital rule

It is required to find limit using L'Hopital rule $$\lim_{x\to\infty}\frac{x+\sin x}{x-\sin x}$$ first I tried using L'Hopital rule right away, which gives us $$\lim_{x\to\infty}\frac{1+\cos x}{1-\cos x}$$ playing with this a bit I managed to get it to the form of $$\lim_{x\to\infty}\frac{1}{1-\cos x}$$ I don't know how to move further. Did I do something wrong in previous steps or am I on the right path?


Apostrophe difference (Ones' and Two's Complement)

Why does the place of the apostrophes differ in the following two titles?   en.wikipedia.org/wiki/Two's_complement en.wikipedia.org/wiki/Ones'_complement   Which one is the correct?


Mysql installation error on ubuntu 14.04

When i try to install mysql  by this command on ubuntu 14.04 i get this error. Help me with simple and detailed solution as I am new on ubuntu.   sudo apt-get install mysql-server  Error: Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  mysql-server : Depends: mysql-community-server (= 5.6.25-3ubuntu15.04) but it is not going to be installed E: Unable to correct problems, you have held broken packages.


What fantasy book has a character acquire powers by sleeping in a dead dragon's body?

I read this novel a very long time ago, so the details are hazy, of course.  All I clearly remember is that the main character has to sleep in the body of a dead dragon (to escape inclement weather, maybe?) and ends up acquiring powers because of it.  I seem to remember that it was a girl, though that may be wrong, and I believe there was something about rainbows.  I also think, for some reason, that she was a slave, but again that could be wrong.   Any help would be greatly appreciated!


How can I factory reset an iPhone 7 without the Apple ID password?

My daughter bought an iPhone 7 a few months ago from a friend of a friend.  We found out a few days ago that it still has someone else's Apple ID on it.  We do not have the password for this Apple account.  We would like to factory reset this phone, but we can't find a way to do it without the Apple ID password. Our last attempt was to use iTunes to put it into recovery mode, but then that failed because to restore the phone, we had to turn off "Find my iPhone" ... and we can't do that without the Apple ID password.  It seems like everything we try needs this Apple ID password at some point.  What are our options here? We no longer have any contact with the person we bought it from. And I refuse to believe there's not a way to forcibly return this phone to its original state.  I have seen advertisements for software that claims to do this. Does anyone have experience with this type of thing.


Unlike everyone elses problems! Mine crashes after I've logged on; at the part that says: "Mojang".   I had mods installed but have since removed them completely and it still isn't working.  Below I've attached the minecraft crash report:  ---- Minecraft Crash Report ---- // My bad.  Time: 7/20/15 9:27 PM Description: Initializing game  java.lang.OutOfMemoryError: Java heap space     at bmi.a(SourceFile:230)     at bmh.b(SourceFile:130)     at bmh.a(SourceFile:77)     at bot.j(SourceFile:553)     at bot.a(SourceFile:139)     at bou.a(SourceFile:23)     at bnn.a(SourceFile:99)     at ave.am(SourceFile:448)     at ave.a(SourceFile:310)     at net.minecraft.client.main.Main.main(SourceFile:124)   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Stacktrace:     at bmi.a(SourceFile:230)     at bmh.b(SourceFile:130)     at bmh.a(SourceFile:77)     at bot.j(SourceFile:553)     at bot.a(SourceFile:139)     at bou.a(SourceFile:23)     at bnn.a(SourceFile:99)     at ave.am(SourceFile:448)  -- Initialization -- Details: Stacktrace:     at ave.a(SourceFile:310)     at net.minecraft.client.main.Main.main(SourceFile:124)  -- System Details -- Details:     Minecraft Version: 1.8.7     Operating System: Mac OS X (x86_64) version 10.9.5     CPU: 2x Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz     Java Version: 1.6.0_65, Apple Inc.     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.     Memory: 282712 bytes (0 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)     JVM Flags: 5 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     Launched Version: 1.8.7     LWJGL: 2.9.2     OpenGL: NVIDIA GeForce 320M OpenGL Engine GL version 2.1 NVIDIA-8.24.16 310.90.9.05f01, NVIDIA Corporation     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.      Using VBOs: Yes     Is Modded: Probably not. Jar signature remains and client brand is untouched.     Type: Client (map_client.txt)     Resource Packs: [PureBDcraft 512x MC18, herobrinepack9110877]     Current Language: English (US)     Profiler Position: N/A (disabled)   And this is the text Mojang/Minecraft shows me all the time!     Uhoh, it looks like the game has crashed! Sorry for the inconvenience.      With magic and love (?) we've managed to grab some details about the crash and >we will get on it as soon as we can   You can see the full crash below    Can anyone here help me? It would mean the world to me!


How do I convert a Bukkit world to vanilla Minecraft?

I ran a small self-hosted Bukkit server for Minecraft version 1.5.2 and later 1.16 I only used a few plugins, e.g. a AutoBackup, nothing game-changing. Now, for different reasons, I wanted to switch back to Vanilla starting from version 1.16.1. But the Bukkit server stored the world in three separate folders:  WORLDNAME WORLDNAME_nether WORLDNAME_the_end  How can I combine those folders to make the server compatible with a Vanilla server again?


How does $e^{i x}$ produce rotation around the imaginary unit circle?

Euler’s formula states that $e^{i  x} = \cos(x) + i \sin(x)$.  I can see from the MacLaurin Expansion that this is indeed true; however, I don’t intuitively understand how raising $e$ to the power of $ix$ produces rotation.  Can anyone give me an intuitive understanding?


Can I draw attention to a well deserving answer on my question?

Earlier today I posted  which yielded a .  I'd like to attract attention to this answer in the hope that the answer will get upvoted, as a kind of reward for the quality of the answer.  Is there anything that I can do to achieve this?


Apple ID no longer in service and cannot turn off Find My iPad

MY Apple ID has changed, as in the original one was closed and now have a new one, and I cannot sign out of some devices because it is asking for the password for the account that is now closed. How do I get around this?  Thanks.


For which $c$ will the set $K(c) = \{a + b\sqrt{c} : a, b \in \mathbb{Q}\}$ be a field? I know for example, that $K(\frac{2}{3})$ will be one, I am just wondering what the most general result of this type is.


Does Devil's Fruit power gained depend on how much of it is eaten?

Luffy accidentally ate the Gomu-Gomu (Rubber-Rubber) fruit, but was interrupted by Shanks after a few bites. It was too late and Luffy got the Devil's Fruit powers anyway. If he had instead eaten the whole of it, would he have got even more power from the fruit?


Square matrix A is singular $\iff \operatorname{rank}(A)<n$?

I know that if a matrix is not of a full rank than it is singular, but is it always true that singular matrices are of non-full ranks?


I see that the eqexam is available at CTAN (). But when I run:  sudo tlmgr install eqexam   I receive the following message:  package eqexam not present in package repository.   How can I install it?


What's wrong with this Java Coded if STatement?

I am not a professional programer. I am still learning, so my code is a little basic right now.  Scanner UserInput = new Scanner(System.in); String UserChoose = UserInput.next(); if (UserChoose=="Quit"){   I have deduced that there is something missing in the if statement, but I cannot figure out what. Can someone please tell me what I am missing? I have been searching online for an hour with no luck.


Which Harry Potter Characters Appear in All Seven Books Only to Die In Book Seven?

Which Harry Potter characters appear in all seven books, only to die in book seven? [MAJOR SPOILERS/CHARACTER DEATHS]  I can go either way on       Harry,   depending on your interpretation of the King's Cross chapter in Deathly Hallows.      Some feel he died; other believe it was more along the lines of a near-death experience. I'll accept either interpretation.     I'm not requesting this, but just as an FYI: It's fun to try and answer questions like this from memory before hitting up canon. This is not a list question, as there is a finite number of characters who fit the question's criteria.   ★ I'm looking for a canon-based answer (the seven Harry Potter novels, the three supplemental books, J.K. Rowling interviews, and Pottermore) and do not prefer an answer from either the HP Wikia or the Wikipedia.  NOTE: A few months ago I got an email from a fellow SFF.se user about the Harry Potter questions on the site. Now, I cannot find her email :/ She asked me this question as a personal challenge and I put it onto the back burner, but today I decided I would post it here and see if the user who emailed me will comment so I can fully credit her for the question.


I just wondering what is the best way to join domain name and username  for instance :  string domainName = @"DTS\"; string username = "jake";  string domainUser = domainName + usernName;   Please advise


File Globbing: adding *[Aa]* & *[Bb]* together

So basically I want to add these two cmd lines together  ls *[Aa]*  ls *[Bb]*   I'm looking for a file that contains both A and B (lower or uppercase) and they can appear more than once.  Here's what I tried:   ls *[Aa]*&&*[Bb]*


If a document has very long footnotes close to each other in the main text, LaTeX start to compensate for this by breaking the page (see the first picture below).  I am grateful that TeX makes an effort to put footnotes close to the corresponding mark, but no thank you, TeX, this is too much. No matter what, it should not break the page, nor make the paragraph skips longer (which is almost as ugly) or use any of its other usual, dirty tricks; I prefer having the footnote five pages after the mark if that is what it takes. Can someone find a way to make TeX stop breaking the page like this?  I tried experimenting with both bigfoot and interfootnotelinepenalty=0, which changed the input, but did not remove the problem. Furthermore, bigfoot caused the nightmare shown on the second picture below. Notice that the footnotes run out of the page itself.  Note that memoir is not the problem either; change to article and load geometry, and exactly the same happens. Also, the A5 format is not the issue either; it just makes the problem even worse than when using A4.  A MWE:  \documentclass[a5paper]{memoir}  \usepackage{lipsum} %\usepackage{bigfoot} %\interfootnotelinepenalty=0  \begin{document}     \lipsum[1]\footnote{\lipsum[1-10]}     \lipsum[1]\footnote{\lipsum[1-15]}     \lipsum[1]\footnote{\lipsum[1-10]}     This needs a footnote\footnote{\lipsum[1-10]}, and it is very necessary in order not to cause confusion. \end{document}   The output:    The output with bigfoot:


If $R/I \times R/J$ is isomorphic to $R/(I\cap J)$ as $ R $-modules, then $I + J = R$.

If $R$ is a commutative ring with identity and $I$ and $J$ are ideals of $R$ such that $R/I \times R/J$ is isomorphic to $R/(I\cap J)$ as $R$-modules, then $I + J = R$.   I know this is the converse of CRT and there are many posts on this. However, I can't find a post that provides a complete answer to  this.   This is the solution I found.   However, I find it to be very complicated. What does $\otimes_R$ mean? What does tensor product mean? I have not learn tensor product.   I prefer a solution without it and using only concepts from elementary ring theory course.  Is there simpler answer to this?


In stat courses the concept of observational unit is fundamental. When sampling from a population, each element in the sample is called an observational unit (sometimes referred to as an individual). So a sample of size 10 contains 10 observational units (even it the sampling is done with replacement). Each observational unit can have various attributes or variables associated with it. For example, sampling a bunch of cpus from a cpu manufacturing process, each cpu has a clock speed, a physical length, a weight, etc. Sometimes the sample space for this experiment is written as the set of possible weights, or the set of possible lengths, etc. However it seems more accurate to say that the sample space is the set of observational units and that each of the aforementioned variables are random variables which map from the set of observational units to that particular variable's values. I am stuck however and I don't see how to carry this framework over to an experiment of rolling a single die, or tossing two coins. For example, what are the observational units when I toss two coins? Shouldn't there be 4 of them so that I can get a sample space with the same cardinality as {HH, HT, TH, TT}? Any pointers on this would be appreciated.


Number of ways to select $m$ items out of $k$ categories, where each category is selected at least once and selection order matters?

Suppose I ask the following question: If we have $k$ categories and $m$ selections of an item, where each item can belong to one of the categories, how many possible enumerations of each category can we have?  This is a common combinatorics question which is answered by the stars-&-bars analogy. If you make a sequence with $m$ stars and $k-1$ bars, every possible orientation of stars and bars represents a completely unique enumeration of categories, and the set of possible orientations you can make is exhaustive. Therefore, the number of possible orientations you can make with those stars and bars, which is $m+k-1 \choose m$, is the answer to the question.  Similarly, if you specify that each category must have been chosen at least once, this is equivalent to having $k-1$ bars and $m-k$ stars. Thus the answer to that question is $m-1 \choose k-1$.  However, suppose we asked the following question: How many ways are there to select $m$ items out of $k$ categories where order of item selection matters? For example, if we have $3$ categories, and $5$ selections, one possible $k$-tuple is {2,0,3} (that is, 2 items of category 1 and 3 items of category 3). However this can be done in multiple orders of choosing categories ($5 \choose 2$ to be exact). For example, you can make the above choice with order 3-1-3-1-3 or 1-1-3-3-3. So what if we do a weighted sum of selecting each possible tuple, where the weight is given by the number of possible ways of selecting that tuple?   Well if each category is allowed to be selected any number of times, including $0,$ then the answer is actually simple. This is just all possible ways of selecting $m$ items, where each item can be one of $k$ categories. So the answer is $k^m.$  Now here's where I'm stuck. What is the answer to the above problem, with the constraint that every category is chosen at least once?  As far as I understand, to do this we would have to sum over every possible tuple, with the summand being the number of possible ways to select that tuple. So there are $m-1 \choose k-1$ tuples. But for each tuple, the number of ways of selecting that tuple is a multinomial coefficient, where the top term is $m$ and the bottom terms are the individual values in the tuple.   A very simple example is the following: Suppose there are $3$ categories and $4$ selections. Each category must be chosen at least once. Then there are ${3 \choose 2} = 3$ possible enumerations of categories, and we would sum over them using: $$ N = {4 \choose 2,1,1} + {4 \choose 1,2,1} + {4 \choose 1,1,2} = 36. $$  However, I don't know how to do this sum in general. For $m$ selections and $k$ categories I think we would have to set up the following sum,  $$ N = \sum_{n_1=1}^{m-k+1} \sum_{n_2=1}^{m-k +2-n_1} \sum_{n_3=1}^{m - k + 3 - n_1 - n_2} \dots \sum_{n_k = 1}^{m - n_1 - n_2 - \dots - n_{k-1} } {m \choose n_1, n_2, \dots, n_k}. $$  (I believe I set up the upper bounds properly, but I could be wrong.) I don't know how to do such a sum, or if it even has a closed form solution.


A function continuous on all irrational points

Let $h:[0,1]\to\mathbb R$  $h(x)=\begin{cases}0&\text{if }x=1\\\frac{1}{n}& \text{otherwise if }x\in\mathbb Q,x=\frac{m}{n},\;m,n\in\mathbb N,\gcd(m,n)=1\\0&\text{otherwise if }x\in\mathbb R\setminus\mathbb Q\end{cases}$  How do you prove that $h$ is continuous on all irrational points within $[0,1]$?


How to report spam sent through my website contact form without blocking it?

Despite the Google captcha protection I receive some spam from my website contact forms.   I want to report these spams but without blocking my contact form address.  Explaination: when somebody send a mail from the contact form, the mail goes first to my website server (contact@mywebsite.com adress), and is automatically redirected to MyPrivateAdress@gmail.com. So I can't use the Gmail "spam report" option to report the spam@spam.com without blocking contact@mywebsite.com address.  Any idea how to report that kind of contact form's spams?


Double Factorial: Number of possibilities to partition a set of $2n$ items into $n$ pairs

I know that the partition of $2n$ items into $n$ pairs has something to do with double factorial, but I am not sure how many possibilities we exactly have.   We can choose such a partition into pairs by first choosing $n$ elements to be in one half and the remaining $n$ in the other half, which gives ${{2n} \choose n}$ possibilities. Then we can take a permutation of both sets and match them accordingly.   This gives $${{2n} \choose n} n! n!=\frac{(2n)! n! n!}{n! n!}=(2n)!$$ possibilities. But with this we overcount, since we do not want the pairs to be ordered. Each of the $n$ pairs is counted twice, wherefore we have to divide by 2 for every pair, hence $\frac{(2n)!}{2^n}$?   Well, another possiblity to do that is just to iteratively pick $2$ elements among the remaining ones, which gives ${{2n} \choose 2} {{2n-2} \choose 2} \dotsb {4 \choose 2}$  I am not sure, but I do not think that this is the same and also, I do not see the connection to double factorial. Would be very glad if you could help me with these 3 possiblities.   Thank you.


I am writing report using Latex software but I got stuck while using tags.  consider  a statement( for example):     for any A ∈ Γ, B ⊆ A implies B ∈ Γ. The traditional (t, n) threshold secret sharing [3 - 9] is a special case of general secret sharing.Their qualified subsets are those that have at least a certain, per-determined number of participants.   And my latex code :  for any A \in T, B  \subseteq A implies B \in T.The traditional (t, n)  threshold secret sharing [3 - 9] may be a special case of general secret sharing. Their qualified subsets area unit those who have a minimum of an exact,  pre-determined variety of participants.   The output generated in the PDF look like:     for any A ∈ T;B ⊆ AimpliesB ∈ T.Thetraditional(t,n)thresholdsecretsharing[ 3-9]maybeaspecialcaseofgeneralsecretsharing:T heirqdeterminedvarietyofparticipants.   My questions is when I am using some tags, after using tags text occurring after that tag is  displayed without space between them as you can see in the latex output above.  I have referred latex pdf also but I am not getting my answer. so please suggest to me some way so I can display my text in original form as you can see in example statement.


Is there a simple way to preview the files that rm will remove?

Is there a simple way to evaluate what a given rm command will do when you do not understand it (such as not recognizing how the flags, variables, etc. interact)?  While ls helps catch problems in your rm parameters, ls -abc XYZ does not list the same files that would be affected by rm -abc XYZ. Ideally, I would like to type something like previewrm -abc XYZ and see what would be removed without actually removing anything, including using the -f flag.  I essentially want to run rm in test batch mode. That is, I want to see what actions it would take if it was run for real, preferably without touching it at all. Thus, testout 'rm -abc XYZ' might be the true ideal.


I am updating UBUNTU 14.04 then machine is restart then after currect username and password not login successfully.What can I do???


factor $z^7-1$ into linear and quadratic factors and prove that $ \cos(\pi/7) \cdot\cos(2\pi/7) \cdot\cos(3\pi/7)=1/8$

Factor $z^7-1$ into linear and quadratic factors and prove that  $$ \cos(\pi/7) \cdot\cos(2\pi/7) \cdot\cos(3\pi/7)=1/8$$  I have been able to prove it  using the value of $\cos(\pi/7)$. Given here


Fantasy book where a young prince becomes a mage

When I was younger (11-12 years old, so the early 2000s) I once read a story where a young boy, who may have been either a young prince or a squire of some sort, is recruited by a wizard and taken to a city to train as a mage.  I seem to remember him living in dorms with the other children at this school, until he gets into difficulty with another of the boys in the dorm. He is kicked out of the dorms and ends up living above a blacksmith shop (I think).  I remember it being the first book in a series of books of which there were about 3 out at the time. I think one of the stories was about the boy going to a tower to do something or other.  Does anyone have any idea what this book series is? I haven't been able to find it for years now but it was a story I really loved.


How do I use F3 to get my coordinates when my laptop makes F3 a special key?

I can't get the coordinates on my computer because it keeps changing the brightness.  I have a windows 8 Samsung, and I'm playing Minecraft version 1.6.4.


I have Ubuntu 16.04, my problem is that when the correct Password is entered I get the following message:  Failed to start session   Any other entry returns:  Invalid Password   I am locked out from the computer, how can I fix this?


I append data with jquery , but not working any event on this data in laravel

I use laravel 5.6  I use bellow event and append div.categoryAjaxId .  this code is working and append my code .  //--------- get product ------------------------- jQuery('.orderProduct').click(function(e){     var productId = $(this).attr('id');     var token = '{{ csrf_token() }}';      e.preventDefault();      jQuery.ajax({         url: "{{ url('order/getCategoryAjax') }}",         method: 'post',         data: {             id: productId,             _token: token         },         success: function(data){             $('#orderProductSelect').hide();             $('.categoryAjax').show();             $.each(data, function(index,category){                 $('.categoryAjax').append('
' +                     '' +                     ''+category.name+'' +                     '
');             });         }}); });   now I want get categoryAjaxId ID . with bellow event :  //----- get feature and value of category -------------------- jQuery('.categoryAjaxId').click(function(e){     var categoryId = $(this).attr('id');     console.log(categoryId);     var token = '{{ csrf_token() }}';      e.preventDefault();      jQuery.ajax({         url: "{{ url('order/getFeatureAjax') }}",         method: 'post',         data: {             id: categoryId,             _token: token         },         success: function(data) {             $('.categoryAjaxId').hide();             $('.featureAjax').show();             $('.featureAjax').append('xxxxxxxxxxx');         }     }); });   but this event not working . and not show anything in console.log .  Thanks your help


(edge vertices) normal view object mode blender

I have a problem with blender which consists in having the normal view of the object on which I am working Look at my hand with full of vertices in object mode or i want it like suzanne like this  so this is my probleme i can't have this normal view


I am an absolute beginner, with little to no knowledge on the subject but I have somehow developed a strong interest in theories like String theory and M-theory, by reading about them on other forums. So can you   recommend me any farily accessible books or other materials that could help me understand these theories in-depth? Or do I have to extensively study other areas in physics before I am able to comprehend them, if so, what are those other topics?


xargs and vi - "Input is not from a terminal"

I have about 10 php.ini files on my system, located all over the place, and I wanted to quickly browse through them. I tried this command:  locate php.ini | xargs vi   But vi warns me Input is not from a terminal and then the console starts getting really weird - after which I need to press :q! to quit vi and then disconnect from the ssh session and reconnect to have the console behave normally again.  I think that I sort of understand what's happening here - basically the command hasn't finished when vi started so the command maybe hasn't finished and vi doesn't think that the terminal is in normal mode.  I have no idea how to fix it. I have searched Google and also unix.stackexchange.com with poor luck.


I need to fly from Germany to US ASAP. I’m holding EU passport

My partner live in the states and I live in Europe. We not married so no legal union. However I still wanna go to him in the States ASAP. The Schengen travel van should expire today but no news of renewal and I can’t get in touch with any embassy. Do you have any idea of what’s gonna happen and if I can travel?   Thank you!


Access Array From another class error in Code

Hello I am trying to access an array from another class I have the code written but there seems to be a error and I can't figure out what is wrong with it (This is in Java)  Here is the first class  import java.util.ArrayList;  import java.util.Collections;  import java.util.List;  public class Main {     private static List<String> Deck;      public static void ArrayList() {// Method to create the deck         Deck = new ArrayList<String>();         int i = 1;// counter variable for loops          ArrayList <String> Clubs = new ArrayList <String>();// ArrayList for all clubs cards         while (i < 11) {// while loop to put each number in up to 10             String c = String.valueOf(i);             c = c + "C";             Clubs.add(c);// adds the card             i++;             // each increases so each card is different so ace first time through then 2 then 3....         }         ArrayList <String> Spades = new ArrayList <String>();// same same for spades         while (i > 1) {             String s = String.valueOf(i);             s = s + "S";             Spades.add(s);             i--;          }         ArrayList <String> Hearts = new ArrayList <String>();// same same for hearts         while (i < 11) {             String h = String.valueOf(i);             h = h + "H";             Hearts.add(h);             i++;         }         ArrayList <String> Diamonds = new ArrayList <String>();// same same for diamonds         while (i > 1) {             String d = String.valueOf(i);             d = d + "D";             Diamonds.add(d);             i--;         }          // Adds all Cards to 1 Deck Array         for (int j = 0; j < 10; j++) {             Deck.add(Clubs.get(j));         }         for (int j = 0; j < 10; j++) {             Deck.add(Spades.get(j));         }         for (int j = 0; j < 10; j++) {             Deck.add(Hearts.get(j));         }         for (int j = 0; j < 10; j++) {             Deck.add(Diamonds.get(j));         }         Collections.shuffle(Deck);// shuffles deck         while (i < 10) {// while loop to put nine 0 in array so the program can end             Deck.add("0");// adds 0             i++;// counter variable     }          public List<String> getDeck() {// Method used to Store the ArrayList to be accessed Through other classes            return Deck;        } }   Here is the Next Class  import javax.swing.JButton;  import java.util.List;  import javax.swing.JFrame;  import java.util.ArrayList;  public class Window {          Main m = new Main();          public static void main(String[] args) {             Main m = new Main();//allows us to access other class             List <String> Deck1 = m.getDeck();// makes the new ArrayList equal the old Deck ArrayList              System.out.println (Deck1.get(1));// Testing this is where java says the error is }   Please let me know what is wrong and where I need to fix it


I've always been under the impression that jumping in an elevator wouldn't help at all, especially after reading a snippet of physics where Einstein said that free fall was identical to zero gravity.   I just watched an episode of QI (a British game show) where they said that jumping would only take off about five pounds of force... How would jumping help at all? If the elevator is in free fall, then you're not really jumping--you're just pushing, right?


How to bend a tube with consistent thickness?

Modelling a Newton's cradle, but i can't seem to create the stand shape:    I have tried to use a path, and got this result:    It looks pretty good until you reach the top, where it is flat. The thickness is not consistent. So i am looking for an alternative way to make the stand. What are some ways to make this type of shape?


In the iOS app, I can't find the function that shows:      Recent achievements: privileges, badge and reputation earned   The site shows this information.  I think it's a useful function to monitor reputation changes; Am I not seeing it, or is a missing feature?


"Access is denied" as owner when trying to delete folder, change owner or change permissions

I have a folder called webdriver.   I cannot open it or delete it.  When I try to open it, it says access is denied.    When I try to delete it, it says:    When I try to change the owner, it says "Unable to display current owner" then "Access is denied":


How to change the time for OS selection menu in GRUB?

I have Windows 7 and Ubuntu 12.04 in my system and i saw that the default time for os selection menu is only 10 sec, as i am new to Linux can anyone tell me how to increase this time?


If sequence$\frac{A}{B}\rightarrow \alpha\neq 0$, show if A is summable, B is summable.  I was trying to use contrapositive of the statement suppsoe A converges to L and B to M.$If M\neq 0 then \frac{A}{B}\rightarrow \frac{L}{M}$   But it didn't work out well since we do not know if B has a limit or not. How do I show B converges?


How to put this movie (.mp4) in my slide

The following are related tutorial and articles:     I want to insert a movie in my slide with the following codes: \documentclass{beamer} \mode<presentation> {   \usetheme{default}         \usecolortheme{default}    \usefonttheme{default}    \setbeamertemplate{navigation symbols}{}   \setbeamertemplate{caption}[numbered] }  \setbeamertemplate{frametitle}[default][center] \usepackage[english]{babel} \usepackage[3D]{movie15} \usepackage[utf8x]{inputenc}     \begin{document} \begin{frame}{Movie} \begin{columns} \begin{column}{4.2cm} \begin{block}{A} \includemovie[autoplay,repeat]% {4cm}{3cm}{goose.mp4} \end{block} \end{column} \end{columns} \end{frame} \end{document}  I put the video in the same file of the this latex document. My video file is:    MP4 Video (.mp4) However, it only shows the following:  Well, I can open this video; however, I cannot open it in my pdf file. How to fix it?


I am trying to communicate with DAO class through getters/setters either providing or fetching data to DAO. I am beginner and here is what I did so far: public class Bean { private String[] categories;  public Bean(String[] categories) {     super();     this.categories = categories; }  protected String[] getCategories() {     return categories; }  protected void setCategories(String[] categories) {     this.categories = categories;     System.out.print(categories); } }  Here is DAO code: > // INSERT     protected boolean insert(Bean b) throws SQLException {         int[] result = null;         String[] categories = b.getCategories();                  try {             cnn = getConnection();             ps = cnn.prepareStatement(INSERT);             for (int i = 0; i < categories.length; i++) {                 System.out.print(categories[i]);                 if (categories[i] != null ) {                     ps.clearParameters();                     ps.setArray(1, cnn.createArrayOf("VARCHAR", categories));                     ps.addBatch();                 }                 result = ps.executeBatch();             }             ps.clearBatch();             cnn.commit();               I am getting parameter values in servlet get method as: String[] categories = request.getParameterValues("category");  In controller servlet I am writing code like this: Bean b = new Bean(categories);     b.setCategories(categories);     DAO db = new DAO();     try {         boolean inserted = db.insert(b);         if(inserted) {             out.print(inserted);         }         else {             out.print(inserted);         }     } catch (SQLException e) {         // TODO Auto-generated catch block         e.printStackTrace();     }  The above code is throwing the following error:  [Ljava.lang.String;@7c5da1becom.hello.user.categories.DAO java.lang.NullPointerException: Cannot invoke "com.hello.commons.DBController.getJdbcDriver()" because "dbc" is null Feb 11, 2021 10:02:31 AM org.apache.catalina.core.StandardWrapperValve invoke  I am sure there are many mistakes. Being a beginner and learner please correct my code and advise best standards Best regards


Novel about rendezvous with alien ship travelling through the solar system

I'm looking for a novel I read, probably in the mid 1990s.  The story involved an alien vessel/asteroid coming through our solar system and a human ship going out to meet it and then being stuck on it as it continues out into deep space.  As they explored the alien vessel they encounter other alien races who are also stuck, some of them go round looking for new arrivals to steal all their technology.  When they first land they find spires sticking out of the surface that are rotating with near infinite torque so they use this to generate power.


I am trying to redirect to external url. I use the below code.  <script> window.location.href= "www.radar.com"; </script>   But it redirect the url to this http://localhost/webtask/www.radar.com. But I want to  redirect to www.radar.com. I am unable to find the issue.Please help....


What is the name of this theorem, and are there any caveats?

For random variable $X$ that follows some distribution, $f(x)$ is the probability density function of that distribution if and only if $$\mathbb{E}[\phi(X)] = \int_{-\infty}^\infty \phi(x) f(x)dx$$ for all functions $\phi$.  Context: My professor used this in lecture to demonstrate a way to find the distribution of $cX$ given random variable $X$ that follows a specific distribution.   What is the name of this theorem? Have I missed any qualifications/caveats? I am in particular curious about whether "for all functions" is correct. My professor mentioned "positive, bounded, deterministic functions," but I am not sure what he meant by that. Where can I find a proof of this theorem?


Producing a customized object in Javascript

I want to have this     var myobject = {         'a': [{ 'b': 2 }]       };        var myother = {         'a': [{ 'c': 3 }]       };   to become :   {'a' : [{'b': 2},{'c': 3}]}   how can I achieve this ?


im working at my own little Program so I wanted to ask how I can do the variable test to give out - so long how intro.Length is. So the String intro is 66 chars with space long now I want that it prints just - 66 times like ---------------------------------------------- but 66 chars long how can I do that? using System;  namespace ConsoleApp1 {     class Program     {         public static int alter;         public static string vorname;         public static string nachname;         public static string jeah;         public static string intro;         public static int abc;         public static string test;          static void Main(string[] args)         {             intro = "Hey you wanna try my small Program? If Yes enter Y if not enter N!";             abc = intro.Length;             test = "-" * ;              Console.Write(test);             jeah = Console.ReadLine();             if (jeah == "Y")             {                 Vorname();                 Nachname();                 Alter();                 Output();             } else             {                 Console.WriteLine("Schade dann nicht!");             }                           Console.ReadKey();         }


I have recently bought a D7200 . I am wanting to use it to photograph my girls football games. I set it to S mode and put the side dial so Cl but they all cam out really dark. Any help would be apppreciated.


Any way to see mail sent by other user through shared address?

My wife and I have a "shared" email address, like thesmiths@example.com which we both use from Gmail when we both want to get replies or for signing up for certain websites.  When an email is received at that address, it gets forwarded to both of our personal Gmail accounts.  The problem is that when either one of us "sends as" that address, the other does not see the sent message. So we have to cc or bcc each other (and she usually forgets.)  Is there any automagic way to have those sent emails appear in BOTH of our Gmail accounts?  I've tried filters but I don't think they work on outgoing messages. Basically we want a filter that would automatically forward emails from that address to the other person.  I know this can be done with standalone mail clients, but neither of us uses those.


How to make list of friends private in Facebook?

One of the Facebook apps I wanted to install had a list of permissions it asked to have grante. One of the permissions is my list of friends, which I refused. It seems the list is public.  How do I make it private?


Suppose someone has commented or answered my question. Is it possible to check the edit history of comments and answers to find out what was changed?


How can you evaluate $\sum_{n=1}^\infty nx^{n-1} = \frac{1}{(1-x)^2}$ without relying on the fact that it's the derivative of $\sum_{n=1}^\infty x^n = \frac{1}{1-x} $?


I have a mesh which want to array 360 degrees with help of curve modifier and array modifier. I created a circle curve. I moved cursor to its origion and mesh's origin to cursor. I want to array it on y axis but when i click on it, it turns my mesh upside down under where it is not supposed to be. When i drag it on x axis, it moves on z axis. i tried CRTL+A - scale, rotarion, too in case. But still same.  Above, position of my mesh and curve        The result


Correctly indexing multiple domains with same content in Google and others

I have a client with a dozen territorial domains, like mydomain.co.uk, mydomain.fr, mydomain.de, etc Most of these domains hold a different language of the same dynamic content (shop), but some, like co.uk and .com, have the same language and content, except for some content customized to each country/domain in the front page, contact and other pages.  I am aware that we should use the canonical meta tag to mark those duplicated contents, but, we want the co.uk to be present in UK ( indexed in google.co.uk ) and the .com to be present in US and other countries, for example, or least that is the goal.  Is there anything we can do to "help" google determine the geographical meaning of each domain? If we mark with canonical tag the .com and co.uk sites, do you know how google will decide which one to show on a given search?


Vector Subspace for Differential Equation

We are given the following problem:     Let $S$ be the set of all functions $y$ that satisfy the following differential equation   $$2\dfrac{d^2y}{dx^2}  - 3\dfrac{dy}{dx} + y = 0.$$   Show that $S$ is a subspace of the vector space $A$, where $A$ is the set of all functions $f : \mathbb{R} \rightarrow \mathbb{R}$.   I do not know how to approach the problem.


Getting back on the bike after bad fall, how do I get over my fear?

On Nov of last year I had a bad stupid crash that broke 2 of my front teeth and left one loose. I was descending from a very rocky steep hill and my wheel got locked, threw me off my bike straight to a rock. My bf said it was bc I wasn't going fast enough to keep momentum. Anyways, make long story short I am terrified. I've been road biking with clipless pedals to build confidence but I just can't seem to have it when it comes to mtn biking,any advice on how to get rid of this fear and nervous feeling?


How to grow LVM partition to include newly released partition (now unallocated space)

I had a Windows partition and I nuked it in favor of a VirtualBox VM.  Now I could use the extra space it was occupying. LVM2 is in use on the Linux side but the Windows partition which has since been removed pre-dates the LVM setup. The space in question is to be added to the /home partition. I've created an admin user who has a home dir that is not in /home so that I can log in as him and get this done. Procedure? Do I need to mess with the volume group? Do I need to use fdisk first or can I use a pv* command?  This situation seems more complicated than gparted or lvm (the GUI tool) can manage.   Additional info:  dude@machine:~$ sudo lvs    LV     VG        Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert   home   ubuntu-vg -wi-ao--- 214.87g                                              root   ubuntu-vg -wi-ao--- 191.39g                                              swap_1 ubuntu-vg -wi-a----  31.94g                                            dude@machine:~$ sudo fdisk -l /dev/sdb  Disk /dev/sdb: 500.1 GB, 500106780160 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976771055 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xca18e148  Note: Below sdb3 is physical and sdb5 logical but it's the same space.      Device Boot      Start         End      Blocks   Id  System /dev/sdb3       526147582   976769023   225310721    5  Extended  /dev/sdb5       526147584   976769023   225310720   8e  Linux LVM  dude@machine:~$ df -T Filesystem                  Type     1K-blocks     Used Available Use% Mounted on /dev/mapper/ubuntu--vg-root ext4     197401876 13355496 173995820   8% / none                        tmpfs            4        0         4   0% /sys/fs/cgroup udev                        devtmpfs  16428232        4  16428228   1% /dev tmpfs                       tmpfs      3288660     1580   3287080   1% /run none                        tmpfs         5120        0      5120   0% /run/lock none                        tmpfs     16443284    19692  16423592   1% /run/shm none                        tmpfs       102400       44    102356   1% /run/user /dev/sda1                   ext2        240972    51593    176938  23% /boot /dev/mapper/ubuntu--vg-home ext4     221638340 24327232 186029496  12% /home /home/dude/.Private          ecryptfs 221638340 24327232 186029496  12% /home/dude


6 up votes for a comment telling me its a duplicate when it is not. 4 votes to close despite no one reading the actual question. no answer accepted.  I have found a link that explains.    So long SO, account closed.


How can I force Google to re-index my site?

I changed the structure of my URLs.  The pages are already indexed by Google and have the following structure:  /myfolder/page.apsx   The new structure is:  /page.aspx   Now all URLs that Google knows are wrong. How can I tell Google to re-index and that the structure has changed? Internally I redirect in ASP.NET when the URL contains myfolder by I want Google to update the URLs.    Thanks for the answers - I use IIS 6 and I do not know how to configure a redirect of all pages that contains the folder to page one folder below.  So I did the trick in the Begin_Request method and did a Context.Response.Redirect. This is no 301 redirect, only a redirect done with ASP.NET via code. Will this also do the trick so that Google notices that the URL /folder/page1.aspx now is redirected to /page1.aspx?


How To Fix Java.lang.NullPointerException When Creating Arrays

I'm making a hangman game. However, I am struggling when trying to output the word that the player has to guess but as blank characters e.g. if the word was 'great', the program would output _ _ _ _ _  I've used a for loop to create an array that has the same amount of characters as the word, but whenever I run my code, I get an java.lang.NullPointerException.  I have tried researching the issue and looking in the java documentation, however I am new to the language and find it hard to make sense of the issue and how to resolve it. Where am I going wrong?  import java.util.*;  public class Hangman  {     static char[] word1 = {'a', 'm', 'a', 'z', 'i', 'n', 'g'};     static char[] word2 = {'f', 'a', 'b', 'u', 'l', 'o', 'u', 's'};     static char[] word3 = {'g', 'r', 'e', 'a', 't'};     static Random random = new Random();     static int choice;     static char[] choice_array;     static char[] num_of_spaces;      public static void main(String args[])     {         System.out.println("-------");         System.out.println("Hangman");         System.out.println("-------");         choice = random.nextInt(3)+1;         switch (choice)         {         case 1:             choice_array = word1;             break;         case 2:             choice_array = word2;             break;         case 3:             choice_array = word3;             break;         }         System.out.println(choice_array);         for(int counter = 0; counter < choice_array.length; counter++)         {             num_of_spaces[counter] = '_';         }         System.out.println(num_of_spaces);     } }


“macOS needs to repair your library” error loop on Mojave upgrade

I’ve been having trouble fixing the “macOS needs to repair your library” loop for the past couple of days and I’m running out of options. The message pops up over and over again, no matter what I do.    I’ve gone as far as typing a command in Terminal (recovery mode) which Apple support sent me (the diskutil resetuserpermissions, except longer).  I found some other commands online but I’m not sure what they do and that’s why I haven’t tried them, can anybody help me?  Other commands I’ve found: resetpassword (confused as to WHICH password it’ll reset) and  sudo chown -R <user> ~/Library  sudo chgrp -R <groupname> ~/Library (found on this website)  This last one the user said I should get it by running id -u for user and id -g for groups, but as I am not the tiniest bit familiar with programming, I wonder if he meant I should replace “user” for id -u and same thing for groups??  Please help as I am desperate and Apple support’s solutions haven’t helped me so far!!


Comma or space in long numbers and the UK Standard Rule

Is there a strict rule in the UK on how to write long figures?  If so, which one is it?   For example, if I need to write long numbers and follow the UK standard, which figure is correct?     10 000 000 000 people (ten billion people) or 10,000,000,000 people ?    Same example but with another figure: which one is correct?      £1 000 000,85  or  £1,000,000.85


Adding alpha band to a TIFF image drastically increases its filesize?

I'm using gdalwarp -dstalpha src.tif dst.tif to add alpha channel to an 8-bit unsigned image with 3 bands. The initial size of the image is 300 mb, but adding an alpha band increases it to 1980 mb, which is far more than expected 1/4 increase.   What is the matter?


Is any quantitative property of the population a "parameter"?

I'm relatively familiar with the distinction between the terms statistic and parameter. I see a statistic as the value obtained from applying a function to the sample data. However, most examples of parameters relate to defining a parametric distribution. A common example is the mean and standard deviation to parameterise the normal distribution or the coefficients and error variance to parameterise a linear regression.  However, there are many other values of the population distribution that are less prototypical (e.g., minimum, maximum, r-square in multiple regression, the .25 quantile, median, the number of predictors with non-zero coefficients, skewness, the number of correlations in a correlation matrix greater than .3, etc.).   Thus, my questions are:   Should any quantitative property of a population be labelled a "parameter"? If yes, then why? If no, what characteristics should not be labelled a parameter? What should they be labelled? And why?   Elaboration on confusion  The Wikipedia article on estimators states:     An "estimator" or "point estimate" is a statistic (that is, a function   of the data) that is used to infer the value of an unknown parameter   in a statistical model.   But I can define the unknown value as .25 quantile and I can develop an estimator for that unknown. I.e., not all quantitative properties of a population are parameters in the same way that say the mean and sd are parameters of a normal distribution, yet it is legitimate to seek to estimate any quantitative population property.


"He was a considerable cut above the leagers" meaning

What does the boldened part of this sentence mean?:  As it turned out this man (a senior Foreign Affairs Advisor) was a considerable cut above the bush leaguers we had been dealing with.


Any way to catch when xp_readerrorlog fails?

I'm trying to query the ErrorLog files, but it sometimes fails on some of my servers. For some reason a file go missing from time to time. I do not know why. I do not think that I deleted the file :-). Worse, SQL Server "crash" with this error  Msg 0, Level 11, State 0, Line 60 A severe error occurred on the current command.  The results, if any, should be discarded.   If I run   EXEC master..xp_readerrorlog 999   I do get a proper error:  Msg 22004, Level 16, State 1, Line 63 xp_readerrorlog() returned error 2, 'The system cannot find the file specified.'   I have tried many things; TRY-Catch block, a separate sproc to do the insert and dynamic SQL. They all eat my error message.  Here is my code:   SET NOCOUNT ON   DROP TABLE if EXISTS #ReportSQLErrorLogs  CREATE TABLE #ReportSQLErrorLogs (     row_id BIGINT NOT NULL IDENTITY(1,1),      log_date datetime NULL,     processinfo nvarchar(16) NULL,     ProcessText NVARCHAR(2048) NULL,     CurrentLogNum TINYINT NULL )  DECLARE @NumErrorLogs INT, @CurrentLogNum INT SET @CurrentLogNum = 0  -- Get total number of log files from registry EXEC master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', @NumErrorLogs OUTPUT SELECT @NumErrorLogs = ISNULL(@NumErrorLogs, 6) -- NULL in registry entry for Error Log files mean default of 6 value  WHILE @CurrentLogNum < @NumErrorLogs BEGIN     INSERT INTO #ReportSQLErrorLogs ( log_date, processinfo, ProcessText )     EXEC master..xp_readerrorlog @CurrentLogNum     --PRINT @CurrentLogNum     RAISERROR ('at %i', 10, 1, @CurrentLogNum) WITH NOWAIT      UPDATE #ReportSQLErrorLogs SET CurrentLogNum=@CurrentLogNum WHERE CurrentLogNum IS NULL     SELECT @CurrentLogNum = @CurrentLogNum + 1 END   And bonus points if you happen to know why errorlog files can go missing.


control fan speed using Applescript (or terminal)

I would like to control the fan speed using terminal, if possible without third party app.  The idea is to automate and schedule different fan speed.


How to get a curved arrow pointing left and right?

I need something like $\curvearrowright$, but pointing in both directions.  This is for a commutative diagram.  Thank you!


Show a Normed vector space is Banach space iff for every sequence, the series converges.

Show that a Normed vector space $\mathbb{X}$ is Banach space iff for every sequence $(x_n)$ in $\mathbb{X}$,such that $\Sigma \|x_n\| <\infty$, the series $\Sigma x_n$ converges in $\mathbb{X}$.   I know that a complete (where every Cauchy sequence converges) normed space is a Banach space. So if I take a Cauchy sequence $(x_n)$ in $\mathbb{X}$ then I need to prove that the sum of the sequence converges.   Thanks in advance.


How to parseIPv6 address in a string using Python 3.x

I'm trying to find out IPv6 address from a string. I've done this on IPv4 part by using re.findall(re.compile('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'),addr). How can I modify this to IPv6?   Here's my string:  addr = "......IP address is 2001:0000:3238:DFE1:63::FEFB. SUbnet mask is.........."   Any help is appreciated. :)


Can I apply for a long term visit visa after being denied entryto UK? Would the odds be in my favour?

I worked in the UK for the last couple of years on a Tier 2 visa but moved to another country recently. I tried to re-enter the country during the curtailment period unaware that the visa was not valid (although a part of the curtailment letter said I had leave to enter until the curtailment period).I was denied entry and removed from the UK. Can I apply for a long term visa directly or do I need to apply for a 6-month visa first (since this is recommended to see your international travel history)?   Thanks in advance!


I'm using this regex string:  /rfi .*?(.*) .*?\((.*)\)/i   Group 1 finds the rfi number & group 2 returns the contents inside the ( ). With test string: "New RFI 087 (Concrete Beam at Planter)" everything works fine, but with test string "New RFI 087 (Concrete (Beam) at Planter)" it crashes.  Is there anyway to search inside the ( ) but ignore multiple ( ) inside of it ?


How do I write a comment which contains commands that contain the character ` (backtick)?

I would like to use in a comment the following command:    How can I do that so that character " ` " before and after the word "Private" is visible?


Prove that the trigonometric equation  sin(cosx) = cos(sinx)   has no solutions.  I graphed the functions and I can see they are never equal to eachother, but how do I do a formal proof for this?


Layover at Dusseldorf and Frankfurt, category A or B visa?

I am a Indian citizen in the United States on a F-1 visa.  For the summer break, I am traveling (round-trip) from Chicago to New Delhi via Dusseldorf-Frankfurt by Lufthansa airlines. My onward Journey would be on July - 8 and return Journey on Aug - 11.  My layover will be of 1 hour 10 mins in Frankfurt and 3 hours in Dusseldorf.  I would like to know if I require Category A or Category B Visa. If not, what type of visa do I require for the Schengen visa for my transit. How I can apply for the same?  I tried to find slots in German consulate but all slots are full before my departure date. If I don't get the Schengen visa, I cannot travel and will loose all the fare (since my ticket is a non-refundable ticket). Is there any other way I can tackle this situation.


Get root access for copying files to /usr/share/...?

To be short, I want to copy a folder to a location /usr/share/screenlets/.... in Ubuntu 10.04 system. I tried by logging in as root from terminal giving su.   I even changed my user account type to ADMINISTRATOR; Yet, no use. PASTE option in the context menu's list in the folder /usr/share/... is INACTIVE.  How can I copy those files?


Let $U, W$ be two vector subspace in a vector space $V$. Assume that neither one is contained in the other, i.e. $U \not\subset W$ and $W \not\subset U$. What is the easiest way to see that $U \cup W$ is not a vector subspace?


Indian citizens holding J 1 visa travelling on cruise to Bahamas

Indian citizens holding J1 visa in US want to travel to Bahamas on cruise. Do they need Bahamas visa ?


I don't understand, because if 'don't' is 'do not' then wouldn't the sentence without conjunctions be 'do not you dare' which I'm pretty sure isn't grammatically correct. Like, when we say the term it means something else, certainly not 'do not you dare' anyway. Any ideas on why? I am so glad English is my first language.


Web Maps for Collecting Information in Questionnaire?

I am working with a Non Profit group who are looking for collect information around urban cycling routes.   They would like to know the routes people take to get from point A to point B.   I thought, "well web maps are great for that!"   Are there any out of the box solutions (ie: Google Maps Engine, CartoDB, MapBox, etc.) that would allow for the creation of a web map where people could enter data (draw their cycling route)?   I know that a web map could be made using things like Leaflet, but the group does not have web mapping or web development capabilities.   Ideally, the web map could be embedded into an online survey, and at the end of the survey, the group could access the drawn routes and download them for analysis in a GIS.   Any thoughts?


What spacing around colon in function notation?

Is there some standard for which spacing is to be preferred in the f: X -> Y notation for a function?  Three possibilities:  $f \colon X \to Y$ \\ $f: X \to Y$ \\ $f \mathpunct{:} X \to Y$   The respective outputs are shown here:


I created FileTest.java and RuntimeTest.java in the same package named test. Then, in RuntimeTest.java , I used Runtime.getRuntime().exec("java test.FileTest") to run FileTest.java, but it seems that the FileTest.java didn't run. Anyone knows why? Thanks!


Vacuum sealed ham left out for 9 hours, is it still safe to eat?

I accidentally left a vacuum sealed ham steak out on the counter for 9 hours. If I reheat it is it still safe to eat?


I have nothing against Ubuntu. Completely satisfied with its performance. But after some while now, I don't have much hard disk space for my own files. So I'm planning to keep Windows 7 and uninstall Ubuntu.   Currently I get dual boot options when I turn on my PC. I got to know that uninstalling Ubuntu would result in some repair work to be done for Windows 7. Please fill me in with details on this, and on how to uninstall Ubuntu, because I have an uninstall file in Windows 7 in the location where I have installed Ubuntu.


How to prevent ICE CYBER virus - Avira has allowed reinfection

The ICE CYBER virus is particularly nasty.  I thought it snuck in while Avira Free Antivir was off, and then became active later.  Being more carefull for the two days after removing it with a Kaspersky rescue disk, I have it again.    It's time for new antivirus software.  What will prevent infection from the ICE CYBER virus?  I tried AVG a while back:  I uninstalled it because it required that all internet traffic be diverted through it's program, and I don't want some AVG person to be able to log all of my internet traffic.    (It would not run without internet access.  I didn't allow AVG with my firewall.  Upon specifically allowing AVG, I got inernet access back.  Goodbye, AVG.)  How I removed the ICE CYBER virus.  I made a Kaspersky rescue disk, and did a scan.  It restored access to my computer.  I then restored XP back to a restore point a couple weeks old with rstrui.exe.  I then ran Kaspersky again, plus Malwarebytes, plus Hitman pro, plus an Antivir full scan.  Two days later I have it again.  Avira Free Antivir failed to prevent the virus.  I had it set for web protection, plus all file reads and writes.


please help me I want to install ubuntu on my laptop, but I don't know what version I should install for all the driver to work. Here is my laptop specs: -AMD A-series A12-9720P -AMD Radeon RX 540 Thank you for helping.


Computing complex integral with absolute value

What is the value of $\int_{|z|=1}|z-1||dz|$?  By definition, if $z$ is parametrized by $z=e^{i\theta}$, the integral is $$\int_0^{2\pi}|e^{i\theta}-1|\cdot|ie^{i\theta}|d\theta = \int_0^{2\pi}|e^{2i\theta}-e^{i\theta}|d\theta$$ It has an absolute value, so I don't know how to integrate it.


Does olive oil and balsamic vinegar together need to be refrigerated?

Do I need to store a mixture of olive oil and balsamic vinegar in the refrigerator?


Is there a away of amount the on bits in of n binary length number in lognsteps?

I'm trying to find out if there's away for evaluating the number of on bits in a binary number of length n using O(1)  space, in logn steps?  If so- How?


Does this answer your question? Notice remains open even after submitting feedback

I have  today and one member was voted as duplicate and private feedback was there, I choose no and submitted the form. When I revisit the question or refresh the page same notice reappears with yes/no options.  In-network tab I got 200 OK status and response as "success":true  Environment: OS: Windows 10 Browser: Chrome 79.0.3945.117 (Official Build) (64-bit)  From the comments, the same issue is happing with   (might be with whole StackExchange network)      From network tab


random walk hitting time in finite steps

Give a simple symmetric random walk, denote by $\mathbb P_0(T_1 < \infty)$ the probability of starting at $0$ and for the first time reaching level $1$ within finite discrete time steps. What is $\mathbb P_0(T_1 < \infty)$?  So I know by the law of total probability  $$ \begin{split} \mathbb P_0(T_1 < \infty)  &= \mathbb P_0(T_1 < \infty|S_1 = 1)  \mathbb P_0(S_1 = 1)   + \mathbb P_0(T_1 < \infty|S_1 = -1) \mathbb P_0(S_1 = -1) \\  &= \frac12 + \frac12 \mathbb P_0(T_1 < \infty|S_1 = -1) \end{split} $$  Also, $\mathbb P_0(T_2 < \infty)$ = $\mathbb P_0(T_1 < \infty)$$\mathbb P_1(T_2 < \infty)$.  In order to solve the system of the above two equations, I need to find the relationship between $P_0(T_1 < \infty|S_1 = -1)$ and $\mathbb P_0(T_2 < \infty)$. I guess they  are  equal since from $-1$ to $1$ is the same as from $0$ to $2$, but I'm not sure if that's correct.


else if (answer.equals("check value")){         System.out.println("Of what?");         System.out.println("Tax, Donations, Income, Profit, Expenditure, Services, Military, City or Economy.");         System.out.println("Do not use caps and spell it correctly otherwise it will not be recognised.");         String valueToCheck = scan.nextLine();         if (valueToCheck == "tax"){             System.out.println(tax);         }else if (valueToCheck == "donations"){             System.out.println(donations + "donations per turn");         }else if(valueToCheck == "income"){             System.out.println(incomePerTurn + " income per turn");         }else if(valueToCheck == "profit"){             System.out.println(profitPerTurn + " profit per turn");         }else if(valueToCheck == "expenditure"){             System.out.println(expenditurePerTurn + "expenditure per turn");         }else if(valueToCheck == "services"){             System.out.println(servicesBudget + " to services budget");         }else if(valueToCheck == "military"){             System.out.println(militaryBudget + " to military budget");         }else if(valueToCheck == "city"){             System.out.println(cityBudget + " to cities budget");         }else if(valueToCheck == "economy"){             System.out.println(economy  + " to total economy");         }         newTurn();}   Hello, whenever I run my program and type 'check value' I get no errors, in fact I get nothing. I am just wondering why nothing is returned. Thanks for any help!


Why am I getting this error? How to solve this error?

I have tried to install synaptic package manager and in the terminal it is showing me some error.  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


I have had this problem since I fixed my previous problem of have my model disappearing when I closed in on it. I have tried the "Limit selection to visible" at the bottom of the screen and some other method but end up nowhere. If you can help please do so If you need the .blend file I can provide


I start with a basic class that I want to manipulate in a List using LINQ, something like the following:  public class FooBar    {       public virtual int Id { get; set; }       public virtual string Foo { get; set; }       public virtual string Bar { get; set; } }   This is what I ultimately found out to solve my problem using the non lambda LINQ stuff.  // code somewhere else that works and gets the desired results   var foobarList = GetFooBarList();  // Abstracted out - returns List<Foobar>    // Interesting piece of code that I want to examine var resultSet = from foobars in foobarList                   orderby foobars.Foo, foobars.Bar                   select foobars;  // Iterate and do something interesting   foreach (var foobar in resultSet)   {       // Do some code   }   What I'm really curious about is if the same can be accomplished using the Lambda based extension methods off of generic IEnumerable to accomplish the same thing.  Google tells me I can do something like the following to accomplish it:  var resultSet = foobarList.OrderBy(x => new {x.Foo, x.Bar})                             .Select(x=>x);   However if I do that I get a runtime error when I hit the foreach statement.  The error tells me that at least one object has to implement IComparible, which I can see that since I'm using an anonymous type for the .OrderBy() method.  So is there a way to accomplish what I want using the Lambda way?


I'm not sure if 'inspired' here is a verb in past participle or an adjective.  Director George Lucas was inspired to create the Wookiee character Chewbacca—a “gentle, hairy, non-English-speaking co-pilot”—after seeing his wife’s dog sitting in the passenger seat of his car.


What'd be the most efficient way of lowercasing everything from the point of the command invocation until the end of the group, that is, how should one define a command that acts like, for example, {\scshape ... }, just lowering the case of everything that follows. Let's for the beginning say that what follows is just plain text. (also wondering if LaTeX3 will make such text, or text+commands, manipulations any easier?)


How do you tame a wild animal without being/knowing a beast-master?

In one of my recent D&D sessions, one of the members of the party (rogue) tamed a wild turkey. Since then, the rest of us have wanted a companion/pet as well (ex: Blood Hawk, Bat, etc.). Are there certain rules for animal-taming? Or is it completely up to the DM? Because with the turkey, they tamed it in one roll.   Please note that none of us are Rangers or beast-masters.   And we are playing in Adventurers League (the DM usually decides whether to use a rule or not).


I understand what it is, like an item proc that delivers an effect on hit for example. But what does PROC actually mean? Does it stand for something or is it short for another word?


Creating the Minecraft End Portal in Blender

Perhaps a reference video would be needed to show this, but to clarify, merely the portal and its animations appear nearly impossible to create, the frame itself is simple diffusion and optional reflection. Mind this is using cycles.   I though the best way to attain this would be to have the position of the camera changing cause a movement of the portal textures however it has proven futile.  And so I ask, is this possible in Cycles?  EDIT:  My original plan was to use the UV Warp modifier to create the movement effect, with several planes underneath each other to create the depth. However, the way it appears to be a void, another area is the piece I lack.   The frame of the portal, again, is not a problem.  In reference to a comment that referenced a similar concept using a Nether portal that showed the Nether upon the other side, is similar, however there is no need to create another world on the other side, as I want to stay true to the visual mechanics of Minecraft.  Here is an example of the in-game version of what the goal is.


Files icon disappears from the unity launcher

I'm experiencing this behaviour on 2 separated machines (in a virtualbox vm and physically installed on another laptop):  Sometimes after I start the Files Gnome application - its corresponding button disappears from the Unity Launcher couple seconds after it's started. So if I minimize the application - I have no chance to close the application rather than killing its process with kill.  That's how it looks like:    Has anyone else experienced it? Is it a bug or some tricky configuration option?  If it's a bug - where should I report it?  PS: I've filed a bug for that


What methods do you know for the geting data type in the javascript?

For example I have a some code:  ({}).toString.call(new Date()); // "[object Date]"   anybody knows, another methods how to check type? (I wanna to receive only date type without object)


Increase clickable area in comment flag dialog

The comment flag dialog .  A side effect of that change was to .  In particular, the clickable regions on the new flag dialog are pretty skinny, as shown in red below:    This is frustrating, because it requires me to put my mouse in just the right place, which takes extra effort.  I wish the clickable regions were instead larger, so they included all of the text associated with the corresponding option, like this:    That would be better, because it would make it easier to select the option.  It would also match the way  on this site.  Can this change be made?


Why do you need space between cd and .. in change directory command?

I am a newbie and would like to know if there is any way to eliminate the need for space between cd and .. in the change directory command i.e. cd.. instead of  cd ..


There exist certain attacks that can be used against RSA keys whose prime factors are of specific forms, such as one by Coppersmith.  How common are these RSA keys?  If you generate primes randomly, is there a realistic risk of choosing a weak prime number?  Does this risk, if realistic, vanish if you always choose $p$ and $q$ to be safe primes?


In quantum mechanics, is energy conservative statistically or for every single system?

I'm learning from Griffiths' book "Quantum Mechanics". In quantum mechanics, a particle has a variety of accessible energy states. Then is the energy of the particle always conserved? Energy states are decided randomly, this makes me think energy would not be conserved. I got some alternative ideas:   Average value of energy is conserved. Energy is statistically conserved, but there are fluctuations. Few particles effect each other, so the energy loss of one particle is compensated by another particle. Therefore energy is always conserved and there is no fluctuation.


Number of $7$-digit telephone numbers with non-decreasing digits? strictly increasing digits?

I'm really confused with the question below.     A phone number is a 7-digit sequence that does not start with 0.   (a) Call a phone number lucky if its digits are in non-decreasing order. For example, 1112234 is lucky, but 1112232 is not. How many lucky phone numbers are there?   (b) A phone number is very lucky if its digits are strictly increasing, such as with 1235689. How many very lucky phone numbers are there?   I have learnt that to determine if a question is asking for permutations or combinations we see if the order matters. For part a) it's talking about the order of these numbers and how many of these exist. In my head, permutations pop up and I would say the first position has 9 possibilities and so do the rest (if repeated). This is my same logic in part b). However, they are wrong and I do not understand how to proceed with this question. Please give some helpful tips when solving such problems.


How to animate morphing a rectangular plane into a sphere

How to make a grid-to-sphere animation like this?


We should have the ability to un-upvote comments that we had previously voted on, within a reasonable timeframe.  Sometimes my hand slips and I accidentally upvote something, or I blindly upvote Jon Skeet's comments out of habit.


In MLE for continuous rv, why is it ok to evaluate a pdf at a point?

In MLE for continuous case, my course notes define the likelihood function to be:  $$ L(\theta) = L(\theta;y) = \prod_{i=1}^n f(y_i;\theta) $$  Where $f$ is the joint pdf of $y_i$ given $\theta$.  I thought normally it doesn't make sense to evaluate a pdf at a point (eg. $f(X=2) = 0$ for some continuous rv X), and that it only make sense to evaluate for the random variable to be $>$ or $<$ to a value.  But in the case of MLE, why is it OK to evaluate a joint pdf at a point?


Automatically adding dimensions to polygons in QGIS

Is it possible to show :  lot # area dimensions of the polygon's lines highlighted polygon  with the only input being the lot #. The result should look like this:


Difference between "did + verb" and just "verb + ed"

I asked this question yesterday on English Language & Usage and thought that this would be actually something for this site and maybe a contribution to all who might have the same confusion.  This question is about something I always get confuse with (native language German). As far as I know "did + verb" is something done and finished in the past. But isn't it the same with "verb + ed"?  The answers can be seen here . Anything you would like to improve?


What is the weight limit of a large cabin baggage on WizzAir?

I'm paying for a large (56 x 45 x 25 cm) on-board luggage at WizzAir, but can't find the weight anywhere on their website.  I've been looking at other posts like  but it's seriously outdated (and doesn't give a concrete answer to the question) and wanted to know if anyone happened to know the actual numbers by any chance.


Power of an adapter working with different input voltages

I have a laptop adapter which, according to its label, works with 100-240 V, 1.8 A, 50-60 Hz as its input. Since only one input current has been mentioned, does it mean that its consuming power is higher in countries with 220-230 V mains electricity than in countries with 110-120 V electricity?


"It might be different if he were flagging down a passing car or trying to phone for help, but typing, in and of itself, is not an inherently dramatic activity."  In this sentence, I do not understand the phrase "in and of itself"  There should be some difference between the prepositions "in" and "of" in this context.   Please explain in as much detail as possible!


Use a linear approximation to estimate the given number $64.07^{2/3}$

That's all they give you. I tried putting it into the linear approximation equation of:  $$ f(a)+f'(a)(x-a) $$  but I get almost the same value as $64.07^{2/3}$, which is around $16.0116$. Just not sure how else to go about doing this problem. Thanks.  Here's the problem. I'm doing this online and it comes back as incorrect. I've tried nearly every possible solution to this (16.0117, 16.0116, 16.012, 16, 16.1, etc.) Is there a specific solution to this? Thanks.


Does a South African citizen with a UK visa need a transit visa for Amsterdam?

I am taking my son to the U.K he has a South African passport so therefore has a visa for the UK. We are flying via Amsterdam, does he need a separate visa for Amsterdam ?


Why don't I have permission to ls directories I own and have r/w permissions for?

It seems I need to use sudo to ls directories that I own and have r/w permissions on.   If I try to ls my media drive, I can see it, but not its sub-directory, even though I think owning that sub-directory should enable me to do so. When I try, I get this result:  me@icvr1:/home$ ls -al /media/ total 12 drwxrwxrwx   3 root              root      4096 Dec 20 11:05 . drwxr-xr-x  25 root              root      4096 Dec 19 12:41 .. drw-rw-rw-+  4 me                me        4096 Jan  4 12:01 innovationcommons  me@icvr1:/home$ ls -al /media/innovationcommons/ ls: cannot access '/media/innovationcommons/External_Storage': Permission denied ls: cannot access '/media/innovationcommons/DataStorage': Permission denied ls: cannot access '/media/innovationcommons/..': Permission denied ls: cannot access '/media/innovationcommons/.': Permission denied total 0 d????????? ? ? ? ?            ? . d????????? ? ? ? ?            ? .. d????????? ? ? ? ?            ? DataStorage d????????? ? ? ? ?            ? External_Storage  me@icvr1:/home$ ls -al /media/innovationcommons/DataStorage  ls: cannot access '/media/innovationcommons/DataStorage': Permission denied   However, if I use sudo, I get this more expected and useful result:  me@icvr1:/home$ sudo ls -al /media/innovationcommons/ [sudo] password for me:  total 16 drw-rw-rw-+ 4 me     me     4096 Jan  4 12:01 . drwxrwxrwx  3 root   root   4096 Dec 20 11:05 .. drwxrwxrwx  1 me me         4096 Jan  3 13:35 DataStorage drw-rw-rw-  4 me me         4096 Aug 29 11:33 External_Storage  me@icvr1:/home$ sudo ls -al /media/innovationcommons/DataStorage  total 16 drwxrwxrwx  1 me me 4096 Jan  3 13:35 . drw-rw-rw-+ 4 me me 4096 Jan  4 12:01 .. drwxrwxrwx  1 me me 4096 Jan  2 16:08 Images drwxrwxrwx  1 me me  496 Jan  3 13:37 Places drwxrwxrwx  1 me me    0 Dec 12 14:53 $RECYCLE.BIN drwxrwxrwx  1 me me 4096 Dec 12 14:54 System Volume Information   Why can't I successfully ls -al /media/innovationcommons without using sudo, or even just ls its sub-directories?


Restricted least squares: condition is that the parameter vector is greater or equal zero

I only found a example in which the constraind on $\beta_i, \ i=1,...k$ would make them sum up to one as well introduces a constraind such that all $\beta_i$ are all greater or equal zero. Since I dont need a condition for the summation of the $\beta_i$ I'm not quite sure how to deal with this problem.  Since in this context a matrix $C$ of constraints is introduced such that $C\beta = c$, I'm not sure how to deal with $C\beta \geq 0$.  Any suggestions are very welcome!


PgfPlots - Data in one column to be plotted into separate graphs

I have a large amount of measured data, that I would like to plot. Data are organized into three columns where the first column provides a frequency, the second and third column are values measured at this frequency, like this:  1000019.25  0.007299716 -0.46983397 746474.438  0.004848992 -0.33711791 557226.438  0.005053654 -0.244117826   I would like to plot column three over column two in my plot.  After every 64 rows, a new set of data starts which should be plotted in another graph in the same diagram.  I found the "select coords between"-option, but am only receiving an empty plot. Here's my example:  \begin{tikzpicture}  \pgfplotsset{select coords between index/.style 2 args={     x filter/.code={         \ifnum\coordindex<#1\def\pgfmathresult{}\fi         \ifnum\coordindex>#2\def\pgfmathresult{}\fi     } }}  \begin{axis}[ ] \pgfplotstableread{pictures/data.txt} \datatable \addplot table [x index = 1 , y index = 2, select coords between index={0}{63}] from \datatable;   \end{axis}  \end{tikzpicture}   This works so far if I manually select the lines. However, I was wondering if there is a way to add some kind of loop that automatically takes the first n rows for the first graph, the next n rows for the second etc. and also iterates the legend entries.


After installing AMD RX 480 driver on Ubuntu 16.10, cannot get to login

I recently upgraded to an RX 480 and installed Ubuntu 16.10 gnome desktop. Because the default/open source drivers were glitchy, i downloaded the latest drivers from AMD's website, the 16.50 drivers, and after installing and rebooting all i can get to is TTY and Grub. If i do sudo service gdm restart it freezes. How do i fix this?


Word for when I present a graph to support my point but it refutes it?

What's the word for when I present a graph to support my point but it refutes it? I guess its shooting myself in the foot. But I want a better term.


Global scope or permanent length or savebox

I am trying to save a minipage width and height in one environment, and use these dimensions in a subsequent environment of mine, to make a picture environment. The idea is to create a picture on the right of the minipage using the rest of the \columnwidth, and with the same height as the minipage on the left. The problem is, as far as I understand, that neither the lengths nor the \savebox'es set within the first environment survive to the next one, as they are subject to scoping rules of LaTeX.  So my question is, how can save dimensions (or the box) in one environment and use them in another?  Update: here is (non-working) example using \global:  \documentclass{article} \usepackage{calc} \usepackage{picture}  \newsavebox{\questiontextbox} \newsavebox{\questionpicturebox} \newlength{\questiontextheight}  \newenvironment{questiontext}[1]% {\begin{lrbox}{\questiontextbox}% \begin{minipage}[t]{#1}}% {\end{minipage}\end{lrbox}% \noindent\usebox{\questiontextbox}% \settoheight{\questiontextheight}{\usebox{\questiontextbox}}% **** \global\setlength{\questiontextheight}{\questiontextheight}}  \newenvironment{questionpicture}[1]% {\begin{lrbox}{\questionpicturebox}% \setlength{\unitlength}{1cm}% \begin{picture}(#1-\fboxsep-\fboxsep,\questiontextheight)}% {\end{picture}\end{lrbox}% \fbox{\raisebox{-\questiontextheight}{\usebox{\questionpicturebox}}}}  \begin{document} \begin{questiontext}{0.2\columnwidth} There must be some text here so I made it up to fill more than just a single line. \end{questiontext}% \begin{questionpicture}{0.8\columnwidth} \put(0.5,0.5){\circle{0.4}} \end{questionpicture}  \end{document}   The \fbox is there only to visualize that the picture height is only two \fboxsep's. I tried to put \global before \settoheight in the line marked with ****, which does not work, either. No idea what I am doing wrong; could the packages calc or picture (which is needed to use real dimensions) prevent proper \global behaviour?


How can I set a color to command highlighting in TeXworks?

I would like to have a darktheme in TeXworks, So I have followed  answer. However, the default color of commands like \section is dark blue, which makes it very difficult to see (even worse for \usepackage which uses a darker blue).  Is there any way to define the special syntax coloring used within my CSS file?


Why isn't perpetual motion possible, even though we are so technologically advanced?

Why  wouldn't be possible if we are so technological advanced?  It is just a thing that I was wondering for too long. I mean, we are able to create so powerful permanent magnets, like neodymium magnets which can store an massive quantity of energy for a long period of time, but we are not able to use that energy at all. Why?


Estimated standard deviation of difference between means in case of known and unknown variance?

I am referring to this  page 198-9:    I have troubles understanding the case with unequal variance.  In general it :   or on :    Therefore if we assume unequal variance, I would think like this:  $s_{\bar{X}_T-\bar{X}_C}=\sqrt{s^2_T/n_1+s^2_C/n_2}$  Howerver, they give this for the standard error:    I have troubles with deriving these two different formulas.


Can anyone explain to me what these error messages I got when I looked in dmesg? I am new to Ubuntu and to the Linux World.  [ 7.802351] CPU4: Core temperature above threshold, cpu clock throttled (total events = 1) [ 7.802352] CPU0: Core temperature above threshold, cpu clock throttled (total events = 1) [ 7.802353] CPU5: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802354] CPU0: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802354] CPU4: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802356] CPU1: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802356] mce: [Hardware Error]: Machine check events logged [ 7.802362] mce: [Hardware Error]: CPU 4: Machine Check: 0 Bank 128: 00000000880a0003 [ 7.802363] mce: [Hardware Error]: TSC 99561677c [ 7.802385] mce: [Hardware Error]: PROCESSOR 0:506e3 TIME 1501537538 SOCKET 0 APIC 1 microcode ba [ 7.802387] mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 128: 00000000880a0003 [ 7.802387] mce: [Hardware Error]: TSC 995616be4 [ 7.802388] mce: [Hardware Error]: PROCESSOR 0:506e3 TIME 1501537538 SOCKET 0 APIC 0 microcode ba [ 7.802389] CPU2: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802390] CPU6: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802391] CPU3: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.802392] CPU7: Package temperature above threshold, cpu clock throttled (total events = 1) [ 7.826359] CPU4: Core temperature/speed normal [ 7.826359] CPU0: Core temperature/speed normal [ 7.826360] CPU2: Package temperature/speed normal [ 7.826361] CPU6: Package temperature/speed normal [ 7.826361] CPU0: Package temperature/speed normal [ 7.826362] CPU4: Package temperature/speed normal [ 7.826363] mce: [Hardware Error]: Machine check events logged [ 7.826367] mce: [Hardware Error]: CPU 4: Machine Check: 0 Bank 128: 00000000880b0002 [ 7.826368] mce: [Hardware Error]: TSC 99916f004 [ 7.826369] mce: [Hardware Error]: PROCESSOR 0:506e3 TIME 1501537538 SOCKET 0 APIC 1 microcode ba [ 7.826369] mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 128: 00000000880b0002 [ 7.826370] mce: [Hardware Error]: TSC 99916f2ca [ 7.826370] mce: [Hardware Error]: PROCESSOR 0:506e3 TIME 1501537538 SOCKET 0 APIC 0 microcode ba [ 7.826400] CPU1: Package temperature/speed normal [ 7.826401] CPU5: Package temperature/speed normal [ 7.826402] CPU3: Package temperature/speed normal [ 7.826402] CPU7: Package temperature/speed normal [ 467.922330] CPU4: Core temperature above threshold, cpu clock throttled (total events = 73) [ 467.922331] CPU0: Core temperature above threshold, cpu clock throttled (total events = 73) [ 467.922332] CPU7: Package temperature above threshold, cpu clock throttled (total events = 86) [ 467.922333] CPU3: Package temperature above threshold, cpu clock throttled    I am running Ubuntu 17.04 with 4.10.0-29-generic kernal


If the brain has no pain receptors, how come you can get a headache?

I've read many years ago in books, that the brain has no nerves on it, and if someone was touching your brain, you couldn't feel a thing.  Just two days before now, I had a very bad migraine, due to a cold. It's become better now, but when I had it I felt my head was going to literally split in half, as the pain was literally coming from my brain.  So it lead me to the question: How come people can get headaches if the brain has no nerves?


Proof of an equality involving cosine $\sqrt{2 + \sqrt{2 + \cdots + \sqrt{2 + \sqrt{2}}}}\ =\ 2\cos (\pi/2^{n+1})$

so I stumbled upon this equation/formula, and I have no idea how to prove it. I don't know how should I approach it: $$ \sqrt{2 + \sqrt{2 + \cdots + \sqrt{2 + \sqrt{\vphantom{\large A}2\,}\,}\,}\,}\ =\ 2\cos\left(\vphantom{\Large A}\pi \over 2^{n + 1}\right) $$  where $n\in\mathbb N$ and the square root sign appears $n$-times.  I thought about using sequences and limits, to express the LHS as a recurrence relation but I didn't get anywhere.  edit: Solved, thanks for your answers and comments.


Let $\sum_{n=0}^{\infty} a_n$ be a convergent series such that $a_n \downarrow 0$. Prove that, $ \lim_{n\to \infty} na_n = 0 $

This is my proof so far,   Let $\varepsilon > 0$. By CCC, there is $N > 0$, such that, if $n,m>N$, then $|\Sigma_{i=m+1}^n a_i| < \varepsilon$. We can drop the absolute values as $a_i \geq 0$, and, $a_{m+1}\geq a_{m+2}\geq ... \geq a_n$.  now I'm stuck.