I'm having issues with the placement of the values in my tree, i'm not quite sure whats the cause of it. Any help is appreciated.  \documentclass{article} \usepackage{mathtools} \usepackage{newfloat}  \usepackage{caption} \usepackage{subcaption} \usepackage{tikz} \usepackage{tikz-qtree}  \begin{document}  \begin{figure} \centering \begin{tabular}[t]{|c|c|}\hline   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 ][.2 ][.1 ]]     \caption{i=1, (Q = \{5, 2\})}   \end{subfigure} &   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 ][.5 ]][.2 ][.1 ]]     \caption{i=2, (Q = \{2, 6\})}   \end{subfigure} \\\hline   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 ][.5 ]][.2 ][.1 ]]     \caption{i=3, (Q = \{6, 4\})}   \end{subfigure} &   \begin{subfigure}{.5\textwidth}     \centering     \Tree[.1 [.5 [.5 ][.6 [.8(GOAL) ]][.5 ]][.2 [.4 ][.2 ][.1 ]][.1 ]]     \caption{i=4, (Q = \{4\})}   \end{subfigure} \\\hline \end{tabular} \caption{BFS S,R,L} \end{figure}  \end{document}

I have a graph. This is my code.    \documentclass[10pt]{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows,patterns}     \pagestyle{empty}      \definecolor{ttqqcc}{rgb}{0.2,0,0.8}     \definecolor{ffqqtt}{rgb}{1,0,0.2}     \definecolor{ttqqff}{rgb}{0.2,0,1}     \definecolor{uququq}{rgb}{0.25,0.25,0.25}      \begin{document}      \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]      \draw[->] (-3.63,0) -- (3.67,0);     \foreach \x in {-3,-2,-1,1,2,3}       \draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt)          node[below] {\footnotesize $\x$};     \draw[color=black] (3.48,0.07) node [anchor=south west] { $x$};      \draw[->] (0,-1.93) -- (0,5.57);     \foreach \y in {-1,1,2,3,4,5}       \draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt)          node[left] {\footnotesize $\y$};     \draw[color=black] (0.06,5.19) node [anchor=west] { $y$};      \draw (0pt,-10pt) node[right] {\footnotesize $0$};      \clip(-3.63,-1.93) rectangle (3.67,5.57);     \draw[pattern color=ffqqtt,pattern=north east lines,fill opacity=0.1, smooth,samples=50,domain=0:1.0]      plot(\x,{\x^4-4*\x^2+3}) -- (1,0) -- (0,0) -- cycle;     \draw[pattern color=ttqqcc,pattern=crosshatch,fill opacity=0.1, smooth,samples=50,domain=1.0:1.7320508075688772]      plot(\x,{\x^4-4*\x^2+3}) -- (1.73,0) -- (1,0) -- cycle;      \begin{scope}[xscale=-1]     \draw[pattern color=ffqqtt,pattern=north east lines,fill opacity=0.1, smooth,samples=50,domain=0:1.0]        plot(\x,{\x^4-4*\x^2+3}) -- (1,0) -- (0,0) -- cycle;     \draw[pattern color=ttqqcc,pattern=crosshatch,fill opacity=0.1, smooth,samples=50,domain=1.0:1.7320508075688772]        plot(\x,{\x^4-4*\x^2+3}) -- (1.73,0) -- (1,0) -- cycle;     \end{scope}      \draw[smooth,samples=100,domain=-3.6342419080068153:3.665758091993186] plot(\x,{(\x)^4-4*(\x)^2+3});      \fill [color=uququq] (-1.73,0) circle (1.5pt);      \fill [color=uququq] (-1,0) circle (1.5pt);      \fill [color=uququq] (1,0) circle (1.5pt);      \fill [color=uququq] (1.73,0) circle (1.5pt);      \end{tikzpicture}     \end{document}   When I see the DVI output DVI, I have    And if I look at the PDF file, I have


Let $T$ be totally transcendental theory. (stable in particular)  I want to prove that $a\overset{\vert}{\smile}_{A}b$ iff $MR(a/A)=MR(a/Ab)$   Well we know that since $T$ is totally transcendental then every formula and in prticular every type has a Morely Rank. So we can talk about the problem.   And $T$ is stable so forking and dividing coincide.   By that i managed to prove the "$\Leftarrow$" direction, by showing that if $tp(a/Ab)$ forks over $A$ then $MR(a/A)>MR(a/Ab)$.   But i can't manage to prove the second direction. I though maybe to assume that $MR(a/A)>MR(a/Ab)$ and take $\varphi \in tp(a/A)$ and $\psi \in tp(a/Ab)$ s.t $\psi(\mathfrak C)\subseteq\varphi(\mathfrak C)$ ($\mathfrak C$ is the monster) with $MR\psi<MR\varphi$. Than to find some how a way to show that $\psi$ divides.

given monster model of $\mathcal{M}\models T$ in $\mathcal{L}$, $p\in S_n(A)$ and $p\subseteq q\in S_n(B)$ where $A\subseteq B$,   $q$ does not fork over $A$ iff $MR(p)=MR(q)$(MR : morley rank).  $\leftarrow$ is easy to prove by the statement "if $q$ forks over A then $MR(q)< MR(p)$." I saw proof of $\rightarrow$ which premises that both concepts(nonforking extension and same morley rank) satisfy some unique properties like invariance under automorphism, local character, transitivity, etc. I just want to know whether some simple direct proof exists. What I tried was zorn's lemma for $P=\{q'\mid p\subseteq q'\text{(partial) type in $\mathcal{L_B}$}, MR(p)=MR(q'), q' \text{ does not fork over A}\}$ but failed to show maximal element is complete type in $S_n(B)$.


I wanted to make a heavy cream substitute.   Here's what I tried:   Melted butter and stored it in a cup.   The pot I melted it in was not washed.  Used the same pot to boil milk.   Afterward, the milk looked yellowish with bubbles on it.  Strained the milk and put it in the refrigerator until it's cool. Added the melted butter to the milk.   They wouldn't mix. They stayed separate like oil and water.     My questions:   Why wouldn't they mix? And how do I get them to mix? Why did the milk look that way? Was it because of the remaining butter in the pot? How can I make use out of this milk and butter?

Good day. I recently made a homemade double cream using 1.5 cups of whole milk and 150 grams of unsalted butter. I followed most recipes I saw online which started with melting the butter so that it becomes liquid and not letting it boil and mixing it with the milk. However, I had several problems as I placed the melted butter in cold milk which lead to the butter forming again which in turn made it difficult for me to mix with a hand mixer. What I did next was I placed the mixture in a saucepan and let it warm over low heat. When the butter turned liquid again and the milk starting to become warm, I took it off the pan and back to my mixing bowl then used a hand mixer for about two and a half minutes.   When the mixture looked mixed to me, I placed it in a container and placed it in the fridge to set. However, upon returning to it a couple of hours later, the double cream separated, the butter formed at the top part and the milk was at the bottom.   My question is, can I still turn this disaster of a double cream and make it usable for cooking/baking purposes? Or should I toss it to the bin and start on a new one? (and this time make sure that the milk is in room temp before mixing the two components)


I was looking over some code the other day and I came across:  static {     ... }   Coming from C++, I had no idea why that was there. Its not an error because the code compiled fine. What is this "static" block of code?

My question is about one particular usage of static keyword. It is possible to use static keyword to cover a code block within a class which does not belong to any function. For example following code compiles:  public class Test {     private static final int a;         static {         a = 5;         doSomething(a);     }     private static int doSomething(int x) {         return (x+5);     } }   If you remove the static keyword it complains because the variable a is final. However it is possible to remove both final and static keywords and make it compile.   It is confusing for me in both ways. How am I supposed to have a code section that does not belong to any method? How is it possible to invoke it? In general, what is the purpose of this usage? Or better, where can I find documentation about this?


Given a physical quantity represented by a function $f(t,x)$ what is (if there is any) the actual meaning of the third derivative of $f$, $\frac{\partial^3 f}{\partial t^3}$ or $\frac{\partial^3 f}{\partial x^3}$

(Originally  by AJAY.)  What is the geometric, physical, or other meaning of the third derivative of a function at a point?  If you have interesting things to say about the meaning of the first and second derivatives, please do so.


I need to use this raster data to extract elevation for points and polygons, but I am really confused about the unit of the pixel values    The pixel values are between 49 and 252, and oceans have higher pixel values than some land areas. How should I interpret the pixel values and convert them to meters?

I have a DEM built from LiDAR data and the file extension is .tif. When I open this file in ArcMap it seems to be a shaded relief DEM (see the screenshot below).  It happens I want to visualize the DEM colored by elevation. How should I proceed?


I have an UITextView that loads different text depending on the route the user has taken in order to get to the view with the text on it.  How do I dynamically adjust the height of the UITextView depending on its content using Swift?

Is there a good way to adjust the size of a UITextView to conform to its content? Say for instance I have a UITextView that contains one line of text:  "Hello world"   I then add another line of text:  "Goodbye world"   Is there a good way in Cocoa Touch to get the rect that will hold all of the lines in the text view so that I can adjust the parent view accordingly?  As another example, look at the notes' field for events in the Calendar application - note how the cell (and the UITextView it contains) expands to hold all lines of text in the notes' string.


I am using this code in Pandoc tempalte to create simple table  \begin{tabular}{p{2cm}  p{15cm}}      \Huge $title$ & $abstract$ \end{tabular}   with straight forwards intentions of having one cell with huge text and other one with smaller text.  But it results in:    I was hoping, that the top line of '1S' will be in same height as in the other cell.  What am I missing?

