Is there a way to write a macro that steps through two lists of arguments pairwise, like what Python's zip function does? For example, I'd like to write a macro like this (using xparse because that's what I've been experimenting with; I'm open to other options): \NewDocumentCommand{\Zip}{ >{\SplitList{,}}m >{\SplitList{,}}m }{%     % something that calls \myfunc in an itemize environment }  \newcommand{\myfunc}[2]{\item #1, #2}  So that calling Zip{zebra,frog,jay}{mammal,amphibian,bird} is equivalent to \begin{itemize}     \item zebra, mammal     \item frog, amphibian     \item jay, bird \end{itemize}  Is this possible? I've looked into xparse but it seems to only allow stepping through two lists one at a time, not zipping them together. There was a similar question here , but I hope there's a nicer solution now.

In functional languages, there often is a function called zip, which can be handy in many situations; for example in ruby, one can say:  %w(a b c).zip(%w(d e f))   to get an array of arrays [["a", "d"], ["b", "e"], ["c", "f"]].  It seems that there are many ways to make a zip function, either with a  (), or . (The map might actually be done with foldr.)  But given that the lambda.sty lists do not seem to support nested lists, I'm not sure how would one go about making zip in TeX (with lambda.sty).  I tried something along the lines of which seemed the most simple;  \catcode`@=11 \input lambda.sty  \def\Zipwith#1#2#3{\Foldr#1{#3}{#2}}  \def\lista{\Listize[a,b,c]} \def\listb{\Listize[d,e,f]}  \Unlistize{\Zipwith\Map\lista\listb} \bye   but it results in [abcd, abce, abcf]. So, close but no cigar.  Would you have an idea?  I wouldn't actually need there to be nested lists as a result, just that for lista zipped with listb, some macro \foo#1#2 would get run for (continuing with the example lists) three times, getting as its arguments on the first run #1<-a, #2<-d, on the second run #1<-b, #2<-e, and on the third #1<-c, #2<-f.


I have compiled so many source codes files in latex and it works perfectly. I downloaded another template and run but my texmaker could not generate the pdf of that file. Although I have tried this file in another laptop in texstudio and its perfectly working.  But I don't know why my latptop miktex not producing pdf file?  Log File:  {C:/Program Files/MiKTeX 2.91/fonts/enc/dvips/base/8r.enc} !pdfTeX error: pdflatex (file gbsnu8a): Font gbsnu8a at 720 not found ==> Fatal error occurred, no output PDF file produced!

I'm an average user of LaTeX, but not proficiency. I'm trying to learn from book templates I've found on the web, but I get this error message:  Trying to make PK font ccicons at 1493 DPI... Running miktex-makemf.exe... miktex-makemf: The ccicons source file could not be found. Running ttf2pk.exe... miktex-makemf: PK font ccicons could not be created.  LaTeX Font Warning: Some font shapes were not available, defaults substituted.  !pdfTeX error: pdflatex.exe (file ccicons): Font ccicons at 1493 not found  ==> Fatal error occurred, no output PDF file produced!   I'm using MiKTeX (over Windows 7), and according to the MiKTeX package manager the "ccicons" package is already installed.  Could you please help me solve this problem?


I have a crack in the paint that seems to be getting larger over the years.  It doesn't seem to be damp.  Could this be something serious or just shoddy installer work?

I recently discovered a fairly long (~2 foot) crack in my drywall within my home. Aside from the aesthetics, is there any negatives associated with leaving a drywall crack alone for an extended period of time? Of course I will eventually fix it up, but does delaying this fix pose any risk for further damage? Edit: The property is basically brand new. It is a condo that was constructed in 2019. The crack (image attached) is about 2-3 feet long. From top to bottom, it starts off jagged like a normal drywall crack but then suddenly becomes very straight near the window frame. The area right at this crack-type transition is raised off the wall. Don't know the exact dimension of the raise, but it is obvious in sight if you are close and very obvious running your finger over it. I do not know what would be in the wall here since it is a perimeter wall.


How can I find a formula for $$\sum_{k=1}^n k2^k$$  I'd also appreciate if someone could indicate some materials about this subject.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Two fold... Will a white vehicle retain heat throughout the night, thus being warmer come morning? While a dark truck, with dark tinted windows and dark interior, lose heat heat faster throughout the night?

In my book's thermodynamics chapter, it says that an      "object that radiates heat faster also absorbs heat faster. This means   that an object that is a more efficient radiator comes to equilibrium   with its environment more quickly. With this in mind, is it better to   paint your house black or white?"   I am confused which it would be. The book says white because      "in summer, you house is cooler than the environment and white   reflects away the heat. In winter your house is warmer than the   environment and white radiates away the heat"


Can I turn on a DC motor momentarily with this circuit if I replace LED with 12 VDC motor?  I need help making a circuit to turn on 12 VDC motor momentarily with push button. So if I push button, the 12 VDC motor not activate, but when I release it the DC motor will be active momentarily; what should I do?

I am trying to make circuit to turn on an LED momentarily. I would like to charge the capacitor when the button is pushed, then when released turn on the LED momentarily with the capacitor.


I am trying to create a latex class that allows sectioning below subparagraph. For doing that, I modified the article.cls class of the texlive distribution adding two more options \thesubsubsubsection and \thesubsubsubsubsection. So now, the sectioning tree goes as follows:  \thesection   \thesubsection   \thesubsubsection   \thesubsubsubsection   \thesubsubsubsubsection \theparagraph   \thesubparagraph   Please see below myarticle.cls, mysectioning.tex and the resulting mysectioning.pdf.  I achieved the wanted effects in terms of numbering, table of contents and section formatting. The only problem that I have is that in the new two headings, \thesubsubsubsection and \thesubsubsubsubsection, the heading title is repeated in the following paragraph as indented text (see Sections 1.1.1.1  and 1.1.1.1.1 below).  Do you know how can I avoid this behavior?  Many thanks in advance for your help and ideas! Sebastian

My intention is to create a letter with multiple appendixes, which are \included and their part-titles will be added to the \encl-list.  My letter looks like:  \documentclass{scrlttr2} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage{lmodern,textcomp,graphicx} \usepackage{booktabs} \usepackage{tabu}  \newcounter{part} \setcounter{secnumdepth}{-1} \makeatletter \newcommand{\part}{\@startsection{part}{-1}{\z@}% name, ebene, einzug                            {1ex}% vor-abst                            {1ex}% nach-abst                            {\normalfont\Large\bfseries}}\\% format \renewcommand{\thepart}{Anlage \Alph{part}} \makeatother  \begin{document} \begin{letter}{to somebody} \opening{Dear Sirs and Madams,} ... \closing{Farewell,}  \include{anlage-a}  \end{letter} \end{document}   The appendix starts as follows:  \part{test part}  My part-content...   Which gets rendered to:    Why does this happen, and how to avoid it?


I want to be able to create a Live USB flash drive that I can run Ubuntu/Xubuntu on and be able to keep my configs intact. And maybe install some extra stuff.  Tried using the USB flash drive creator with the persistent storage. When booted into I would test by creating a random file in home Dir, reboot back into stick and see if there.  Do far it hasn’t worked.

I have a bootable USB drive w/Ubuntu 10.04.  I use it to learn Ubuntu and to diagnose, repair, or recover other people's computers and files.  The problem comes when I constantly have to keep re-downloading the tools I need.  Is there a way to keep the tools I downloaded and keep Ubuntu they way I customized it (i.e. wallpaper, graphic options, icons on desktop, etc.) without installing it on the PC?  I want to be able to keep everything on my USB drive.


I have just read the question of the title in an article from Kirchheim. I didn't know this result, does any one know where I can find a proof of it?

I'm trying to prove the following:  Every metric space can be isometrically embedded in a Banach space, so that it's a linearly independent set.  I came up with the following idea:  Let $ (X,d) $ be a metric space. We can take the vector space of all functions from $ X $ to $ \mathbb{R} $. Now we can send an element $ x \in X $ to the function which takes the value $ 1 $ on $ x $ and $ 0 $ everywhere else. This would embed $ X $ in $ \mathbb{R}^X $, so that it would be a linearly independent set and actually a basis.   The problem seems to be finding a suitable norm, to make the embedding also an isometry. With that, we could just use the fact that every normed space can be isometrically embedded in a Banach space to get the desired result.  Any hints on constructing the metric? Or have I chosen a bad space?


dont know if its right to post on here but i have a bit of problem.  I had a windows 8 laptop and partitioned it into 4 partitions. Now i had reserved one partition for a linux installation. I had a disc of linux mint and installed it on the laptop selecting the partition. when i restarted my machine i found out that all the 4 partitions had been wiped and linux mint had all my disc space. now i am trying to recover the data.  My windows PC does not recognise the hard drive, is there any way to get this data? i have some windows programs to recover data but the hard drive just wont get detected. please help!   how can i recover this data.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I'm using Blender 2.71 and it comes with Python 3.4.0 even though the most recent version is 3.4.1. Is there any way to change this?

When Blender is installed, it creates its own copy of Python 3.x. However, I prefer to code in Python 2.x. This makes it difficult for me to work with newer versions of Blender. I would like to know what to do so that Blender will instead use an external installation of Python 2.x, which I already have installed on my computer.  How do I make Blender recognize the other version of Python?


I tried a simple calculation it gives me wrong result.  Here is the fiddle :     var test = (1909 / 10000) * 10000 $("#abc").val(test);
   <input type="number" id="abc">

 Actual answer is suppose to be : 1909

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


For the question , how can we add captions to each sub-figure?

If I want to put two images beside each other, what should I do? I have inserted a figure. But, rather than having the next figure on a new line, I want it to be beside the already inserted figure. How can I do that?


We're trying create a trigger that will fire when a new contact is added to SF (that contact is created via the Hubspot connector). Is the workflow below possible through triggers / Apex code? (I'm not specifically asking for code, just to know if this is possible. The code / error I'm currently getting is posted in )  The workflow:  When a contact is created via the Hubspot connector, this should happen:    Create a person account Associate the contact with the Person account Create an opportunity associated with the Person account   When a contact is updated via the Hubspot connector, this should happen:   Update some custom properties on the Opportunity associated with the Person account Update the first name, last name, and email on the Person account    This could be a creation of a new value, or the old value could need to be updated.  Is it possible to do this? If not fully possible, then which parts might work?

Code  trigger CreatePerson on Contact (before insert) {     RecordType personAccountRecordType =  [SELECT Id FROM RecordType WHERE Name = 'Person Account' and SObjectType = 'Account'];      Map<Contact, Account> accounts = new Map<Contact, Account>();    for(Contact record: Trigger.new) {        if(record.AccountId == null) {            Account newPersonAccount = new Account();            newPersonAccount.FirstName = record.FirstName;            newPersonAccount.LastName = record.LastName;            newPersonAccount.RecordType = personAccountRecordType;             accounts.put(record, newPersonAccount);        }    }     insert accounts.values();     for(Contact record: Trigger.new) {        if(record.AccountId == null) {            record.AccountId = accounts.get(record).Id;        }    } }   Error  Validation Errors While Saving Record(s) There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Can not select a person account".   How can I associate the recently created Person account with the Contact?


I m under debian8 and some (important) files have been deleted. I m trying to restore my machine and almost everything works except dpkg-query -l, it returns me those lines :  root@minos:~# dpkg-query -l dpkg-query : erreur : la lecture du fichier « info » « /var/lib/dpkg/status »  du paquet a échoué: Aucun fichier ou dossier de ce type   It looks like the file at /var/lib/dpkg/status doesn't exist anymore. Is that possible to 're-create' one ? Thanks  EDIT  root@minos:~# ls -lrt /var/lib/dpkg/ total 156 drwxr-xr-x 2 root root   4096 mai    3  2016 parts drwxr-xr-x 2 root root   4096 mai   18 09:26 updates drwxr-xr-x 2 root root   4096 mai   23 16:25 alternatives drwxr-xr-x 2 root root   4096 mai   23 16:25 triggers drwxr-xr-x 2 root root 139264 mai   23 16:25 info -rw-r----- 1 root root      0 mai   24 11:45 lock   This doesn't work..  root@minos:~# cp /var/backups/dpkg.status.0 /var/lib/dpkg/status cp: impossible d'évaluer « /var/backups/dpkg.status.0 »: Aucun fichier ou  dossier de ce type root@minos:~# ls -lrt /var/backups/ total 64 -rw------- 1 root root     870 mai   17 11:42 group.bak -rw------- 1 root shadow   728 mai   17 11:42 gshadow.bak -rw------- 1 root shadow  1445 mai   17 11:42 shadow.bak -rw------- 1 root root    1821 mai   17 11:42 passwd.bak -rw-r--r-- 1 root root   33242 mai   18 09:08 apt.extended_states.0 -rw-r--r-- 1 root root   10240 mai   25 06:25 alternatives.tar.0

I have deleted some files around /var/lib/dpkg/, namely:  /var/lib/dpkg/status /var/lib/dpkg/available /var/lib/dpkg/info/*   I understand Debian uses these files to keep some information about installed packages. Now when I do apt-get update, I get following error:  Reading package lists... Error! E: Could not open file /var/lib/dpkg/status - open  (2: No such file or directory) E: The package lists or status file could not be parsed or opened.   As I understand the , files located in /var are not supposed to be system-critical. Rater these should be temporary files, logs, caches, and similar.   Is there therefore a way to recreate the deleted files ?


Whilst going through 'a brief history of time' ,I faced difficulty in understanding the two slit experiment. How can individual electrons cause fringes?

Whilst going through 'A brief history of time', I faced difficulty in understanding the . How can an individual electron cause fringes on screen? I was unable to understand it? Please explain it simply.


How do I search for code fragments that are punctuation?  For example, how do I search for  ||: or -> ?  Is there a way to search for these sorts of things in StackExchange? Here's what I've already know: Google can find it.  See:  Google's results:  ...    But both  and , can't seem to find these.  (I think DuckDuckGo can't find it because StackExchange can't find it.  , but I'm not sure about just how this works.)

Situation: It started out as me  for the literal string C-c in  but it ended up omitting the - sign and showing results which contained the strings C/C++ and C & C++.  is an example of a post which contains that string of characters (yet fails to show up in the results).  Things I've tried:   post suggests that I can use the undocumented code: operator, but when I do that, it just wraps the whole term in double quotes like .  As @terdon in Unix & Linux chat has , using this  does yield some relevant results, but it doesn't show me  that is supposed to be there. edit: It appears that the Symbolhound query no longer returns that result.  Finally,  says that you can search for literal characters, but as you can see:    Quoted phrases are exact matches except for case-sensitivity, for example, you can search  or .  The second example (symbols) leads to 0 results.  So by now I assume that the search engine has changed (but the old documentation still lingers on this site). Is there a method for me to search for strings that include special (or is it literal?) characters?


I rendered a 1200x800 image, but it's just the transparent texture thing:    I used Cycles for this image. In a test in Blender Render, it worked perfectly, although the materials were made in Cycles so you obviously couldn't see them as you were supposed to.

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Teachers often take off points from students who write 1/sqrt(2) instead of sqrt(2)/2. Why do we need to write it as sqrt(2) / 2 ? Where did that convention come from? Do we need to even do it? Why do teachers care so much?

In grade school we learn to rationalize denominators of fractions when possible. We are taught that $\frac{\sqrt{2}}{2}$ is simpler than $\frac{1}{\sqrt{2}}$.  says that "there is a bias against roots in the denominator of a fraction". But such fractions are well-defined and I'm failing to see anything wrong with $\frac{1}{\sqrt{2}}$ - in fact, IMO it is simpler than $\frac{\sqrt{2}}{2}$ because 1 is simpler than 2 (or similarly, because the former can trivially be rewritten without a fraction).  So why does this bias against roots in the denominator exist and what is its justification? The only reason I can think of is that the bias is a relic of a time before the reals were understood well enough for mathematicians to be comfortable dividing by irrationals, but I have been unable to find a source to corroborate or contradict this guess.


Is there a way to override a function inside a class without touching the class coding?  We have the class, let's say it's located in foo.php:  class WPSEO_Frontend {       public function head() {             echo '<!-- / ', $this->head_product_name(), ". -->\n\n";             return;       } }   So without modifying this class above, is there a way to remove this echo from the outside of the class, like (I know the below example isn't going to work):  bar.php  class WPSEO_Frontend overrides head {       echo '';       return; }

You can do this in Python, but is it possible in PHP?  >>> def a(): print 1 ...  >>> def a(): print 2 ...  >>> a() 2   e.g.:  <? function var_dump() {} ?> Fatal error: Cannot redeclare var_dump() in /tmp/- on line 1


I have upgrade from ubuntu 17.04 to 17.10, but now i can not use simplescreenrecorder. I have found a way around it: Use Xorg! but my experience is that wayland is faster. So does anyone know how i can use simplescreenrecorder in wayland?  It does not matter if i use sudo or not. It just does not work! I do not want an alternative, just SimpleScreenRecorder.

I want to record my screen, audio and webcam in Ubuntu 17.10.  I have tried the following software (from this thread ):   gtk-recordmydesktop: Missing web camera support xvidcap: Missing web camera support Kazam: Wont start Simple Screen Recorder: Missing web camera support VOKOSCREEN: Records only black screen Tibesti: Missing web camera support VLC: Missing web camera support, could not get it to record at all OBS: Will not start ScreenStudio: Will not start   Any suggestion for good software to do this?    After some digging I found out that if I start Ubuntu 17.10 in X Server instead of Wayland then Vokoscreen works and meets my requirements.


Can you prove directly from the definition of Ito integral (By that I mean limit of simple functions)   $$\int_{0}^{t}B(s)^{2} dB(s) = \frac{1}{3}B(t)^{3}-\int_{0}^{t} B(s) ds $$  So I started by writing $B(t)^{3} - B(0)^{3}= \sum_{0}^{n-1}B(s_{i+1})^{3}-B(s_{i})^{3}$ Where $0=s_{0}<s_{1}<...<s_{n}=t $ and $s_{i+1}-s_{i}$ tend to 0 as n tends to infinity. Where to go from here? Maybe bring in $(B(s_{i+1})-B(s_{i}))^{3}$.  Thanks!

I am trying to solve the exercises from the book Stochastic differential equations -An Introduction with applications by Bernt Oksendal and I am stuck on 1 question.  Prove directly from the definition of Ito's integral that   $$\int_0^t B_s^2 dB_s=\frac{1}{3}B_t^3-\int_0^t B_s ds$$  I have tried for a couple of hours but I simply cannot prove it . I would be grateful if somebody could help me out , even a hint would be very helpful


int main () {     int intarr [5] = {1,6,7,9,3);     char charr [7] = "Avneet";     std::cout << intarr << "\n";     std::cout << charr << "\n";     return 0; }   The first line this program prints is a memory address and second line, the whole string (Avneet). What's making the difference? One more question. In the int case, the address I get is what? The address of the entire array or just the address of the first element of that array.

I'm using C++ to understand how exactly pointers work. I have this piece of code using arrays, which I'm using just to understand how the equivalent works with pointers.  int main() {         int arr[10] = {1,2,3};         char arr2[10] = {'c','i','a','o','\0'};     cout << arr << endl;     cout << arr2 << endl; }   However when I run this, arr outputs the address of the first element of the array of ints (as expected) but arr2 doesn't output the address of the first element of the array of chars; it actually prints "ciao".  What is it that I'm missing or that I haven't learned yet about this?


My son is 2, going on three. He's doing really well during the day for potty training. He tells me when he needs to go.   How do I do this with him at night? Diapers are too small. He's in a six for diapers at night, and pulls-ups are more expensive then diapers.   I'm a first time mother and this is all new to me. I need help, please!

My daughter is potty trained during the day and is currently sleeps with pull-up. For the past few nights she has been peeing so much that she wets her bed. We have tried to restrict her liquid intake before bedtime, but that doesn't seem to have helped. Please help!


I am taking a quick course Python programming and I learn a quick way to initialize an array in Python by using the * operator. I am trying to extend it to a 2d case.  A = [[0]*3]*3   I then try to modify the [0][1] element to specific value but I found that all elements on the middle column are changed at the same time. For example,  A[0][1] = 888   It results in A[0][1] = 888, A[1][1] = 888, A[2][1] = 888. I really don't see how this happens. It seems like that all elements are linked and refer to the same address. But if I change the initialization code to   A = [[0,0,0],[0,0,0],[0,0,0]]   The problem is gone. I just wonder what is wrong with the first approach. Any fast way to initialize the array with certain value but without explicitly specify the elements?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


The following link shows 404.     When I click the job ad, it shows "Not Found"     App Version: 1.6.2.5 Device: iPhone 6 OS Version: Version 10.2 (Build 14C92)

The link to the recommended job in the app brings you to a page with the text: Not Found    Looking at the link it seems like after changing the URL structure in Stack Overflow Jobs they have not been updated in the apps.  For the job in the screenshot this is the used URL in the app:    The correct URL is:


I'm studying the comparison Hessian theorem and I not understand the following:  Let $(M, \langle\ ,\  \rangle)$ be a complete Riemannian manifold. Given $o\in M$, define $r=dist(o, \cdot)$. Then, for $r \rightarrow 0^{+}$,   \begin{equation} \operatorname{Hess}(r) = \frac1r\bigg\{ \langle\ ,\  \rangle  - dr\otimes dr \bigg\} + o(1). \end{equation}  I tried use Taylor's formula for $r$. That is, if $\gamma:[0,1] \rightarrow M$ is a smooth path, such that, $\gamma(0)=o, \ \gamma'(0)=v$ and $\gamma(t)=p$, for some $t\in[0,1]$, then $$ (r\circ \gamma)(t) = (r\circ \gamma)(0) + (r\circ \gamma)'(0)t + \frac12(r\circ \gamma)''(0)t^2 + o(t^2), $$ i.e.,  $$ r(p) = \langle \nabla r, v\rangle t + \frac12 \operatorname{Hess}(r)(v,v)t^2 + o(t^2). $$  So,  $$ \frac12 \operatorname{Hess}(r)(v,v) = \frac{r}{t^2} - \frac1t \langle \nabla r, v\rangle + o(1). $$  Since $r\rightarrow 0^{+}$, I believe that  $$ \frac12 \operatorname{Hess}(r)(v,v) = \frac{1}{r} \bigg\{ 1- \langle \nabla r, v\rangle \bigg\} + o(1). $$  But, this is no concluded the equality above.  Someone has some idea? Thank you!

I'm studying the section 7 ("Local Geometry in Constant Curvature) of chapter 5 of "Riemannian Geometry" written by Petersen.   At the beginning there is a Lemma which says how behaves the metric $g$ of a Riemannian manifold $M$ around a point $p$ in normal coordinates: $$ g_{ij} = \delta_{ij} + O(r^2). $$ where $r$ is the distance from $p$.  Then the book says in polar coordinates around $p$ any Riemannian metric has the form: $$ g = dr^2 + g_r $$ where $g_r$ is a metric on $S^{n-1}$.  We know also that the Euclidean metric looks like: $$ \delta_{ij} = dr^2 + r^2 ds^2_{n-1}, $$ where $ds^2_{n-1}$ is the canonical metric on $S^{n-1}$. Since these two metrics agrees up to the first order (thanks to the Lemma), we have that: $$ \lim_{r \rightarrow 0}g_r = \lim_{r \rightarrow 0}(r^2 ds^2_{n-1}) = 0 $$ and  $$ \lim_{r \rightarrow 0}\Big(\partial_rg_r - \frac{2}{r}g_r\Big) = \lim_{r \rightarrow 0}\Big(\partial_r(r^2 ds^2_{n-1})- \frac{2}{r}(r^2 ds^2_{n-1})\Big) = 0. $$  Everything is quite clear so far. But then the book says that since      $$ \partial_rg_r = 2\text{Hess}r$$   then we get  $$ \lim_{r \rightarrow 0}\Big(\text{Hess}r - \frac{1}{r}g_{r}\Big) = 0. $$  I don't understand why $\partial_rg_r = 2\text{Hess}r$. Any help would be really appreciated.  Another question: in the next theorem Petersen talks about space forms $S^n_k$. I know that they should be complete Riemannian manifold of dimnsion $n$ and constant sectional curvature $k$, but do you know where does he define them? What is $sn_k$?


I have to find the following sum, and I've solved up to a certain point but cannot proceed further. Any hints on how to proceed would be helpful.  $$\sum_{r=0}^{n}\frac{(-1)^r}{(r+1)^2}{n\choose r}$$   Consider the expansions of $(1-x)^{n}$ and $(1+x)^{n}$. $$\begin{align}\int_{0}^{x}(1-x)^{n}\mathrm dx&=\sum_{r=0}^{n}\frac{(-1)^{r}x^r}{r+1}{n\choose r}\\\frac{1-(1-x)^{n+1}}{n+1}&=\sum_{r=0}^{n}\frac{(-1)^{r}x^r}{r+1}{n\choose r}\tag1\end{align}$$ Similarly integrating $(1+x)^{n}$ from $0$ to $x$. $$\frac{(1+x)^{n+1}-1}{n+1}=\sum_{r=0}^{n}\frac{x^r}{r+1}{n\choose r}\tag2$$ Replacing $x\mapsto 1/x$ in $(2)$, the required summation is just the coefficient of $x^{0}$ in the product of $(1)$ and $(2)$, which simplifies to the following. $$\text{coeff. of }x^{n+1} \text{ in } \left[\underbrace{(1+x^{n+1}-x^{n+1})}_{=0}-(1-x^2)^{n+1}+\underbrace{x^{n+1}(1-x)^{n+1}}_{=1}\right]$$ Any hints on how to proceed further. Thanks.

How can I calculate the following sum involving binomial terms:  $$\sum_{k=0}^{n} \binom{n}{k}\frac{(-1)^k}{(k+1)^2}$$  Where the value of n can get very big (thus calculating the binomial coefficients is not feasible).  Is there a closed form for this summation?


I am unable to update/upgrade the packages because I keep getting the following errors.  W: GPG error: https://dl.winehq.org/wine-builds/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F W: The repository 'https://dl.winehq.org/wine-builds/ubuntu xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04 ./ Release: The following signatures were invalid: KEYEXPIRED 1553542768 W: The repository 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04 ./ Release' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: https://sourceforge.net/projects/usuproject/files/repository/skss/Release.gpg: Signature by key 08F210B54CB352AB21E9DDC08095DBD6EA79208A uses weak digest algorithm (SHA1)   I have tried solutions from several post from StackOverflow and blogs but none of them has worked so far.  Please let me know if any other information is required.  PS: I have tried the solutions  and

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


So, I insert this code into ubuntu,   $ sudo apt-get install -y build-essential linux-headers-`uname -r` dkms module-assistant   And it displays the error  E: Unable to locate package module-assistant   Do you know how to deal with this (Ubuntu 18.04.1)?

How do I get to the Universe Repository in supported versions of Ubuntu?


This morning, as I was walking to work, I noticed that the skies were different. It had a reddish tint.  What causes this?

At daytime the Sun's light is yellowish if not near white. Why when the Sun starts to go down that it's light turn more red. I don't think the earth's rotation is so rapid to cause a red shift.  Why isn't that effect as clear, at sunrise?


In the Crater Equation  $$ D=0.07C_f\left(\frac{g_e}{g}\right)^{1/6}\left(E \frac{\rho_a}{\rho_t}\right)^{1/3.4} $$ where $\rho_a$ is the density of the impactor, $\rho_t$ that of the object, $g_e$ Earth's gravitational acceleration, $g$ the gravitational acceleration of the object, and $C_f$ the collapse factor.  In this equation, how is the $C_F$ calculated?

I found this crater equation $$ D=0.07 \cdot C_f \cdot (g_e/g)^{1/6} \cdot (W p_a/p_t)^{1/3.4} $$  on a , where  $$ \begin{align} D &= \text{Crater Diameter}\\ C_f &= \text{Crater Collapse Factor (this is equal to 1.3 for craters > 4km on Earth)}\\ g_e &= \text{Gravitational Acceleration at the surface of Earth}\\ g &= \text{Acceleration at the surface of the body on which the crater is formed}\\ W &= \text{Kinetic Energy of the impacting body (in kilotons TNT equivalent)}\\ p_a &= \text{Density of the impactor (ranging from 1.8g/cm3 for a comet to 7.3g/cm3 for an iron meteorite).}\\ p_t &= \text{Density of the target rock} \end{align} $$ Can someone explain to me what the crater collapse factor is?


In the final battle of Avengers: Endgame, Tony Stark manages to steal the Infinity Stones from Thanos’s gauntlet and insert them in his own glove. We don’t see how he pries them loose from Thanos’s gauntlet, but it was done so smoothly that Thanos himself does not see or feel it happening.  We then see the stones hovering over the glove for a moment before they settle into place and give Tony vast power.  What was causing the hovering? Was it the same effect that allowed the stones to the stolen in the first place? Was the glove specially made for holding the stones? If so, when was the plan made for Tony to take the stones and why did they think he would be able to wield them (the point is made earlier that only the Hulk can do so without being destroyed). I thought Scarlett Witch might have been involved, but she had been dead until moments before and there was no chance for Tony to coordinate plans with her. So, basically, how did the stones end up in the glove?

In the final fight with Thanos, Tony Stark has a struggle with Thanos to get the gauntlet off him. Later it is shown that the stones are now with Tony on his suit.  The question is, how did he get it off the gauntlet and onto his suit?


I cancelled the Microsoft Windows 10 Reservation and uninstalled KB3035583, but Windows 10 is still trying to install.   After I uninstalled KB3035583 and restarted my laptop as instructed, I could not find KB3035583 to hide it.   Now Windows 10 is sitting in my Windows Update saying that it will install when I restart my computer.

It's been a time I didn't follow the list of which Windows 7/8/8.1 KBs I must skip since I don't want the unfinished Windows 10 at all. Moreover, I will still consider Windows 10 unfinished (-> unstable) until they release Windows Server 2016  The KBs list up today is scattered all over the Internet, and I am fearing to miss a single one of those.  As far as I know, some of the newer KBs are even old rebranded ones or re-re-re-pushed again and again. The goal is also to not use any external software or post-installation removal tools since I also intend to deploy a script that will block those KBs.  So the question is: can you tell me all the KBs you know that I must avoid?  Any details that can prevent "Telemetry", the "Windows Customer Experience Improvement Program" or prevent the resetting of Windows' settings about updates and privacy concerns is good too ! (Since they are even linked)   In case some cumulative updates (updates that regroup a pack of old ones) contains one of the listed KB, this is still relevant for the question here.  Remarks  There is of course other ways to disable the updates, which are still appreciated here but do consider that they represent a secondary objective of this post. Same applies for saying it's not the correct method to do it, and I do know the list will endlessly get longer.  The reason is that I still prefer doing it manually since I don't even want the files at all in my system. Furthermore, some of these updates had been re-pushed again and again for at least six times ! This is in fact due to the problems that those updates had caused and I don't want any risks to jeopardize my systems because Microsoft have plans for users with our without their consent by doing "Betas To Manufacture".  related:


I was wondering if there was a way to make the first line in a four-line interlinear gloss not conform to glossing alignment/gloss spacing. \documentclass[12pt]{article} \usepackage{gb4e,cgloss} \usepackage{leipzig}  \begin{document}  \begin{exe} \ex \label{label}\glll awúuassshiichih \\ awuua- ss- shiichi -h \\ inside.{\Noun}- {\Goal}- throw -{\Imp} \\ \glt `Throw it in [the] inside! [of the hoop]' %\citation \end{exe}  \end{document}  The first of the four lines is simply the example in the examined language. Thus, I do not need it to align with the spacing below. However, the word on the first line (/awúuassshiichih/) aligns with the first word on the second and third lines. This is fine, but it results in the second words on the 2nd and 3rd lines being pushed all the way to the end of (/awúuassshiichih/). Is there a way for me to avoid this? I am using the newest updates of TeXMaker, MacTeX2020, and MacOS. Thank you in advance!

I'm stumped with how I might use linguex to get an unglossed first line, then give a second line with morpheme breakdowns, the morpheme-by-morpheme gloss on the third line, and the free translation on the fourth line. This would be helpful for languages in which the morphophonology obscures the morphemes themselves. Anyone already done this?


In ArcGIS and QGIS you can add data on your map and it aligns perfectly even when the Coordinate Reference System (CRS) is not set. Both softwares inform the user that the CRS is not set and it should be done.   How the added data can align itself perfectly even if the CRS is not set?  After setting the correct CRS the data stays in exactly the same position and seemingly nothing changes. For me it seems that the CRS is originally correctly set in some unknown way.   Why does the user have to set the CRS manually again in both mentioned softwares, even the software knows the correct CRS already?

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


I'm trying to do an incremental backup of all files on my NAS box that where modified in the last 24 hours (or so, can be more flexible).  I'm using PuTTY to connect through SSH to a ReadyNAS 102 which has BusyBox v1.20.2 and uses Bash.  I origianlly used:  find . -mtime -2 | cpio -cm /media/USB_FLASH_2  And then tried:  find . -mtime -2 | cpio -o | { cd /media/USB_FLASH_2 && cpio -imd; }  which got me the error:  BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.  Usage: cpio [-dmvu] [-F FILE] [-H newc] [-tio] [EXTR_FILE]...  Extract or list files from a cpio archive, or create an archive using file list on stdin  Main operation mode: -t List -i Extract EXTR_FILEs (or all) -o Create (requires -H newc) -d Make leading directories -m Preserve mtime -v Verbose -u Overwrite -F FILE Input (-t,-i,-p) or output (-o) file -H newc Archive format.

I'm trying to do an incremental backup using cpio but it seems that the busybox version doesn't work the same as the normal one? This is what I've got so far:  find data/Backup -mtime -2 | cpio -cm media/USB_FLASH_2  I origianlly used:  find . -mtime -2 | cpio -cm /media/USB_FLASH_2  However, I've seen people say busybox doesn't like definitive paths while using cpio. Unsure about that though.   It returns an error that basically says I'm using cpio wrong. I can't find anyone using the busybox cpio to do things like this, does that mean i can't do it? I've looked at using rsync as well but again, it doesn't do what i would expect.  For reference I'm using PuTTY to connect through SSH to a ReadyNAS 102.  After using find . -mtime -2 | cpio -o | { cd /media/USB_FLASH_2 && cpio -imd; }  i get the output:   BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.  Usage: cpio [-dmvu] [-F FILE] [-H newc] [-tio] [EXTR_FILE]...  Extract or list files from a cpio archive, or create an archive using file list on stdin  Main operation mode:         -t      List         -i      Extract EXTR_FILEs (or all)         -o      Create (requires -H newc)         -d      Make leading directories         -m      Preserve mtime         -v      Verbose         -u      Overwrite         -F FILE Input (-t,-i,-p) or output (-o) file         -H newc Archive format


I am currently studying Kinematics and there's a little bit confusion about the definition of point object given in my course book NCERT(it is a standard textbook in India) which is as follows :  This approximation (of point object) is valid so far as the size of the object is much smaller than  the distance it moves in a reasonable duration of time.  But when I started solving the exercise,  one particular question requires the learner to differentiate weather an object in a particular situation can be considered as point objects or not  and there are two options which cannot (as far as I think) be differentiated into any of these categoriea by considering the definition, which are :  (c) a spinning cricket ball that turns sharply on hitting the ground. (d) a tumbling beaker that has slipped off a table.  Please give an proper and elaborated definition of point object and also the usage of this approximation in physics. Also, please clarify the advantages of this definition.

I can't seem to get the idea of point mass into my head. Why are equations of physics applicable on only point masses and should be altered while dealing with object that has a collection of points? We don't see point objects in the real world, so why consider using it in a physical science?


I've searched for questions like this, but all the cases I found were solved in a problem-specific manner, like using !g in vi to negate the regex matches, or matching other things, without a regex negation.  Thus, I'm interested in a “pure” solution to this:  Having a set of strings I need to filter them with a regular expression matcher so that it only leaves (matches) the strings lacking a given substring. For example, filtering out "Foo" in:  Boo Foo Bar FooBar BooFooBar Baz   Would result in:  Boo Bar Baz   I tried constructing it with negative look aheads/behinds (?!regex)/(?<!regex), but couldn't figure it out. Is that even possible?

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


I am DMing an homebrew DND 5e adventure. My players are going to defend a village from an orc tribe.  The village will have around 100 armed farmers. Players also gained support of a local dwarven mining expedition (around 30 dwarves), and freed an enslaved kobold tribe from the orcs (about 15 surviving kobolds).  The village will be defended by 100 farmers, 30 dwarves and 15 kobolds against 50ish orcs and 30ish goblins.   They don't know the exact numbers, I will adjust depending on how they will prepare for this.  I took a look at Unearthed Arcana mass combat, but I think it's unlikely to be fun, interesting or balanced for this type of battle.   Some flaws I've identified in Unearthed Arcana for my case:    With units compromising of max 25 units, BR ratings will be extremely low. Most units would be hit once and be dead, or not be hit and nothing happens. For example a unit of 15 orcs (BR 3) against a unit of 20 armed farmers (there is no CR for farmers.. but I would say 1/4, so 20 farmers will have 2 BR) would have a big chance of dying in one hit without causing any damage.  Having 2 or 3 BR will be a huge difference due to the fact that units will either deal 2 BR damage or 5 BR damage. So if a units have 3 BR it has a chance of surviving an attack, while with 2 BR the unit either takes no casualties or is wiped. Movement and speed is multiplied by 10, range is not. This means that archer units will be forced to melee very quickly.   Most of the post about mass combat either suggest to use Unearthed Arcana Mass  Combat rules (which I don't want to use for the reasons above), or design small encounters and objectives around the battlefield.  While the second option could work, I would like to let the players actually command small units around the battlefield. They will spend a couple of sessions preparing traps and strategies to help them in the battlefield (pitfall traps, fires in the fields, ambushes..), and I think they would enjoy to see their result in a "battle" environment.  Is there any system that can let the players play out the battle, more suited to my case?

For instance, a party of four player characters raise a force of 30 militia men to go take a bandit camp. When they get there the bandit camp has 40 men, and none of them notable.  For the sake of simplicity, both the 30 men and the 40 bandits are armed with long swords, and wearing leather armor.   Is there a proper way to handle combat between the 30 man militia and the 40 bandits while also incorporating our four player characters? If no "proper" way exists, is there a generally accepted "best" way?


I have a pair of quadratic equations in the form  $ax^2 + bx + cy^2 + dy + e = 0$  $fx^2 + gx + hy^2 + ky + l = 0$  and there should be a solution in the range $-2 \leq x,y \leq 2$ which I need to find programmatically.  I can eliminate one variable by squaring to get a quartic equation which I could solve numerically and substitute back, but I'm not sure about numeric stability and spurious roots.  Is there a better way of solving this?  Edit: This question  has answers with comments "In order to solve this degree 4 equation you need either some luck, or some patience " and "How would one programatically find the lines that constitute a degenerate conic?". That does not seem to demonstrate a better/simpler solution.

I have a system of two quadratic equations with unknowns $x$ and $y$:  $$a_{1 1} x y + a_{1 2} x^2 + a_{1 3} y^2 + a_{1 4} x + a_{1 5} y + a_{1 6} = 0,\\ a_{2 1} x y + a_{2 2} x^2 + a_{2 3} y^2 + a_{2 4} x + a_{2 5} y + a_{2 6} = 0,$$  where $a_{i j}$ are arbitrary scalars.  Is there an algebraic solution of the above system?


I’m using Ubuntu 14.04.  I’m having trouble getting a command picked up in my $PATH using sudo.  I have added this to my /root/.profile file  # ~/.profile: executed by Bourne-compatible login shells.  if [ "$BASH" ]; then   if [ -f ~/.bashrc ]; then     . ~/.bashrc   fi fi  export PATH=$PATH:/usr/local/rvm/rubies/default/bin  mesg n   I have logged out and logged back in as my user with sudo privileges.  Then I try and run the command within the $PATH but I get a “command not found” …  daveuser@mymachine:/home/rails/myproject$ sudo gem pristine --all sudo: gem: command not found daveuser@mymachine:/home/rails/myproject$ sudo echo $PATH /usr/local/rvm/gems/ruby-2.3.0/bin:/usr/local/rvm/gems/ruby-2.3.0@global/bin:/usr/local/rvm/rubies/ruby-2.3.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/    bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/rvm/bin daveuser@mymachine:/home/rails/myproject$ sudo which gem daveuser@mymachine:/home/rails/myproject$ which gem /usr/local/rvm/rubies/ruby-2.3.0/bin/gem   Notice that when I echo $PATH I get exactly the PATH where the “gem” command lives.  What else do I need to do to get my “gem” command recognized when I run the command as the sudo user?  Edit: The preserve-env didn’t work.  here’s what happened …  remoteuser@remotemachine:/home/rails/myproject$ sudo --preserve-env gem pristine --all [sudo] password for remoteuser:  sudo: gem: command not found   Edit 2: output of sudo -l  remoteuser@rtemotemachine:/home/rails/myproject$ sudo -l Matching Defaults entries for remoteuser on rtemotemachine:     env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin  User remoteuser may run the following commands on rtemotemachine:     (ALL : ALL) ALL

I have a program that is installed in a custom directory under /opt. To make it easier to run it, I edited my bashrc to add said directory to my path: export PATH=$PATH:/opt/godi/bin:/opt/godi/sbin  This works fine if I want to run the program without sudo. However, if I try to run it with sudo it fails with a "command not found" error. $ sudo godi_console sudo: godi_console: command not found  Inspecting the PATH variable after using sudo reveals that its not including the same PATH I have as a normal user: $ sudo sh # echo $PATH                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  Why is the PATH not the same? Am I doing something wrong? I'm on Debian Jessie, if it makes a difference. One thing I tried was to invoke /opt/godi/sbin/godi_console directly, passing the absolute path to the executable. Unfortunatelly, that didn't help in this particular case because godi_console itself depends on the PATH being correctly set.


I learned how to use bibtex from the LaTeX wikibook, found . They say that to compile a LaTeX file that uses bibtex, you need to call pdflatex once, followed by bibtex, followed by two more calls to pdflatex. I'm wondering: what's actually going on at each of these steps? Why do I need to run pdflatex and bibtex in that order?

As explained , if you need to compile a new document with bibtex citations, then you need to run latex three times, and bibtex once:  latex document bibtex document latex document latex document   Why can't latex figure this out itself, and just do what it needs to do? What is it doing in the later runs that it can't do in the earlier runs?


I'm using AndroidStudio with libGDX and want to share the score I got in my game to social networks (WhatsApp, Facebook, E-Mail, ect.). I even succeed in doing so, but I have a fatal problem. As help I used that article on GitHub:   I brought everything of that article in my code   and added this in my main Activity:   Leaderboard leaderboard;  public PlayState(Leaderboard leaderboard) {     super(nplatform);      this.leaderboard = leaderboard;      leaderboard.shareScore(); }   But I want to call the method, when clicking on a button in gameover-screen, so in update method not in constructor. But trying to do so   @Override public void update(float dt, Leaderboard leaderbord) {  leaderboard.shareScore();   // The code behind that isn't important  }   I got that error:  E/AndroidRuntime: FATAL EXCEPTION: GLThread 1152               Process: com.demo.game, PID: 29103               java.lang.NullPointerException: Attempt to invoke interface method 'void com.demo.game.NativePlatform.shareScore()' on a null object reference                   at com.demo.game.PlayState.update(PlayState.java:245)                   at com.demo.game.states.GameStateManager.update(GameStateManager.java:32)                   at com.demo.game.RiskyDemo.render(RiskyDemo.java:37)                   at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:459)                   at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1553)                   at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1253)   the links are all bringing me to the part where "leaderboard.shareScore();" is.  If there is a way to bring the code in update method, I would be very grateful  Thanks for helpful answers! :)

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


In the below 2.6.18 Linux Kernel (Red Hat) server, there is a lot of free memory, but I see some swap is used.  I always thought of swap as an overflow when memory has been depleted.  Why would it swap with about 7GB (50%) free memory?  Swappiness is 60 (default).  Meminfo output:  MemTotal:     16436132 kB MemFree:       7507008 kB Buffers:        534804 kB Cached:        2642652 kB SwapCached:      39084 kB Active:        6001828 kB Inactive:      2532028 kB HighTotal:           0 kB HighFree:            0 kB LowTotal:     16436132 kB LowFree:       7507008 kB SwapTotal:     2097144 kB SwapFree:      1990096 kB Dirty:             236 kB Writeback:           0 kB AnonPages:     5353644 kB Mapped:          45764 kB Slab:           330660 kB PageTables:      34020 kB NFS_Unstable:        0 kB Bounce:              0 kB CommitLimit:  10315208 kB Committed_AS: 14836360 kB VmallocTotal: 34359738367 kB VmallocUsed:    264660 kB VmallocChunk: 34359472735 kB HugePages_Total:     0 HugePages_Free:      0 HugePages_Rsvd:      0 Hugepagesize:     2048 kB

Using swap space instead of RAM can drastically slow down a PC.  So why, when I have more than enough RAM available, does my Linux system (Arch) use the swap?  Checkout my conky output below:    Also, could this be the cause of speed and system-responsiveness issues I'm having?  Output of free -m :  $ free -m              total       used       free     shared    buffers     cached Mem:          1257       1004        252          0         51        778 -/+ buffers/cache:        174       1082 Swap:          502        144        357


Problem Setting: $X_i$ is i.i.d. from a piecewise distribution which is $$ f_{\theta_1, \theta_2}(x) = \frac{1}{\theta_1+\theta_2}e^{-\frac{x}{\theta_1}}I_{[x>0]} + \frac{1}{\theta_1+\theta_2}e^{\frac{x}{\theta_2}}I_{[x \leq 0]} $$ I want to figure out the minimal sufficient statistics for $\theta = [\theta_1,\theta_2]$ and find the maximum likelihood estimation for both of them. I try to use the factorization theorem, but I don't know how to deal with the indicator functions in the joint pdf $f_{\theta_1, \theta_2}(X)$, where $X = \{X_1, X_2,...,X_N\}$.

I am trying to find the MLE of $\theta=(\theta_1,\theta_2)$ in a random sample $\{X\}_{i=1}^n$ with the following pdf $$f(x\mid\theta)= \begin{cases} (\theta_1+\theta_2)^{-1}\exp\left(\frac{-x}{\theta_1}\right) &,  x>0\\  (\theta_1+\theta_2)^{-1}\exp\left(\frac{x}{\theta_2}\right) &,  x\le0\\ \end{cases} $$ If I let $\bar{X}_1$ be the average of the $n_1$ values where $X_1>0$ and $\bar{X}_2$ the average of $n_2$ values where $X_i\le 0$ and $n_1+n_2=n$ Then the likelihood function is: $$L(\theta\mid  X)=\left(\frac 1 {\theta_1+\theta_2}\right)^n\exp\left(\frac{-n_1\bar{X}_1}{\theta_1}+\frac{n_2\bar{X}_2}{\theta_2}\right)$$ but I am having trouble maximizing this function.


Let $A$ be an $n\times n$ invertible matrix. Let $a \in \Bbb C$, let $\alpha$ be a row $n$-tuple of complex numbers and let $\beta$ be a column $n$-tuple of complex numbers. Show that $$(\det(A))^{-1}\, \det\left(\begin{bmatrix}a & \alpha\\ \beta & A \end{bmatrix}\right)=\det\left(a-\alpha A^{-1}\beta\right).$$ Can anyone show me how to prove this?

Let $A$ be an $n\times n$ invertible matrix. Let $a$ be a number in $\mathbb{F}$, let $\alpha$ be a row $n$-tuple of numbers from $\mathbb{F}$ and let $\beta$ be a column $n$-tuple of numbers from $\mathbb{F}$. Show that $$ |A|^{-1}\left|\begin{array}{cc}   a & \alpha \\   \beta & A \end{array}\right|=a-\alpha A^{-1}\beta $$  So far, I have the following: $$   \begin{pmatrix}     1 & 0\\     -\beta a^{-1} & I   \end{pmatrix}   \begin{pmatrix}     a & \alpha\\     \beta & A   \end{pmatrix}=\begin{pmatrix}     a & \alpha\\     0 & A-a^{-1}\beta\alpha   \end{pmatrix}\\   \left|\begin{array}{cc}   a & \alpha \\   \beta & A   \end{array}\right|=\left|\begin{array}{cc}     a & \alpha\\     0 & A-a^{-1}\beta\alpha   \end{array}\right|=|a||A-a^{-1}\beta\alpha|=|aA-\beta\alpha|\\   |A^{-1}||aA-\beta\alpha|=|a-A^{-1}\beta\alpha| $$  I don't know where to go from here...


This may be a silly question, but it popped into mind while reading this article on Scientific American:   One of the early bits of evidence for Mirror Symmetry in string theory, as I understand, is that a compact circle of radius $R$ produces identical physics to one of radius $1/R$. So suppose that the macroscopic part of the universe were nevertheless compact (say for the sake of argument a 4-torus). Would one be able to produce a big bounce by having the universe shrink asymptotically to zero in size, with the bounce occurring as the radii reach $R = 1$?  (This is perhaps a silly question; I'm mixing pop-science articles with pop-science takes on string theory, which is probably bound to produce mostly poppycock. Still, I'm curious if there is any sense in what came to mind.)  Edit: My question is really more about whether or not this would provide a possible model for a big bounce, not whether or not the big bounce is a valid theory.

I have several questions regarding the "big bounce" theory. It appears to be popular among LQG researchers. My questions are as as follows.  1) How one reconciles it with the fact that it is now experimentally established that the universe is expanding in an accelerating manner?  2) The entropy of the universe should have been very very low (maybe zero) at the time of the big bang/ big bounce. What was the entropy "before" that event? Was it even lower? If it was lower then doesn't that mean entropy decreases indefinitely? On the other hand if we accept the entropy was higher then doesn't that violate the second law of thermodynamics?  3) What observational evidence can confirm pre-bounce physics? According to GR there are some points near the bang/bounce where one simply can't easily define time in a meaningful way. Even for a quantum gravity theory, is it possible for any theory to extrapolate itself "before" the "bounce"? If there are no observational consequences after the bounce shouldn't one apply Occam's razor?


$sql = "UPDATE users SET ? = ? WHERE user_id = ?"; $stmt = $db->prepare($sql); $stmt->bind_param("ssi", $obj->{'property'}, $obj->{'value'}, $id);   It says "Fatal error:  Call to a member function bind_param() on boolean"  $obj->{'property'} and $obj->{'value'} are strings. $id is int.  What I am doing wrong?

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I am writing a thesis. I put all the references, including my own publications in a BIB file.   I want to create two sections like before:  \section {My Publications}  [1] my pub 1   [2] my pub 2  ...  [9] my pub 9  \section {References} #other reference  [10] other pub 1  [11] other pub 2  ...  The idea is to put all my references to the beginning of reference list. How could I do that in Latex?   Thank you very much

The question I want to ask is related to the answer of this question:  .   My aim is to separate my bibliography into two parts : one part for a personnal bibliography, and a second one for the regular bibliography.  To do that, I use the technique of the post I cited :  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage[style=alphabetic,maxnames=6,natbib=true]{biblatex} \bibliography{biblatex-examples}  % Variants of each could be added \newcommand{\firstname}{Donald~E.} \newcommand{\lastname}{Knuth}  \DeclareBibliographyCategory{byname}  \DeclareIndexNameFormat{byname}{% Test could be refined   \ifboolexpr{ test {\ifdefstring{\lastname}{#1}}            and test {\ifdefstring{\firstname}{#3}}               } {\addtocategory{byname}{\thefield{entrykey}}} {}}  \AtDataInput{%   \indexnames[byname]{author}}  \begin{document}  \section{Knuth's books}  \begin{refsection}  \nocite{*}  \printbibliography[category=byname,heading=none]  \end{refsection}  \section{Not Knuth's books}  \printbibliography[notcategory=byname,heading=none] \end{document}   The problem is that only the second bibliography appears, and when I remove the refsection, then all the bibtex entries of my input files are printed, separated as they should.  EDIT: the aim is to have all publications (even the ones not cited) by author knuth in the first section and all the other cited publications in the second one.


Is it possible to remove some of the default Google apps from Gmail? I'm only using the Drive and the Calendar apps, and would like to remove the other apps (YouTube, Google+, Photos, etc). By remove, I mean either hide from view or delete them entirely.  I have followed the guide provided on the , and the answer provided . However, these are about removing external apps. I would like to remove the ones by Google.  My reason for this is that the app view is too cluttered for me. More options is fine, but the way it's set up now is just... Annoying  to me.  The following image shows what I'd like to remove (or hide, if removal is impossible).

How to remove link for an application in new Google Launcher?


When I go to a fully automated restaurant in the USA (, ), am I supposed to tip?

Tipping customs in the United States can be surprising for people who travel there for the first time. It happened to me when I used a shuttle van service out of LAX a few years ago. To sum up the bias: I am French; a country where service charges are included and optional tips to waiters in restaurants are only a few euros.  Although I paid by credit card, the driver gave me a pen and a form on which I could write the tip amount. At that moment, I was really missing simple rules that could help me define how much a suitable tip could be.  Afterwards, I heard about different calculation tricks. Some people say it's 20%, others 18%; some suggest to double the sales tax.   Is the rule the same for all occasions to tip, or are there different amounts depending for a table service restaurant, the tip jar of a fast-food restaurant, a bar waiter, a taxi driver? When someone gives outstanding service although not used to get tips, how much is appropriate? For instance, we had an airport car rental shuttle bus driver calling a competitor rental company for us to see if they had cars available, since the rental company of that bus was sold out. Restaurants often add a gratuity for large parties. Are patrons expected to tip beyond this amount and how much?


I have a D3200 with 11 focusing points:    The newer and more expensive bodies have even more focus points like e.g. the D610:    I mostly work in Single-point AF mode, which means I choose one of the 11 points, move the one point over my subject, and focus.  Isn't it more comfortable to have fewer focus points wider spread over the whole field instead of like 50 in a small area in the center?    when I want to focus something in the left corner, there is no focus point and I have to set the focus with a different focus point and move my subject into the position with locked focus the more points I have, the more difficult to handle is the Single-point AF mode by switching between all of these points   Am I misunderstanding something about focusing?   Even in Dynamic-area AF mode or 3D-tracking which uses all of my 11 points, it won't be able to focus something in the corner.

I was looking into the new Nikon D600, which looks like a pretty compelling camera. I however noticed that its 39 AF points though quite a lot are all bunched up in the middle.  I am used to having AF points more spaced out, usually because I tend to use the Rule of Thirds quite a bit in my compositions. I haven't had the chance to see the camera out in person yet.  So, focusing on that one aspect only can someone with experience advice me how much of a nuisance that would be?


I have been using Ubuntu since a long time. I used to dual-boot it with Windows XP, which was very easy to set up via Wubi.   Now, with Windows 8.1,  I'm unable to install on DOSS partitions. How can I set up the dual-boot?

Is there any Windows installer (wubi) for Ubuntu 14.04 LTS?  When I mount the .iso file with Daemon Tools and run wubi.exe, it just asks me if I want to reboot (I think that's useful only when the .iso  is burned on CD), so is there no "real" installation?


By one line, what I mean is something like the output of this Ruby code: def ask()   puts("What is your name?")   name = gets().chomp   if (name == "Tilly")     puts("Awesome name!")   else     print("#{name} is a ")     index = 0     while (index < 50)       print("silly ")       index += 1     end     puts("name!")   end end  ask()  Basically, I don't want a new line for each time the word silly is printed. Here's the Python code: name = input("Welcome! Enter your name. ") print(name, "is a") i = 0 while (i < 50):     print("silly")     i = i + 1  print("name!")  How do I fix this? In Ruby, there is print() for situations like this, and puts() for everything else. Python doesn't seem to have anything like this. Please be gentle, this is my first ever Python program.

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I have two PCs and one micro SD card. What I did was copy some files (1.1 GB) onto micro SD card. But I replaced some files. So everything was perfect, until I tried to use the SD card for Raspberry Pi, when did not work.   I checked the micro SD card again, and most files had disappeared! I connected it to my mac and formatted the micro SD card. It was good for mac but not Ubuntu. It said that 1.1 GB is used! But there are no files.   I re-formatted again, but this time in Ubuntu. And now the total capacity has dropped, and it is unreadable in mac.   Why has this happened? Is there any hope that I can fix it?

I have a MicroSD card in a USB adapter (which plugs into a USB port on my machine, and acts like a USB flash drive). I was using Unetbootin to make this a bootable USB flash drive with Kubuntu. But I needed to cancel while it was working. So I killed the Unetbootin process from the console.  Since then, I can't format the MicroSD or delete the folder that Kubuntu made. I have also tried mkdosfs, with no success. I can't mount the drive anymore either? What can I do to make this drive usable again?  Trying to create a new partition table in GParted, as described in Eliah Kagan's answer, does not work. It fails with the error message "imposible crear tabla de particiones" ("unable to create a partition table").


I represented $x$ as $[x_1\ x_2\ ... x_n]^T$, and $y^T$ as $[y_1\ y_2\ ... y_n]$.  Multiplying them produces a matrix $n$x$n$: $$ \begin{pmatrix}x_1y_1&x_1y_2&\dots& x_1y_n\\ x_2y_1&x_2y_2&\dots& x_2y_n\\ \\ \\ \\ \\  x_ny_1& x_ny_2&\dots& x_ny_n \end{pmatrix}$$  (I apologize, I don't know how to format a matrix using LaTeX). :)  Obviously, for $n=2$, $n=3$ the determinant is $0$. I just don't know how to prove it for $n$.

(a) Let $x$ and $y$ be $n\times 1$ matrices, $n \ge 1$, and let $A=xy^T$. Show that $\det(A)=0$.  (b) Explain why the statment in part (a) is false if $n=1$.


I'm using an android phone (Samsung core prime) and all of my contacts numbers saved in 'google contacts'. There are no contacts in my 'phone storage' or 'sim card'. Now, my question is, if I reset my phone, what will happen with my contacts? Will it delete from google contacts or no? Please answer me

My HTC Desire S is working fine when I don't put my micro SD card in it (this card was free with the phone). But the phone keeps restarting every few minutes if I keep the memory card in it. By that, I could say that the phone is fine, but the issue can be either with the memory card or the phone not supporting memory card anymore. The phone and memory card worked completely fine for 8 months.  The thing is, if the same memory card is inserted in any other mobile, be it an Android or any other smartphone, that phone will not restart and the data is completely readable too. So, the memory card is fine. When I insert some other memory card on my phone, then my phone does not restart too. So that means the issue is with my phone & that particular memory card combo.    I am ready to uninstall each and every app from my phone, but will that solve my problem? Should I perform the factory reset? Will it solve my issue? What will I lose if will do the factory reset? Like: contacts, SMS, call logs, APN settings, etc. Any free software to backup all these?  But maybe I am going in the wrong direction. Maybe there is some easy way to get the phone and memory card working.


I am able to talk to Mirabelle but it wont let me accept the quest "Revealing the Unseen" is it a fixable glitch?

I'm stuck in the College of Winterhold questline because of a glitch between the quests "Good Intentions" and "Revealing the Unseen." After talking to the Augur of Dunlain, I return to the Archmage Savos Aren to finish the quest, and he gives me the Mage's Circlet and finishes "Good Intentions." The problem is, the next quest "Revealing the Unseen" doesn't start. He talks about Mirabelle Irvine and tells me to go talk to her, but since the quest hasn't been started, she doesn't have anything to say about the Staff of Magnus. I've tried reloading from before the quest many times and finishing it but still the same result. I've also tried doing other quests and coming back to try and finish it later, but still the next quest doesn't start. I'm on the PS3.  Anyone have a way of fixing this bug/glitch? Thanks in advance.


I have a blend that keep getting stuck in the rendering stage. Initially it would just crash after a few seconds of trying to render. I was using Blender 2.79 so U downgraded to the stable 2.78. I have also opened a couple other blends that I have done in the past and it worked without an issue. I have also updated my drivers, I've changed the picture output folder and the display to full screen from image editor suggested by some people on forums. I've lowered and raised the tile count, I've turned down the threads to one or two instead of the autodetected four. I'm using GPU compute, but I've also switched to CPU. I've also tried switching to blender render. Nothing seems to work, on this particular blend.   I've also tried scaling down the image to a smaller size so that the details are cut in half. Still nothing. I've been able to render other images with more vertices that this one without issue. Below are some pictures of it in solid and rendered mode.   [![enter image description here][1]][1]    If I just let the render run I get the system fluctuating in memory and CPU resources to finally output this error:    Any help would be greatly appreciated.   Edit:  It has been stated that this may be a duplicate of another question. In looking at that question the answer does not satisfy this query. The solution presented in that question was to purchase a more powerful graphics card. As I am running a much more powerful card than the one mentioned in the question, I do not believe that solution to be the case here. For context I am running a GTX 1060 with 14214Mb of vram. The other card was only running 1024bm of vram using a GTX 750.

I've been struggling a little with Cycles and my GeForce GTX 750 graphic card. Most of the time it works well, but when I try to work with scenes that have custom shaders (like a skin shader with multiple textures, including for displacement), I get an error, both on the viewport and at rendering:     Cancel | CUDA error: Out of memory in cuLaunchKernel(cuPathTrace, xblocks, yblocks, 1, xthreads, ythreads, 1, 0, 0, args, 0)   Or something like that. Here's a screenshot so you can check it out:    I'm using a PC and Windows 7, with 8Gb of RAM. I can't render this scene with GPU, but using CPU, it renders ok.  My question is: What is causing this issue? I have the latest drivers installed for my graphic card, so I have no idea what this is.


Looking for a app for ubuntu 14.04  I need a app to download the songs and video from  youtube.com.  Is there any way to get the sign of download on youtube while watching any favourite songs or videoes?  In my friends computer the download option comes on youtube while watching any movie or song on youtube.com,  he was using Windows7. But I am using Ubuntu 14.04 LTS.  By clicking on download, he was able to download that songs from youtube directly?  I need a best app or website in Ubuntu to download the songs from youtube.com

What are instructions on how to download videos from YouTube?    Notice: Terms of Service Violation  Please be aware that by following any of the answers below, you will be violating YouTube's . In particular, from Section 5.B.:     Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.


I want to create a shape that looks like this:    I have the following code  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}[     inout/.style={       rectangle,       draw,       minimum size=1cm,       inner sep=2pt     }   ]     \node[inout] (d1) at (1,1) {in}; \end{tikzpicture}  \end{document}   which produces this:    How do I add the lines? This is meant to be a custom shape for a circuit.  Thanks!  Note: I looked at the  of this question and didn't find it very helpful. The question itself wasn't very related (it didn't answer my line question in a way I could understand) and the documentation it provided I found very difficult. If someone could provide a simple explanation, that would be really helpful.

I would to define a new "T" shape (i.e. the red and green shapes in the following image) so that I can then draw with TikZ the diagram below.    Unfortunately I cannot figure out how to do. To be honest, I have read the section "Declaring New Shapes" from the PGF manual and I am completely lost with the low level pgf commands.     How could I do? Suggestions on any direction are welcomed.


I have had two monitors for my Late 2016 MacBook Pro running the latest updates, a 1080p one and now a 4K monitor. Both have had the same issue described below. When I connect my external monitor to my laptop (using HDMI to USB-C) the monitor is turned off, however, it is detected as I can move my cursor onto the other screen (though I can't see the cursor as the monitor is turned off). When I turn the monitor on it does not display my other screen as it should but turns itself off again. This cycle of me turning the monitor on and then it turning itself off happens about 5 times until seemingly randomly it displays as it should my desktop background and any windows I have open. On further experimentation if I plug a USB-C hub into my laptop and then connect an HDMI cable from the hub to my external monitor the problem does not occur at all. This is becoming very frustrating and I can't seem to solve the issue. Any help would be greatly appreciated.

MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter:


I can't figure a way to work this one out, I know it has to go to 1. this is the best I could do:   $0^0$ $\le$ $n^\frac{-1}{\sqrt{n}}$ $\le$ $n^\frac{1}{n}$   but I feel like that's cheating. It is causing problems because $n^\frac{1}{\sqrt{n}}$ $\ge$ $n^\frac{1}{n}$ and $n^\frac{1}{\sqrt{n}}$ $\ge$ $n^\frac{-1}{n}$. so I can't find a way to sandwich it for squeeze theorem.   I know of the Binomial expansion trick for $n^\frac{1}{n}$ but that gives two lower bounds since $n^\frac{1}{\sqrt{n}}$ ≥ $n^0$ and  $n^\frac{1}{\sqrt{n}}$ ≥ $n^\frac{1}{n}$ ? since n ≥ $\sqrt{n}$ => $\frac{1}{\sqrt{n}}$ ≥ $\frac{1}{n}$. I can't seem to find a upper bound I know converges to 1

How can prove limit of $n^{\frac{1}{\sqrt{n}}}$ is 1 without using advanced theorem?  I think we have to make sequence which is greater than $n^{\frac{1}{\sqrt{n}}}$ and its limit is also 1 with just simple things (like $n^{\frac{1}{{n}}}$).  But it seems like impossible to me. :-(   -----edit-----  In this problem I can't use continuitiy or limit of function.  What I can use is just limit of sequence.


Is there a web-based stock query service that allow me to look up for Stocks that match certain criteria?  E.g. I want to find ALL stocks that are on 52-week high, with an Avg-daily volume greater than 1 million, and that cost between 5 and 10.  Thank you.

I am looking for a free way to get a large amount of data on the prices of stocks.  I am not a trader or anything like that so it wouldn't be worth it to pay for a service to give me stock prices. I have a mathematics background and I would like to make my own determinations of what stocks to invest in. To do this, I need some data.  Is there any free place online to download data on various stock prices over the last few years?  I would probably like to do this for a few stocks so it would be good if it could somehow be in a text file or a csv rather than having to type it out myself.  I know there are websites that crunch the numbers for you but I would prefer to do it myself.  EDIT: If there aren't any free services, where should I look for cheap ways to get the data I need?


<script>      $(document).ready(function() {      $('#example').DataTable({      dom: 'Bfrtip',                buttons: [         {             extend: 'print',         }     ]                 });   });   </script>   This is  the script I have got from jquery data table documentation which is printing properly my jquery data table. Just I want to remove the header whixh is getting printed alongwith this data. How can I remove it ?

I have a link on my webpage to print the webpage. However, the link is also visible in the printout itself.  Is there javascript or HTML code which would hide the link button when I click the print link?  Example:   "Good Evening"  Print (click Here To Print)   I want to hide this "Print" label when it prints the text "Good Evening". The "Print" label should not show on the printout itself.


typedef struct Sym_item{                         char       *name;                                                symbolType       type;                                       char            *data;                                               bool             fce;                                                    TList           *args;                                           bool             init;                         tHTable         *ptr_loctable;  // .. this is conflicting                         char            *class_name;                                         bool             isstatic;                                           struct Sym_item *nextptr; }iSymbol;   typedef struct Hash_table{                         iSymbol         *ptr; }Hash_item;   typedef Hash_item tHTable[Hash_table_size]; // .............. this is conflicting   I am using this structure iSymbol which contains a tHTable which is defined lately, but I need it that contains also the array of the symbols as this structure.   This says compiler:    error: unknown type name ‘tHTable’<br>   tHTable *ptr_loctable;

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I want to draw this graph in overleaf.  I tried Many times but I am unable to do so. Kindly help me out how to draw this graph. Thanks

I am trying to create a timeline similar to the one displayed below, it does not have to be exactly the same. I already tried looking at other threats about timelines, which made me to believe I am probably gonna have to use the Tikz package. But other than that, they didn't really help me much further.     This is what I tried:  \documentclass{article} \usepackage{tikz} \begin{document}          \begin{tikzpicture} % draw horizontal line    \draw[ultra thick, ->] (0,0) -- (\ImageWidth,0);  % draw vertical lines \foreach \x in {2,4,6,8,10,12} \draw (\x cm,3pt) -- (\x cm,-3pt);  % draw node \draw[ultra thick] (4,0) node[below=3pt,thick] {t-2} node[above=3pt] {}; \draw[ultra thick] (6,0) node[below=3pt,thick] {t-1} node[above=3pt] {}; \draw[ultra thick] (8,0) node[below=3pt, thick] {t} node[above=3pt] {};              \draw[ultra thick] (10,0) node[below=3pt] {t+1} node[above=3pt] {};  \draw [black, ultra thick ,decorate,decoration={brace,amplitude=5pt},        xshift=5pt,yshift=-4pt] (4,0.5)  -- (8,0.5)         node [black,midway,above=4pt,xshift=-2pt] {\footnotesize Training period};   \draw [ black, ultra thick,decorate,decoration={brace,amplitude=5pt},        xshift=8pt,yshift=-11pt] (10,-0.5) -- (8,-0.5)        node [black,midway,below=4pt,xshift=8pt] {\footnotesize Testing period}; \end{tikzpicture}  \end{document}   It ended up looking as follows:   Which is rather far from my desired result.


Why is "high" pronounced "hiy" but is not spelled as the latter, but the former?  Wouldn't "high" be read as "heeg-h" or "haig-h"?  The other possible duplicate's examples all have a "t" prefixing, and also, the accepted answer for that question does not address why GH is occasionally pronounced out.   Example's of other words starting with "GH" is Ghillie, or ending with GH as in Edinburgh.


Law of conservation of energy states that energy cant be created nor destroyed.I dont understand how it is applicable for a object moving under influence of gravity.If some force has been applied on an object due to the influence gravity making the object gain energy as kinetic or pottential then from where does the energy come from?  How is this gravitational pull produced between matter?  I have a serious doubt in this and sorry if i made a blunder question

I would like to know where gravity gets its energy to attract physical bodies?  I know that the law of conservation states that total energy of an isolated system cannot change. So gravity has to be getting its energy from somewhere, or else things like hydropower plants wouldn't be able to turn the power of the falling water into a spinning rotor.  Just to be clear, Lets create an example:  Lets say we have two objects with equal mass close to each other. So gravity does its job and it pulls each other closer, this gets turned into kinetic energy. This is where I'm lost. According to the law of conservation energy can't be created or destroyed and the kinetic energy comes from the gravitational pull so where does the gravitational pull gets its energy.  If that energy isn't being recycled from some where else then that means you have just created energy, therefore breaking the law of conservation.


I am interested in computing the sum of all digonal kth order minors of a matrix.   By this I mean that I have an $n\times n$ matrix $A$, and I define the diagonal kth order minors as determinants of the matrices $A_{I,I}$ where $I$ is some ordered set of $n-k$ non-repeating integers between $1$ and $n$. I then want to compute \begin{equation} \sum_{I} \det A_{I,I}, \end{equation} over all distinct integer sets $I$ with values between $1$ and $n$.   I can of course compute these minor determinants 1 by 1 and sum but I was wondering if this quantity reduces to some property of the full original matrix $A$, or whether it can be computed via matrix multiplication and traces, rather than computing a large number of determinants.  For some context: I am a physicist computing free-fermion correlators which can be computed via determinants. The expression I am trying to compute corresponds to tracing over all intial and final states with a fixed fermion filling.

Is there any formula for the sum of principal minors? (note: $i^{th}$ principal minor which results from omitting the $i^{th}$ row and $i^{th}$ column)


How to install ubuntu in my laptop?  Where from I can get it? Is it free?  What apps or software are required? I am using HP pavilion with Windows 8.1 Original Ver.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I'm looking to use the P-channel MOSFET approach to reverse polarity protection as described  and . Basically this picture:    I've seen that circuit topology used, for example, , but I'm not convinced that schematic is accurate (maybe you can comment). The way I see it, I can either connect the Drain-pin to the Input Voltage, or the Source-pin to the Input Voltage. Does it matter which way I connect the P-channel MOSFET, or is the protection symmetric about the drain-source channel and all that matters is that the D-S channel is in series with the input voltage?

I read somewhere that this can be used for the reverse polarity protection in the circuit. But I am quite confused with its operation. Can somebody help me with this.         – Schematic created using


I have a laptop with a broken screen, but I have physical access to it. I also don't have any HDMI capable screen available.  My question is, how can I install Ubuntu without any screen?   Would it be possible somehow to connect another computer or a smartphone e.g. via USB to the laptop to control the installation?

This is tricky. I would like to install Ubuntu on a machine that is intended to work as server, and for some reason I do not have an option to connect a screen to it.  I expect this may be similar to remote installation. However, there is currently no OS on that machine, so I will have to set up everything from scratch.  On the other hand, I do have a physical access to that machine. Therefore I can get it to boot from a CD/USB. But that's not enough.  Is there a way to do such installation remotely? Is there a version of Ubuntu image that comes with a SSH server preinstalled, and starts it once booted, so that I can boot the machine with such image, connect to it via SSH and process the installation from a different computer?  If not, what other options do I have?


I have installed a ruby gem called Redcar, which is launched from the command line.  When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing command line work.  The shell I'm using is the GITBash shell from MySysGit.  I found a Redcar.bat file which is meant to launch Redcar as a shortcut, I presume, but I don't want the extra command prompt window to open whenever I launch the BAT file.    How do I just run the BAT without seeing the prompt?

On Windows XP, can I run a batch (.bat or .cmd) file, via a shortcut, without a "black window"?


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

Is output buffering enabled by default in Python's interpreter for sys.stdout?  If the answer is positive, what are all the ways to disable it?  Suggestions so far:   Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)   Is there any other way to set some global flag in sys/sys.stdout programmatically during execution?


The reputation thresholds to access review queues on beta sites constantly change - not an issue in itself, but there appears to be a bug around the displaying of the "review" link on these sites.   For example, on Software Recommendations, at 255 reputation I can currently access the Close and Reopen queues. However, I do not have a "review" link in the top bar:    If I browse to /review manually, I'm allowed to work through the queues, however since the review link is missing some people may not notice they're actually able to review anything.  Since during beta, this kind of activity is important in defining and fine tuning the scope of the site, in addition to bringing attention to potential problems, I feel that this is an important issue.

I committed and joined  in private beta. As per private beta privilege page casting close and reopen votes requires only 1 reputation. So anyone is able to access close votes and reopen votes review queues. But there is no link of the review page in the top bar or anywhere. So I thought I am not able to access any review queue. I opened the review page by typing the URL manually (to see review statistics for curiosity). But I found that I can access close & reopen votes review queues.        Probably I won't be able to access any review queue if I have less than 350 and the site goes to public beta. But during private beta off topics, unclear, or closable questions are likely to come. So it is very important to close/reopen them during private beta.  So can we please add the "review" link in the top bar if I am able to review some queues?


I installed Ubuntu 18.04 and used it for 5 months with no problems.  Since 2 weeks ago, suddenly the system freezes. The mouse pointer is immobile and running processes (e.g. VLC) freeze. I feel that some update had created problem.  I reinstalled latest Ubuntu 18.04. It worked fine for 2 days, then same problem came back.  Keeping Alt+Print Sreen, pressed REISUB (as CapsLock key also had frozen), with no result.  Can anyone help me out? or should I go back to older Ubuntu?

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


An array in C# has some space overhead: it stores its sync block, its array type, possibly its element type (for reference types), its length...  Some quick tests indicate that the array's elements actually start at a cache line boundary. For example, in a byte[] it is faster for two separate threads to simultaneously update index 63 and 64, respectively (as they are on different cache lines), than for them to update index 62 and 63 (as they are on the same cache line).  I'm curious to know where the metadata is stored. Does it go at the end, possibly residing in the same cache line as the last few elements? Or is it stored elsewhere altogether?  This could be useful when trying to cache-optimize the usage of some array. If the metadata is stored in a separate cache line, then there is probably nothing we can do to avoid that extra cache line fill whenever the array is used. However, if it is stored in the last cache line, then the array size could be optimized to leave precisely enough room for the metadata, and the elements in that cache line could be probed first, as it is available anyway.

What is the memory layout of a .NET array?  Take for instance this array:  Int32[] x = new Int32[10];   I understand that the bulk of the array is like this:  0000111122223333444455556666777788889999   Where each character is one byte, and the digits corresponds to indices into the array.  Additionally, I know that there is a type reference, and a syncblock-index for all objects, so the above can be adjusted to this:  ttttssss0000111122223333444455556666777788889999         ^         +- object reference points here   Additionally, the length of the array needs to be stored, so perhaps this is more correct:  ttttssssllll0000111122223333444455556666777788889999         ^         +- object reference points here   Is this complete? Are there more data in an array?  The reason I'm asking is that we're trying to estimate how much memory a couple of different in-memory representations of a rather large data corpus will take and the size of the arrays varies quite a bit, so the overhead might have a large impact in one solution, but perhaps not so much in the other.  So basically, for an array, how much overhead is there, that is basically my question.  And before the arrays are bad squad wakes up, this part of the solution is a static build-once-reference-often type of thing so using growable lists is not necessary here.


There's an option "This question only pertains to a specific site" when flagging "off-topic".  Is it possible to add a box which asks you about the site that the question belongs to, and auto posts the site recommendation as a comment?  Is it also possible if a majority of off-topic votes think that the question belongs to the same specific site, it auto move it to the site? It seems unclear when the close message only says "this question doesn't power the SE network".

Currently, the only way to ask for something to be migrated to a site that isn't part of the standard migration path is through a custom mod note.  I currently have two active custom mod notes on Stack Overflow that ask for migration that are not standard targets for SO.  I believe the questions could be better answered on another site.  Fortunately, or unfortunately, the questions have been answered, and answers have been up voted and accepted. At this point, a week and a half later, migrating either of the questions would be disruptive to both communities and not necessarily produce a better answer (they've got accepted answers).  The unfortunate part is I really do believe that both questions could have gotten better answers and more attention on another site.  What I would like to see is a more streamlined way to flag for moderator attention for migrations.  The UI would look something like this:    This would allow people to find the proper site easily.  No more "Migrate this to Mathamatica.SE" because, well, that doesn't exist.  Something that I didn't do on this mock up is add a link to the corresponding help/on-topic page for the target site.  Something people could check and click before hitting the submit button.  I don't have this quite right again, because while that shows a "closing for off topic", this is a flag and not a vote to close.    The "flag for migration" is only one part of this though.  The other part would be to make another flag queue style thingy for moderators in which they could look at just migration flags created through the above interface.  By providing the mods with a "just migration" view into the flags, questions that should be migrated can be quickly identified from the multitude of existing flags and handled promptly before the migration would be disruptive.


I'll be at my uncle's house just in case you need to reach me.   I'll be at my uncle's house should you need to reach me.      Could you tell me what is the difference between those?


I only know that the rational and irrational are together called real numbers. Rational numbers can be written in the form $\frac {p}{ q}$ ,where $p \in \mathbb Z$ and $q \in \mathbb Z$.  Are there any additional information which I left? If 'yes' then please tell me the alternative definitions.How to answer it in an interview? Thank you in advance.

I've found lots of resources that say this is a real number if it's not rational, but what is a real number, really?  I mean what is the definition of a real number?  If nothing else, anyone know of a resource where I could find out myself?  Thanks!


I'm using this formula in my main worksheet in cell N3:   =IFERROR(INDEX(Totals!M$3:M$33,MATCH($B3,Totals!$K$3:$K$33,0)),0)   Details:   $B3 lists first/last names on main worksheet. Totals!$K$3:$K$33 lists first/last names on "Totals" worksheet. M$3:M$33 contains a numbers.   I'm looking for a way to count the numbers in column "M" if the names in column "K" match/are duplicates.  Row 3     "K" = David / M = 39  Row 4     "K" = Angela / M = 53  Row 5     "K" = Angela / M = 3  Row 6     "K" = Paul / M = 61  Row 7     "K" = Betty / M = 49  Desired result: If $B3 = Angela, then "56" is the result found in cell N3 on the main worksheet.

I have a simple spreadsheet, two columns "Amount" (col Q) and "Account" (col O).  I want to get the sum of the "Amount" column where the corresponding "Account" forum equals "Paypal".  This is as far as I can get!  =SUM(Q:Q)*(O:O="Paypal")