undefined reference with a static instance

I am currently porting some code from Visual Studio to Mingw GCC. It seems there is a problem when I attempt to use a static variable . This code works fine in Visual studio so I am not sure what the problem might be here. I have pasted an outline of what the code looks like. If this is insufficient I could put in more.  Header file: .h namespace LG_Wrapper {     template <LG_Thread Thread>     class EffectApplication : public ktApplication     {     public:     static EffectApplication<Thread>& GetInstance();     protected:         .....         .....         static boost::recursive_mutex mResource;       } }  DECLARE_LEGACY_TYPES(EffectApplication);   Source File: .cpp namespace LG_Wrapper {      template<>     boost::recursive_mutex  EffectApplication<LG_Thread_NAME>::mResource;  //LG_Thread_NAME type discussed below      template <LG_Thread Thread>     EffectApplication<Thread>& EffectApplication<Thread>::GetInstance()     {         boost::recursive_mutex::scoped_lock mutex( mResource ); //Error with mResource          static EffectApplication<Thread> instance;         return instance;     }     .... }   Now I am not sure about the LG_Thread_NAME type.  After going through the code I noticed that I define the following in the project settings  LG_THREAD_NAME=GAME   This definition comes into play with this macro somewhere else in the code  #define DECLARE_LEGACY_TYPES(...)   I am having issue accessing mResource The code builds fine if I comment out the statement  boost::recursive_mutex::scoped_lock mutex( mResource );   Any suggestions on why I might be getting the following error with the above code ?  (.text$_ZN10KT_Wrapper17EffectApplicationILNS_9LT_ThreadE0EE11GetInstanceEv[_ZN10LT_Wrapper17EffectApplicationILNS_9LT_ThreadE0EE11GetInstanceEv]+0x11): undefined reference to `LT_Wrapper::EffectApplication<(LT_Wrapper::LT_Thread)0>::mResource'   Update: I am certain that there is something wrong with the variable mResource because in the static method. If I do this it builds fine    boost::recursive_mutex l; boost::recursive_mutex::scoped_lock mutex( l );   Duplicate Question Issue: I am not sure how this question is a duplicate of the links provided. In all the links provided the ops have not initialized their static variables. Here I have initialized my static variable outside the class.


I accidentally put 2 cups of water in one box of strawberry cake mix, and i was only supposed to put 1 cup. I dont have any extra boxes to start over with, and the consistency of it is too thin! How can i fix it?


(int) does not type-convert multiplication result correctly

If I use (int) to convert a product between a float  type variable and an integer, the result is not what I expect it to. Please see my code.  The expectation is that the result is 4090270, not 4090269  (int)(4090270.0) works correctly  $amount = 40902.70; // Same for  40902.20 $amount= (int)($amount*100); echo $amount; /// Output :  4090269


I've been trying to play some games on my macbook (running on mojave) and whenever I try to hold CTRL and click it won't let me. Is there anyway to disable Ctrl-Click?


How to show search results when the column isn't there or will have too many results per row?

The same issue can happen with Deal. If I search for "AUG" I might get 100 results for 1 Group or 1 row, so in total I may have 300 rows with 100 results per row. So I obviously can't show that many deals. Which is why I am only showing a total # of deals. But if they search, what is the best way to show the matches? Would I put "Matched 2" after the # of total deals in a group?


I am beginner in Java and i have a question while trying to learn Strings . In the below program  String st1="Test"; String st2="TEST"; String st3= st1.toUpperCase();  if(st3 == st2) {     System.out.println("Equals");  } else     System.out.println("Not Equals");   O/P for the above program displays as "Not Equals" where as i was expecting "Equals" Since "TEST" already exist in String Pool,  st3 should have pointed to already existing String rather than creating a new String.  Kindly explain the behavior. Thanks in advance


Suspected Virus. Interuppted downloads on IE, Chrome, windows update, adobe

So I'm looking for some advice. I'm running out of ideas.  I have an issue on 2 of my computers.  My MS Surface Pro 4, and Desktop PC. Downloads are interrupted in chrome and IE... Windows update is failing to download updates. Adobe Creative cloud cannot update...   I suspect a virus or malware. however I'm running Bitdefender on both (could this be the cause). I've also run malwarebytes. (Although I had to download on another computer, as it is showing a network error when downloading on either of these devices) Nothing is turning up any issues. I've tried Bitdefenders Repair CD to do an offline scan. I couldn't get Kaspersky or Windows defender to boot on my surface to try offline scans with them.   I have brought my surface to my office, and used the guest wifi. same issue so not the network.  Both computers are running windows 10 insider preview builds, but one is home(build 14942), one is pro (build 14959).  Any suggestions of what I can try? Any software I can run to narrow down the search area?  Thanks in advance  Martin


USB drive encrypted with VeraCrypt on Windows doesn't automount on Ubuntu

I encrypted using VeraCrypt on a Windows machine and the problem is that it doesn't auto mount and show up.  I used lsusb to find the device so it is showing up.  Bus 001 Device 011: ID 0781:5575 SanDisk Corp   How do I mount this and can I install VeraCrypt on my Ubuntu machine and un-encrypt it?


How can I replace pictures in Libre Office documents?

I have a document that I want to use as a template every so often; I will change the pictures and some of the text, but want to keep the general layout.   I have been able to do the replace picture thing in MS Word, and from the reading I have done, it looks like it was also done easily in Open Office.  How can we do this in Libre Office?


I am aware of why the Axiom of Choice is equivalent to the the statement that every surjection splits. However, I don't see why we don't also need AC to show that every injection splits.  In particular, for any injection $f$, we need to pick some element in the domain of $f$ to which elements in the codomain of $f$ are sent in the case that those elements are not in the image of $f$. This shows moreover that left inverses are not in general unique. How can we do this without AC?    EDIT: My real issue here is in the comparison of the proof of "$f: A \to B$ is a surjection implies $f$ has a right inverse" with the proof "$f: A \to B$ is an injection implies $f$ has a left inverse", and the use of the Axiom of Choice therein.   In particular, one apparently need not invoke AC in the injection proof to select in advance a single element $a_0 \in A$ for which to send $b \in B$ in the case that $b \notin f(A)$. But then, in the same way, in the surjection proof surely one may select for each $b \in B$ a single element $a_b \in f^{-1}[\{b\}]$ which then determines a function $g: B \to A$ such that $fg = \text{id}$, all without AC? We know each $f^{-1}[\{b\}]$ is not empty, so pick an element in $f^{-1}[\{b\}]$ (in the same way we did so in the injection proof by picking $a_0 \in A$) and send $b$ to that element.


Max resolution of Intel 8th gen Integrated graphics undetected by Ubuntu 16.04

On a newly installed 16.04, the screen resolution cannot be changed from 1024 x 768, even though my Intel chipset and monitor are confirmed to support a resolution of 1920 x 1200 or more.   I do seem to have the Intel driver installed and enabled. I have also tried , which didn't change anything.  I have seen quite a few questions about it here and elsewhere, none of which suggest a clear solution nor any way of diagnosing the root cause. My current bet is that somehow 8th generation intel processors, require  but the process seems a little sensitive to try.


I wants to cite my document in latex(overleaf). and I used biblatex . but then i saw after compiling it's numbers changing in wrong  form and one of them disappearing.  \documentclass[12pt,onecolumn,a4paper]{article} \title{hw3} \author{alisafarpoor1108 } \date{May 2020} \usepackage{graphicx} \pagenumbering{roman} \usepackage{biblatex} \addbibresource{lib.bib} \begin{document} \begin{figure} \centering     \includegraphics[width=\textwidth,height=\textheight,keepaspectratio]{images/nemad.jpg} \end{figure} \vspace{2cm} \title{Third Homework}  \author{ IUST \\ }  \pagebreak \date{\today} \maketitle \pagebreak \tableofcontents \pagebreak \listoffigures \pagebreak \pagenumbering{arabic} \section{CRITERION} salam\cite{1}\cite{2}\cite{3}\cite{4}\cite{5}\cite{6}\cite{7}\cite{8}  \medskip \printbibliography \end{document}   and my lib.blb is:  @article{1,   author  = {M. Xi and L. Chen and D. Polajnar and and W. Tong},    title   = {Local binary pattern network: A deep learning approach for face recognition,},   journal = {IEEE International Conference on Image Processing (ICIP)},   year    = 2016,   pages   = {3224-3228}, } @article{2,   author  = {J. Deng and J. Guo and N. Xue and S. Zafeiriou},    title   = {ArcFace: Additive Angular Margin Loss for Deep Face Recognition,}, journal = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},     year    = 2019,    pages   = {4685-4694},     note    = {An optional note},    }   @online{3,     author = {O. Kharkovyna},   title = {An Intro to Deep Learning for Face Recognition,},   year = 2019,   url = {https://towardsdatascience.com/an-intro-to-deep-learning-for-face-recognition-aa8dfbbc51fb},   urldate = {2020-03-30} }  @book{4,   author    = {X. Jiang and A. Hadid and Y. Pang and E. Granger },    title     = {Deep Learning in Object Detection and Recognition},   publisher = {Springer},   year      = 2019,   isbn      = {9811051518} }  @article{5,   author  = {P. S. Chandran and N. B. Byju and R. U. Deepak and K. N. Nishakumari and P. Devanand and P. M. Sasi},    title   = {Missing Child Identification System Using Deep Learning and Multiclass SVM,},   journal = { IEEE Recent Advances in Intelligent Computational Systems (RAICS)},   year    = 2018,   pages   = {113-116}, }  @article{6,   author  = {J. Yu and D. Ko and H. Moon and M. Jeon},    title   = {Deep Discriminative Representation Learning for Face Verification and Person Re-Identification on Unconstrained Condition,},   journal = {IEEE 25th International Conference on Image Processing (ICIP)},   year    = 2018,   pages   = {1658-1662}, }  @article{7,   author  = {J. Zeng and J. Zeng and X. Qiu},    title   = {Deep learning based forensic face verification in videos,},   journal = {International Conference on Progress in Informatics and Computing (PIC)},   year    = 2017,   pages   = {77-80}, }  @article{8,   author  = {D. Voth},    title   = {Face recognition technology,},   journal = {IEEE Intelligent Systems},   year    = 2003,   pages   = {4-7}, }   but in output i see like the image with wrong citation. for making it simple I removed most parts but remaining that is here is still wrong.   '''


Determine the Taylor series expansion of function $f(x) = \frac{\arcsin(x)}{\sqrt{1-x^2}}$.  $f(x) = \frac{\arcsin(x)}{\sqrt{1-x^2}} = \arcsin(x)\frac{1}{\sqrt{1-x^2}}$  It is known:   (1.) $\arcsin(x) = \sum_{n=0}^\infty\frac{(2n-1)!!x^{2n+1}}{2^nn!(2n+1)}$  (2.) $\frac{d}{dx} (\arcsin(x)) = \frac{1}{\sqrt{1-x^2}} = \frac{d}{dx}(\sum_{n=0}^\infty\frac{(2n-1)!!x^{2n+1}}{2^nn!(2n+1)}) = \sum_{n=0}^\infty\frac{(2n+1)!!x^{2n+2}}{2^{n+1}(n+1)!}$  (3.) In third step I multiplied these two series, but I am not sure whether it is correct: $\arcsin(x)\frac{1}{\sqrt{1-x^2}} = \sum_{n=0}^\infty(\sum_{m=0}^n\frac{(2m+1)!!x^{2m+2}}{2^{m+1}(m+1)!})\frac{(2n-1)!!x^{2n+1}}{2^nn!(2n+1)}$  EDIT: How did you get this sum $\sum_{n=0}^{\infty}\frac{4^n (n!)^2}{(2n+1)!}x^{2n+1}$ ?  And, in case I have to determine the product of the (some other) series, which one of these should I write?   (a) $\sum_{n=0}^\infty(\sum_{m=0}^n\frac{(2m+1)!!x^{2m+2}}{2^{m+1}(m+1)!})\frac{(2n-1)!!x^{2n+1}}{2^nn!(2n+1)}$  or   (b) $ = \sum_{n=0}^\infty(\sum_{m=0}^n\frac{(2m-1)!!x^{2m+1}}{2^mm!(2m+1)})\frac{(2n+1)!!x^{2n+2}}{2^{n+1}(n+1)!}$


How do I save list values in a list in python?


Stop making iPhone constantly change sound volume on its own?

I regularly get interrupted in watching and listening to video by the volume randomly getting lowered without me asking for it. I get a system notification telling me "the volume was lowered", telling me it's protecting my hearing based on the last 7 days of use. I've never been asked about enabling such a feature. I have already disabled what relevant items I can find under Sound & Haptics, which is given as the source of the notification. It apparently doesn't matter though because it's not being respected. How can I make this stop? iPhone 8, iOS 14.2


Will I get corpses if enemies were stunned?

I'm playing XCOM: Enemy Within.  I've already researched all the corpses type and had lots of plasma weapons for my entire troops.  It seems no need to stun enemies and capture them alive.  Will I get corpses if I stun the enemies instead of kill them?  If I can only get their weapons and nothing else, maybe I don't need to bother capture them any more.  Thanks for the answers :D


Calculating Variance of the LogOR for within subjects studies for a meta-analysis

I would like to add to a meta analysis both studies with between and within subject design, but for the latter I don't know how to calculate the variance of the logOR. I found an answer  But what does ns stand for?


The number next to the featured tab is incorrect

On mobile (can't check main, but I suspect this bug isn't there on main), on a tag search page, the number next to the featured tab seems to be behaving strangely.  The  tag has 4 featured (bountied) questions.   the featured tab(dropdown) has a "(409)" next to it.   it is 22  , it is 11.  Screenshot:        None of these are the actual number, 5.


Could there be equivalence between anisotropic space and the presence of a field?

What if we are so used to the curvature of space caused by mass and the range of its effects that we totally ignore the possibility of the existence of "opposite" curvature1, i.e. objects that bend space opposite to mass and cause repulsion by creating local space anisotropy?   What if we are so used to space curvature caused by mass that we invent a force that has no charge to explain possible effects of opposite curvature (repelling force - diamagnetism)?   What if the oscillating electric field has the ability to cause tiny local (anisotropy) fluctuations in space and its effects on objects are interpreted as "magnetic field"?  Could magnets be just an example of objects with anomalous gravitational fields due to their ability to distort the isotropy of space?  I guess my question boils down to:   How do we know that the force at the poles of a magnet is not gravitational (large but local curvature caused by anisotropy) with opposite signs, rather than what we call magnetic?  Can space curvature arise from something else different than mass?  What would change on the r.h.s of the Einstein's equation (components of stress-energy tensor) if we assume a connection with torsion?    1. Same size of the volume element $dV$, but with stretch in one element, say $dx$ and proportional compression in the other two $dy$, $dz$.


How do I find block of text, from a text file, containing a specific string


How to merge/join two file based on common field with repeated rows


Given the normal distribution X=N(1,2), what is E[X^3]?

Given $X \sim N(1,2)$, what is $E[X^3]$?  I've been told I should use the moment generating function, but I'm not sure how to apply it here in this instance.  Using the given mean and variance, I subbed the values into the normal density function $f(x)$, then tried to compute $E[X^3]$ by integrating $\int_{-\infty}^{\infty} f(x) \, x^3 \mathrm{d}x$ . At this point, I have no idea how to compute the integral, which leaves me pondering if I've veered way off track. I'd appreciate any help!


High voltage OP amplifier circuit analize

I revised my previous hand drawing schematic to a clear one.   As discuss, Block A seem to be a non-inverting amplifier. But not same with classic non-inverting OPA, the input is at inveting-input at OP, is this works? Or it's a schmitt trigger? Block D seems to be a current source, How to calculate the current Id? How to analyze block B & C?  What is C1 function?   The image from circuit lab looks a litter small. I attached a bigger on pic.  Sorry for many questions, I'm really new to analog circuit.  Thanks a lot for your patience.            – Schematic created using


What is the agreed upon definition of a "positive definite matrix"?

In here:      A positive definite matrix is a symmetric matrix A for which all   eigenvalues are positive. - Gilbert Strang   I have heard of positive definite quadratic forms, but never heard of definiteness for a matrix.   Because definiteness is higher dimensional analogy for whether if something is convex (opening up) or concave (opening down). It does not make sense to me to say a matrix is opening up, or matrix is opening down.   Therefore it does not make sense to say that a matrix has definiteness.   In addition, when we say $M \in \mathbb{R}^{n \times n}$ positive definite, what is the first thing we do? We plug $M$ into a function(al) $x^T (\cdot) x$ and check whether the function is positive for all $x    \in \mathbb{R}^n$. Clearly, that means we are defining this definiteness with respect to $x^T (\cdot) x$ and NOT $M$ itself.  Furthermore, when matrix have complex eigenvalues, then we ditch the notion of definiteness property all together. Clearly, definiteness is a flimsy property for matrices if we can just throw it away when it becomes inconvenient.     I will grant you that if we were to define positive definite matrices, we should only define with respect to symmetric matrices. This is the definition on Wikipedia, the definition used by numerous linear algebra books and many applied math books.  But then when confronted with a matrix of the form   $$\begin{bmatrix} 1 & -1 \\ 0  & 1 \end{bmatrix}$$  I still firmly believe that this matrix is not positive definite because it is not symmetric. Because to me positive definiteness implies symmetry.   To what degree is it widely agreed upon in the math community that a positive definite matrix is defined strictly with respect to symmetric matrices and why only with respect to symmetric matrices?


How do I access a HTLM element that was load with a JQuery function?

How do I access an element inside the header.html file, loaded in the javascript code, using document.getElementById("element") inside the index.js? There is another way of accessing it from the index.js file?  index.html file     <html> <head>     <meta charset="utf-8">     <script src="//code.jquery.com/jquery-1.10.2.js"></script>     <link rel="stylesheet" type="text/css" href="css/style.css"/>     <script src="js/jquery.js" type="text/javascript"></script>     <script>         $(function(){             $("#header").load("header.html");             $("#footer").load("footer.html");         });     </script>     <script src="https://www.gstatic.com/firebasejs/3.9.0/firebase.js"></script>     <script src="js/app.js" type="text/javascript" language="javascript"></script>     <script src="js/index.js" type="text/javascript" language="javascript" defer></script> </head> </html>


Why can't a spin-1 particle decay into two identical spin-0 particles?

I've got this far:  Suppose a spin-1 particle with $j$,$l$,$s$ decays into a system of two identical spin-0 particles with $J$,$L$,$S$.  The RHS must have total spin $S=0$, so $J=L$ which must be even since the particles are Bosons and their states must be symmetric in their exchange.  Then by conservation and addition of angular momenta, the LHS must have $L=J=j=\left\{\begin{array} \.l-1,l,l+1 &\text{ if }l\neq0 \\ 1 &\text{ if }l=0 \end{array}\right.$.  Mistakes are likely.  Two possible ways to proceed (but I can't motivate either):   Can I choose to take $l=0$ for some reason? I know (I think) that a system of two identical Bosons has to have $l$ even, because of symmetry of their wavefunctions under exchange of the two particles. Does the value of $l$ for a single Boson also have to be even? If so, can I then somehow rule out the $j=l\neq 0$ case and get a contradiction?