I am trying to achieve a table where a few things have to work simultaneously. Several of these things have been discussed before, but I have been unable to make everything work at once (and some things at all).  I want to be able to use different font sizes in cells on the same row, and have them precisely aligned at the top. That has almost been achieved in the MWE below, but the letters of the smaller font are slightly below the letters of the larger font. (Previous discussion: , but the alignment is only close, not perfect.)  Edit: The top alignment should be for the maximum height of the font used, so that an 'a' ends up at the same height whether it is written by itself or followed by a tall letter, such as an 'l' (or, if the small 'b' next to the big 'B' in the example below is changed for a small 'a', the 'a' should not jump up to the ceiling.  I also want to be able to insert several rows of text with forced line breaks within a cell of the table, and those rows need to have the same spacing between them as normal text has. That has been achieved by nesting another table in a cell in the MWE below.  In addition, I want to be able to use \hfill to put something out in the right margin from within the nested table, which works in the MWE.  Further, the margins on the top, bottom and sides of the table should be zero, so that only the page margins determine the amount of white space around the table (as it is now, there is even a difference between the right and left margins -- although the margins were for some reason adjusted when I uploaded the pdf below, it is visible if you compile the code and look at the pdf directly).  Lastly, I would like to get rid of all automatic spacing between cells, and then define my own spacing. Preferably, I would like to be able to define the vertical spacing between cells in terms of line heights (for lines of the size that I specify for normal text, so 11pt in the example below), while the units of horizontal spacing would preferably be defined in terms of "the width of an 'm'", or something like that.  \documentclass[paper=a4,fontsize=11pt]{scrartcl} % KOMA-article class \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} % English language/hyphenation \usepackage{geometry} \usepackage{tabu} \usepackage{lipsum}  \pagestyle{empty} % No pagenumbers/headers/footers  \newcolumntype{V}{>{\vspace{0pt}}p}  \begin{document} \begin{tabular} [t]{@{}V{0.2\columnwidth}V{0.8\columnwidth}} % @{} is used to remove the margins from cells \Huge\textbf A & \begin{tabular}[t]{@{}p{0.8\columnwidth}} Lorem ipsum \hfill right-aligned\\ sem.\\ Lorem\\ ipsum \end{tabular} \\  \Huge\textbf B & b \\  \Huge\textbf C & \lipsum*[1] \\  \end{tabular} \end{document}     Edit 2013-03-25: I tried a different approach (with minipages) and asked a question: . As of writing this, I have one answer that is similar to the accepted answer below. It achieves correct spacing, but is limited to different sizes in the left column (if one wants to use \hfill in the right column), and the top alignment for the \Huge text is not perfect.  Edit 2013-03-25: I got an answer in the thread  where \strut was used to add space, and \vphantom{Qp} (adds the vertical space of what is written in the braces(Qp in this example)). That could most likely be used here to, to get the correct spacing between cells even if only short letters or letters that do not protrude downwards are used.


I am getting the following errors when I play a YouTube video:  Failed to load "libpepflashplayer.so" Freswrapper is a translation layer which needs PPAPI plugin backend. Ensure your system have "libpepflashplayer.so" available. Paths tried: /opt/google/chrome/PepperFlash/libpepflashplayer.so /opt/google/chrome-beta/PepperFlash/libpepflashplayer.so /opt/google/chrome-unstable/PepperFlash/libpepflashplayer.so /usr/lib/adobe-flashplugin/libpepflashplayer.so /usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so /usr/lib/PepperFlash/libpepflashplayer.so /usr/lib64/PepperFlash/libpepflashplayer.so /usr/lib/chromium-browser/PepperFlash/libpepflashplayer.so /usr/lib64/chromium-browser/PepperFlash/libpepflashplayer.so /usr/lib/chromium/PepperFlash/libpepflashplayer.so /usr/lib64/chromium/PepperFlash/libpepflashplayer.so /opt/chromium/PepperFlash/libpepflashplayer.so /usr/lib/pepflashplugin-installer/libpepflashplayer.so   I am using Ubuntu 14.04 LTS 32-bit.  How do I correct the above errors?

I have had significant problems with watching flash video in 64-bit Ubuntu.  Does anyone know of a good way to get flash running on the platform?


In the attached picture you see green lentils which I want to prepare in order to make a Dal. They are obviously dried although it is not mentioned directly on the package.   My question is: Do I need to treat them like dried chickpeas? Dried chickpeas must be unpacked and then stay submerged for around twelve hours to be edible and cookable. Do i need to do the same with the lentils? One lentil has far less mass than a chickpea so I had doubts.  EDIT: I am aware of this possible duplicate but the submitter of the question has not clarified what types of lentils he wants to cook:

Everything I have read says that you do not need to soak lentils like you would beans.  Unfortunately the last several times I have cooked lentils they have seemed a little chalky.    Should I be soaking my lentils before I cook them?


I know how to find the orthogonal and the special linear group of $2$ by $2$ matrices. This is because I know their “defining” properties. How can I find the Lie algebra of:  $$A = \left(\begin{array}[c c]  - a_1 & a_2\\    0& a_1^2  \end{array}\right),$$  Where the matrices are invertible? I don’t know their defining characteristic that is my big problem. If I know it, I can use dedicated to solve. Maybe it has to do something with their matrix potential or their trace?  Please help.

I'm working on the question     Let $G$ be the group of invertible real matrices of the form $\left [\begin{array}{c c}a & b\\ & a^2\end{array}\right ]$. Determine the Lie algebra $L$ of $G$, and compute the bracket on $L$.   I'm familiar with how to derive the Lie algebra for a linear group like $U_n$, $SU_n$, etc. but I'm not sure what to do in a more explicit case like this.


I've never asked a question here before so bear with me. I'm running 13.04 and whenever I run my package manager it doesn't fully execute because it comes up with an error saying it can't open my cache and says that my packages have unmet dependencies. I do not know if my cache doesn't exist or what to do exactly. I'd like to just update to 13.10 but it won't let me run the package manager and I am not able to do so manually. Any assistance would be greatly appreciated. Thanks! Namaste

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


It is known that x+(1/x) is an integer number. Show that (x^n)+(1/(x^n)) is also an integer number for any natural n.   I'm sort of stuck on starting the induction step. Help is much appreciated!:)

Assume $x \in \mathbb{R}$ and $(x + \frac{1}{x}) \in \mathbb{Z}$.   Use Induction to prove that for all $n \in \mathbb{N},~ (x^n + \frac{1}{x^n}) \in \mathbb{Z}$.  I'm not sure how to use the information given to prove the induction step. What I have so far is.  $P(n) : (x^n + \frac{1}{x^n}) \in \mathbb{Z}$  Base Case Then $(x^0 + \frac{1}{x^0}) = 2 \in \mathbb{Z}$  Induction Hypothesis: $x^k + \frac{1}{x^k}\in \mathbb{Z}$  Want to prove: $x^{k+1} + \frac{1}{x^{k+1}} \in \mathbb{Z}$  My first step was  $x^{k+1} + \frac{1}{x^{k+1}} = x \cdot x^k + \frac{1}{x} \cdot \frac{1}{x^k}$


, Can you help me with the following exercise?  Show that doesn't exists matrix $A,B\in M_n(\mathbb{C})$ such that $$AB-BA=I$$  Has something to do with the annihilator? Thanks !