How to add the measures of the single parts of a 3d object saved in STL format

I've downloaded the STL files of a puppet that should be ready to be printed with a 3d printer and I've used two 3d tools to display the relative components of the puppet's body. First of all I used Blender, but unfortunately I can't see anything, as you can see from the picture that I have attached. I've also used the program that Windows uses by default and this time I was able to see the content inside. So now I have two problems to fix within Blender :  I want to understand how to see the content of the STL file as soon as I open the file in blender  I want to see the the measures in cm of the single parts of the objects   thank you.


80s book similar to Narnia but with a more Celt feel, allusions to Finn MacCool and eating "the salmon of wisdom"

So, I read this book in the mid-nineties (no idea if it was new or not).  I can't recall the title (obviously), but relevant plot points:  It starts off like the Narnia series, where a young (tween) sister and brother are sent to live with relatives in a country estate.    If I recall correctly, the girl was older, and the boy was more of a child, she was closer to being a teen (or actually being a teen). I remember specifically that he was referred to as having baby fat still, and being more childish than her.  They discover salmon swimming in the pool, and there was an old woman. Turns out she was a druid who had turned a man into a salmon for (reasons). Both he and her are from the ancient past (you know, when druids were more common), and the guy starts to resemble the famous Irish hero Finn MacCool.  I am pretty sure he was called Finn also, but I don't think they ever gave him a last name in the book, so I'm pretty sure it's not the eponymous book "Finn MacCool" which I saw later on.    The druid takes the kids and young man back in time with her, and they live in the woods for a while having adventures.  I don't recall all of them, but I do recall that Finn had to catch and eat the "salmon of wisdom" or similar, and burned his thumb in doing so, which made him think he had to stick his thumb in his mouth to think.    Eventually the kids were returned to their own time, leaner and harder and more tan, and the boy faced up to some bullies and didn't let himself get pushed around (evidence of his character development, I suppose).    I thought it'd be a fun book for my daughter, but can't for the life of me remember the name to find it.


In diagrams I often see light waves depicted as little sine waves that travel through space.  And often when describing polarizers, the explainer will angle their hand to show the angle of polarization and bob it up and down in a sine wave action, apparently emulating the amplitude of the wave.  My questions is, is the amplitude of light really like this?  Where it moves up and down or side to side in space?  Or, is the sine wave relationship just an analogy?