I have a homework question I can`t solve:  Let $X$ be a normed linear space, $A,B \in B(X)$. Show that there exists no nontrivial $c \in \mathbb{C} $ such that $AB-BA=cI$.  Thanks alot already guys! I seem to have a professor who gives impossible homework problems.  The hint he gave: $A^{n}B-BA^{n}=ncA^{n-1}$, $n \in \mathbb{N}$


I want to copy my database files(ldf and mdf) into a separate box for few hours as there is a disk space issue in my current sql server box. Currently i have mdf in one drive(:D) and ldf in another drive(:E). I have to move both mdf and ldf into same drive,say :D. I understand that it is recommended to have separate disk drives for LDF and MDF ,but this is a DEV box and to avoid purchase/delay client wants to go with this option.  I have two plans:   Take backups of all systems databases and user databases and save it in a separate box. Move MDF and LDF to a separate box for few hours   So after the partitioning/merging of disk drives are completed i can either:   Restore the backups. Move the MDF and LDF to the merged drive.   For user database ,i understand that the below steps will be sufficient:   Bring the database offline Move the file(s) to the new location manually. Update the system catalog settings:  ALTER DATABASE DBNAME         MODIFY FILE (             NAME = 'DBNAME',             FILENAME = 'D:\SQL_Data\DBNAME.mdf'         )         GO  ALTER DATABASE DBNAME     MODIFY FILE (         NAME = 'DBNAME_log',         FILENAME = 'D:\SQLLog\DBNAME_log.ldf'     ) Bring the database online   Can someone explain the dangers of second step or direct me how to do second step for system databases.?

I have a database and want to move the .mdf and .ldf files to another location. But I do not want to stop the MSSQLSERVER service, and I do not want to export to another server.   How can I do this?


I have a problem with my website footer. As supposed to be, it's rendered after the page's content, but when the page's content is less than the browser's height is annoying to see it on the middle of the page.  I'm correcting this behavior manually setting the footer to position:absolute; bottom:0, but doing so, breaks the footer when the content is greater than the browsers height. There is any way to automate this?  The content is just a div, with no aditional style and normally, the footer is position:relative; bottom:0. The website could be seen here:   Thanks.

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


I try to put at least one tag on each e-mail that comes in, but sometimes I miss some.  Is there any way to search for all untagged e-mails in Gmail (or all e-mails with just the Inbox tag)?  Right now the only way to find Gmail e-mails with no tags (or with only the Inbox tag) is to scroll through my list of all e-mail and look for myself...terrible.  I would like a way to get a list of all e-mails with no tags (or with only the Inbox tag).  I have tried a search term with "-[Tag1] -[Tag2] -[Tag3] [...]" with "-" in front of all of the tags I use, but that does not work.  If it or something like it did work, even being while long and awkward, I would still use it since it would be better than what I currently have to do!    Edit:  I originally typed this out referring to "tags", the non-Gmail-centric word for "labels".  Right before submitting I remembered the Gmail-centric term and changed those words to "labels" before submitting the question.  I have now put the question back to the original way I wrote it so that people searching using search term "tags" (like I did, which is why I did not find ) will find an answer.

I'd like to sort all of my Gmail messages that don't have label, so I can process them (I miss some every now and then).  I can sort by every label by clicking on it at the left, but how do you sort the unlabeled ones?


While writing an email on behalf of 2 other people.  Should I write.. Savin, Steve and Myself   Or   Myself, Savin and Steve.. ?   I remember reading somewhere it is always, first person, second and third.. My doubt is with the order and not in the usaage of 'Myself' or 'Me' Thanks.

Which is correct: me and my wife or my wife and me?  The sentence in which this is used is       Ms. Smith informed me and my wife that she was afraid of being accosted.


I found the following in Baby Rudin:     Theorem      If $x,y\in \Bbb R, x>0$ then there exists a natural number $n$ such that   $$nx>y$$   After this, he proves another theorem using the following     Let $x<y$, we have $y-x>0$ then the theorem above yields that a natural number $n$ exists such that   $$ n(y-x)>1 $$   I'm not sure how that theorem gives that result, could someone explain this? I'm pretty  sure it must be really simple, but I'm not getting it.  E: I said in the comments this was not a duplicate to the suggested question. My doubt here was even more elementary than that question's.

I have a question about Rudin's proof of Theorem 1.20 (b) in his book Principles of Mathematical Analysis.  Theorem 1.20 is stated as follows:     (a) If $x\in R, y\in R$, and $x>0$, then there is a positive integer $n$ such that $$nx>y.$$   (b) If $x\in R, y\in R$, and $x<y$, then there exists a $p\in Q$ such that $x<p<y$.     I understand Rudin's proof of (a).  The beginning of Rudin's proof of (b) is given below:     Since $x<y$, we have $y-x>0$, and (a) furnishes a positive integer $n$ such that $$n(y-x)>1.$$  Apply (a) again, to obtain positive integers $m_1$ and $m_2$ such that $m_1>nx$, $m_2>-nx$.  Then $$-m_2<nx<m_1.$$  Hence there is an integer $m$ (with $-m_2\leq m\leq m_1$) such that $$m-1\leq nx<m.$$   I don't understand the justification for this last sentence beginning "Hence...."  How is $m$ found, and why are $m_1$ and $m_2$ needed to find $m$?


I want to set my linux machine box 12 hours format,how to set it ,please advise  I am able to display with #date +%r,but wanted to set it permanently

When I go to change the date and time it doesn't work. I try to unlock but it just won't unlock. If there is any way to make it work please help.  I know it isn't very descriptive but I really would appreciate some answers.


Let $f:(a-\epsilon,a+\epsilon)\to(0,\infty).$ If $$\lim \limits_{x \to a}\left(f(x)+\frac{1}{f(x)}\right)=2,$$ prove that  $$\lim \limits_{x \to a}f(x)=1.$$  I'm trying to get something using $\epsilon-\delta$ definition but I'm stuck . How to use $(a-\epsilon,a+\epsilon)$ information I'm wondering . $$~~$$ An

I need to prove this limit:     Given $f:(-1,1) \to \mathbb{R}\,$ and $\,f(x)>0,\,$ if $\,\lim_{x\to 0} \left(f(x) + \dfrac{1}{f(x)}\right) = 2,\,$ then $\,\lim_{x\to 0} f(x) = 1$.


Overleaf is saying that both \unlhd and \trianglelefteq are undefined control commands, although \traingleleft works fine.  How else can I make normal subgroup symbol i.e.   with an equality sign below.

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


OK I understand the basics, but can someone explain code copied from Greg's answer :  a[1::-1]   # the first two items, reversed a[:-3:-1]  # the last two items a[-3::-1]  # everything except the last two items, reversed   To me the first one reads: slice from 2nd position to end, then reverse it.  The second one is slice from beginning to the -2 position then reverse it.  The third one is slice from -3rd position to end then reverse it.  Obviously I am wrong since they work as suggested, but can you please tell me why?

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


I was looking for quite some time on whats the best way of selecting or inserting some data.  I have two tables:  ReportData: report_data_id(pk), source_id(fk), value1; Source: source_id(pk), source_name(varchar250);   I am doing a bulk insert into the ReportData around 10k of rows at once, but I don't know which is the best way of getting the source_id, because not all of the sources are defined.  I was thinking that a good way is writing a function to which I send a source (which is a string) and if the source exist return the id, if not insert the source and then return the id. And then before the bulk insert I will add this into the VALUES SELECT * FROM get_source('SourceString'). This then on insert is going to query that function 10k times.  In my ReportData I have like 10 columns which are FK and on each I need to do the same thing as described above.  Is this a good way of doing what I described above?

Using PostgreSQL v9.1.  I have the following tables:  CREATE TABLE foo (     id BIGSERIAL     NOT NULL UNIQUE PRIMARY KEY,     type VARCHAR(60) NOT NULL UNIQUE );  CREATE TABLE bar (     id BIGSERIAL NOT NULL UNIQUE PRIMARY KEY,     description VARCHAR(40) NOT NULL UNIQUE,     foo_id BIGINT NOT NULL REFERENCES foo ON DELETE RESTRICT );   Say the first table foo is populated like this:  INSERT INTO foo (type) VALUES     ( 'red' ),     ( 'green' ),     ( 'blue' );   Is there any way to insert rows into bar easily by referencing the foo table?  Or must I do it in two steps, first by looking up the foo type I want, and then inserting a new row into bar?  Here is an example of pseudo-code showing what I was hoping could be done:  INSERT INTO bar (description, foo_id) VALUES     ( 'testing',     SELECT id from foo WHERE type='blue' ),     ( 'another row', SELECT id from foo WHERE type='red'  );


The functions of each pair are inverse to each other. For each pair, check that both compositions give the identity function.  $F: \mathbb{R} \to \mathbb{R}$ and $F^{−1}:\mathbb{R} \to \mathbb{R}$ are defined by $F(x)=3x+2$ and $F^{−1}(y)=\dfrac{y−2}{3}$, for all $y \in \Bbb{R}.$  My attempt:     Inverse Function  For each particular but arbitrarily chosen $y \in \mathbb{R}$, according to the definition of $f^{-1}$, $f^{-1}(y) = \dfrac{y-2}{3}$ is a unique real number $x$ such that $f(x) = y$. \begin{align*} F(x) & = y\\ 3x + 2 & = y\\ x & = \frac{y-2}{3} \end{align*} Therefore, $f^{-1}(y) = \frac{y-2}{3}$.  Compositions of Functions.   The functions $g \circ f$ and $f \circ g$ are defined as follows: $$(g \circ f)(x) = g(f(x)) = g(3x + 2) = 3x + 2$$  for all $x \in \mathbb{Z}$.

The functions of each pair are inverse to each other. For each pair, check that both compositions give the identity function.  $F: \mathbb{R} \to \mathbb{R}$ and $F^{−1}:\mathbb{R} \to \mathbb{R}$ are defined by $F(x)=3x+2$ and $F^{−1}(y)=\dfrac{y−2}{3}$. for all y ∈ R  My attempt:     Inverse Function  For each particular but arbitrarily chosen $y \in \mathbb{R}$, according to the definition of $f^{-1}$, $f^{-1}(y) = \dfrac{y-2}{3}$ is a unique real number $x$ such that $f(x) = y$. \begin{align*} F(x) & = y\\ 3x + 2 & = y\\ x & = \frac{y-2}{3} \end{align*} Therefore, $f^{-1}(y) = \frac{y-2}{3}$.  Compositions of Functions  The functions $g \circ f$ and $f \circ g$ are defined as follows: $$(g \circ f)(x) = g(f(x)) = g(3x + 2) = 3x + 2$$  for all $x \in \mathbb{Z}$.


I have the following code:  #include<stdio.h> typedef struct _node_1 {     int number;     int scores;     int xyz;     double p;  } Node_1;  typedef struct _node_2 {     int number;     int scores;     int xyz;     struct _node_2 *p;  } Node_2;  typedef struct _node_3 {     int number;     int scores;     int xyz;     struct _node_2 p;  } Node_3; int main() {     printf("%d\n",sizeof(Node_1));     printf("%d\n",sizeof(Node_2));     printf("%d",sizeof(Node_3));     return 0; }   and the output is:  24 24 40   My question is why the result of these 3 examples's outputs are like this and how do we exactly determine the size of a structure? BTW, my operating system is 64-bit. Thank you!

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


In this Matlab code, I'm trying to generate a random vector of int and dividing with their sum to make it behave like probability values. But sometimes(not always) its not summing upto 1. Is it a floating point precision issue ?? How can I fix it ?  for I = 1:5 A = randi([1,10],[1,10]); % Just get a 10 length vector of random int A = A/sum(A); % Make the vector normalize to % behave like probability values    if sum(A)~=1        % should sum to one        % but sometimes its not        disp(['Not equal to 1', sum(A)]);    else        disp('Equal to 1');    end end

I am writing a program where I need to delete duplicate points stored in a matrix. The problem is that when it comes to check whether those points are in the matrix, MATLAB can't recognize them in the matrix although they exist.  In the following code, intersections function gets the intersection points:  [points(:,1), points(:,2)] = intersections(...     obj.modifiedVGVertices(1,:), obj.modifiedVGVertices(2,:), ...     [vertex1(1) vertex2(1)], [vertex1(2) vertex2(2)]);   The result:  >> points points =    12.0000   15.0000    33.0000   24.0000    33.0000   24.0000  >> vertex1 vertex1 =     12     15  >> vertex2     vertex2 =     33     24   Two points (vertex1 and vertex2) should be eliminated from the result. It should be done by the below commands:  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   After doing that, we have this unexpected outcome:  >> points points =    33.0000   24.0000   The outcome should be an empty matrix. As you can see, the first (or second?) pair of [33.0000 24.0000] has been eliminated, but not the second one.  Then I checked these two expressions:  >> points(1) ~= vertex2(1) ans =      0 >> points(2) ~= vertex2(2) ans =      1   % <-- It means 24.0000 is not equal to 24.0000?   What is the problem?    More surprisingly, I made a new script that has only these commands:  points = [12.0000   15.0000           33.0000   24.0000           33.0000   24.0000];  vertex1 = [12 ;  15]; vertex2 = [33 ;  24];  points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :);   The result as expected:  >> points points =      Empty matrix: 0-by-2


I have a Kotlin extension function to add a fragment which is in another Kotlin file  fun Fragment.addFragment(tag: String?, id: Int, fragmentManager: FragmentManager) {   // will take care of adding the fragment.   val fragmentTransaction = fragmentManager.beginTransaction()   fragmentTransaction.add(id, this, tag)   fragmentTransaction.addToBackStack(tag)   fragmentTransaction.commit() }   But whenever I am using that extension function to add a fragment then I am getting this crash  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setNextAnim(int)' on a null object reference   I am using that extension function like this:  MyFragment().addFragment("MyFragment", R.id.frame, fragmentMaganer)   After the above statement if I tried to debug my code then its executed successfully till  fragmentTransaction.commit()   but after that in the onStart() method of my activity I am facing that NullPointerException issue  But if I use the same code directly in Activity like this:  val myFragment = MyFragment() val fragmentTransaction = fragmentManager.beginTransaction() fragmentTransaction.add(R.id.frame, myFragment, tag) fragmentTransaction.addToBackStack(tag) fragmentTransaction.commit()   then Its working fine. Can someone please explain why its no working with Extension function?

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?


Screen lock is off in the privacy settings, but it keeps on showing after the screen goes blank after 10 minutes.  I just want the screen to go blank after ten minutes without having to press esc every time I get back to using the PC.  I am using Ubuntu 18.04.2 LTS and it's simply great, except for this little irritation.

I've just installed Ubuntu 18.04 and I want to disable the lock screen.   I don't want to see it at all, neither on power-on nor after suspension.    I tried:      Settings -> Privacy -> Screen Lock -> and changed 'Automatic Screen Lock' to 'Off'.   The lock screen still appears after suspension. Any suggestions?


to create block with events, which will be shown on homepage. Is it possible to create view, which will show all events, till today + 2 more, which are in future and closest to today date? Like it is shown on this diagram  2017-04-16 Event6 nonvisible  2016-09-15 Event5 visible  2014-03-12 Event4 visible  ----------------- today  2013-12-20 Event3 visible  2012-12-20 Event2 visible  2009-12-20 Event1 visible

I'm trying to get a union of a user's nodes and comments sorted by "post date". This  links to sandbox projects for D6 but there is nothing for 7.  This  has an example of using hook_views_pre_execute() and a SQL UNION in D6. This doesn't work for D7 with views 3.  I came across merlinofchaos'       Because we're now using Drupal's new query generator, the query is a SelectQuery object which you will have to modify or replace. Look up Drupal 7's new database layer for more information.   Does anyone have an example of how to do this or any other solution to combine two views?


Okay, so when I downloaded Ubuntu I deleted Windows XP because of activation issues. So there's nothing running side-by-side, its JUST Ubuntu. But anyhow, I want to play the games I had on my other OS on this one. For example, games like Sims 2, Hitman Absolution, etc. They read that they're in the ROM, but don't start up the install. So is there some special dealieo I need to download before they install due to the games being made for Windows or Mac? Basically, how do I install and play games on Ubuntu that I had on Windows XP? Thanks y'all.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


Note: While I agree that this question basically is a duplicate of the above question, I feel @alienth's answer (below) is more concise, so I suggest you take a look at it before going to the other question.  I periodically backup/image/clone my entire ubuntu system drive to another drive with:  dd if=/dev/sda of=/media/disk1/backup.iso   It works great when I need to restore the drive after an experiment, drive failure, etc.  However I'd now like to mount a partition from within that .iso (i.e. what would have been /dev/sda1 when I was dd'ing the drive).  If I'd backed up with:  dd if=/dev/sda1 of=/media/disk1/backup.iso   then the .iso would be easily mountable using ubuntu's mount volume utility.  But the utility doesn't work for an iso of the entire drive.  Is there a way to just mount sda1 from the original iso?

I used dd to backup a 80GB drive  dd if=/dev/sdb of=~/sdb.img   Now I need to access some files on that drive, but I don't want to copy the ".img" back over the drive.   mount ~/sdb.img /mnt/sdb doesn't work either. It returns :  mount: you must specify the filesystem type   I tried to find the filesystem type with file -s  fox@shoebox $ file -s sdb.img sdb.img: x86 boot sector; partition 1: ID=0x12, starthead 1, startsector 63, 10233342 sectors; partition 2: ID=0xc, active, starthead 0, startsector 10233405, 72517410 sectors; partition 3: ID=0xc, starthead 0, startsector 82750815, 73545570 sectors, code offset 0xc0   Is it possible to mount sdb.img, or must I use dd to restore the drive?


public void MethodName(ObservableCollection<DataCollection> dataCollection)     {         if (dataCollection != null)         {             IsChecked = dataCollection.Any(o => o.DataCollectionID.Equals(30));              IsChecked = dataCollection.Where(o => o.DataCollectionID.Equals(30)).Count() > 0;         }                 }   Can anyone explain me, what could be the most efficient way to use from above two filtering? .Any? or .Where.Count?  Note: Consider that dataCollection has over 10,000 items.  Please advice me. Thank you

in the System.Linq namespace, we can now extend our  to have the  and  extension methods.  I was told recently that if i want to check that a collection contains 1 or more items inside it, I should use the .Any() extension method instead of the .Count() > 0 extension method because the .Count() extension method has to iterate through all the items.  Secondly, some collections have a property (not an extension method) that is Count or Length. Would it be better to use those, instead of .Any() or .Count() ?  yea / nae ?


I read this about 15 yeas ago, maybe more. I believe it was aimed at YA, but it may have been for adults.  In the beginning the main characters are attending an illegal drag race. They've built the car to be powered entirely by NOS, rather than by petrol with a NOS boost. To do this they had to make the fuel tank cover every possible inch of the car, including the body shell.  The race begins by and electrified gate gate raising up. Racers can't set off early or they'll get electrocuted. One of the rivals sets of before the gate is fully raised and gets around it by coating the car in rubber.  During the race (or shortly after) the place get raided by some sort of police/authorities. I can't remember if it was a sort of totalitarian state or if it was just because they were criminals but I believe it was close to the former.  During the raid the authorities have some sort of tank vehicle. The protagonist has a gun that can disable vehicles, but as the tank is shielded it is ineffective. However they manage to fire it into the tank barrel and it worked. Another character explains that the tank barrel is normally shielded, but the shield is lowered for a split second before the tank is about to fire. And the protagonist must have fired at exactly the right time in order to get the shot in before the tank fired.  It was set in the near future. That's everything I can remember.

I can't really remember how long ago it was, but I think the book was marketed towards children/teens.  All I remember is the basic premise of the story.  Some story about these unusual little blue electric critters that only certain people could see, and these kids took it upon themselves to go about destroying them since they fed off energy or something like that.  Not sure whether they fed off people or off electricity... or both maybe?  I think the dominant method of destroying them was an electric baton that was taken from law enforcement.  I wanna call them buzz batons, but that's probably thanks to Artemis Fowl.


I've been looking into analytical mechanics with the intention of finding out more about Lagrangians and actions. As far as I currently understand it, the Lagrangian is formed with positions and velocities and then operated on using the Euler-Lagrange equation to determine the laws of motion. However, talking to more experienced physicists than myself, they always say that there's more than just equations of motion in a Lagrangian. Also, when I look at Lagrangians defined for fields, I cannot interpret them (probably because I'm coming at it from a mechanical point of view). I guess that's two questions in one, but the overriding question I have is what information can be obtained from a Lagrangian, and taking it beyond mechanical systems what does it generally represent? Links to websites and book recommendations would be greatly appreciated.

The action  $$S=\int L \;\mathrm{d}t$$  is an important physical quantity. But can it be understood more intuitively? The Hamiltonian corresponds to the energy, whereas the action has dimension of energy × time, the same as angular momentum.  I've heard the action being described as a measure of change, although I don't know how this description can be justified.


The , when using the Devil Summoning Variant, has the ability to attempt to Summon Devil (1/Day).  Having a read through the appropriate page on  it discusses the idea that it makes the most sense to attempt this on turn 1.   This means we have a scenario were the Bone Devil succeeds on the summoning and now has (on average) 7 spined devils fighting with them.  How does this effect the encounter difficulty? Is it as simple as going from a 5,000 XP encounter to a 8,150 XP encounter (adjusted 16,300)?  The CR level given to the Bone Devil, does this include this scenario or is it seperate?

The Drow Mage (CR 7) has the Action Summon Demon (1/day), which allows him to summon a shadow demon (CR 4). Is the shadow demon already included in the CR of the Drow Mage, or do I have to count the shadow demon as an extra creature to determine the difficulty of the encounter?


Having Issues with getting the returned string from the apex controller.  If I use getState and check if success it wont run and will only run if there is an error in the state. Just from a glance anyone have a recommendation? I'm just trying to render the record Owner's fullphotourl and this component is an iterated component.   Component:  <aura:component implements="force:hasRecordId" access="global" controller="MyChecklistExperiment">    <aura:attribute name="checklistId" type="Id" />    <aura:attribute name="targetFields" type="Checklist_Team__c" />    <aura:attribute name="showDialog" type="String" />    <aura:attribute name="remoteRecordId" type="Id"/>    <aura:attribute name="SmallPhotoUrl" type="String" />     <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>     <force:recordData aura:id="checlistTeamRecord"                   recordId="{!v.checklistId}"                   targetFields="{!v.targetFields}"                   fields="Id, Name, Role__c, Owner.Name, Owner.Email, OwnerId, Member__c, Member__r.Name"                   />     <div class="slds-media__figure">         <lightning:avatar src="{!v.SmallPhotoUrl}" fallbackIconName="standard:user" class="slds-avatar--large slds-avatar--circle"/>               </div>   Javascript:      ({ doInit : function (component, event, helper){     var action = component.get("c.getRelatedOwner");     action.setParams({         userId: component.get("v.targetFields.OwnerId")     });     action.setCallback(this, function(response) {         var url = response.getReturnValue();         component.set("v.SmallPhotoUrl", url);     });     $A.enqueueAction(action); },           Apex Controller:     public with sharing class MyChecklistExperiment {  @AuraEnabled public static String getRelatedOwner(Id userId){      String test;     test = [             SELECT Id, fullPhotoUrl             FROM User             WHERE Id =:userId         ].fullPhotoUrl;     system.debug(test);     return test;    }  }

I am using Lightning Data Services to have the current record already prefetched  <aura:component controller="MyCtrl" implements="force:hasRecordId">     <aura:attribute name="parent" type="SObject" />      <aura:handler name="init" value="{!this}" action="{!c.init}" />      <force:recordData aura:id="recordLoader"                       recordId="{!v.recordId}"                       fields="Name,..."                       targetRecord="{!v.parent}"                       layoutType="FULL" />     {!v.market.fields.Name.value} <-- WORKS! </aura:component>   I can directly display its fields in the component without any problems. But when I pass the record   ({     init: function(cmp, evt, helper) {         var action = cmp.get("c.queryData");         action.setParams({ parent: cmp.get("v.parent") });         action.setCallback(this, function(response) {             ...         });          $A.enqueueAction(action);        }, })   into my Apex init method fields are not accessible anymore  public class MyCtrl {      @AuraEnabled     public static String queryData(Parent__c parent) {          // parent is null     } }


I'm getting a String value from an HttpServletRequest with the method getParameter with the prupose to parse it to Integer.  This value can be a "null" String if the value is not setted in the front-end but when I try to compare it the result is always false  Boolean.toString(request.getParameter("parameter") == "null")); Boolean.toString(request.getParameter("parameter") == null)); Boolean.toString(request.getParameter("parameter").isEmpty())); Boolean.toString(request.getParameter("parameter").isBlank()));   this outputs  false false false false

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


I just finished a new computer build and am trying to find a way to get the files from an old hard drive. The old hard drive was from a different Windows 10 computer, and is an HDD. I want to somehow move the programs to be installed on the SSD connected to the computer while also keeping the files from the old computer and storing them on the HDD. Is there a way for me to do that? Note: I don't need to move everything from the HDD to the SSD, there's too much there for me to do that. I need to:  Merge the user on the HDD with the user on the SDD.  Move the programs to the SSD.  Keep the files on the HDD.

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


I would like to enumerate where \item would start with a), b), c)...and so on AUTOMATICALLY. This is very important for me. I tried something like this:  \begin{enumerate}[label=\alph*)]     \item something 1     * something *     \item something 2     * something * \end{enumerate}   But I think there is something wrong

Together with a colleague I'm writing a book (with the Springer template), and I am currently homogenizing the layout. I'd like to change the default numbering scheme in the enumerate environment globally in the beginning of the document so that I don't have to tack on the modifier at the end of every “\begin{enumerate}[(1)]” — and change it once my co-author decides he prefers (i), (ii), etc. or some other way to number lists. Is there any way to do this?


I developed a CNN for ECG arrhythmia classification and when I train the model I obtain the same validation accuracy for all of the 50 epoch. Can you please tell me what is wrong? I tried to modify the parameters, also the structure, but the validation accuracy is unchanged (80.1%). The ECG signals fed into the network are ECG heartbeats composed of 1x300 vectors (300 sample points signals). height = 1; width = 300; channels = 1; Xtrain = reshape(Xtrain,[height, width, channels, length(Xtrain)]); Xvalidation=reshape(Xvalidation,[height, width, channels, length(Xvalidation)]); Xtest = reshape(Xtest,[height, width, channels, length(Xtest)]); Ytrain=categorical(Ytrain); Yvalidation=categorical(Yvalidation); Ytest=categorical(Ytest); Layers=[ imageInputLayer([height,width,channels]); %'DataAugmentation', 'none'); %'Normalization', 'none');  convolution2dLayer([1 3], 256,'stride',[1 1], 'padding','same');  %Filter window size = [1 5], No of filters = 64, stride = [1 1];  convolution2dLayer([1 3], 256,'stride',[1 1], 'padding','same');   reluLayer(); dropoutLayer(); maxPooling2dLayer([1 2],'stride',[1 2]); %PoolSize = [1 2], Stride = [1 1]   convolution2dLayer([1 3], 128,'stride',[1 1], 'padding','same');   reluLayer();  convolution2dLayer([1 3], 128,'stride',[1 1], 'padding','same');   reluLayer();  convolution2dLayer([1 3], 64,'stride',[1 1], 'padding','same');   reluLayer(); dropoutLayer(); maxPooling2dLayer([1 2],'stride',[1 2]); fullyConnectedLayer(256);  dropoutLayer(); fullyConnectedLayer(128);  fullyConnectedLayer(5); %Reduce to five output classes softmaxLayer(); classificationLayer(); ]; options = trainingOptions('sgdm','InitialLearnRate',0.001,'MaxEpochs',50, ... 'LearnRateSchedule','piecewise', ... 'LearnRateDropFactor',0.1, ... 'LearnRateDropPeriod', 3,... 'L2Regularizatio',1.0000e-04, ... 'MiniBatchSize', 60,... 'ValidationData',{Xvalidation, Yvalidation},... 'Plots','training-progress'); convnet = trainNetwork(Xtrain,Ytrain,Layers,options);

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


My buddy has full access to my Ubuntu 16.04 machine to host his website and doesnt know too much. He went into folder and went to change file permissions but instead ran   chmod -R /   to 775 or 755 he doesnt remember and I can't remotely get into the server to check.  It appears to be offline as i can't remote SSH, websites are down, like it appears to be completely offline but it isnt. I tried to login physically to it on root only to receive incorrect login when entering the username root without it even asking for a password. THOUGH the account that the command was executed form can be logged into and has sudo access.  I don't have a viable backup so if anybody could help that would be amazing!  <3

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


Just a quick question:  For the matrix    $$   \begin{pmatrix}    2 & 2 \\    2 & 2\\   \end{pmatrix}  $$ Show that the eigenvectors of the matrix are orthogonal.   I can tell that the eigenvectors are $(-0.5, 1)$ and $(2, 1)$. I'm just not sure how to show they are orthogonal.

Can someone point me to a paper, or show here, why symmetric matrices have orthogonal eigenvectors? In particular, I'd like to see proof that for a symmetric matrix $A$ there exists decomposition $A = Q\Lambda Q^{-1} = Q\Lambda Q^{T}$ where $\Lambda$ is diagonal.


I just encountered this review and I'm unsure what to do with it. Somebody claimed the posted code to be copyrighted.      So should this edit be accepted just on the basis of this claim?  Should it be flagged for moderation?

The following question was closed:    I, and others, voted to re-open the question. I also flagged the question saying:     This question was closed incorrectly by a single moderator vote. Can we get it open again please?   This flag was marked helpful but then the question was deleted by the moderator . Lasse also left the following comment:     This question, and answer, contains code copyrighted by Embarcadero. Not only will it stay closed in its current form, it will also be deleted.   I don't believe, although I could very well be wrong, that either question or answer contains code copyrighted by Embarcadero. As a licensed user of Delphi Profession, I have the source code to the Delphi libraries which is where I presume Lasse believes the source code originates. I cannot find it there.  I flagged the question again saying:     I don't believe that there is copyright violation here. Could the supposed violation be made more clear?   This flag was  with the comment:     A moderator reviewed your flag, but found no evidence to support it.   Clearly one of the moderators, presumably Lasse believes that this code violates Embarcadero copyright. I would like to see the evidence for that assertion. I fully understand that I may be mistaken and that this really is a violation of Embarcadero copyright and that I simply have not found or do not have access to the copyrighted code in question.  For what it is worth, the question was later re-posted: .


If $G$ is a finite $p$-group and $H\neq 1$ is normal in $G$, then $H\cap Z(G)\neq 1$ I know that there is an answer  but it uses composition series. My teacher gave me the following hint: $$G = Z(g)\cup (\cup G_{x_i})$$ and to see $H$ as $$|H| = |H\cap Z(G)| + \cdots$$ I think it has something to do with the class equation. If we let $G$ act on $H$ by conjugation, I know that the class equation becomes: $$|H| = |\{h | ghg^{-1}=h\}| + \sum_{i}|\{gh_ig^{-1}| g\in G\}| = \\ |\{h \ | \ gh =  hg\}| + \sum_{i}|\{gh_ig^{-1}| g\in G\}| = Z(G) + \sum_{i}|G_{x_i}| = Z(G) + \sum_{i}(G:G_{x_i})$$ (the last equality I'm just guessing... Shouldn't it have something to do with $H$?) I also feel that the conclusion should follow from $|H|$ being $>1$ and divisibility, but I'm not quite sure. Could somebody help me and also verify if my class equation is right?

If $G$ is a finite $p$-group with a nontrivial normal subgroup $H$, then the intersection of $H$ and the center of $G$ is not trivial.


I've come across a couple of videos where some interesting sounds are produced using ice.  (Click on the images to see the video.)      Here, they drop a block of ice into a deep crevice and as the block falls, you can hear some strange sounds. These sounds remind me of some sound effects in old cartoons and sci-fi movies. The pitch of the sounds start high and end up low. Is this some kind of doppler effect?      Here, there's a man performing 'nordic skating', making the same sounds as he skates on top of a thin ice sheet. Maybe they are caused by the cracking ice. But why does that sound like this?    There are some other videos too, where they skip stones on frozen lakes.    Here the ice makes some high-frequency sounds which correspond to the chirping of birds.  What are these sounds and why do they sound the way they sound?

This is a fun problem that I came across recently, which I'm posting here for your delectation. We all love a good slinky: they can be used for all sorts of fun demos in physics. One example is the "spring reverb" effect, which is well known in the film sound effects industry. If you couple a microphone to a slinky, and then tap the slinky, it produces a wonderful chirping noise. This is actually how they made the sound of the blasters in the Star Wars film franchise.   Watch and enjoy  for a scaled-up example. The slinky in this case is a coil of 3.5mm galvanised steel, 100m in length. A piezo transducer is used to pick up the sound. What property of the coil allows it to produce such an interesting noise?


Over time I've learned that many (most?) methods used in classical statistics can be interpreted as evaluating a Bayesian model in some plausible way while I find the standard explanations much less intuitive.  So I was wondering whether there are any resources which explain standard stats methods in a Bayesian manner?

I'm a simple minded Bayesian who feels comfortable in the cosy world of Bayes.   However, due to malevolent forces outside my control, I now have to do introductory graduate courses about the exotic and weird world of frequentist statistics. Some of these concepts seem very weird to me, and my teachers are not versed in Bayes, so I thought I'd get some help on the internet from those who understand both.   How would you explain the different concepts in frequentist statistics to a Bayesian who finds frequentism weird and uncomfortable?   For example, some things I already understand:   The maximum likelihood estimator $\text{argmax}_\theta \;p(D|\theta)$ is equal to the maximum posterior estimator $\text{argmax}_\theta \;p(\theta |D)$, if $p(\theta)$ is flat.  (not entirely sure about this one). If a certain estimator $\hat \theta$ is a sufficient statistic for a parameter $\theta$, and $p(\theta)$ is flat, then $p(\hat \theta|\theta)=c_1\cdot p(D|\theta)=c_1\cdot c_2\cdot p(\theta|D)$, i.e. the sampling distribution is equal to the likelihood function, and therefore equal to the posterior of the parameter given a flat prior.    Those are examples of explaining frequentist concepts to someone who understands Bayesian ones.   How would you similarly explain the other central concepts of frequentist statistics in terms a Bayesian can understand?  Specifically, I'm interested in the following questions:   What is the role of Mean Square Error? How does it relate to Bayesian loss functions? How does the criterion of "unbiasedness" relate to Bayesian criteria? I know that a Bayesian will not demand that its estimators are unbiased, but at the same time, a Bayesian would probably agree that an unbiased frequentist estimator is generally more desirable than a biased frequentist one (even though he would consider both to be inferior to the Bayesian estimator). So how does a Bayesian understand unbiasedness? If we have flat priors, do frequentist confidence intervals somehow coincide with Bayesian ones?  What in the name of Laplace is going on with specification tests like the $F$ test? Is this some degenerate special case of a Bayesian update on the distribution over model space?    More generally:  Is there some resource that explains frequentism to Bayesians?  Most of the books run the other way around: they explain Bayesianism to people who are experienced in frequentist statistics.     ps. I have looked, and while there are a lot of questions already about the difference between Bayesian and Frequentism, none explicitly explain Frequentism from the perspective of a Bayesian.   is related, but is not specifically about explaining Frequentist concepts to a Bayesian (more about justifying frequentist thinking in general).  Also, my point is not to bash frequentism. I really do want to understand it better


installation stops at ""initramfs unable find a medium containing live file system "" i have tried lubuntu , xubuntu ,ubuntu all are giving me errors ..iam using bootable usb and using Universal-USB-Installer-1.9.5.6(1).exe as instructed on pendrive linux  quick specs p4 3.ghz 512mb ram ,32bit hdd is pata 80gb i researched and found that it is bios setting problem....  ubuntu version is ubuntu-14.04.1-desktop-i386.iso xubuntu version is xubuntu-14.04.1-desktop-i386_2.iso lubuntu version is lubuntu-14.04.1-desktop-i386.iso

Error message:  (initramfs) unable to find a live medium containing a live file system   I got this error while trying to install Ubuntu 10.10 from a bootable USB stick on to Asus X64J series laptop. After getting this error the installation fails to start.  I have used the same USB stick on some other laptops and the installation started as usual. Any help will be appreciated.


I've been participating in stack overflow for a while and for some reason just realized today that there are (at least) two meta sites for stack overflow:     This might be a dumb question, but what is the difference between these two and what belongs on the stack site versus the exchange site?

How do per-site metas, such as Meta Writers Stack Exchange or Meta Stack Overflow differ from the general Meta Stack Exchange?  Where should I go to ask my question?


Let $G$ be a group. The claim is that if $H = Z(G)$ (the center of $G$), then $Z(G/H) = 1$. I either have to prove or disprove the claim. My intuition says its false and I was thinking of using $G = Q_8$ (the quaternion group) as the counter example. Am I on the right track?

Question. Prove or disprove: The center of $G/Z(G)$ is trivial for all finite groups $G$. (Here $Z(G)$ denotes the center of $G$.)  Attempt at a Proof.  Assume the contrary that $G/Z(G)$ has a non-trivial center.   Let $g\notin Z(G)$ be such that $gZ(G)$ is in the center of $G/Z(G)$.   Then $$\boxed{xgx^{-1}\in gZ(G)}$$ for all $x\in G$.   We note that $xgx^{-1}=ygy^{-1}$ if and only if $xC_G(g)=yC_G(g)$, where $C_G(g)$ denotes the centralizer of $g$ in $G$.  Since $g\notin Z(G)$, we have $G\neq C_G(g)$.  I couldn't go any further.  Can someone help?


im trying to make a program that is password protected and once the password is entered correctly it opens a file. when i try to run the program i get a syntax error saying "EOL while scanning string literal" where i put the file path'  heres my code.  import os while True:     print("9. exit")     print("0. close")     choice = int(input("enter password: "))     choice = int(input("enter option: "))     if (choice>=1124):         if choice ==1124:                 os.starfile('C:\restriced_access\')   os.starfile('C:\restriced_access\') this is where the problem is. its supposed to open a file folder in my Windows(C:)

import os xp1 = "\Documents and Settings\" xp2 = os.getenv("USERNAME") print xp1+xp2   Gives me error   File "1.py", line 2  xp1 = "\Documents and Settings\"                                ^ SyntaxError: EOL while scannning single-quoted string   Can you help me please, do you see the problem?


I'm trying to install rainlendar-lite on ubuntu 18.04.1 and keep getting  Download is performed unsandboxed as root as file '/home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)  jim@jim-Z1-7623:~/Downloads$ sudo apt-get install ./rainlendar2-lite_2.14.2.b157-1_amd64.deb [sudo] password for jim:  Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'rainlendar2-lite' instead of './rainlendar2-lite_2.14.2.b157-1_amd64.deb' The following NEW packages will be installed:   rainlendar2-lite 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded. Need to get 0 B/17.9 MB of archives. After this operation, 20.5 MB of additional disk space will be used. Get:1 /home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb rainlendar2-lite amd64 2.14.2.b157-1 [17.9 MB] Selecting previously unselected package rainlendar2-lite. (Reading database ... 180109 files and directories currently installed.) Preparing to unpack .../rainlendar2-lite_2.14.2.b157-1_amd64.deb ... Unpacking rainlendar2-lite (2.14.2.b157-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Setting up rainlendar2-lite (2.14.2.b157-1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ... N: Download is performed unsandboxed as root as file '/home/jim/Downloads/rainlendar2-lite_2.14.2.b157-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)   EDIT: Thanks everyone. I've given up on installing rainlendar 2.14, and gone back to rainlendar 2.13, which works fine. In checking on the rainlendar forum, some people are having the same issues I'm having, but not everyone (a really bizarre problem that only affects some users???). So for now, my issue is solved, but not the install problem with rainlendar 2.14. Thanks again.

I can't install Rainlendar 2 on my Ubuntu 18.04, I found this solution for 16.04 (), followed it, seems to work, but after install, there's no Rainlendar in my Show Apps, so I'm not sure what went wrong. When I issued sudo dpkg -i rainlendar2-pro_2.12.2.b138-1_amd64.deb, I got this:   Selecting previously unselected package rainlendar2-pro. (Reading database ... 190677 files and directories currently installed.) Preparing to unpack rainlendar2-pro_2.12.2.b138-1_amd64.deb ... Unpacking rainlendar2-pro (2.12.2.b138-1) ... dpkg: dependency problems prevent configuration of rainlendar2-pro:  rainlendar2-pro depends on libpng12-0; however:   Package libpng12-0 is not installed.  rainlendar2-pro depends on tofrodos; however:   Package tofrodos is not installed.  rainlendar2-pro depends on libjpeg62; however:   Package libjpeg62 is not installed.  rainlendar2-pro depends on libwebkitgtk-1.0-0; however:   Package libwebkitgtk-1.0-0 is not installed.  dpkg: error processing package rainlendar2-pro (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-11ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Errors were encountered while processing:  rainlendar2-pro   I got this after issuing this command in terminal sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED:   rainlendar2-pro 0 upgraded, 0 newly installed, 1 to remove and 35 not upgraded. 1 not fully installed or removed. After this operation, 20.5 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 191316 files and directories currently installed.) Removing rainlendar2-pro (2.12.2.b138-1) ... Processing triggers for mime-support (3.60ubuntu1) ... Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...   What I'm doing wrong? After the last command it just removed Rainlendar and not installing dependencies as stated in the original post? TIA


I was reading the book "Elements of algebraic topology", by Munkres, and I am struggling to understand this example.    Why doesn't the diagram of figure 3.6 determine the torus?

At page 17 of Munkres' Elements of Algebraic topology it says, referring to fig. 3.6, that "the diagram does not determine [the torus]. It does more than paste opposite edges together":   Is it so? I tried to glue them together, but end up with a normal torus.


I'been sending emails through sendmail for a long time, I want to change to sendgrid, but my mails end up in the spam folder.  I been using sendmail so I suppose my domain already has some reputation, I don't know what else could be affecting my setup.  Any ideas?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I was trying to make glass, instead of it I got something like mirror, but it reflects unknown photo of trees I haven't ever seen before.

I’m not sure What it is? I’m trying to get a glossy shade to building in my scene as soon as I put roughness to zero I see these trees in glass. I have no trees in my scene anywhere, background is black. Even when I render I see these trees. How can I get rid of them and still keep my glossy building material.


If I suddenly lose my Internet connection, all of the Youtube videos that were pre-loaded by my browser (Chrome or Firefox) can still be watched and watched again, since they are saved somewhere in the memory of my PC.  Where does my browser save such videos? In what format?  I am interested in both Windows and Ubuntu-similar operative systems.

I have watched a video on youtube, I didn't close the browser window and it is buffered. I can watch that video anytime, without connecting to internet, as it is completely buffered. But I am not able to find the local cache for it, I checked the default folder of cache for my browser(chrome), which is: %AppData% Local\Google\Chrome\User Data\Default\Cache, but videos is not there. However it must be there somewhere in my local system as I am able to watch it again and again without connecting to internet. I used to get those previously, but something happen either it is saving in some other folder or what.  does anyone has any idea?


Every time I read about a theory in mathematics, it usually starts with axiomatizing the most fundamental concepts that are going to be treated.  Recently, I have started finding this troubling. In the foundational crisis, we tried to root all of mathematics on set theory and build it up from there. I believe this is a supremely elegant idea, but I have to ask myself why.  I understand why axioms are the brick wall against which all infinite regressions crash. We cannot, after all, ask why something is indefinitely. There must come a time when we simply say: because it is.  But why? What happens if we throw logic out of the window and attempt to start everything from scratch?   I have read about model and category theory and all types of order logics, but none of them seem to be enough because they are all rooted in something that eventually leads to a so-called "self-evident truth". What if infinite regressions are similar to infinite series: something that at first we assumed was non sensical but actually turns out to be really useful?  My question is: are there ways to build mathematics without axiomatizing? If no, is there a proof?

I am trying to understand what mathematics is really built up of. I thought mathematical logic was the foundation of everything. But from reading a book in mathematical logic, they use "="(equals-sign), functions and relations.  Now is the "=" taken as undefined? I have seen it been defined in terms of the identity relation.  But in order to talk about functions and relations you need set theory.  However,  seems to be a part of mathematical logic.  Does this mean that (naive) set theory comes before sentential and predicate logic? Is (naive)set-theory at the absolute bottom, where we can define relations and functions and the eqality relation. And then comes sentential logic, and then predicate logic?  I am a little confused because when I took an introductory course, we had a little logic before set-theory. But now I see in another book on introduction to proofs that set-theory is in a chapter before logic. So what is at the bottom/start of mathematics, logic or set theory?, or is it circular at the bottom?  Can this be how it is at the bottom?  naive set-theory $\rightarrow$ sentential logic $\rightarrow $ predicate logic $\rightarrow$ axiomatic set-theory(ZFC) $\rightarrow$ mathematics  (But the problem with this explanation is that it seems that some naive-set theory proofs use logic...)  (The arrows are of course not "logical" arrows.)  simple explanation of the problem:  a book on logic uses at the start: functions, relations, sets, ordered pairs, "="  a book on set theory uses at the start: logical deductions like this: "$B \subseteq A$", means every element in B is in A, so if $C \subseteq B, B \subseteq A$, a proof can be "since every element in C is in B, and every element in B is in A, every element of C is in A: $C \subseteq A$". But this is first order logic? ($(c \rightarrow b \wedge b \rightarrow a)\rightarrow (c\rightarrow a)$).  Hence, both started from each other?


I was recently looking at the entropy equation for an ideal gas, show below  $$S=NR\left\{\frac{5}{2}+\ln\left[\frac{V}{N}\left(\frac{2\pi mRT}{h^2}\right)^{3/2}\right]\right\}$$  And what troubles me is as $T\rightarrow0$ then entropy become negative, which violates the third law of thermodynamics, how can this be?

After deriving the entropy of an ideal gas we get to : $$S = Nk \left[\ln(V) + \frac{3}{2}\ln(T) + \frac{3}{2}\ln\left(\frac{2\pi mk}{h^2}\right) - \ln(N) + \frac{5}{2} \right]$$  In the zero temperature limit, we expect to have $S=0$, however, we get infinity. How can we overcome this mathematical inconsistency?


I have a div with further divs contained in it.These divs internally contain table/div in them. How can I select this parent div and its children in jquery? Parent div has the class "AccordionTitle AccordionTitle-selected"   I have tried following  var klo=$(".AccordionTitle.AccordionTitle-selected").contents()   and   var klo=$(".AccordionTitle.AccordionTitle-selected").children().clone()   but it is only selecting parent div and its children.Its not going deep to the root.I am using jquery 1.9.0  Thanks

Consider the following HTML:
    I should be changed red
       I should not be changed red.
I should be changed red.

   Given a DOM element obj and an expression, how do I go about selecting any children and possibly obj?  I'm looking for something similar to "select descendants" but also including the parent, if it matches the expression.  var obj = $("#obj")[0];  //wrong, may include siblings of 'obj' $(".foo", $(obj).parent()).css("color", "red");  //wrong -- excludes 'obj' $(".foo", obj).css("color", "red");  //correct way, but it's annoying var matches = $(".foo", obj); if ($(obj).is(".foo")) matches = matches.add(obj); matches.css("color", "red");   Is there a more elegant solution to this?


Consider the $(m-1)\times (m-1)$ matrix $M$ shown below.   $$ M=   \left[ {\begin{array}{cc}    1 & 1/2 & 1/2 & \ldots & 1/2\\    1/2 & 1 & 1/2 & \ldots & 1/2\\ \vdots \\ 1/2 & 1/2 & 1/2 & \dots & 1   \end{array} } \right]$$  I would like to show that $\det (M)=\frac{m}{2^{m-1}}$. I have tried induction, but the computation gets rather messy. When $m=2$, $\det(M)=1=2/2$, and when $m=2$, $\det(M)=1-1/2^2=3/2^2$.   I know some people are very good at seeing tricks to compute the determinant of a matrix like this without induction. Any ideas?  Thanks!

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


I am working on a JDA Discord Bot and everytime I run it, I get this exception. java.lang.NullPointerException: Cannot read the array length because "<local3>" is null     at com.houseofkraft.handler.CommandHandler.scanIndex(CommandHandler.java:42)     at com.houseofkraft.core.DiscordBot.<init>(DiscordBot.java:68)     at com.houseofkraft.Stratos.main(Stratos.java:13)  I was attempting to make a basic Command Handler and here is the code for it:  public void scanIndex(Index index) throws IOException, InvalidLevelException {         String[] commandList = index.indexClass;          for (String classPath : commandList) {             if (classPath.startsWith("com.houseofkraft")) {                  String[] classPathSplit = classPath.split("\\.");                 String commandName = classPathSplit[classPathSplit.length-1].toLowerCase();                  commandPaths.put(commandName, classPath);                 DiscordBot.logger.log("Added " + commandName + " / " + classPath + " to path.", Logger.DEBUG);             }         }     }  Index.java: package com.houseofkraft.command;  public class Index {     public String[] indexClass;      public String[] getIndexClass() {         return indexClass;     }      public Index() {         String[] indexClass = {                 "com.houseofkraft.command.Ping",                 "com.houseofkraft.command.Test"         };     } }  I'm not exactly sure why it causes the Exception. Thanks! EDIT: Here is my DiscordBot Code     public DiscordBot() throws IOException, ParseException, LoginException, InvalidLevelException {         try {             if ((boolean) config.get("writeLogToFile")) {                 logger = new Logger(config.get("logFilePath").toString());             } else {                 logger = new Logger();             }              logger.debug = debug;              info("Stratos V1");             info("Copyright (c) 2021 houseofkraft");              info("Indexing commands...");             // Add the Commands from the Index             commandHandler.scanIndex(new Index()); // here is the part that I call             info("Done.");              info("Connecting to Discord Instance...");             jda = JDABuilder.createDefault(config.get("token").toString()).addEventListeners(new EventHandler(commandHandler)).build();              if (jda != null) {                 info("Connection Successful!");             }          } catch (Exception e) {             e.printStackTrace();         }     } }

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


I am writing my thesis/dissertation and am refining my literature review. The literature I have written about has been cited but the citations across the entire paper are numbers (Which is what I want). However, for the Literature Review, I want the citations to appear by name or something meaningful rather than just numbers as it could become a bit vague to follow which papers are making which points. E.g.  [1] considers x, y and z with the intention... but I want something like *Paper name* considers x, y and z with the intention... Any advice or recommendations are much appreciated. Thank you

Is there some way to get the title of a citation shown in the normal text instead of the key? I need the titles of some papers I cite in the normal text, so typing them by hand seems to be superfluous if I already have them in my bibtex file.  Is there any way to do this?


While working on my first ever Latex document I have been looking for a way to add notes to tables. An answer to another question suggesting using threeparttable. Regardless of whether I add the tablenotes section, I get an error:   Error in thesis.tex (line 96): Extra }, or forgotten \endgroup. \endtabular ->\TPTsav@endtabular \TPT@endtabhook l.96 \end{tabu} I've deleted a group-   closing symbol because it seems to be spurious, as in `$x}$'. But perhaps the } is  legitimate and you forgot something else, as in `\hbox{$x}'. In such cases the way to  recover is to insert both the forgotten and the deleted material, e.g., by typing  `I$}'.    My MWE looks like this:  Preamble:  \documentclass[man, natbib, a4paper, draftfirst, twoside, 12pt, floatsintext]{apa6}  %---------TABLES--------- \usepackage{booktabs} \usepackage{tabu} \usepackage{threeparttable} %indents in tables (custom command) \newcommand*{\TableIndent}{\hspace*{0.5cm}}% %-------END TABLES--------   In the document:  \begin{threeparttable}[!h] \centering \caption{Number of sample deletions by reason} \label{tab1} \begin{tabu}{X[.3,r]X} \toprule Number of respondents & \multicolumn{1}{c}{Reason for deletion}       \\  \midrule 77,934                & Number of respondents in original SOEP sample    \\ -23,690               & \TableIndent 1. Not in sample starting 2004\\  \cmidrule(r){1-1} 54,244                 &                                                \\  \addlinespace -52,673                & \TableIndent 2. Started first job before 2004   \\  \cmidrule(r){1-1} 1,571                 &                                                   \\ \addlinespace  -16                & \TableIndent 3. Risk data is not available     \\  \cmidrule(r){1-1} 1,555                 & Sample used for analysis                          \\  \addlinespace \bottomrule \end{tabu} \end{threeparttable}   I thought that I had my environments nested wrong, but all answers so far have tabu inside of threeparttable.

threeparttablex can be used to add table notes to tabu tabulars*. If the tabular spans \textwidth, the output is as expected. It seems however that the tablenotes environment does not adjust its width if the tabular is narrow, although of course this would be desirable.  1) Is there any option/command which is intended to automatically adjust the tablenotes environment's width?  2) If not, is there a workaround?    @ 2) According to , threeparttablex does know the tabular's width. Moreover, given that for the threeparttable package, which threeparttablex supposedly builds upon, the package documentation states "you can redefine the whole tablenotes environment", it seems that it should be possible to find a workaround.  \documentclass{article} \usepackage{booktabs} \usepackage{tabu} \usepackage{threeparttablex}  \begin{document}     \centering \begin{ThreePartTable}     \begin{tabu} to .4\textwidth {XX}         a & b   \\\toprule         0 & 1   \\\bottomrule     \end{tabu}     \begin{tablenotes}         \footnotesize         \item[*] This is a long table note text, long enough to exceed the table's width.     \end{tablenotes} \end{ThreePartTable} \end{document}   *threeparttablex is designed to extend threeparttable to longtable. Even though the manual does not mention it, threeparttablex works with tabu, which threeparttable does not. Replacing threeparttablex's ThreePartTable environment in the above code with a threeparttable environment gives an "Extra }, or forgotten \endgroup." error.


I have a file1 with the following:  1,joe,jim,bob,sally,mark,sue,etc,etc 2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc 1,clarie,mike,joe,jim,bob,sally,,etc,etc 2,matt,alivia,joe,jim,bob,mark,sue,etc,etc 1,julie,claire,joe,jim,bob,sally,mark,sue,etc,etc 2,sophia,joe,jim,bob,sally,mark,sue,etc,etc   I would like to change it so column 1 was in numerical order and write to file2:  1,joe,jim,bob,sally,mark,sue,etc,etc 2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc 3,clarie,mike,joe,jim,bob,sally,,etc,etc 4,matt,alivia,joe,jim,bob,mark,sue,etc,etc 5,julie,claire,joe,jim,bob,sally,mark,sue,etc,etc 6,sophia,joe,jim,bob,sally,mark,sue,etc,etc   my file1 has over 100,000 lines and has 65-90 columns per line.

I have two sample files like this:  $ cat file1 abc,sachin cat,kumar   $ cat file2 xyz pressure  $ cat file3  xyz,sachin pressure, kumar    I want the first column of file1 to be replaced with file2.  I tried doing something like this:  $ awk 'FNR==NR{a[NR]=$3;next}{$2=a[FNR]}1' file1 file2   I'm using Solaris 10 and it didn't appear to support this. Any other suggestions?


Let $OABC$ be a regular tetrahedron. Using   $OA=a,~OB=b,~OC=c$, prove that  $QT$  bisects  $PU$ where $P,U,Q,T$ are mid points on the edges of a regular tetrahedron. P is the midpoint of OA. T is the midpoint of AC. U is the midpoint of BC. Q is the midpoint of OB. Midpoints; P and Q are midpoints on the edges of the base of the tetrahedron.  Going about this I thought that I would prove that $PUQT$ forms a a parallelogram and then prove that $QT$ bisects $PU$, however I may be wrong.

Suppose that $OABC$ is a regular tetrahedron with base $ABC$. Suppose further that $T$ is the mid-edge of $AC$, $Q$ is the mid-edge of $OB$, $P$ is the mid-edge of $OA$, and $U$ is the mid-edge of $CB$.  How can one show that $QT$ bisects $PU$?


I've recently seen latest mac os is having invisible scroll bars which will be visible only once your mouse comes onto it. I think it is a bit tough for the user to know if there is a page overflow or not. Is it not a bad User experience.

The scroll bar is hidden on MacBook if the user doesn't move the mouse for some time.  This pattern is also used in other devices too, for example Android devices.  The scroll bar does not take much place but it informs a user of where on page he is.  Is it a good approach hiding the scroll bar when the user is presumed viewing the content?


I am looking for the symbol := and the symbol ::=  the first one means "expressed as" (e.g. a sentence A is expressed as a juxtaposition of words bcd) and the second one means "defined as", in various applications of logic and language theory. in Linux, typing := one after one (in kile or lyx) causes vertical misalignment of the characters. I expect the center point between two dots of : and the center line through the two lines of = be on the same line, but often = is positioned too high, and also the space between them is too large, and a negetive space of -0.1 em does not look good.  Anyone like to help, telling me where to find these two symbols?

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


Let $x>0$, $y>0$ and $z>0$ such that $x\neq y $ , $y\neq z$ and $x\neq z$. If $x+\dfrac{1}{y}=y+\dfrac{1}{z}=z+\dfrac{1}{x}$, prove that $xyz=1$

If $a, b, c$ be distinct reals such that $$a + \frac1b = b + \frac1c = c + \frac1a$$ how do I find the value of $abc$?  The answer says $1$, but I am not sure how to derive it.


I want to only get the value associated to "cached" column of the free -m command. What is the most efficient way to achieve it? Something with sed or awk?

free -m currently puts out something like this.     I would like to know using grep/awk how we can get the total free amount. i.e. 9083


Looks like there is no such option in BIOS and I'm unable to find any software to do it from the OS. My laptop model does not appear in

How can I control the computer's fan speed?  On Windows there is a wonderful program called .


When evolving a Pokémon of the same kind in PokémonGo, do you evolve the high cp or the low cp Pokémon?  For example, there are two female Nidorans, one of 144 and the other of 234 (remember, this is just an example, I'm just throwing out numbers and Pokémon). So, which Nidoran do you evolve into a Nidorina?

When activating the evolution for a caught Pokemon, it seems to amplify the Combat Power (CP). Thus it seems most beneficial to evolve your Pokemon with the highest CP, if you have multiple of the same kind.   But what I am not sure about is whether it makes an efficiency difference if you spend candies and dust to boost CP before evolving, to gain more from the amplification? Or is it more efficient to just evolve without spending, and then using the leftover candies afterwards, since they now give a bigger CP boost per candy?   I only tested with a Rattata so far, which gained +8 CP per candy before evolving, and +15 CP afterwards. I collected no numbers on the amplification efficiency though, and now ran out of materials for further testing.  Or maybe it is a balanced calculation and makes no difference at all? I would love to have some insight on that.    Some data I collected thus far: (GPC = CP gain per candy)  79 CP Weedle (GPC 6) evolved to: 84 CP Kakuna (GPC 6), evolved at 90 CP to: 297 CP Beedrill    Note: The max-CP "half circle" in the profile stayed filled roughly at the same relative position throughout the evolutions.


Here is my output after running df -h --total:  Filesystem      Size  Used Avail Use% Mounted on udev            3.9G     0  3.9G   0% /dev tmpfs           784M  9.9M  774M   2% /run /dev/nvme0n1p3  216G  182G   24G  89% / tmpfs           3.9G   33M  3.8G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup /dev/nvme0n1p1  496M   28M  469M   6% /boot/efi cgmfs           100K     0  100K   0% /run/cgmanager/fs tmpfs           784M     0  784M   0% /run/user/0 tmpfs           784M  104K  783M   1% /run/user/1001 /dev/mmcblk0p1   60G  1.4G   59G   3% /media/joe/3666-6537 total           290G  183G   96G  66% -   I have a lot of photos and videos on this drive, which are clearly all being kept in /dev/nvme0n1p3. I've recently cleared some space, but certainly not 96G worth (The total Avail). Before I did cleanup (of around 20G, which agrees with the Avail amount on /dev/nvme0n1p3), I was not able to export from photo editing applications or render any videos, having been given warnings bout my disk being full. Obviously, this was only the /dev/nvme0n1p3 filesystem that was full.  So why do I have so much storage in these other dev and tmpfs partitions (is partition the right word here?) that seems to being going unused? I assume that the tmp directories fill up with junk when the system is in heavy use? And what is /dev/mmcblk0p1, which is using hardly any of it's allotted 60G of storage?

I am trying to understand how to see the total size of my hard drive & how much is left. It was recommended on various searches to use the command below   df -h Filesystem      Size  Used Avail Use% Mounted on udev            7.8G     0  7.8G   0% /dev tmpfs           1.6G  9.6M  1.6G   1% /run /dev/sda1       219G   29G  180G  14% / tmpfs           7.8G   18M  7.8G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup cgmfs           100K     0  100K   0% /run/cgmanager/fs tmpfs           1.6G   64K  1.6G   1% /run/user/1000   However I don't understand any of these directories. I mean what are they, are these all directories or partitions or what? And why do they appear under "mounted on"? How does that bit work. I assume the /dev/sda1 is my solid state drive? So now if I install applications, which one of these directories does my software get installed  into? I assume it just gets installs in the / directory (I haven't even got a clue what the / directory is). Can someone explain what the other directories are and what they are used for?


I'm trying to create a nxn 2D list where its values starts from 0 to n something like this  [ 1 2 3 4 ] [ 5 6 7 8 ] [ 9 10 11 12]  I tried to use the following code to do it     self.board = [[list(range(n*n) for i in range(self.n)] for num in range(self.n)]  but instead it fills every element in the list with 16 elements What expression should I use to replace list(range(n*n)) ?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I operate some Windows Servers (with Windows Server 2019 Standard) that work with sensitive business informations. These servers are accessed by Remote Desktop Services (mstsc.exe), using the default port which is 3389. I recently read on Quora that there are a large amount of mstsc logins on sale on the dark web. So I wonder that is it safe to leave the Remote Desktop Services port on the default (which is 3389)?

On my home Windows 10 machine, I have port forwarded Microsoft's RDP port (3389) via my router to port (20202). Thus, I can remotely access the Windows 10 machine via the Microsoft Remote Desktop application on my Mac by simply typing in <my public IP address>:<port> (e.g. 134.111.23.443:20202).  I'm wondering if there is a way to make this more secure, such as tunneling over SSH, without requiring any other computers (I only have the Windows 10 Machine connected to the Internet by landline at home, and my MacBook, which I take with me).


I have been trying to get USC to install. have tried almost every way i could find online so far BUUUUT... from what terminal was telling me I have no files missing ran a software check, Sudo something something. said no error or corrections were needed. USC still could not be found. i even restarted before i checked again. no change. I did not, how ever save a Txt. of my terminal data before restart sorry. but i will try what ever an post that data if its needed at some point.

I updated Ubuntu last night (sudo apt get update && sudo apt get upgrade) and to  my surprise this morning I didn't find the 'Ubuntu Software' app and there's a new entry called 'Snap Store' which when opened looks just like the old 'Ubuntu Software' app. So has 'Ubunu Software' been renamed to 'Snap Store'? And if yes, why?


I submitted an article to an Elsevier Journal in (Jan, 2018) The status and the status date changed after one week in "under review". Now status remains "Under review" but the status date is new (Sep 2018) Could you please tell me what it means? Thanks

I have a paper submitted to a journal of Elsevier.  From "Manuscript Submitted" to "with editor" took one day; then it was  "with editor" for five days, and then "under review". One and a half months later, the status of the paper was still "under review", but the date of status has changed.  What can cause the date in the submission system to change in the absence of a change in status?


Is there any formular to this sum? $$ \binom{n}{1}  + \binom{n+1}2 + \binom{n+2}3 + \cdots + \binom{n+m-1}m$$  This is a sum of left aligned .  For example, that is the sum of below numbers.(n=5, m=4)  [[ 1  1  1  1  1]  [ 1  2  3  4  5]  [ 1  3  6 10 15]  [ 1  4 10 20 35]]   It looks like the sum is  $$ \binom{m}1\binom{n}1 + \binom{m}2\binom{n}2 + \binom{m}3\binom{n}3 + \cdots + \binom{m}n\binom{n}n, \;\text{where } m>n$$ But I can't get a shorter form.

How to simplify $\sum_{i=1}^{k}\binom{n + i - 1}{i}$? I tried reducing the sum to $\binom{n}{1}, \binom{n}{2}, \binom{n}{3}$ and so on but couldn't get a pattern.


I want to recover in Java the instance of the caller. Here is my code  class A {     void methodA() {         B b = new B();         A a = b.methodB(); //needs to be the same instance ie "this"     } }  class B {     A methodB() {         //Here the code (with reflection) I need         A a = getPreviousInstanceCaller();         return A     } }   Does it exist in Java a way to do that ? Maybe with reflection ?

I need to find the caller of a method. Is it possible using stacktrace or reflection?


Why does f\left(x\right) result in more space before the ( than f{\left(x\right)}?  i.e. Why does putting extra braces suppress the space?

Why does the addition of a \left and \right introduces an extra space around the formula? Specifically, why do $\cos(\theta)$ and $\cos\left(\theta\right)$ render differently?  Is there a way to use resizable delimiters without introducing the spurious spaces?  Why did Knuth design it like this?  Edit: This occurs too, if \operatorname{MYOP} or some other operator, like \lim, \min etc. is used. (This edit is basically to make it easier to find this answer.)