My use case is to obtain the material coefficients for simple material classes (metals, plastics, wood, fabric, glass etc). As an example, I have created a simple metal gold in Blender 2.79 using the following steps:   Choose the cycles renderer Add Monkey mesh  Material -> Glossy BSDF Pick color of gold (#FFD700) Render (Shift + Z)   Now, I want to see what the .MTL coefficients of this material are. To that end, I exported the .OBJ file (which generated its associated .MTL file). But the values in my .MTL file are default values. Moreover, when I re-import the .OBJ into blender, it doesnt show my metal.   My question is: Is there any way I can view the .MTL coefficients of this simple material?   What has been tried: There is one answer , but I was not able to "pack" anything. In fact I do not know how to pack material properties.


Strong law of large numbers --> convergence in L^{1}?!

Let $X_{1}, X_{2}, X_{3}, ...$ be a sequence of iid and integrable random variables with $E[X_{1}] = \mu$. Show that $$ \frac{1}{n} (X_{1}+X_{2}+X_{3}+...+X_{n}) \to \mu   $$ in $L^{1}$.  My thoughts so far: Strong law of large numbers implies almost surely convergence. So I still need to get from a.s. convergence to $L^{1}$ convergence. In my lectrure notes I have found two possible ways of doing so:  (a) If $\quad$ $X_{n} \to X \; a.s.$ $\quad$ and $\quad$ $E(|X_{n}|^{p}) \to E(|X|^{p})$ $\quad$ then $\quad$$X_{n} \to X$ in $L^{p}$.  (b) If $\quad$ $X_{n} \to X \;$  in prob.  $\quad$ and $\quad$ $\{X_{n} : n \in \mathbb{N}\}$  is UI $\quad$ then $\quad$$X_{n} \to X$ in $L^{1}$.  Which is more promising? I tried both but...it didnt really work out...  Many thanks in advance.


Is there any similarity between 'yield' and 'return' statement in python?Also is it possible to create object of a function?

**def colour_generator(lst):     for i in lst:         yield i  print()  colours=['red','green','blue']  print(colour_generator(colours))**   here the funtion colour_generetor returns the object address but if in the same code we replace 'yield' with 'return' then it  returns the first element in the list(lst).. Is 'yield' completely different from 'return' statement ?  Moreover **is it really possible to create object of a function?**As the output when 'return' statement is used instead of 'yield' statement in the above code is :"" or it is something else ?


Closed form for the variance of a sum of two estimates in logistic regression?

In logistic regression with an intercept term and with at least one dependent variable which is categorical, is there a closed form for the variance of the sum of the intercept and the coefficient of the categorical variable, or do you have to sample from a multivariate distribution with the means and variances of the intercept and the coefficient to get a reliable measure of the variance of this sum?  $P(y) = \frac{exp(y)}{1 + exp(y)}$  $y = \beta_{0} + \beta_{1}x + \epsilon$  where x is categorical.  Would the formula for the variance of a sum (of two random variables) be applicable here?  $Var(\beta_{0} + \beta_{1}) = Var(\beta_{0}) + Var(\beta_{1}) + 2Cov(\beta_{0}, \beta_{1})$  The reason I ask, is that in  I got the impression that no closed form existed for the variance in question, and the advice was to sample from a multivariate distribution with the means and variances of $\beta_{0}$ and $\beta_{1}$  set.seed(1) dependent.var <- sample(c(TRUE, FALSE), 100, replace = TRUE, prob = c(0.3, 0.7)) independent.var <- ifelse(dependent.var, sample(c("Red", "Blue"), replace = TRUE,   size = 10, prob = c(0.8, 0.2)), sample(c("Red", "Blue"), size = 10,   replace = TRUE, prob = c(0.4, 0.6))) table(dependent.var, independent.var) ##               independent.var ## dependent.var Blue Red ##         FALSE   42  26 ##         TRUE     7  25 my.fit <- glm(dependent.var ~ 1 + independent.var, family = binomial(logit)) coef(summary(my.fit))                     Estimate Std. Error   z value     Pr(>|z|) (Intercept)        -1.791759  0.4082482 -4.388897 0.0000113927 independent.varRed  1.752539  0.4951042  3.539737 0.0004005255 > vcov(my.fit)                    (Intercept) independent.varRed (Intercept)          0.1666666         -0.1666666 independent.varRed  -0.1666666          0.2451282   The logit of TRUE for a "Red" case is $ \beta_{0}+\beta_{1} \approx -0.039$. Is the variance for this estimate exactly  vcov(my.fit)[1,1] + vcov(my.fit)[2,2] + 2 * vcov(my.fit)[1,2] [1] 0.07846154 ?   Or is this only an approximation, and a more accurate measure is to be found by sampling, e.g.  library(MASS) var(rowSums(mvrnorm(n = 1E7, mu = coef(my.fit), Sigma = vcov(my.fit)))) [1] 0.07842985 ?   In this simple example, the sampling method does not seem to provide more accurate estimates of the variance (using 1E7 samples).   it is stated that "There is a correspondance between the covariance matrix of the fit parameters and Δχ2 confidence regions only for the case of Gaussian uncertainties on the input measurements.". Is that a reason against relying on the closed form above, or is there perhaps another reason for the advice to sample instead of deriving the variance analytically in cases like this?  EDIT: (In response to the answer given by StasK). The advice I originally got was to simulate from the full model, not from the vcov(), so here is the code to simulate from the full model:  library(arm) sim.i <- sim(my.fit, 100000) logit.for.TRUE.red <- sim.i@coef[,1] + sim.i@coef[,2] var(logit.for.TRUE.red) [1] 0.07781206


Chinese remainder theorem with quadratics

I'm struggling to understand how the Chinese remainder theorem works on quadratics (though I know how it works in the simpler cases). For example in my number theory book there's an example with $f(x) = x^{2} + x + 7$ and we need to find all the solutions to $f(x) \equiv 0$ (mod $189$) given that the roots mod $27$ are $4, 13, 22$ and the roots mod $7$ are $0$ and $6$.   There's a solution in the book to the example but I can't understand it very well. It says: "...we find that $x \equiv a_{1}$ (mod $27$) and $x \equiv a_{2}$ mod($7$) if and only if  $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$)."  And then the solution (there are six) follows easily by plugging in the solutions provided in the mod $27$ and mod $7$ cases listed above.  But my main struggle is understanding how this equation $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$) was derived, and how to get this equation in general for these problems (I think it involves Chinese remainder theorem and Euclidean algorithm but I can't figure it out).


How to protect my Window from Wanna Cry (Wanna Crypt) ransomware attack and how to remove Wanna Cry?

When i wrote this question in SuperUser there was not any information and solution about Wanna Cry attack in SuperUser. So this is not a duplicate question and has special information and useful solutions for you about Wanna Cryattack.    How to protect my Windows (Client|Server) from the popular Wanna Cry (Wanna Crypt)? What to do if my system is affected to WannaCry? How to remove it? How Wanna Cry work?


“It's better being” vs “it’s better to be“

When gales tear at the mountain peaks, it's better to be a horse in Sunnfjord than an emperor in Russia.”    Should I use the being form there instead of to be? Why or why not? Are both ok, or is one wrong? How can you know?


"I never went to poker yesterday" - Is this grammatically correct?

A colleague of mine often pulls me up on my awful grammar, earlier today I said "I never went to poker yesterday" and she told me that it was grammatically incorrect.   I understand that I could/should have said "I did not go to poker yesterday" but I would like to know whether my original statement was technically a grammatically correct statement, because in my head it makes logical sense.   Thanks


How to stop programs from opening my browser?

How do you prevent programs from obnoxiously opening the browser on their own accord?  It's unbelievable that programs/developers feel so entitled as to A.) open another program on one's computer, and B.) then have the gall to browse to whatever site or advertisement they so please.  cough... Revo Uninstaller


"You are due an apology"  If I say that to someone then it means that I owe them an apology and not the other way around.  I recently debated this with someone and they could not make sense of it and did not agree with me.  If I was owed an apology then I would say "I am due an apology"


Every time I log in from a shared computer on Stack Overflow, I am not able to log out.  Even if I click log out, it takes me to the home page and when I click the login link it automatically logs me back in. I neither allow my browser to save passwords or nor to remember me.  I get this message each time     Welcome back user. Click here to refresh the page   Each time I have to clear all my cookies from my browser to log out from it. Why does this happen?


Errors when trying to insert graphics file

I want to include a graphics called quadratic.pdf in my LaTeX document, which only contains the image show below.   While compiling, I get the following errors:  Line 1: Fatal Error No output file produced   Line 5: !LaTeX error. File: 'quadratic.pdf.sty' not found.    Where am I going wrong?    \documentclass[oneside]{book}  \usepackage{graphicx} \usepackage{quadratic.pdf}  \begin{document}  \chapter*{Basic Graphics}  \begin{figure}[h] \centering \includegraphics[width=0.5\linewidth]{quadratic} \caption{The graphics file named \texttt{quadratic}.} \end{figure}  \end{document}


Is it possible to make an equation with a explaination pointing each variable?

I was curious if there is a way to do an explanation like the image below shows for a variable? Currently, I have been making legends after showing the equation.


How to fix "404 Not Found" crawl errors reported by Google in Search Console

I was checking on Google webmaster tools for my blog site to see if there's any indication on why my blog traffic decreased to half in one day and i saw 43 Not Found crawl errors and 5 in Sitemap Not Found errors.   The 5 Not Found errors in Sitemap were the links to categories. I guess I renamed categories that's why Google can't find the links.   As for the 43 other Not Found errors, I see blog post titles that contain ' or . For example "McDonald's" or "O.N.E."  They weren't found by Google crawler.   There is also a blog post with /CachedYou at the end and a blog post with /www.example.com attached at the end.  They weren't found by Google crawlers either.   How do I correct those Not Found Errors?


I have learned that the word for a person from Britain is a Brit. But, I was browsing the Internet and I saw reading the Guardian that the word is Briton. I researched, and found that Briton is the more accurate word, but I have heard the word Brit used multiple times by people I know over the years.


Do airlines verify the validity of visas electronically during check-in?

My question is whether airlines check visas electronically at the check in.  Say a person wants to fly from Moscow, Russia to London, UK to claim an asylum. Since he doesn't have a visa to the UK, he forges a UK visa and sticks it on his passport. Let's say visa quality is 1=1 with original.   So when he tries to check in with the airlines for the London bound flight, we know that the airlines will check the visa visually. But do they check it electronically, or with UK border agency before the flight to confirm its authenticity?  I heard of something called "passenger manifest." Does it have anything to do with visa checks?   Edit, pasted in the details given as an answer:   to the guy who is worried regarding criminal offence of forging a fake document, if asylum seeker can get to his destination, he/she is not prosecuted for forging a travel document considering they would not be able to gain genuine ones in their country where their life is threatened. 1951 UN Refugee Convention: Section 51.   I asked the same question on Quora (also a forum) where a guy who claimed to have good knowledge of this system said, the airlines send the list of boarding passengers to UK and border agency confirms the list, marking the ones who are not allowed to board, those on no fly list or with invalid (forged) visas. Then the airline can deny you boarding right at the airplane gate when they check for your passport one last time. He also mentioned, this system was in place specifically to stop refugees flying into the country easily... Oh man.   But, obviously it would be GREAT if someone who actually works/worked at airline companies doing the boarding checks answer with full certainty. Please tag those if you know any with such credentials.


Tapping Active Abilities when they have summoning sickness?

If I put a  onto the battlefield, which would have summoning sickness, can I tap it that turn to use its ability or do I have to wait an extra turn to use it?


File size on disk is ~46x what windows says the actual size to be

Now, I can get when it takes a few extra Kb to stow  away a few files, but when it takes more space than the file itself, and 46x more at that, I start to think something's up.   I'm installing a TeX distribution, fresh.  So far, the file size is over 46 times the actual file size. This seems ridiculous.  Why do these files take so much more space than they should? why is it so wasteful? I've considered the stripe size on FAT32 as a limitation, but looking at the number of files, each stripe would need to be about 1.5MB minimum.  Compare this to the rest of the files on my disk. The size is 2.90 GB, and the size on disk is 9.24GB, giving a ratio of about 1:3.17 size:storage


What's the point of locked doors in Harry Potter?

In the Harry Potter universe, there is a spell that unlocks things. In the books and movies, there are many occasions where the main characters use this spell to open doors in wizard buildings (such as the door leading to where the Philosopher's Stone is hidden, or a door in the Magical Congress Of USA headquarters). Hermione knows the spell in her first year, which seems to indicate it's pretty easy to learn/cast, especially for the average adult wizard.   What I'm wondering, then, is why do wizards lock their doors when it's so easy to unlock them? And if it's so easy to unlock locked doors, why aren't there more doors locked with enchantments?


Spacing around `\circ` with an operator and a letter

When \circ is used with math operators and letters inside align environment, the spacing around it is not correct in some cases.  Code:  \documentclass{article}  \usepackage{amsmath}  \DeclareMathOperator{\pr}{pr}  \begin{document}   \begin{align*}     \pr \circ f \\     \pr &\circ f \\     \\     f \circ f \\     f &\circ f \\     \\     \pr \circ \pr \\     \pr &\circ \pr \\     \\     f \circ \pr \\     f &\circ \pr   \end{align*} \end{document}   produces:    The last six lines of formulas look fine. But for the first two lines, the space between \circ and f is too small in the first line where \circ is not behind &; while in the second line where \circ is behind a &, the space is normal, just as the following lines.  Why do the spacings behave this way?


Delete photos JUST from iPhone and not Mac?

How can I delete photos just from my iPhone and not in my photo library from the Mac?  Every time I delete photos from my iPhone it'll be deleted on my Mac and vice versa...  Thank you


prevent user from accessing page when click back button

I have 3 users and a login page is provided for them. when a user is login, the user is directed to their respected pages. But the problem when a user once click the BACK BUTTON of the browser they should not be allowed to access the pages without providing the login credentials again. LoginPage.cs  protected void bLogin_Click(object sender, EventArgs e) {          datatable = methodobj.getData("select regd_no, pword,user_type from stu_info where regd_no='" + tbUName.Text + "'and pword='" + tbPword.Text + "' ");          if (datatable.Rows.Count >= 1)         {             if (string.Compare(Convert.ToString(datatable.Rows[0][0]), tbUName.Text, false) == 0 &&                 string.Compare(Convert.ToString(datatable.Rows[0][1]), tbPword.Text, false) == 0)             {                 Session["loginstatus"] = true;                  if (datatable.Rows[0]["user_type"].ToString() == "admin")                 {                     Session["regd_no"] = Convert.ToString(updtkitable.Rows[0]["regd_no"]);                     Response.Redirect("~/aHome.aspx");                 }                 if (datatable.Rows[0]["user_type"].ToString() == "students")                 {                     Session["regd_no"] = Convert.ToString(updtkitable.Rows[0]["regd_no"]);                     Response.Redirect("~/RandomPassword.aspx");                 }                 if (datatable.Rows[0]["user_type"].ToString() == "teacher")                 {                     Session["regd_no"] = Convert.ToString(updtkitable.Rows[0]["regd_no"]);                     Response.Redirect("~/subMark.aspx");                 }             }              else             {                 lbStatus.Text = "**Login fail. Incorrect UserId or Password.";             }         }         else         {             lbStatus.Text = "**Login fail. Incorrect UserId or Password.";         }    }   AdminMasterPage.cs  protected void Page_Load(object sender, EventArgs e) {     Response.Cache.SetNoStore();     if (Session["loginstatus"] == null)     {         Response.Redirect("~/login.aspx");     }     else if (!Convert.ToBoolean(Session["loginstatus"]))     {         Response.Redirect("~/login.aspx");     }     else if (Session["user_type"] != "admin")     {         Response.Redirect("~/login.aspx");     }


I've come across this Topology layout a few times now and I'm wondering if its bad Topology or not. I know it's a quad, but it just feels distorted. Are there any downsides to it? If so, what should be the appropriate way to fix it.


Which one is correct?   Neither my friend nor I feel my best in the morning. Neither my friend nor I feel her best in the morning. Neither my friend nor I feel our best in the morning.    I already know that the verb agrees with the subject closer to the verb:   Neither my friends nor my brother understands me. (correct) Neither my friends nor my brother understand me. (wrong)   AND   Neither my brother nor my friends understand me. (correct) Neither my brother nor my friends understands me. (wrong)


I'm currently using Ubuntu XFCE4 and I am trying to install elementary-desktop. Except everytime I try to install it, all it comes up with is,           E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   Could someone please help me with this? Thanks!


OpenVPN connection fails from RHEL 7.3 client on EC2

I have a working OpenVPN configuration on Windows 7. I am able to connect to it via the GUI as well as from the command line (openvpn --config .\openvpn.ovpn).  Here is the config file:  ## acme.ovpn ## client proto tcp dev tun persist-key persist-tun ca ca.crt cert mycert.crt key mykey.key remote <REMOTE_IP> 443 route <SOME_OTHER_IP> 255.255.255.0 resolv-retry infinite status openvpn-status.log verb 3   I copied all my config files over to an EC2 instance of RHEL 7.3 and . However, when I try to run sudo openvpn --config ./openvpn.ovpn), the trace ends up showing   Wed Feb  8 14:52:27 2017 Restart pause, 5 second(s) Wed Feb  8 14:52:32 2017 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info. Wed Feb  8 14:52:32 2017 Socket Buffers: R=[87380->87380] S=[16384->16384] Wed Feb  8 14:52:32 2017 Attempting to establish TCP connection with [AF_INET]<OPENVPN_IP>:443 [nonblock] Wed Feb  8 14:52:42 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out Wed Feb  8 14:52:57 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out Wed Feb  8 14:53:13 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out Wed Feb  8 14:53:28 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out Wed Feb  8 14:53:43 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out Wed Feb  8 14:53:58 2017 TCP: connect to [AF_INET]<OPENVPN_IP>:443 failed, will try again in 5 seconds: Connection timed out   Please note that the EC2 instance is just an openvpn client, not a server, as has been misunderstood. I am trying to establish a connection from it to a server, which is what the above log placeholder  is the IP of.  Why does the same configuration fail on the cloud VM that succeeds locally on Windows 7 and what should I do to fix it?  This question has also been asked .  RELATED:


How to choose a predictive model after k-fold cross-validation?

I am wondering how to choose a predictive model after doing K-fold cross-validation.   This may be awkwardly phrased, so let me explain in more detail: whenever I run K-fold cross-validation, I use K subsets of the training data, and end up with K different models.   I would like to know how to pick one of the K models, so that I can present it to someone and say "this is the best model that we can produce."   Is it OK to pick any one of the K models? Or is there some kind of best practice that is involved, such as picking the model that achieves the median test error?


How to save all tabs in a FireFox window?

Sometimes when I'm researching on a software issue (i.e. a bug that I most likely created), I google a lot and so have a lot of tabs open in FireFox. I don't use IE :)  But FireFox only allows me to save the open-tabs for the last session. Is there a way that I can sort of command FireFox to obey => for this FireFox main window containing all these open tabs, save the session as name "researching on bug #232 -- file is not saving" so that I can come back later and click on a button to have all those tabs open up again.


What's the avarage temperature of the Universe?

I'm sorry if this was asked before but with all the stars and dark matter and all the other stuff, curently in the Universe, what's the avarage temperature of the Universe? Is it like extremely high or extremely low?


Is it inappropriate for an author to copy and paste from his/her original paper in an extension paper?

I am currently a referee for a paper. One of the authors of the paper had written an earlier paper, which I will refer to as the "original paper," and the paper which I am now refereeing is an extension of the original paper, which I will refer to as the "extension paper."  I have found that large portions of the extension paper are copied from his original paper. In particular, a whole section of definitions is copied from his original paper; and some paragraphs in the introduction and literature review are copied wholesale or with slight modifications from the original paper.  Is it acceptable for an academic paper to copy paragraphs and even a section from an earlier paper by the same author?  My intuition suggests that it is acceptable to copy the definition section, with an acknowledgement that it came from the original paper, since definitions are standard. But it seems strange to me for the introduction and literature review to be too similar to the original paper.


Can a particle be physically observed inside a quantum barrier?

I understand that if a particle approaches a finite potential barrier of height $V_0$ with energy $E < V_0$, there is still a finite probability of finding the particle on the other side of the barrier due to quantum tunneling.  My question is, since the wavefunction is nonzero inside the barrier region, is it possible to actually make a position measurement and locate a particle inside the barrier?  I mean, if we can say that "there is a nonzero probability that the particle is inside the barrier", surely this would suggest we can do so?  If not, why not? Am I understanding the whole wavefunction/probability distribution thing right?


I have installed a Ubuntu 16.04LTS system, how can I know whether Gnome or KDE is installed ? (I searched a bit, but this is not at all intuitive).


Find the eigenvalues and eigen vectors of $A=(a_{ij})$ where $a_{ii}=0$ and $a_{ij}=1;i\neq j$.

Give the eigenvalues and eigen vectors of an $n\times n$  matrix $A=(a_{ij})$ where $a_{ii}=0$ and $a_{ij}=1;i\neq j$ . Is the matrix diagonalizable?   I've tested the matrix for $n=2$ and I get $x^2-1=0$ where $x_{1}=1$ and $x_{2}=-1$  for $n=3$ I get $-x^3+3x+2$ and the eigenvalues are $x_{1}=2$ and $x_{2}=-1$  and for $n=4$ I get $x^4-6x^2-8x-3$and the eigenvalues are $x_{1}=-1$ and $x_{2}=3$   I can't see any kind of pattern.


Permission denied when writing to '/tmp/file' as root

This simple script  sudo rm -rf /tmp/a echo a > /tmp/a chmod a+w /tmp/a echo b >> /tmp/a sudo bash -c 'whoami; echo c >> /tmp/a'   outputs  root bash: /tmp/a: Permission denied   Why does root not have permissions to write to /tmp/a?  Here's a reproducible way to demonstrate this via Docker:  # alpine 3.8 alpine=$(docker run -d alpine:3.8 sleep 99999999999999) d() { docker exec $alpine "$@"; } d apk add sudo bash d adduser -D u d sudo -u u bash -c 'echo a > /tmp/a; chmod a+w /tmp/a' d bash -c 'whoami; echo b >> /tmp/a' docker rm -f $alpine  # ubuntu 18.04 ubuntu=$(docker run -d ubuntu:18.04 sleep 99999999999999) d() { docker exec $ubuntu "$@"; } d useradd u d apt-get update d apt-get install -y sudo d sudo -u u bash -c 'echo a > /tmp/a; chmod a+w /tmp/a' d bash -c 'whoami; echo b >> /tmp/a' docker rm -f $ubuntu


I have an object animal:  class Animal{  }   I want to create an object of Animal, is there a difference between the lines on the class main?  class main{      var myVar = new Animal();        // case 1      Animal myAnimal = new Animal();  // case 2 }


What if a black hole of normal matter and a black hole of antimatter collided?

This is a curiosity question. Considering same mass black holes. As nothing can come out of either black hole, would the annihilation result into a black hole of energy? Assuming the two black holes do not repel one another - i.e. assuming antimatter does not have opposite gravity.   Could the big bang have been one such collision between black holes of unequal masses where black hole of normal matter was heavier?


Using two video cards; how good should the second one be?

So I'm looking to start a new build, using some of the parts from my old PC.  One thing I wanted to do was try out Intel (current is AMD) and to have two GPUs.  This build has Oculus Rift in mind.  The question I have is in regards to the GPUs.  Obviously, having two of the same would make the most sense, but the primary reason I want two is ultimately to have as many video outputs as possible (I only have two right now, and would like 3 or 4, I do a lot of multitasking).  If I were to go with two different video cards, does it matter how good the second one is?  I would probably get one very powerful one, capable of running all the games I'd want to play on it's own if necessary, and the second one I really just need for outputs.  Would this effect the performance of the two as a unit?  Perhaps this is the completely wrong way to go about this, I'm not sure.  This is only my second ever build, I'm still very much a novice.  Hopefully if there is a better solution, someone can let me know!  tl;dr: I need 3 to 4 video outputs, but only need 1 good video card.  If I need a second (to achieve the number of outputs I want), does it have to be a good one?  NOTE: After some googling, it appears I am not fully aware of the difference between a GPU/Graphics card.  Maybe someone could shed light on this in the context of my situation.  Thanks!


How to calculate standard errors of the sample standard deviation (in excel)

I have data on exchange rates, where I have calculated the mean and the standard deviation of the payoff. I am able to run a regression (payoff regressed on a constant) and get the standard error of the sample mean.   Is it possible to either do the same with the standard deviation or calculate from a formular and get the standard error of the standard deviation?


Which process scheduler is my linux system using?

I'm not quite sure if stackoverflow or serverfault is the forum to use for this question, but ill try here.  Is there some command I can use or a file I can check in order to find out which process scheduler I'm using on my Linux system? I am not looking for the I/O scheduler, but the process scheduler, and please, do not refer to guides or howtos for what a scheduler is, what I'm simply asking is if there is a command or file I can run/check to see this. I could check the doc for my kernel but again I'm just wondering if there is a command or file i can check.  I might have been a little redundant above but that's because the posts I've seen people seem to confuse process scheduler with the i/o scheduler, and they don't seem to answer the actual question, just provide links to what a scheduler is which is not what I'm after here, so apologies if the above comments sounded rude.


Does this sequence converge pointwise and/or in $L^1$?

Let $a_n(t)=\frac{1}{n} \text{1}_{ [0,n)}(t)$. Does this sequence converge in $L^1/$pointwise?  My ideas: We have for all $t$: $\mathbf{1}(t)\in\{0,1\}$ and $$0 \leq \frac{1}{n}\textbf{1}(t) \leq 1 \Rightarrow 0 \leq \left| \frac{1}{n}\textbf{1}(t)\right|^p \leq 1 \quad \forall p\ge1$$   So it's a null sequence and we have dominated convergence with dominated function $g(t)=1$. $g(t)=1$ is integrable so all $a_n$ is integrable for all $n$.


Does $\lim \limits_ {n\to \infty}\ \frac{n}{n+1}$ equal $1$?

$$\lim_ {n\to \infty}\ \frac{n}{n+1}=1$$   I'd write it like this:  $$\lim_ {n\to \infty}\ \frac{n}{n}+\frac{n}{1}=\lim_ {n\to \infty}\ 1+n=\infty$$  What am I missing?


how can i solve this integral (steps included)?

My doctor challenged me to solve this integral and I tried my best, please help me ?! $$ \int \frac{1}{\cos \theta}\, d\theta $$


*ignore* C++ and C# How to display percentage in a command line

When I make a program where the progress is shown in the command line, how do I make 1 line which increases (or decreases) when the progress grows?  So that you don't get this:  Progress: 1% Progress: 2% Progress: 3% Progress: 4% Progress: 5% Progress: 6%   But this:  Progress: PROGRESS%   So 1 single line for the whole operation  Can someone explain to me how this works?


I'm having problems with my desktop computer.  It's 5 years old already, but still works well even with the latest games so I'd really like to keep it as long as possible.  Specs listed below:   motherboard: ASUS P5N72-T CPU: Intel Core 2 Quad Q9550 memory: OCZ 4GB Dual DDR2 graphics: Gigabyte GeForce GTX280 power unit: Corsair 620W case: Thermaltake Kandalf with decent cooling CPU is cooled by a separate radiator and fan, not the standard box one   The problem started a couple of years ago. When playing GPU-intensive games it kept freezing every hour or so. The intervals began to be smaller and smaller with time. Recently, when playing Farcry 3 I had to restart the machine every 15 minutes which pretty much rendered the game unplayable for me. Also, this summer, when the days were very hot (the room was probably 40+ degrees Celsius) it started freezing even when working normally (i.e. not playing).  When the machine crashes, it literally freezes - the screen stops at the last frame, all sounds stop and it's totally unresponsive. I've tried checking the temperature - the graphics card is definitely the hottest, but remains within acceptable limits, the CPU and motherboard temperatures are OK.  It's been suggested to me that the motherboard I have is known to be problemmatic because of the memory bus bandwidth or so. I've tried downclocking the CPU and it works to a certain extent - freezes don't happen so often, but they still do.  Another interesting things is that when I boot linux on this machine, kernel bootup sometimes freezes when initialising mdev.  Would you have any hints as to how I might diagnose the part that's causing the problems?


Static External IP addresses in Zone europe-west3 have entry point in California, US

I have several static IP Addresses in Google Cloud Platform in the zone europe-west3. However, I just noticed that they all are traced back to California, US, which totally defeats the purpose. They should resolve to Frankfurt!  It is not the same with south-eastasia static IP which correctly resolve in Singapore.   Why is it different with the europe ones? I have privacy complaints for customers now. Google support seems to be rather unavailable.


Marvin the Martian vs. the Death Star: how much energy will they actually need to disintegrate the Earth?

According to ,  will require $1.711 \cdot 10^{32}~\text{J}$ to shatter the Earth into a gravitationally unbound primordial dust cloud.  However, this energy is over 30% lower than the gravitational binding energy derived from the average density model .  Which seems irrational:  if the Earth were in a lower energy state at a uniform density distribution, how did its density gradient evolve in the first place – wouldn’t it be evolving to a homogenous density distribution in that case?  Curtis Sexton and  seem to agree with my reasoning on this point:   the ’s beam weapon output would have to exceed $2.4 \cdot 10^{32}~\text{J}$ to impart escape speed to all of the matter comprising an Earth-like planet.  They can’t both be right, so who wins?  My money’s on the Death Star, but I haven’t found the mistake in Dave’s calculations for Marvin yet.  Does anyone here have the analytical chops to see where he went wrong, or alternatively, where I’ve spaced out?  Here's Dave's mathematical estimate for Marvin:  First he offers an equation for compiling the layers of various densities from the  into a sum of     where $r$ is the radial distance from the Earth’s center and     the various constants are noted below:  $i$. Layer; Height $h_i$ (m); $a_i$ ($kg \cdot m^{-5}$); $b_i$ ($kg \cdot m^{-4}$); $c_i$ ($kg \cdot m^{-3}$)  1  Inner core; 1.2215×10$^{6}$; -2.1773×10$^{-10}$     1.9110×10$^{-8}$ 1.3088×10$^{4}$  2  Outer core; 3.4800×10$^{6}$; -2.4123×10$^{-10}$;    1.3976×10$^{-4}$;  1.2346×10$^{4}$  3  D'' layer; 3.6300×10$^{6}$; 0.00; -5.0007×10$^{-4}$; 7.3067×10$^{3}$  4  Lower Mantle; 5.7010×10$^{6}$; -3.0922×10$^{-11}$; -2.4441×10$^{-4}$; 6.7823×10$^{3}$  5  Inner transition zone 1; 5.7710×10$^{6}$; 0.00; -2.3286×10$^{-4}$; 5.3197×10$^{3}$  6  Inner transition zone 2; 5.9710×10$^{6}$; 0.00; -1.2603×10$^{-3}$; 1.1249×10$^{4}$  7  Outer transition zone; 6.1510×10$^{6}$; 0.00; -5.9706×10$^{-4}$; 7.1083×10$^{3}$  8  Low velocity zone & lid; 6.3466×10$^{6}$; 0.00; 1.0869×10$^{-4}$; 2.6910×10$^{3}$  9  Inner crust; 6.3560×10$^{6}$; 0.00; 0.00; 2.9000×10$^{3}$  10  Outer crust; 6.3680×10$^{6}$; 0.00; 0.00; 2.6000×10$^{3}$  11  Ocean; 6.3710×10$^{6}$; 0.00; 0.00; 1.0200×10$^{3}$  Using the real density distributions for each shell layer:    And calculating for each point $h$ at any given radial distance from the outside in, with the inner and upper bounds $h_1$ and $h_2$ respectively, gives:    So for each $i^{th}$ layer:   And for each point at a radial distance of $r$ we have:   where $ΔU_0$ = 0 and the indexed constants for each piece of the function are described in the table above.  This yields:  -1.711×10$^{32}~\text{J}$  Many thanks to anyone who can explain how this came out wrong!


Power Off button is gone on Ubuntu 20.04 LTS

I recently installed Ubuntu 20.04 LTS on my laptop and I noticed that I no longer have the Power Off button but rather a menu that I need to click on and then I need to click on Power Off... and then Power Off. Is there a way to get the button back?


Prove that for $n\in\Bbb{Z}^+$, $n$ has an odd number of positive divisors if and only if $n$ is the square of an integer.

Actually I am a new student of discrete mathematics and this question is weird for me. Can anyone help me? I think that here we will use the theorem that every integer is written in the form of product of primes and then we argue by saying that it is a square because for divisors to be odd the power of primes must be even or something like that. Can you guys please help me out! Using number theory


(a) Prove that $\operatorname{gcd}(a, b) | \operatorname{gcd}\left(3 a+b, a^{3}\right)$  Since say $d = gcd(a,b)$ then $d|a$ and $d|b$ this will imply $d|(3a+b)$ and $d|a^3$ and therfore $d$ is divisor of those two.But how to show it is greatest common divisor.


How to use LaTeX with Inkscape (MAC OS X)

I've seen somebody asked this question a year ago, but no answers given so I'm hoping this might attract some more/new/different attention.  Simple question. I want to use LaTeX with Inkscape on mac. I already use a tex editor so I should have most of the LaTeX stuff I need. However when I go to "Extensions>Render>", there's not a LaTeX option there as other online sources suggest.  As a fudge I tried using the application Latexit to generate SVG/EPS images to import but I can't seem to get import of those to work either.


Use notify-osd instead notification-daemon in GNOME-Shell

How I can replace **notification-daemon** (ugly notifications at bottom of screen) by   NotifyOSD (modern bubbles in right upper corner) ?    I found some posts about this, but GNOME at default mode don't have Default Provider in  gnome.session (only in fall-back mode).


If I create a secondary user and install an app while using the phone as that user, will the permissions for that app carry over for the primary user?  For example, let's say I have a primary user, Foo, with a Google account foo@gmail.com. I then create the user Bar with the account bar@gmail.com. Whilst using the phone as Bar, I install an app with the "find accounts on the device" permission.  Will this allow the app to see the accounts I have registered with the primary account, i.e. foo@gmail.com? Will it even be able to find the primary user at all or are there hard boundaries between user "workspaces" (for lack of a better term), and as far as the app can see, there's only Bar and its registered accounts on the device?  I'm just generally concerned with apps finding out about my personal data, contacts, emails, etc, and would like to use a "dummy" account for any app I consider hostile in this regard. Would this work?  I have a Nexus 5X running Android 6.0.1.


Title tag different from title appearing in Google?

I'm just wondering how it is possible that IGN.com has this in its title tag:      Video Games, Cheats, Walkthroughs, Game Trailers, Reviews, News, Previews & Videos at IGN   while on Google its title is simply "IGN".   How can one achieve such a thing? Does it use some special meta tag I can't see?


Why do people think that rockets can thrust in the vacuum of space?

A force is required to change the momentum of the rocket exhaust which consists mainly gas moving out of the rocket chamber. People think that it is the rocket that pushes the gas out. If this were true, yes the gas would push back. However, the gas moves because of pressure gradient force and not because of the rocket pushes it out. Therefore, there would be no push on a rocket.    When the gas moves out at high velocity, the atmosphere provides resistance which creates back pressure of flow causing thrust. In space, there is no such resistance.


How do the ages of Flamel, Dumbledore, etc. work out?

In the first Harry Potter book, it is said that Flamel and Dumbledore invented the philosopher's stone together. It's also heavily implied that this stone is the only reason why Flamel lived so long. This means that Dumbledore is… let's say less than 200 years younger than Flamel, to be safe. But since Flamel's age is given and is somewhere in the 600s, that would mean that Dumbledore is more than 400 years old. But after the stone was destroyed, he did not die from that and it's also not said that he had a stash of the elixir. In book 5 there's even a short appearance of someone who was an examinant while Dumbledore was still in school, meaning she would have to be older than him. I would be very surprised if she also got the elixir of life. The same with Dumbledore's brother: Did he get the elixir? Or their parents and he's multiple centuries younger? Or are there other ways that wizards become many centuries old? In that case I would wonder why an elixir of life was even necessary.  The only explanations I can think of are these:   Dumbledore wasn't actually involved in creating the stone and book 1 lied. Flamel isn't actually that old and book 1 lied (and maybe others as well). Rowling is very bad at Math, much more than usual.


I visited Stack Overflow for about 82 days in a row (starting January 21st), including yesterday (April 13th) and today (April 14th).  All times UTC of course (I thought that was clear but I've now added it to my question as a relevant info).  All visits are in a logged-in session of course.  I've just discovered that SO didn't "see" the April 13th visit, so my consecutive days visits were zeroed !!  It's a bug for sure. I have open tabs which my browser's history shows that are from April 13th. More than 20 of them. I saw this one:  , and it's clearly what happened to me. Please help! I'm so close to getting the Fanatic badge...


How many times must you roll a die until each side has appeared?

Let $X$ be the random variable which denotes the number of times a die has been rolled till each side has appeared. The order does not matter. We are trying to find $E[X]$.  Let $X_i$ be a random variable which denotes how many times a die has to be rolled till side i has appeared.  So,  $$E[X]= E[X1+X2+X3+X4+X5+X6] = E[X1]+E[X2]+E[X3]+E[X4]+E[X5]+E[X6]$$  $$E[X1]=E[X2]=E[X3]=E[X4]=E[X5]=E[X6]=6$$  $$E[X]=36$$?  Why is this solution wrong?


I got the message "oh" and it showed my egg. Before I could do anything the server went down. When I got back on my egg was gone. Is there anything I can do to retrieve my incubated but not hatched egg?


NullPointerException in sendBroadcast(intent) in service

I am having a Service class which is a server receiving data from a java client and i am able to retrieve data but when i tried to broadcast the data from the service to the MainActivity, sendBroadcast(intent) gives a NPE in Service and it doesn't broadcast the message..I viewed several answers but i cant figure out the issue..so i posted this quetsion..  below is my service part  public class Service_ extends Service implements Runnable { BroadcastReceiver broadcaster; Intent intent; static final public String BROADCAST_ACTION = "com.mes.broadcast"; private static ServerSocket server; private static int port = 9800; ObjectOutputStream oos = null; ObjectInputStream ois = null;  @Nullable @Override public IBinder onBind(Intent intent) {     return null; }  @Override public void onCreate() {     super.onCreate();     Log.d("sri", "onCreate---->Service");  }  @Override public int onStartCommand(Intent intent, int flags, int startId) {      Log.d("sri","onStartCommand(Intent intent, int flags, int startId)---->Service");     Service_ s = new Service_();     Thread t = new Thread(s);     Log.d("sri","going to start thread---->Service");     t.start();     return super.onStartCommand(intent, flags, startId);      }    @Override    public void run() {    Log.d("sri","run()---->Service");     try {      }catch(Exception e){       // code to connect to java client .......it works fine and  also   obtained data ..I WANTED THIS DATA TO BE SENT TO THE ACTIVITY             intent = new Intent(BROADCAST_ACTION);Log.d("sri","sendResult----->putExtra");             intent.putExtra("message", message);             Log.d("sri", "sendResult---->SendBroadcast");             sendBroadcast(intent);//THIS LINE GIVES ME NPE LINE:109        }}   My Stacktrace is        E/AndroidRuntime: FATAL EXCEPTION: Thread-11724      java.lang.NullPointerException     atandroid.content.ContextWrapper.sendBroadcast(ContextWrapper.java:338)    at airhost.server_client_service_.Service_.run(Service_.java:109)    at java.lang.Thread.run(Thread.java:838)   My MainActivity        //imports....       public class MainActivity extends AppCompatActivity {      TextView result;      Button button;      BroadcastReceiver receiver;      Intent serviceIntent;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     result = (TextView) findViewById(R.id.textView);     button = (Button) findViewById(R.id.button);     button.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             serviceIntent = new Intent(getApplicationContext(),                     Service_.class);             Log.d("sri", "onResume-->startService-----> Activity");             startService(serviceIntent);         }     });      receiver = new BroadcastReceiver() {         @Override         public void onReceive(Context context, Intent intent) {             Log.d("sri", "BroadcastReceiver-->onReceive-----> Activity");             String message = intent.getStringExtra("message");             result.setText(message);         }     };  }  protected void onResume() {     super.onResume();     Log.d("sri", "onResume-->registerReceiver-----> Activity");     registerReceiver(receiver, new IntentFilter(             Service_.BROADCAST_ACTION)); } @Override protected void onPause() {     super.onPause();     Log.d("sri", "onPause-------> Activity");     stopService(serviceIntent);     unregisterReceiver(receiver); } }


Can I release a grapple then grapple another target with Bigbys hand?

First turn i gapple a target with Bigbys hand. On my next turn can I move the hand 30 feet, release the target, and grapple another target?


Feature Split by Attribute in different folders

I want to split a vector by an attribute but instead of getting all of them in a single folder, I need them by separate folders (say the same attribute I´m splitting, or another).  I tried splitting by attribute and then copying datasets, but I get Error 110 because the folder does not exist.   Is it possible to use the Model Builder to    split a feature by an attribute,  create a new folder for each attribute, and  place each new layer in the corresponding folder?


Invalid Session (Try restarting your game) error in Minecraft

I've been trying to connect to multiplayer servers, which I could connect to just fine just a few hours ago, but now I'm getting the error message "Failed to login: Invalid session (Try restarting your game.)" I've restarted my game multiple times, and even restarted my PC, but still the same error. I need help.


How do I reverse a Google Chrome `sudo apt upgrade`?

Tonight I ran sudo apt upgrade and seven packages were upgrade. One of them was Google Chrome 53 x.y?  Anyway flash player now gets pause pizza followed by 1/4 second black flash after the rotating pizza has finished it's 2 to 3 second spinning. I also did a failed Nvidia 367.44 driver install and am not sure which event is causing it but I'd like to reverse the Google Chrome 53.x.y upgrade Ubuntu/Debian just installed.   How do I find out what Chrome version was running before the upgrade? (ie does Ubuntu keep track of versions that were just upgraded somewhere?) How do I reinstall that Chrome version the sanctioned/safe way? How do I freeze that Chrome version so it doesn't get updated again automatically? (Some day I will after finding out what is going on)   I know enough to be dangerous and can probably stumble my way through this but I've been reading about broken packages lately and would like to know the safe path back from where I've come.  The other six packages upgraded tonight I would like to keep as I try to stay current. Note that sudo apt update was run before sudo apt upgrade.


Need wireless internet access on Macbook Pro for travel in USA

I am from Australia and I need to be able to access the internet (4G network) on my macbook pro laptop during a 30-day road trip across the USA.   I am a graphic designer and will need to do some work while travelling. I will need to upload and download a number of PDF files during that time, each file will be between 2mb and 10mb in size, up to a total of 10GB over the 30 days.  I have a USB modem that I use for travel within Australia, but I understand this device won't be compatible with the US network. I am prepared to purchase a US-compatible device. I also understand a prepaid data package would need to be purchased.  Can anyone help with some suggestions on the best way to set myself up? Are USB modems the best device to use in the US? Are there any alternatives to USB modems? Any recommendations on brands, wireless broadband companies, places to purchase these things, would be very much appreciated. Needs to be Mac-compatible.  Thanks so much :)


Making a curved tube thinner or thicker without scaling its overall size

Is there a simple way to change the thickness of a curved tube without scaling its overall size? E.g. scaling the minor radius of an already created torus without affecting its major radius or change the bevel width of a curve that has already been converted to a mesh.


Hope someone can help I know the basics of DNS setup, am having an issue with my hosting company. Have several domains hosted, DNS settings are basically setup by the hosting company using their nameservers.  There is this one domain that was setup recently in a new environment (other nameservers) and my client has problems reaching certain e-mail addresses from this domain, they bounce (Sender address rejected: Domain not found) Tried many dns lookup tools to find out what could be happening, resulted in using  which returns 'no nameservers found'  The dig option from the same online tool returns a SERVFAIL when using Google's DNS, when I use the hoster's nameserver these resolve correctly...  Dig from command prompt gives the same result  dig mydomain.com @8.8.8.8  ; <<>> DiG 9.10.3 <<>> mydomain.com @8.8.8.8 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30575 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1   I reported this to the hoster and eventually they responded that they couldnot find any issue that would explain this behavior. They provided a link to www.intodns.com showing that everything was setup correctly and resolves fine...  Feel like I am left hanging a bit, I don't know why Google doesnot resolve, but it seems an obvious problem that could cause lots of issues. Could someone explain to me what this probably means and how this could be rectified.  edit as per request domain name is: dwc-amsterdam.com


Can we exempt downvoted accepted answers from getting the top spot?

Similar to  but narrower, I'm suggesting we make a particular exception for downvoted accepted answers (those with score less than zero, or some other threshold like -3), so that they stay in the normal sort order and don't jump to the top.  The accepted answer  on bh.se is -5 at time of writing, above an answer with +8 (which is quite a good score on our little site!). It also doesn't help things that the accepted answer is about a mile long so it takes a lot of scrolling to get past it:


How would I get a function to take the date in terms of YYYY-MM-DD, YYYY/MM/DD and DD.MM.YYYY and return YYYY-MM-DD?  I’ve tried a few ways which would work for one of the formats but then not the other


I'm using MacOS Catalina 10.15.4. I want to change the system font on my MacBook Air. I know (or think) that the system recognises fonts using the postscript name of the font. I know that below Mac OSX Yosemite, the name is .LuciadaGrandeUI and for Mac OSX Yosemite, the name is .HelveticaNeueDeskInterface-Regular. However, above Mac OSX Yosemite, the font is San Francisco. What is the postscript name of the font?  EDIT:  Actual problem: I want to change the system font to Comic Sans MS. How?


I'd like to see all my questions waiting for me to accept an answer, across the network, in one overview, possibly on my network profile page.  Rationale  I have a couple of "core" stacks I visit frequently. Most other stacks are "drive by" stacks, where I've asked the occasional question.  I know  I've asked where I could have but have not accepted an answer — per site. I've also seen .  But what I'd like to see is one single overview of questions that are still waiting for me to accept an answer. This would preferably find its home on my user profile or my network profile.


Are Newton's "laws" of motion laws or definitions of force and mass?

If you consider  as laws, then there must be independent definitions of  and  but I don't think there's such definitions.  If you consider them as definitions, then why are they still called laws?


$ 1^k + 2^k + \cdots + (p-1)^k \equiv \begin{cases} -1 \mod p, \text{ if } p-1 | k, \\ 0 \mod p, \text{ if } p-1 \not | k. \end{cases}$

If $p-1 | k \Rightarrow k = (p-1) n$, for some $n \in \mathbb{N}$. Then we $ 1^{(p-1)^n} + 2 ^{(p-1)^n} + \cdots + (p-1)^{(p-1)^n} = \underbrace{1 + 1 + \cdots + 1}_{p-1}  = p-1 \equiv -1 \mod p.$ The second part of the question did not come out. Induction: $k=1$, which is true because we $1 + 2 + \cdots + (p-1)= \frac{(p-1)(p)}{2} \equiv 0 \mod p$. Suppose true for $k = n$, then $1^n + 2^n + \cdots + (p-1)^n \equiv 0 \mod p$. How to finish? Thank you.


The following bash script #!/bin/bash  startNumber=$(( 1 )) endNumber=$(( $startNumber + 3 ))  #for number in {$startNumber..$endNumber} for number in {1..4} do         echo $number done  exit 0  gives the desired output 1 2 3 4  However, when I switch the uncommented and commented for loop, the output is {1..4}  What am I doing wrong?


I am currently reading the paper "PRIMES is in p" and have come across some notation that I don't quite understand in this following sentence     Consider a prime $q$ that is a factor of $n$ and let $q^k || n$. Then...   What does the notation $q^k || n$ mean here?  The full paper can be found  and the notation described above is used in the proof on page 2


I would like help to show the following:  If $f \in C^\infty$, then $f''(x) = \lim_{t \to 0} \frac{f(x + t) + f(x - t) - 2f(x)}{t^2}$  This is the definition of second order derivative by differential coefficients. The first order case is just the definition of derivative, but I'm having trouble with the second order case. I'm really confused, don't even know where to start. Thanks in advance


why is io_stall_writes_ms so much higher for tempdb?

We have the user and system data files on the same disk drive.  The ( io_stall_write_ms / ( 1.0 + num_of_writes ) ) is below 2 for the user files but the tempdb files are typically over 400.  I see that on a few servers and I'm curious if there is a reason it takes longer to write to tempdb than a regular database data file.  SELECT DISTINCT UPPER(LEFT(mf.physical_name, 1)) AS Directory, ( io_stall_write_ms / ( 1.0 + num_of_writes ) ) as result,  io_stall_write_ms, num_of_writes,  fs.database_id,  fs.[file_id] FROM sys.dm_io_virtual_file_stats(NULL, NULL) AS fs INNER JOIN sys.master_files AS mf ON fs.database_id = mf.database_id AND fs.[file_id] = mf.[file_id]   Thank you,


Reading a 12VDC output with digital inputs on an Arduino Uno

I want to use four pins on an Arduino Uno as digital inputs pins for four 12V DC outputs. I know I have to use a voltage divider first (with resistor values being 14kOhm and 10kOhm) to get the correct voltage range (0-5V) and also use the internal 20kOhm resistors on the Uno to achieve this.   My first idea was to not use the internal resistors on the Uno, but instead use external ones, to pull the voltage to zero, when nothing is connected to the input (prevent floating values). A colleague suggested the usage of the internal pullups on the Arduino, but I have no idea how to wire this up now.  Can someone explain it to me somehow?


Do I need a Transit Visa of Canada if I have F1 and SX1 Visas?

I have a flight reservation from Austin, Texas to New Delhi, India. The flight transits through Toronto. I have a valid F1 and SX1 Visa. Do I need transit visa to transit through Canada? My layover is less than 5 hours and I won't be leaving the airport. My SX1 visa is active till 2027 and is valid for multiple entries. Will I be needing a transit Visa?


Trying to install OpenVPN and can't find the Vpn Configuration in task bar

I installed openvpn Ubuntu GNOME and I cannot find the VPN tab for further configuration.


How can I calculate the integral $\int_0^1{\frac{x-1}{(x+1)\ln x}dx}$? Since there is $\ln x$ in the denominator, I tried using Leibnitz integral rule. Let $I(t) = \int_0^1{\frac{x^t -1}{(x+1)\ln x}}dx$, then $I'(t) = \int_0^1{\frac{x^t-1}{(x+1)}dx} $, but I can't get any further.. Wolframalpha tells me it's $\ln (\frac{\pi}{2})$, but not how.


I have the following WME:  \documentclass[12pt]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[main=turkish,english,shorthands=:!]{babel} \usepackage[a4paper,left=30mm,top=30mm,right=25mm,bottom=25mm]{geometry} \usepackage{tocloft} \usepackage{lipsum} \usepackage{titlesec} \usepackage[unicode]{hyperref} %son yükle   % BEGIN \begin{document}    % CHAPTER 1   \chapter{GİRİŞ}   \lipsum[1-30]  \end{document}   I want to disable all hyphenation in the document. How can i do that? Thank you.


While installing sbt I am encountering these errors  E: Malformed entry 1 in list file /etc/apt/sources.list.d/sbt.list (Suite) E: The list of sources could not be read.   I opened sbt.list  it has these two lines:  deb http://dl.bintray.com/sbt/debian/ deb http://dl.bintray.com/sbt/debian/   It is missing distribution and component details. How should I alter it to fix the problem?


picture not included - code that has been working throws error

This has been working before, see e.g.  for reference. The png picture is in the same folder as the latex document. Do I miss anything?  \documentclass[12pt]{article}  \usepackage{fancyhdr} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{mathtools} \usepackage{amsmath} \usepackage{amssymb} \usepackage{url} \usepackage[parfill]{parskip} \usepackage{enumerate} \usepackage{framed} \usepackage{xcolor}  \begin{document}  Start with nice text...  \begin{figure}[h!] \centering   \includegraphics[width=0.5\textwidth]{Temperatur.png}   %\caption{}     %\caption{Schema des Verkehrsflusses \protect\\\hspace{\textwidth} aus http://www.mathe.tu-freiberg.de/~bernstei/HMI/Verkehr.html.   %\label{} \end{figure}  \end{document}   The first part of the error:


As I write my Bachelor thesis at the moment I tried to teach myself how to use Latex. But I am struggling a lot with my bibliography as I can not find a way to program it the way I want to:      Surname, N. und Surname, N. (year), Titel, .... other informarion   (The german word 'und' between the authornames is extremly important)  Sadly I could not find how to do that on the Internet or in other questions.  I recently tried alphadin and apalike. But with alphadin I get only Errors: (Package natbib Error: Bibliography not compatible with author-year citations.) and with apalike, with which i can compile my document, it does not look as I want it to. Besides that I always get that and between  names, which is not that practical as I write my text in german.  I put all my literature into JabRef.  my Code looks as following:   \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[usenames]{color} \usepackage{graphicx} \usepackage{graphicx,caption} \usepackage{tabularx} \usepackage{amsmath} \usepackage{ulem} \usepackage{amsthm} \usepackage{amssymb} \usepackage{mathptmx} \usepackage{fancyhdr} \usepackage{a4} \usepackage{acronym} %\usepackage{epic} \usepackage{eepic} \usepackage{parskip} \usepackage{eurosym} \usepackage{array} \usepackage{pdfpages} %\usepackage{glossaries} \usepackage[authoryear]{natbib} %\usepackage{bibgerm} \usepackage[flushmargin, hang]{footmisc}  \begin{document} .... %-Literaturverzeichnis-------------------------------------------- %\nocite{*} %die Verwendung von bibtex ist Pflicht!!! \newpage \addcontentsline{toc}{section}{Literaturverzeichnis} \bibliography{Literatur} #so heißt mein JabRef File %\nocite{*} %\bibliographystyle{alphadidiEN} %bzw. unsrtdin, alphadin, abbrvdin  \bibliographystyle{alphadin} %\bibliographystyle{apalike} %plainnat statt plain %unsrtnat statt unsrt %abbrvnat statt abbrv %alphadidiEN statt alpha,  \newpage \end{document}   Most of the things with the % were given in the orientation file from my university.  I hope you can help me (and sorry for the trouble with the wrong language at first :) )


Making a method return an arbitrary value while debugging in Visual Studio

So let's say I'm debugging the following method in a C# program:  int MyMethod() {    return 0; }   Is there any way (for example in the watch window?) to execute a statement that will make MyMethod return the value of 1? Or alter the returned value in any way not touching the code at all? (This means that adding int i = 0; return i; and then changing the value of i with the debugger is not an option)


Thickbox doesn't respect dimensions when used in admin

I'm writing an admin plugin which produces a pop up to give the user a preview of content.    I tried to use thickbox as suggested here -  but it does not respect dimensions.  My questions are - is this just broken, should i go custom, or is there now a better way to do this?  Thanks in advance,   <?php add_thickbox(); ?>  View all";


How can I run this python script on all html files under a directory?

I have a python script  $ cat ~/script.py import sys from lxml import etree from lxml.html import parse doc = parse(sys.argv[1]) title = doc.find('//title') title.text = span2.text.strip() print etree.tostring(doc)   I can run the script on an individual file by issuing something like  $ python script.py foo.html > new-foo.html   My problem is that I have a directory ~/webpage that contains hundreds of .html files scattered throughout sub-directories. I would like to run ~/script.py on all of these html files. How can I do this?  I'm aware that I can list all the .html files under ~/webpage/ by issuing   $ find ~/webpage/ -name "*.html"   but I'm not quite sure how to use this list to run my script on them.


I ran into this beauty, but I can't really understand it!  #include <iostream>  using namespace std;  int main() {   int array[] = {10, 20, 30};   cout << -2[array];    return 0; }   It prints -30. Thank you in advance  Edit: Not a duplicate of  because of the "-" sign.


Declaring variable outside route blocks, IS IT SAFE?

Good day legendaries, I am Nodejs and Javascript newbie.  I have routes getting value from a common variable that is on top of them.  let commonVariable = "theDefaultValue";  //some route just to get commonVariable value route.get("/", async (res, req) => { });  //some routes below that change commonVariable value route.post("/", async (res, req) => {   //changing commonVariable value   commonVariable = "anotherValue"; })   My concern is, how is the value of commonVariable after some routes change it, will other routes get the original value?


The difference between "have a lunch" and "have lunch"

Is there any difference between     I am not having a lunch tomorrow.   and     I am not having lunch tomorrow.   This is a follow up question of : .


What firewall ports need to be open for Active Directory?

I want to run DFS replication between a couple of servers. It's my understanding that the servers need to be part of a domain for this. Being able to give people a username and password that works on all servers would be useful too, so I can lock up the admin password.  All machines will be running Windows 2008R2 and they will all be running Windows Firewall, so I need to be able to allow the other machines to connect to this server, but lock out everyone else.   So my question is: what ports do I need to allow the machines to connect to the Domain Controller over?


\documentclass{beamer} \usetheme{Madrid} \begin{document} \begin{frame} aaa \end{frame} \begin{frame} bbb \end{frame} \end{document}   The above tex file is to be converted into html. I am using the following command   make4ht filename.tex   However it throws error. The basic question is "Is it possible to convert beamer presentation to html using make4ht?"


How would I work out the area of a shape that isn't a circle but has no ovals

Say for example I have a shape that is an oval which ddoesn't have straight lines(the wobble) how would I work out the area? What shape would it even be?  Here is an example of what I mean:


At university I have got a problem set with lots of inequalities. Unfortunately there are no explanations given how to do them. In Highschool we only did very easy inequalities. Therefore I am looking for a resource for inequalities. Especially for more difficult inequalities like $$1 \leq z \overline {z} \leq 4 ,  |\Im(z)|<\Re (z),$$ where $z$ is a complex number.   I would be glad at any recommendations.


This will surely be an easy one but it is really bugging me.   I have a script that reads in a webpage and uses  to parse it. From the soup I extract all the links as my final goal is to print out the link.contents.  All of the text that I am parsing is ASCII. I know that Python treats strings as unicode, and I am sure this is very handy, just of no use in my wee script.   Every time I go to print out a variable that holds 'String' I get [u'String'] printed to the screen. Is there a simple way of getting this back into just ascii or should I write a regex to strip it?


How does load average work with modern CPU's?

lead me to be quite shocked with my current system. The CPU in my workstation is an i7 with hyperthreading enabled, and cat /proc/cpuinfo produces 4 'cpu's.  That all given, my PC can generate over a 16 in all the load average slots from 1 minute to 15 minutes while compiling packages for Gentoo, but still be working perfectly for all other tasks as well. I've even seen it as high as 24, though it was starting to slow down at that point. How does this work, if 1.0 is supposed to represent one core at full utilisation?


Is there a name for adjectives that are based around someone's name?

Some examples would include:   Shakespearean Christian Mesmerized Pavlovian Newtonian Boolean Darwinian


How to prove that a limit does not exist?

Let $x \in \mathbb{R}$ and let $\lfloor y\rfloor$ be the largest integer less than or equal to $x$. $$ f(x) = \frac{1}{x} - \left\lfloor\frac{1}{x}\right\rfloor$$ How does one prove that the $ \lim_{x\to 0} f(x)$ does not exist by using a Epsilon Delta proof? There is a hint given that you can use a proof by contradiction.


I am installing ubuntu on my real computer but with the error "this kernel requires an x86-64 cpu but only detected an i686 cpu. unable to boot - please use a kernel appropriate for your cpu" help me!!


How to share worlds between platforms with Minecraft Better Together

I have read that with the new "Better Together Update" (BTU) it is now possible to .  However, I am having trouble finding details of how this is supposed to work to determine if it would do what I am hoping it would and therefore whether it is worth my time/money.  I have some saved worlds on Minecraft for XBox One, all done in creative mode.  I am able to import them into what is now just called "Minecraft" which as of the BTU is what is being used to mean the cross-platform version.   Can I now play this same world on my Windows 10 PC?   If I go to the Minecraft web site it offers to sell me the "Java Edition" with the addendum "includes edition for Windows 10".   But from what I have read, anything that has the word "edition" in it isn't the cross platform version.   It's very unclear to me what I would actually be buying here.  If it is possible to open the same world on different platforms, exactly how would I go about doing this?  On the XBox I have to sign in with an outlook.com e-mail address to access my worlds, or my kids' sign-ins to access their worlds, is it the same from the PC? And where would my world be saved?   I have read that XBox saves will be in the cloud, but PC saves will be local, so how can I get a cloud save onto my PC?  And then how can I get it back to the cloud when I am done so I can play it on the console again?  Will there be two copies floating around, making it possible for me to make a backup on my PC?  How will this interact with world editors?  At some point will I be able to start a game on XBox, transfer it to the PC, open it in a world editor, make some changes, and then transfer it back to the XBox?


When an email is forwarded, does it lose its original headers?

I am wondering if when an email is forward does it lose its original headers?


counter that MSB toggles every 2 seconds

I want a counter that the Most significant bit toggles every 2 seconds, and gets values 0 and 1.So for example it will have 0 for 2 seconds and after 1 for another 2 seconds etc.. I need it like that because I will connect the most significant bit to a decoder which will show results on FPGA 3starter (50MHZ/20ns) Does this will work?    library ieee ;  use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all;  ----------------------------------------------------  entity counter is  generic(27: natural :=2); port(   clock:  in std_logic;     rst:    in std_logic;     count:  in std_logic;     Q:  out std_logic_vector(27-1 downto 0) ); end counter;  ----------------------------------------------------  architecture behv of counter is                 signal Pre_Q: std_logic_vector(27-1 downto 0);  begin      -- behavior describe the counter      process(clock, count, clear)     begin     if clear = '1' then         Pre_Q <= Pre_Q - Pre_Q;     elsif (clock='1' and clock'event) then         if count = '1' then         Pre_Q <= Pre_Q + 1;         end if;     end if;     end process;          -- concurrent assignment statement     Q <= Pre_Q(27-1);  end behv;


Is there more than one harmonic number that is natural?

n-th harmonic number is:  $H_n=\sum_{k=1}^n\frac1k$  is there some $n\neq1$ for which $H_n$ is a natural number?  Or can it be proven that there is no such number?


Say I use a spell that requires target to make a DEX save or take 2d6 fire dmg. What would I compare that creatures DEX save to?   Example: I cast a spell that says, "Target creature makes a DEX saving throw, if fails, take 2d6 fire dmg". What would I compare the targets DEX roll to?


What does the expression inside array brackets mean?

I don't understand what this code is trying to say.  expectedContent = content[offset + readOffset : offset + readOffset + readSize]   This portion of code is part of a tester, that automatically corrects my homework assignment, and it's inside this function   def test_read_section(self, fname):         score = 0          subprocess.call(["ipcrm", "shm", self.data["shm_key"]], stderr=open(os.devnull, "w"))         self.writeString("CREATE_SHM")         self.writeNumber(int(self.data["shm_size"]))         r = self.readString()         if r != "CREATE_SHM":             return score         r = self.readString()         if r != "SUCCESS":             return score         # check if the shm actually exists         shm = self.shmget(int(self.data["shm_key"]), int(self.data["shm_size"]), 0)         if shm < 0:             if VERBOSE:                 print "[TESTER] shm with key %s not found" % self.data["shm_key"]             return score         shAddr = self.shmat(shm, 0, 0)         score = 1          self.writeString("MAP_FILE")         self.writeString(fname)         r = self.readString()         if r != "MAP_FILE":             return score         r = self.readString()         if r != "SUCCESS":             return score         score = 2          sections = getSectionsTable(self.data, fname)         self.writeString("READ_FROM_FILE_SECTION")         self.writeNumber(len(sections)+2)         self.writeNumber(0)         self.writeNumber(100)         r = self.readString()         if r != "READ_FROM_FILE_SECTION":             return score         r = self.readString()         if r != "ERROR":             return score         score = 4                                             fin = open(fname, "rb")         content = fin.read()         fin.close()          sectIds = random.sample(range(len(sections)), 3)         for sectId in sectIds:             _name, _type, offset, size = sections[sectId]             readOffset = random.randint(0, size/2)             readSize = random.randint(5, size/2)             expectedContent = content[offset + readOffset : offset + readOffset + readSize]             self.writeString("READ_FROM_FILE_SECTION")             self.writeNumber(sectId+1)             self.writeNumber(readOffset)             self.writeNumber(readSize)             r = self.readString()             if r != "READ_FROM_FILE_SECTION":                 print "!!!!!%d " % (sectId+1)                 return score             r = self.readString()             if r != "SUCCESS":                 print "[ANDREI] sectid:%d, readOffset: %d, readSize: %d" % (sectId+1,readOffset,readSize)                 return score             readContent = ctypes.string_at(shAddr, readSize)             if readContent != expectedContent:                 if VERBOSE:                     print "[TESTER] read content incorrect"             else:                 score += 2         return score


What is the real life application of group theory other than coding and cryptography if any and how can one apply group theory to them.


I want to install v4l-utils, actually, I'm Using L4T on TX2.  A few days ago, I updated L4T version 27.1 -> 28.1.  And then I couln't open System Settings -> Software & Updates.  Anyway, I ran sudo apt-get install v4l-utils but an error occurred:  E: Unable to locate package v4l-utils.   I tried to find other articles like  in order to fix this, but my case seems a little different.  In conclusion, I have two problems.   I can't install v4l-utils. I can't open Software & Updates.