I want to formulate the likelihood function in a linear regression problem in which I have censored observations. Considering the dataset $(x_i,y_i)$, I suppose that the dependent variable is normally distributed with mean $y=ax+b$ and standard deviation $\sigma$. The model parameter vector is $\theta=(a,b,\sigma)$   In case there is no censored observation, the likelihood function can be written as   $L(\theta;data)=\prod_{I=1}^N f(y_i|\theta)$   where $f(y_i|\theta)$ is the density function of $y$ given the parameters $\theta$.  In case of right censored data, the likelihood is  $L(\theta;data)=\prod_{I=1}^N [f(y_i|\theta)]^{\delta_i} [1-F(y_i|\theta)]^{1-\delta_i},$   where the first term is evaluated for non censored observations and the second term deals with censored data, since the value of the right censored indicator $\delta$ is 1 for uncensored data and 0 for censored data. Moreover, $F$ is the cdf of y and the term in the second parenthesis is the survival function.  Thus, considering the pdf of the Normal distribution having mean $\mu$ and standard deviation $\sigma$   $f(y)=\frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y-\mu}{\sigma})^2)  $  its cdf   $F(y)=\int_{-\infty}^{y} \frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y-\mu}{\sigma})^2) dy $  and the linear regression model   $y=ax+b$  the likelihood function can be expressed, in case of homoskedasticity, as   $$L(\theta;data)=\prod_{I=1}^N [\frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y_i-(ax_i+b)}{\sigma})^2) ]^{\delta_i} [1-\int_{-\infty}^{y} \frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y-(ax_i+b)}{\sigma})^2) dy ]^{1-\delta_i}.$$  Then, for simplicity I can modify the likelihood in the loglikelihood function obtaining:  $$\log(L(\theta;data))=\sum_{I=1}^N (\delta_i) \log (\frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y_i-(ax_i+b)}{\sigma})^2) ) + (1-\delta_i) \log (1-\int_{-\infty}^{y} \frac{1}{\sigma \sqrt(2 \pi)} \exp(-0.5  (\frac{y-(ax_i+b)}{\sigma})^2) dy )$$  Do you agree with this formulation of the likelihood function?  Does somebody have some good reference about this topic?

In Survival Analysis, you assume the survival time of a r.v. $X_i$ to be exponentially distributed. Considering now that I have $x_1,\dots,x_n$ "outcomes" of i.i.d r.v.'s $X_i$. Only some proportion of these outcomes are in fact "fully realized", i.e. the remaining observations are still "alive".   If I wanted to perform a ML estimate for the rate parameter $\lambda$ of the distribution, how can I utilize the non-realized observations in a coherent/appropriate manner? I believe they still contain useful information for the estimation.   Could someone guide me to literature on this topic? I am sure it exists. I am however having trouble finding good keywords/search terms for the topic.


I know there have been similar questions as listed below.        My question is for a specific type of damage which I believe requires a separate consideration.  My old passport binding and booklet is separated. Though it is separated, I have both with me. Apart from this there are no other issues. The passport first 2 pages, last 2 pages and US visa is absolutely readable without any issues.   I have applied for a fresh passport as I'm not allowed to travel in damaged passport.  Question  Is it okay to travel to US from India by carrying the new passport and old passport(which has US visa) with binding off?  I'm in a dilemma because I read the following FAQ Question and Answer in US Embassy website.     Question: My passport has expired or been damaged. However, I still have a valid U.S. visa in the passport. May I use the visa?       Answer: If the photo page on your passport has been damaged (e.g. has become   detached, or looks like it may become detached, from the rest of the   passport), please apply for a new visa in a new passport, submitting   both the damaged and new passport in support of your application.   In my case, photo page is not torn/separated from the rest of the passport pages but separated from the outer binding.  It would be really helpful if someone with a similar situation travelled successfully without any issues reply.

I got my US B1 visa last month on my Indian passport. Someone in my family wrote a phone number on one of the blank page of my passport. As my passport is damaged now, can I travel with my current passport to US or I should apply for new passport? Also, will B1 visa be valid on old damaged passport if I get new passport?


I am about to begin writing a new Windows application from scratch.  Since it is a Windows application, the power of C#/WPF etc. would do a lot of the heavy lifting of writing it, however, I am concerned about the ease with which C# .exe files can be reverse-engineered.  I am hoping the final application will sell for $10-$30, so we are not talking Autocad or Maya prices, but just how worried should I be that someone could easily create a virtual copy?  I mean $10 is not a fortune, but it is the difference between my being able to carry on developing the application and begging on the streets.  I am wondering if I should use some kind of obfuscation.  Do these really achieve anything?  Do they simply make it harder to get good debug messages out?  Does anyone have any experience of these, and if so can anyone recommend one?  Any advice would be very much appreciated.  Kind wishes ~ Patrick

Obfuscation is one way, but it can't protect from breaking the piracy protection security of the application. How do I make sure that the application is not tampered with, and how do I make sure that the registration mechanism can't be reverse engineered?  Also it is possible to convert a C# application to native code, and  is too costly.  C# provides lot of features, and is the ideal language for my code, so writing the whole codebase again in C++ is out of the question.  Secure certificates can be easily removed from the signed assemblies in .NET.


I would like that the width of the first column of an array to be 2cm and the second column to be 1cm. I have the following document but apparently the setting for the width of the second column is not working.    \documentclass{book}     \usepackage{multicol}     \begin{document}     \begin{multicols}{2}     \noindent      \begin{tabular}{ p{2cm} l   p{1cm} r}      abc abc abc abc   & xyz xyz xyz xyz xyz \\      \end{tabular}     \end{multicols}     \end{document}

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that  \usepackage{array} \begin{tabular}{| c | c | m{5cm} |}   vertically centers the text in the last column, but justifies it horizontally (like text in normal paragraphs).  Update: With Jake's method, it seems both \\ and \hline cause an error. How to fix it?


I wonder if Sanderson ever answered it on any panels. Do the metals simply magically disappear after they are burnt or are they in any way excreted from the body? Do they provide any nutritious value for the allomancers? If allomancers can control what metal they burn, can they also control what foods they burn?

In Mistborn allomantic powers are activated by 'burning' them, somehow using them up. But what happens to the metal after it's burnt? Does it oxidise? Is it annihilated?   I know it can't remain in it's standard state and have it's 'magic' used up, to use a crude term, as Kelsier mentions that Vin shouldn't leave metals unburnt as they can be toxic. If they only had their 'magic' used up, they'd remain in their normal chemical state once 'burnt'.  So what happens?


Could you please tell me what is the difference between these two sentences?     There had also been reports that rival gangs of youths had been seen   throwing fireworks at each other near the warehouses, and this might   also have had something to do with the fire starting.      There were also reports that rival gangs of youths were seen throwing   fireworks at each other near the warehouses, and this might also have   had something to do with the fire starting.

A) He was arrested by police. b) He had been arrested by police.  In newspaper reporter want to tell about past event that has already happened.  In above statements Reporter conveyed same meaning, that police have arrested criminal and he is still in there custody.  I am aware that above sentence are In past Tense i.e. former is in simple past and later is in Past perfect. And also in Passive voice  My question is that why reporter purposely used was and had been in sentence? instead of that he could have used Present perfect. e.g he has been arrested by police.  Also Some times reporters does not use simple past before using past perfect.  e.g. He had been arrested by police when I was reached on the spot.


I am a Turkish citizen and am a holder of the EU Blue Card in Germany. I gave my passport to the UK Embassy in Germany for my visa application, so my passport is not with me for a few weeks, but I need to go to Italy. My question is that can I travel with my Blue card but without my passport inside of Europe?

I am currently located in the Netherlands and have lived here for 4 years. I have a working visa for the Netherlands and would like to go on vacation to another country in Europe. I however do currently not have my passport as i sent it to an embassy for a visa application. Will I still be able to travel inside of Europe without a passport if I have my residency ID?  I have a resident permit, not a true Dutch ID. And I own a passport that is currently in transit.  I have called with the KLM and the service employee's conclusion was that I do need to carry my passport with me when i am going to fly, so it seems all I can do is wait and hope my passport is returned to me in the next few days as the amsterdam US consulate (who currently holds my passport) is incredibly difficult to contact for urgent matters.


My problem is that my graphics card is not available in the compute device option:    Instead it shows my Intel Core 2 Duo, which is my processor. Already set CYCLES_OPENCL_TEST=ALL and CYCLES_OPENCL_SPLIT_KERNEL_TEST=1  My Specs Processor: Intel Core 2 Duo E8300 @2.83GHz Graphics Card: AMD Radeon HD 6670 Graphics Card Driver: AMD Radeon Software Crimson Edition OS: Windows 7 64bit

I want to enable GPU rendering, but there is no option in User Preferences > System:    Why is this? How can I get cycles to render using my GPU?


I've a 500GB Disk with Linux and Windows installed. I've given 30GB to Linux. So windows has 470GB now. How to increase the space of 30GB of Linux in Ubuntu from the 470GB windows?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


How can I parse in java specific text from a website? For example if the site has this in their webpage: <meta property='ABC' content="DEF" />. I would like to search for 'ABC' and find 'DEF'. How can I make a function like this? I've got no experience with html, nor parsing information.  Thanks

Using regular expressions, what is the simplest way to fetch a websites HTML and find the value inside this tag (or any attribute's value for that matter):  <html>   <head>   [snip]   <meta name="generator" value="thevalue i'm looking for" />   [snip]


Does anyone know how to add on the Three.js File exporter in blender 2.72b I can not for the life of me get it installed.     ~Thanks.

There is this addon that was built called Window Generator 2. It can be . However, when I go to the download link it shows up in a new tab as a bunch of code.  How can I download and use this addon in Blender?


It is already common to do something "like"**(see asterisks below) z-standardization of the outputs of one neural network layer before passing it to the next.  z-standardization would transform the columns of $H_{\ell}W_{\ell} + \beta_{\ell}$ (where $\ell$ denotes a layer and $H$ denotes a "hidden" matrix containing the values of hidden neurons, or the input data) to have 0 mean and unit standard deviation.    **In reality, batchnorm is used, which incorporates learnable weights to the standardization function to help the model "undo" or "modify" the deterministic nature of z-scaling.  (1) I observe that z-scoring is a nonlinear function in $W_{\ell}$, because we must compute the sample standard deviation of $H_{\ell}W_{\ell} + \beta_{\ell}$, which involves a square root.  It follows that batch-norm will be nonlinear in the previous layer's weights as well.  (2) Thus, if we do batch norm, we do not need to use a common activation function such as ReLU or tanh to prevent the whole "stack" (composition) of affine layers from collapsing into one affine layer.  Meanwhile, the community generally believes batch norm is "good".  Thus, why not just use batch norm between layers and free ourselves from choosing between ReLU, ELU, etc. etc.?  ^^ that is the purpose of my question  what follows is an observation of why my question might also be useful:  (3) Then, we may observe all the questions online about whether batch norm should be used before or after the activation function.  But couldn't we just use batch norm and avoid this question?  Insights and/or references on this specific topic would be much appreciated!  Thanks

I read this great answer about how ReLu could approximate non-linear functions. However, if ReLu can approximate such functions, why cant linear activation function do the same? If they can, why linear activation functions are strictly prohibited in NN?


I know that they will form a basis, but will they span the entire $R^n$?

Does a set of $n$ independent vectors in $R^{n}$ always span  $R^{n}$?  If so, what's the reasoning behind this?


I recently downloaded Ubuntu from the microsoft store, and I am looking to install fdupes to get rid of a bunch of duplicate files I have. When i try to install, i'm met with:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package fdupes   I have looked around but I have no clue how to download the package or any basic Ubuntu options, I am completely new to this. I also only have the terminal window downloaded from the microsoft store. Additionally, if i try to update, i get the error that it cannot reach the archive or security URLs listed.  Please Help

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


Is there a regular expression to validate an email address in JavaScript?


I m using inotify to get events of file changes in directory. int fd = inotify_init(); for(const fs::path& p : fs::recursive_directory_iterator(filename)){         if(fs::is_directory(p)) {         // std::cout<<ss.str()<<std::endl;         std::stringstream ss;         ss<<p;         int wd = inotify_add_watch(fd,ss.str().c_str(),IN_CLOSE_WRITE|IN_CREATE);         if(wd<0)             std::cout<<strerror(errno)<<std::endl;         else             store[wd] = ss.str();         }     }  inotify_add_watch is always throwing error no such file or dir exists even though the path is valid. My os is windows 10 and I m using WSL ubuntu 20.04 on top of it and the paths which I m giving to inotify are like this /mnt/c/Users/name/dir_name I have tested this program in another machine which has 20.04 as the OS, and it worked there. I think due to this WSL the issue is happening, not sure ( I m quite new to WSL).

I'm looking for a bash script that will detect when a file enters a specific folder. Basically I want to eventually make a script that will detect when a file enters a certain folder on my desktop (using windows with wsl), add .png to the end of the file name (long story, just need that to happen), and then move to another file on my desktop. I have something to rename the files, as a friend made it and we worked together to troubleshoot it   for i in /[directory here] ; do mv "$i" "$i.png" ; done   Now I just need to automate it. I don't want to bother him more, since he has already done so much, and I am too new to Ubuntu to understand exactly what to do


Sorry for the lack of hand drawn red circle. The Post in question    App Version: 1.6.0.3 Device: iPhone 4S OS Version: Version 9.3.5 (Build 13G36)

I've noticed a few posts (and it is only a few—maybe a handful) which are missing the year and time from the timestamp—The year is replaced with \yy and the time is replaced with AM/PM.  The timestamp shows as expected in the revision log (in the app) and everywhere on the site.  For example: two answers on                              App Version: 1.6.0.7 Device: iPhone 6s OS Version: Version 10.0.1 (Build 14A403)


When I go to install, I get this error:  sudo apt-get install openssh-server    Reading  package lists... Done Building dependency tree        Reading state  information... Done Some packages could not be installed. This may  mean that you have requested an impossible situation or if you are  using the unstable distribution that some required packages have not  yet been created or been moved out of Incoming. The following  information may help to resolve the situation:   The following packages have unmet dependencies:  libxcb1 : Depends:  libxau6 but it is not going to be installed             Depends: libxdmcp6 but it is not going to be installed  openssh-server : Depends: openssh-client (= 1:5.9p1-5ubuntu1)                    Recommends: xauth but it is not going to be installed                    Recommends: ssh-import-id but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this  may be caused by held packages.   I am running Ubuntu 12.04.4  When I try to install the dependencies listed, it says I have the newest versions.

I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'


Is is possible in SEDE to write a query targeting many communities simultaneously?  I've seen this  but it doesn't help me. e.g. I would like to see how many questions were asked in X, Y, and Z communities in the past 6 months.

I think it would be useful if we could join across databases in the data-explorer.  For example, I'd like to query up a list of questions that I had a hand in migrating away from SO, and see what percentage of them were subsequently closed or re-migrated.  I realise I could download the various data dumps and do this on my own machine, but it would be nice if it were allowed on the online version.  Is this possible/practical?


As the question says. Are there non-trivial groups isomorphic to their automorphisms group?   (By the way i am  but i lost the password of my account and also mail :/ Is there anything anyone can do?)

Any complete group (that is, with trivial center and outer automorphism group) is isomorphic to its automorphism group. The inverse is not true, as the dihedral group of order 8 is isomorphic to its automorphism group but isn't complete.  Problem 15.29 in the Kourovka Notebook asks to find another exemple of a p-group, but I was wondering, is any other exemple known? Is there any other finite (or even infinite) group (not necessarily a p-group) which is isomorphic to its automorphism group but isn't complete?


Please vet my approach:  First need prove that for the least positive value combination (let, $l$), it will divide $a, b \in \mathbb{Z}$.   Will use the indirect, or contradiction approach to prove that $l \mid a$.  Similar will extend to $l \mid b$.  So, for $l \nmid a, \exists q, r \in \mathbb {Z}$, s.t. $a = al +r, 0 \lt r \lt l$. Hence, $r = a - q.l = a - q(ax_0 + by_0) = a(1 - qx_0) - qby_0$. So, $r$ is a linear combination of $a, b$ with integer multipliers, let $x,y,$ where $x = 1 - qx_0, y = -qy_0$  The assumed form for $l = ax_0 + by_0$. Given, by contradiction that $0 \lt r \lt l$, have the following inequalities, as the integer multipliers for $r$ must be smaller than of $l$, and positive too:  => $1- qx_0 \lt x_0$ - (i)  & $-q \lt 1$ - (ii)  =>  $1 \lt x_0(1+q)$ - (i)  & $q \gt -1$ - (ii)  Substituting for $q$ from (ii) into (i), get:  $ 1 \lt x_0($negative value$)$ -- obviously false, hence proved that $l  \mid a$ by contradiction.    Addendum In view of responses recd., have modified as follows. First, assume that $a,b \gt 0$. Second, form four cases of possible values of the integer multiplier, and will try to prove by contradiction in each.  Case (i) : $x_0 \gt 0, y_0 \gt 0$ : Have already proved this case above.  Case (ii) : $x_0 \gt 0, y_0 \lt 0$ : Implies $-qy_0 \lt y_0$, but as $y_0 \lt 0$, so cancelling $y_0$ from both sides leads to: $-q \gt 1 => q \lt -1$.  The two inequalities are :  $1 \lt x_0(1+q)$ - (i), $q \lt -1$ - (ii)  Substituting for $q$ from (ii) into (i), get: $1 \lt x_0$(negative value),  again obviously false.  Case (iii) : $x_0 \lt 0, y_0 \gt 0$ : Implies the two inequalities are:  $1- qx_0 \lt x_0$ - (i), $q \gt -1$ - (ii)  $1 \lt x_0(1+q)$, but as $x_0 \lt 0$, so it changes to $-1 \gt x_0(1+q)$, for positive $x_0$. Now, this is also not possible as $(1+q)\gt 0$.  Case (iv) : $x_0 \lt 0, y_0 \lt 0$ : As assume $a, b \gt 0$, so this case is not possible.  Hence, proved for all possible values of $x_0, y_0$.

I would appreciate hints to this. I've done part (a) but am unconfident. Wondering how I could approach part (b)    Question's comment -- The aim of this question is to use the Division Algorithm and the definition of greatest common divisor (gcd) to show that $d_0 = \gcd(a,b)$.    Question:  Let $a,b$ be integers, not both zero, let $S$ be the set of integers defined by $$S = \{ ax + by | x,y \in \mathbb{Z}\}$$ and let $d_0$ be the smallest positive integer in the set $S$. Prove: a. If $s\in S$, then $d_0$ is a divisor of $s$. b. $d_0$ is a divisor of both $a$ and $b$. c. If $d$ is a divisor of both $a$ and $b$, then $d$ is a divisor of $d_0$. d. $d_0 =\gcd(a,b),$ and hence there exists integers $x,y$ such that $ax + by = \gcd(a,b)$.    Attempt:  Note I don't expect full (or any hints to the problem(s) as there are quite a bit, but I would just appreciate hints. a. Let $s \in S$. Then $s = d_0 q + r$ for some $q,r \in \mathbb{Z}$. By definition, $d_0 = ax_0 + by_0$ for some $x_0,y_0 \in \mathbb{Z}$. $s = ax_s + by_s$ for some $x_s,y_s \in \mathbb{Z}$. Hence, $$ax_s + by_s = q(ax_0 + by_0) + r\\ a(x_s - qx_0) + b(y_s - qy_0) = r.$$ Define $x_r:= x_s - qx_0 \in \mathbb{Z}$ and $y_r:= y_s - qy_0 \in \mathbb{Z}$. Then this shows that $r \in S$ which implies $d_0 | s$.


I am using Ubuntu 12.10, can someone give-me instructions on how to make an account invisible from the login screen without deleting it?

How do I hide a particular user from the login screen on a default install of 11.10 and higher? (ie. using Unity Greeter)?


I have some code:  file.h:   #ifndef SAKE_H_INCLUDED #define SAKE_H_INCLUDED template <class T>  void swapq(T& a, T& b);  #endif // SAKE_H_INCLUDED   file.cpp:  #include "file.h"  template <class T> void swapq(T& a, T& b){    T temp=a;    a=b;    b=temp; }   main.cpp:  #include <iostream> #include "file.h" using namespace std;   int main() {    int a=3, b=2;   swapq(a,b);   cout<<a<<" "<<b<<endl;   return 0; }   So when I built it, the compiler show me a error:  ||=== Build: Release in test (compiler: GNU GCC Compiler) ===| obj/Release/main.o||In function `main':|  main.cpp:(.text.startup+0x2d)||undefined reference to `void  swapq<int>(int&, int&)'| ||error: ld returned 1 exit status| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0  second(s)) ===|   I deleted "template " and replaced "T" in void function with "int" and it built successfully. How can I use template in a "file.h" and "file.cpp" so that I can swap two varible with different datatypes ?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I've looked around but I'm still unable to get it working. If anyone could help that would be great.

I am currently using 2 versions of steam, the Linux one for games compatible with Linux, and the windows version in wine for games which are not compatible. I was wondering if it is possible to get wine to work on games in Linux steam (the one not using wine) , so I do not have to switch back and forth between the two steams.


Although one suit of armor cannot support more than one force field upgrade, light armor can be worn underneath power armor.  Can force fields be installed in both the light armor and the power armor so that the wearer can benefit from two force fields?

Can you wear 2 sets of armor to get the multiple upgrade slots? Ex. wearing a second skin under a defrex hide to get a total of 2 upgrade slots


The other day my friend and I were playing darts with several other players.  We selected teams.  When I learned that my partner would be Jordan, I enthusiastically announced,   "Hey Jordan, it's you and me!"  My friend objected that I should have said "Hey Jordan, it's you and I," for the same reason that one announces at the door of a friend who wonders who is outside, "It is I."    I find "It is I" rather pompous, but it seems correct.  "Hey Jordan, it's you and I," on the other hand, seems incorrect.  What is the rule here?

With the enthusiastic question of "Who wants ice-cream?", what is the more correct response?         (Not) I.   (Not) me.      Neither response is a sentence. The first response of "(not) I" sounds stuffy, like it should be followed with an indignant sniff. The second sounds like American idiom and acceptable for casual speech.    What do you say?


The formula:  $A^T(b - Ax) = 0\\ A^Tb = A^TAx\\ x = (A^TA)^{-1}A^Tb$  What is the reason for multiplying both sides by the transpose of A?

In ordinary least squared there is this equation (Kevin Murphy book page 221, latest edition)  $$NLL(w)=\frac{1}{2}({y-Xw})^T(y-Xw)=\frac{1}{2}w^T(X^TX)w-w^T(X^T)y$$  I am not sure how the RHS equals the LHS. Maybe my linear algebra is weak but I can't figure out how this happens. Can somebody point out how this happens. This is related to deriving the Ordinary Least squares equation where $\hat{w}_{OLS}=(X^TX)^{-1}X^Ty$  NLL - stands for negative loglikelihood.  I am attaching the screen shots of the relevant section. My equation is in the 1st image(page 221). I actually bought the book so I am hoping that showing 2 pages is not a copyright infringement. source (Kevin Murphy, Machine Learning, A probabilistic perspective)


Every now and then an edit will be suggested that introduces both good changes and bad ones, and I'm not sure which of "Improve Edit" or "Reject and Edit" actions is better suited to such a case.  I understand that "Improve Edit" is counted as an accepted edit for the user that suggested the changes, but removing information from an edit is closer to rejecting it than improving it, so "Accepting" such an edit feels misleading and might not give proper feedback to the suggester.  On the other hand, "Rejecting" the edit just to add some of the changes back into the post myself seems unfair to the user that suggested the edit, and it's clear the user cares about the post's quality, though they might have misunderstood some edit guidelines or some information in the post.  What's the better way to handle these situations?  . The first change is bad, the second is good.  Related:

Contradicting Instructions While going through the suggested edits review queue, one sometimes stumbles upon partially useful edits like . Trying to follow the instructions listed in the descriptions doesn't lead to a conclusive answer. Considering our example:   Approve edits that clearly improve the post ↳ No, not *clearly* Improve Edit when you can make additional improvements to the post ↳ I most definitively can Reject and Edit to replace an ineffective edit with your own substantive changes ↳ It is ineffective in the sense that it made the post worse overall (imho) Reject edits that fail to improve the post or that make it worse ↳ Like the last option: yes Skip if you are not sure and want to go to the next suggested edit ↳ Well, yes. But that is really why I am here, asking this question   Reasoning about the remaining Choices This leaves us with three choices: Improve Edit, Reject and Edit and Reject (the last one slightly modified):  Improve Edit  + Acknowledges that some things in the edit where correct - Learning effect for author might vanish, as the improvement might get overlooked - Can't leave a custom message for edit author (except in comments, which pollutes the thread) - Doesn't trigger the system which "punishes" users who repeatedly have their edits rejected - Rewards the edit author with reputation for a poor edit   Reject and Edit  + Clearly shows the author that there were problems with the edit - Still can't leave a custom message explaining the problems of the original post. - One has to partially redo parts of the edit that have just been rejected, which might feel unjust to the original editor   Reject with a custom note and come back immediately to make a good Edit  + Clearly shows the author that there were problems with the edit + Possibility to leave an explanation as to what was wrong with the edit - One still has to redo parts of the edit that has just been rejected - Seems to be a weird workaround for Reject and Edit   Something else?   Each of the three options come with their distinct advantages/disadvantages making it non trivial to decide which one to pick.  Or does the answer simply depend on the quality of the edit? Like:  Improve Edit for subjectively slightly positive edits Reject and Edit (Or Reject and Edit) for subjectively slightly negative edits


I need to be able to take a list of strings, and come up with a list of all possible combinations of those strings combined.  ["asdf", "ghj","ew","ptum"]   It should get a list something like this, up to n  ["agep", "aget", "ageu", ... "fjwm"]   What would I do to get these?

I want to write a function that takes an array of letters as an argument and a number of those letters to select.   Say you provide an array of 8 letters and want to select 3 letters from that. Then you should get:  8! / ((8 - 3)! * 3!) = 56   Arrays (or words) in return consisting of 3 letters each.


I have tried to set up a scheduled backup of my Minecraft server. I used a script I found on GitHub at  and it seems to work great when I run it from the terminal directly.  The cronjobs I have set up however doesn't work for some reason. In mails I get these error messages:     Hexxit Server is running, suspending saves... su: must be run from a terminal   su: must be run from a terminal   su: must be run from a terminal   done   Backing up hexxit-01... done   Total backup size (175 MiB) <= (5000 MiB)... done   Hexxit Server is running, re-enabling saves... su: must be run from a terminal   su: must be run from a terminal   done     The main problem seems to be su: must be run from a terminal and I assume this has to do with security issues on the server and not the script, so that's why I'm asking here.  It's more or less a freshly installed instance of Debian 7.1.0 x64 with one user on it, mc. How do I fix it so that this script runs successfully?  The cronjobs look like this and have been added using crontab -e  */15 * * * * /usr/bin/minebackup backup 0 0 * * * /usr/bin/minebackup backup full     I've been searching around for a bit and I have a feeling I need to edit /etc/sudoers, but the line which I was supposed to comment away isn't even in the file, so I don't know if Debian has changed its defaults or... eh?  Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"  root    ALL=(ALL:ALL) ALL  %sudo   ALL=(ALL:ALL) ALL  #includedir /etc/sudoers.d

I am using  to automate db2 interface testing with our product. I am able to run the command using su - db2inst1 -c "/home/db2inst1/sqllib/bin/db2 list database directory" but when I try the same command with the staf interface I am getting the error:  standard in must be a tty   I commented the "Defaults requiretty" in /etc/sudoers, but still have the same issue.


I've stumbled upon that limit in the book that I'm studying (Spivak's Calculus). At the current stage of the book, this is a trivial task if $\alpha \in \mathbf Q$. But the problem statement doesn't specify anything about $\alpha$, except that $\alpha > 1$, so what if $\alpha \in \mathbf R$? At the current stage there is no Chain Rule, L'Hopital's Rule, exp/log, integrals, series. I've attempted to show that $$\lim_{h^+ \to 0} \frac{|h|^\alpha}{h}=\lim_{h^+ \to 0} h^{\alpha - 1}=0=\lim_{h^- \to 0} -(-h)^{\alpha - 1}=\lim_{h^- \to 0} \frac{|h|^\alpha}{h}.$$ I've tried:  Something like $0<h<\delta = \epsilon^{\frac{1}{\alpha - 1}} \implies 0<h^{\alpha - 1}<\epsilon$, but I'm not sure how to prove the general statement that $\forall x,y,a \in \mathbf R, a > 0, \ \ 0 \leq x < y \implies x^a < y^a$. Also I can only prove the existence of the roots like $\epsilon^{\frac{1}{n}}, n \in \mathbf N$. Prove that $f(x)=x^\alpha, \alpha > 0$, is continuous. Using limits multiplication rule for that would not work for irrational $\alpha$. Showing continuity through differentiability is problematic, I can prove $(x^n)'=nx^{n-1}$ only for rational n (this also hinders the proof of the statement in 1., i.e. that $f(x)=x^\alpha, \alpha > 0$ is an increasing function on $x \geq 0$).  Nevertheless, the problem is given at this stage, so what am I missing here?

I want to calculate the derivative of $|x|^\alpha$ with respect to $x$, where $1<\alpha<2$.  $\frac{d|x|^\alpha}{dx}=\alpha|x|^{\alpha-1}\mathrm{sign}(x)$  Is it correct?  And is it true that  $\lim_{x \to 0} \alpha|x|^\alpha\mathrm{sign}(x)=0$?  What with the following derivative $|x|^\alpha\rm{sign}(x)$. I would be grateful for any hints.


i have a function that scans a directory and builds a key,value pair of all folders and their respective files in it. const listNotes =  () => {     const listing = [];     try{       const folders = fs.readdirSync(defaultPath);       folders.forEach((folder) => {         let v = fs.readdirSync(`${defaultPath}/${folder}`);         listing[folder] = v;       });             } catch (err) {       console.log(err);     }      return listing;   };   and this is an output of such scan [ DailyTask: [ 'Chores.json' , 'Sunday.json'] ]  that is a folder called DailyTask containing 2 files. How do i convert this structure to JSON.

How can I serialize an object to JSON in JavaScript?


How would i remove flags from my enum  I can add them easy with m_Buttons | (button);  enum WindowButton {     None = 0,      Minimize = (1 << 0),     Maximize = (1 << 1),     Close = (1 << 2), }; inline WindowButton operator|(WindowButton a, WindowButton b) {     return static_cast<WindowButton>(static_cast<int>(a) | static_cast<int>(b)); } inline WindowButton& operator |= (WindowButton& lhs, WindowButton rhs) {     return lhs = static_cast<WindowButton>(static_cast<WindowButton>(lhs) | static_cast<WindowButton>(rhs)); }   This is the function where im trying to add / remove  void Window::SetButton(WindowButton button, bool show) {     if (show)         m_Buttons |= (button);     else         m_Buttons | ~(button); // This is not working to remove flags }

How do you set, clear, and toggle a bit?


The system is Windows7 64-bit Integral Edition. There are two administrator users : Ambre-68 and postgres. When I start my computer then there is the screen showing the choice of users. I want Windows to login automatically to the user AMbre-68. How to do that ?

Windows-7 is configured to automatically login on boot.  I want to change which user it logins to.  more details I have 3 accounts:   Administator   administrator no password default for auto login  Mine   administrator password protected I want this to be the default  Other   standard user no password  Guest (disabled)


I often encounter methods which look like the following:  public void foo(final String a, final int[] b, final Object1 c){ }   What happens if this method is called without passing it final parameters. i.e. an Object1 that is later changed (so is not declared as final) can be passed to this method just fine

I can't understand where the final keyword is really handy when it is used on method parameters.    If we exclude the usage of anonymous classes, readability and intent declaration then it seems almost worthless to me.   Enforcing that some data remains constant is not as strong as it seems.    If the parameter is a primitive then it will have no effect since the parameter is passed to the method as a value and changing it will have no effect outside the scope.  If we are passing a parameter by reference, then the reference itself is a local variable and if the reference is changed from within the method, that would not have any effect from outside of the method scope.    Consider the simple test example below. This test passes although the method changed the value of the reference given to it, it has no effect.  public void testNullify() {     Collection<Integer> c  = new ArrayList<Integer>();           nullify(c);     assertNotNull(c);            final Collection<Integer> c1 = c;     assertTrue(c1.equals(c));     change(c);     assertTrue(c1.equals(c)); }  private void change(Collection<Integer> c) {     c = new ArrayList<Integer>(); }  public void nullify(Collection<?> t) {     t = null; }


top - 17:05:46 up 7 min,  1 user,  load average: 227.48, 89.29, 36.78 Tasks: 1758 total,  25 running, 1555 sleeping,   1 stopped, 177 zombie Cpu(s):  1.5%us, 32.1%sy, 58.0%ni,  4.7%id,  2.7%wa,  0.1%hi,  0.8%si,  0.0%st Mem:  65951776k total, 20235624k used, 45716152k free, 10882480k buffers Swap:  4194300k total,        0k used,  4194300k free,  3291164k cached   What's the meaning of that?   doesn't say anything about that?  us means usage. sy seems to be system. ni? What is ni? What is id? What is wa? what is si? Why so much cpu time is spent on ni and sy?

When I issue top in Linux, I get a result similar to this:    One of the lines has CPU usage information represented like this:  Cpu(s): 87.3%us,  1.2%sy,  0.0%ni, 27.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st   While I know the definitions of each of them (far below), I don't understand what these tasks exactly mean.   hi - what does servicing hardware interrupts mean? si - what does servicing software interrupts mean? st - they say it's the "CPU time in involuntary wait by the virtual CPU while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine".   But what does it actually mean? Can someone be more clear?  I listed all of us, sy, ni, etc, because it could help others searching for the same. This information is not in the man pages.  us: user cpu time (or) % CPU time spent in user space sy: system cpu time (or) % CPU time spent in kernel space ni: user nice cpu time (or) % CPU time spent on low priority processes id: idle cpu time (or) % CPU time spent idle wa: io wait cpu time (or) % CPU time spent in wait (on disk) hi: hardware irq (or) % CPU time spent servicing/handling hardware interrupts si: software irq (or) % CPU time spent servicing/handling software interrupts st: steal time - - % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine


So when I'm in render preview I can see everything but everything cut off in object mode

When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached.


So I dropped my phone. The top right corner blacked out to a fifth of the height, it still supports touch, but I can't really see what I'm touching. Is there a way to resize my display so that it only uses the bottom 4/5 of the screen? Like, force the whole display to use a smaller part of the screen, hopefully one I can personalise.

I have a oneplus android phone.  The touch screen recently started malfunctioning so that the bottom centimetre of the screen does not work, but the rest of the screen works perfectly well.  Unfortunately the bottom centimeter contains lots of important functions.  Is there a way to resize my display or resolution so that it excludes the bottom centimeter of my screen?


I just started to upgrade ubuntu 12.04 to 14.04. Installation was not successful. After restart I can see the login page with my username and guest but when I fill login details nothing happens. Same login window appears again. Please help.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I'm currently a student in college in the United States. I have a scholarship, and I work, so I'm in the fortunate position of earning more money than I'm spending. I have a credit card, but pretty much the only reason I have it is to build up a credit history.   If I make multiple payments on my credit card throughout the month, each time paying the balance in full, will the card company charge interest if there happens to be money on the balance on whichever day they charge interest? Is this strategy good for my credit score?

First of all, I am a resident of Canada.  I am  new to credit cards, so I hope my question makes sense. I've had my card for a few months ago and I've always paid the balance in full by the time the due date rolls around. Just out of curiosity, say the day after tomorrow was my due date. If I made a purchase tomorrow and didn't pay it off by the day after tomorrow, would I be charged any interest on it? Is there any negative ramifications at all for doing this?  Thanks.


I know it's possible to add singe IPv6 addresses to the system by calling this command:  ip -6 addr add 2002:c000:203::1/64 dev eth0   This works fine for single addresses. However if I want several of these I have to add them all manually. So my question is if there's a way to allow my system to bind/respond to all possible IPv6 addresses without having to manually enable them. And if so how can I add this configuration in the /etc/interfaces file so that this configuration persists over a reboot of the system?

I know that the ip tool lets you bind multiple addresses to an interface (eg, ). Right now, though, I'm trying to build something on top of IPv6, and it would be really useful to have an entire block of addresses (say, a /64) available, so that programs could pick any address from the range and bind to that. Needless to say, attaching every IP from this range to an interface would take a while.  Does Linux support binding a whole block of addresses to an interface?


Alright, so my old PS3 is broken, won't turn on at all, and if it does, immediately shuts off on it's own immediately after it turns on or a few minutes after which. That's all fine and good, because most of the data I have on there is stuff I can easily do again, or at least enjoy again. However, my main concern is for my Little Big Planet 2 data. I'm not playing through all of that again, because I don't need to. You see, I'm a composer and I used to use the music sequencer in LBP 2 to compose my music. But the PS3 broke, and I got a new one for Christmas.  Is there any way for me to be able to take the LBP 2 data from my old PS3 and put it in the new one? I want to be able to look at the notes of my songs and re-create them on FL Studio. It would be a great help if somebody would tell me how, if there is any way, so I don't have to re-make all of them by memory!

Is it possible to get the data off of the hard drive of a PlayStation 3 that has crashed? I have already voided the warranty so I am not worried about that and I have access to quite a few tools.   I have a new PlayStation and a few saves that were not backed up. I am not worried about them but if it is possible I would love to get it moved over.   The old PlayStation will not turn on at all and I think I am going to have to pull the drive. My main concern is if I am able to transfer the files without running into any issues. I have heard that some of the stuff is specific to each PlayStation, is that true?


so i was trying to install wine i had a problem some of its dependency(win32) were not able to install as it was not able to fetch archives so i decided to update packages and still i had same problem.  what i did next is i removed all of the lists using "sudo rm /var/lib/apt/lists/*" and used apt-get update command. i got such error at the end.     W:    E: Failed to fetch   404  Not Found [IP:IPADDRESS]   E: Some index files failed to download. They have been ignored, or old ones used instead.   and now when i try to install wine i get      Reading package lists... Done   Building dependency tree   Reading state information... Done   Some packages could not be installed. This may mean that you have   requested an impossible situation or if you are using the unstable   distribution that some required packages have not yet been created   or been moved out of Incoming.   The following information may help to resolve the situation:   The following packages have unmet dependencies:    wine-stable : Depends: wine-stable-i386 (= 2.0.4~zesty) but it is not going to be installed Unable to correct problems, you have held broken packages.   and now if i try to update list it starts updating whole list all over again starting from ppa.launchpad.net  please help me to resolve this issue. Thank You!

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Right now, Java is printing 7.1781566186590595E-6. I want it to print 7.17E-6. I searched this up, but I only found how to reduce digits without scientific notation (so it will end up like 0.00 because the number is small).

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


cout << "Please enter colors for the two cuboids: " ; cin >> color1 >> color2;   if ( color1 == color2)     cout << "Color names cannot be the same, good bye..." << endl;  Like here I need to check if color 1 is equal to color2 for example rEd and RED should be considered the same but I should not use for loops to solve this is there any other way?

What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase?  Please indicate whether the methods are Unicode-friendly and how portable they are.


How would you go about solving something like $$\int \frac{1}{4+5\cos{t}}~dt$$  I am aware that you would use a substitution involving the half angle of tan but I am unsure on how to apply it.  Many thanks

Suppose $\displaystyle P(x,y)$ a polynomial in the variables $x,y$.   For example, $\displaystyle x^4$ or $\displaystyle x^3y^2 + 3xy + 1$.  Is there a general method which allows us to evaluate the indefinite integral     $$ \int P(\sin x, \cos x) \text{d} x$$   What about the case when $\displaystyle P(x,y)$ is a rational function (i.e. a ratio of two polynomials)?   Example of a rational function: $\displaystyle \frac{x^2y + y^3}{x+y}$.    This is being asked in an effort to cut down on duplicates, see here:   and here:


Is there a way we can check and refer the source codes which execute the commands like "CayleyGraph()", "SemidirectProduct()" which are used for computations in GAP software?

How can I find the codes related to a function in GAP? When I use "??" in front of the name of function there is no help, so I want to find the code of function among packages.


Just as the title asks, what is the normal limit on how far a character can see/hear under normal conditions (normal lighting, no fog or other weather interference)?   Under the  section all I can find are rules for decreased light, light sources and low-light/darkvision.  I've been told as a general rule to treat normal senses as double the limit of things like low-light/darkvision, so they would extend out to 120 ft. While this seems reasonable as a distance over which to see/hear something clearly, I'd like to know if there is a RAW mention of an actual range that I've simply overlooked.

Let's assume we have some PCs moving along infinitely flat plains. In the air (some distance away) is a large creature with a rider that can cast spells. In optimal conditions (so there's normal daylight and no obstructions), how far from the PCs can the rider be and still see them?   Note that I've certainly seen the Light Sources and Illumination table, but that's not helpful. We're talking about natural light sources under optimal conditions; is there an official Pathfinder rule for how far PCs and NPCs can see?


Has an NFL team ever won its division with a losing record in the division?  I'm wondering if  could win the  this year with four division losses, in the six they play within the division, by virtue of having the best record overall. I'd like to know if that's ever happened before with any other past division winner.

I'm wondering if there has been any division in the modern day NFL history where all teams finished the regular season with winning or losing record. Even though this might not be so probable, it is definitely possible.   This question is motivated by what's been happening this year (2014) in the NFL. All teams in the AFC North (Cincinnati, Pittsburgh, Baltimore and Cleveland) have winning record as of week 12; and teams in NFC South (Atlanta, New Orleans, Carolina, Tampa Bay) all have losing record! at the end of week 12, the worst record in AFC North was 7-4 which is better than the best record in NFC South at 4-7.   UPDATE:    The 2014 NFC South's champion is Carolina Panthers with a losing record of 7-8-1.  2014 AFC North did not have all team with winning record as Cleveland Brown finished at 7-9


What is the estimated hardware requirements for a Dynamics CRM Implementation that will be accessed by about 30 users with about 200K to 500K contact data? The implementation most likely will use Windows Server 2008 and SQL Server 2008 R2.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I want to make an Android app that displays latitude and longitude and features a button that copies them both to the clipboard.  Does copying to the clipboard require special permission on Android?

I'm building an Android app and I want to copy the text value of an EditText widget. It's possible for the user to press Menu+A then Menu+C to copy the value, but how would I do this programmatically?


Even if I have some upvotes on my posts, it looks the same always:    (I expect to see something like +[some rep], like on the site)  However when I click it, I can see my new rep changes highlighted.  Could the highlighting of rep indicator be implemented?

I would like to get a notification if my reputation count has changed. I think there is already some internal API for that. (I can see that changes in the menu bar in the top).  I'm sure that some people would not like that so that should be optional.


I just got this warning when trying to flag a post:     Attention: some of your recent flags have been declined - please    them before flagging this post!   but I dont get this. When I click on the link, I see all my recent flags as helpful or pending. Also in total I have 5 declined flags of 252 total flags.  I've read this question before of course:    and the answer is:      The warning is triggered when at least 10% of the flags you've raised,   processed in the past 7 days, have been declined.   Al though I have no declined flags in the past 7 days.  My last declined flag was on March 23rd. That's longer than 7 days ago and it's also not 10% of my flags.  What am I doing wrong?

I had flagged  on Stack Overflow as spam. The flag was declined, then later  we found it was spam and got deleted as such, but the flag's still marked declined.  However, whenever I try to flag a post now I am presented with an annoying warning:    Below is a summary of my flags thus far:    It's annoying (and somewhat scary) to be presented with warnings for no fault.  Is there a way out?  Should I stop flagging altogether?


Recently in my topology homework I've stucked with the following problem: Prove that sphere with $n$ handles covers sphere with $m$ handles if and only if $m-1$ divides $n-1$ So, basically, as I understand we need to prove that there exist a covering map $p: S_n \rightarrow S_m$ (where $S_k$ is a sphere with $k$ handles) if and only if $(m-1)\big|(n-1)$. Well, actually it doesn't look intuitive why do we need the condition $(m-1)|(n-1)$. Can't we just map all handles of $S_n$ to the handles of $S_m$ (maybe two ore more different handles of $S_n$ to one into $S_m$) and then map the rest of the $S_n$(basically just a sphere) to the rest of $S_n$ (also sphere) ? (I understand I'm not rigorous here, but you definitely understood what I mean). Any hints/ideas would be greatly appreciated.

Similar to a previous question I asked, this is the other question that I couldn't answer in an exam I gave for my Topology course:  Suppose $g_1,g_2$ are non-negative integers such that $2-2g_2$ divideds $2-2g_1$. I have to construct a covering map $S_{g_1} \rightarrow S_{g_2}$, where $S_g$ is denotes an orientable compact connected surface without boundary with genus $g$.  Now, I attempted to try this problem for surfaces with smaller genera, for example a 2-torus and a 2-sphere. Clearly $2-2g$ is the Euler Characteristic of the said surface, and by classification of surfaces we have to only consider connected sum of 2-tori. So, I have $\chi(S^2)=2$, and $\chi(T^2) = 0$, here we have $2$ dividing $0$, hence I have to construct a covering map from $T^2 \rightarrow S^2$, and I have no idea how to move forward.  Addendum: I have to got great answers to my question here but I had a doubt when it comes to the points being mapped, specifically in Giulio Bresciani's answer. Clearly the handles of the figure is mapped to the handles in the figure above, but I'm unable to understand the mapping of the twist of the cover (above figure) to the extreme handles of the base (the figure below). Any help?


The shell script, I am trying to create, should be run by crontab regularly, and it should call a perl script which saves email attachments to a predefined directory.  Here's what I came up with:  backup_day=`date +%Y-%m-%d`  backup_dir=/private-backup/email_attachment_cleaner/korrespondenztest/$backup_day  if [ ! -d $backup_dir ] then     mkdir -p $backup_dir fi  if [ ! -d $backup_dir ] then     echo "Error"     exit 1 fi  output_file=/root/email_attachment_cleaner/history.txt  perl /root/email_attachment_cleaner/email_attachment_cleaner.pl -O $backup_dir -lots-of-further-parameters >> $output_file   When I save this script in /root/email_attachment_cleaner/ and run it with sudo sh /root/email_attachment_cleaner/email_attachment_cleaner.sh, I get the following output:  : not found_attachment_cleaner/email_attachment_cleaner.sh: 2: /root/email_attachment_cleaner/email_attachment_cleaner.sh: : not found_attachment_cleaner/email_attachment_cleaner.sh: 4: /root/email_attachment_cleaner/email_attachment_cleaner.sh: /root/email_attachment_cleaner/email_attachment_cleaner.sh: 19: /root/email_attachment_cleaner/email_attachment_cleaner.sh: Syntax error: end of file unexpected (expecting "then")   It appears to me that the given line numbers are probably "wrong" and should be 1, 3 and 18 instead. However, this output does not help me at all. What's going on here?   I needed quite some time to figure out that empty lines in the script should contain at least a space. Is that right?

I wrote a Bash script in Windows using Notepad++.  cxStopAllServicesOnSERVER.sh  #!/usr/bin/bash cd "/some/path" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" >> "cxStartStopLogger.log" exit   Now after uploading it and setting the required file permissions, I tried executing it as follows:  bash-3.00$ cat cxStopAllServicesOnSERVER.sh #Let's have a look at the code. #!/usr/bin/bash cd "/some/path/" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" >> "cxStartStopLogger.log"  bash-3.00$ # Code and hashbang 'looks' correct,  bash-3.00$ # if there is any issue with the format (EOL characters and such)  bash-3.00$ # we cannot see it using cat. bash-3.00$  bash-3.00$ sh cxStopAllServicesOnSERVER.sh cxStopAllServicesOnSERVER.sh[2]: /some/path^M:  not found Hi. Logs can be found at /some/path/cxStartStopLogger.log bash-3.00$ # Note that ^M appears at the end of the line.  bash-3.00$ bash -x cxStopAllServicesOnSERVER.sh + cd $'/some/path\r' : No such file or directory1.sh: line 2: cd: /some/path ++ pwd ' echo 'Hi. Logs can be found at /some/path/cxStartStopLogger.log Hi. Logs can be found at /some/path/cxStartStopLogger.log ++ date + echo '[Sun' Nov 18 00:28:17 EST '2012]*** STOPPING ALL SERVICES ON SERVER ***' bash-3.00$ # Note that '\r' return character appears at the end of the line.   Problem: When I change the code to korn shell I face the same issue. Appears that an incorrect character is getting added at the end of the line.   NOTE: I found the solution and have posted the same as an answer. Feel free to update or improve it to help other beginners that may face the same issue.  Thanks!


I want to write the latex commands in the document ina coloured box with line numbers. Much like in here the latex commands display in a gray coloured box. I want that with line numbers. And also i want not be limited in grey colour. I want to use my own colur combination. And the line numbers would in different coloured box and the commands should be in a different coloured  box. It is not needed to separate the lines with an horizontal line.

I am writing some documentation for a LaTeX package, in which I am going to be including some example LaTeX code.  What is the best way to typeset that code?  I know I could just use verbatim, but it would be nice to get syntax highlighting.  I realize that this is a duplicate of , in which the consensus was to use the  package.  The problem with listings is that it seems to only have a driver for TeX, not LaTeX.  For example, when I typeset something like this:  \begin{lstlisting}[language=TeX,                    keywordstyle=\bfseries,                    identifierstyle=\itseries,                    stringstyle=\ttfamily] \begin{minipage}{\hsize}   This is a test! \end{minipage} \end{lstlisting}   it results in something like this:     \begin{minipage}{\hsize}     This is a test!   \end{center}   which is obviously messed up.  Is there a LaTeX-specific driver for listings?  If not, is there another package that does syntax highlighting for LaTeX code?


It is a well-known fact that $\aleph_0 = \vert \mathbf{N} \vert$ is the smallest infinite cardinal number. But I'm wondering why; does anyone know a proof?  Thanks!

I am comfortable with the different sizes of infinities and Cantor's "diagonal argument" to prove that the set of all subsets of an infinite set has cardinality strictly greater than the set itself. So if we have a set $\Omega$ and $|\Omega| = \aleph_i$, then (assuming continuum hypothesis) the cardinality of $2^{\Omega}$ is $|2^{\Omega}| = \aleph_{i+1} > \aleph_i$ and we have $\aleph_{i+1} = 2^{\aleph_i}$.  I am fine with these argument.  What I don't understand is why should there be a smallest $\infty$? Is there a proof (or) an axiom that there exists a smallest $\infty$ and that this is what we address as "countably infinite"? or to rephrase the question "why can't I find a set whose power set gives us $\mathbb{N}$"?  The reason why I am asking this question is in "some sense" $\aleph_i = \log_2(\aleph_{i+1})$. I do not completely understand why this process should stop when $\aleph_i = \aleph_0$.  (Though coming to think about it I can feel that if I take an infinite set with $\log_2 \aleph_0$ elements I can still put it in one-to-one correspondence with the Natural number set. So Is $\log_2 \aleph_0 = \aleph_0$ (or) am I just confused? If $n \rightarrow \infty$, then $2^n \rightarrow \infty$ faster while $\log (n) \rightarrow \infty$ slower and $\log (\log (n)) \rightarrow \infty$ even slower and $\log(\log(\log (n))) \rightarrow \infty$ even "more" slower and so on).  Is there a clean (and relatively elementary) way to explain this to me?  (I am totally fine if you direct me to some paper (or) webpage. I tried googling but could not find an answer to my question)


I am not very knowledgeable when it comes to Ubuntu. I keep procrastinating on learning, sorry I'm digressing. My Windows 7 HD failed. I booted into Ubuntu 16.4  and retrieved my important files. I installed windows 10 onto a new hard drive. I didn't install Ubuntu. I just ran it from a CD. Now when I boot up Win10, I get,   error: no such partition.  Entering rescue mode...  grub rescue>  I've tried: bootrec /fixmbr bootrec /fixboot bootrec /scanos bootrec /rebuildbcd   The old hard drive is still connected and I just received an message about it. Also, the HD's might be connected to their original Sata Ports. Any and all help would be awesome. Again, thank you.

I have Windows 8 pre-installed, and then I installed GRUB with Ubuntu. Ubuntu is not my thing, so now I want to remove it along with GRUB. From what I have learned, with UEFI, GRUB does not overwrite the windows bootloader in the EFI partition and is stored elsewhere. How would I remove GRUB and make my PC use the Windows bootloader instead? It should be noted that I created a separate /boot partition when installing Ubuntu.


What changes when you go into safe mode? Can you use the internet? What is safe about the safe mode? I have also tried to go into safe mode and wasn't able to get into the mode.

What does the OS change when it boots into safe mode, as compared to normal mode?


The classical way the $\epsilon$-$\delta$ definition for continuity (limits) proceeds is by starting with a given $\epsilon>0$, and our ability to then find a number $\delta>0$, such that when $|x-x_{0}|<\delta$, we get $|y-y_{0}|<\epsilon$.   My question is: why cannot we do exactly the same definition but starting from a given $\delta$ (instead of starting with a given $\epsilon$)?   That is, why not say: given $\delta>0$, we can find a number $\epsilon>0$, such that when $|x-x_{0}|<\delta$ we get $|y-y_{0}|<\epsilon$ ?    Note: this question is different from other questions posted regarding the direction of implication of the definition (e.g. this )

I'm curious for some perspectives on why it would be wrong to change the definition of continuity of $f: \Bbb R \to \Bbb R$ in the following way:  Original definition. $f : \Bbb R \to \Bbb R$ is said to be continuous at $x \in \Bbb R$ if $\forall \epsilon > 0$ $\exists \delta > 0$ such that $|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$. Altered definition. $f : \Bbb R \to \Bbb R$ is said to be continuous at $x \in \Bbb R$ if $\forall \delta > 0$ $\exists \epsilon > 0$ such that $|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$.  The altered definition is more in line with what I think when I think about continuity intuitively: nearby points are sent to nearby points.  It only makes sense to me to be able to choose "nearness" in the domain (i.e., $\forall \delta > 0$) and show there is nearness in the codomain (i.e., $\exists \epsilon > 0$) to prove intuitively that "nearby points are sent to nearby points". Similarly, if $X, Y$ are topological spaces, we say $f: X \to Y$ is continuous if the preimages of open sets are open.  What would be wrong about changing the definition to say that a map is continuous if the images of open sets are open (i.e., $f$ is continuous if it is an open map)?  This is more inline with the intuitive idea of "nearby points being sent to nearby points" -- you pick nearness in the domain (i.e., an arbitrary open set) an show nearness in the codomain (i.e., the image is open). Does anyone have any useful remarks?


I think the strategy for this problem would be i assume some arbitrary element is in gcd(a,b) and chase it into the rhs and then do it the other way around , but i am not sure how to even start this one.

Let $D$ be a , and let $a,b,x \in D \setminus \{0\}$. Then is it true that $\gcd (ax,bx)=x \cdot \gcd (a,b)$ ?    Let $c=\gcd (a,b)$ and $d=\gcd(ax,bx)$, then as $cx|ax$ and $cx|bx$ so $cx|d$. We would be done if we could show $d|cx$, but I am unable to show that. Please help me to solve this problem.


I have a file and I want to get string from that file into my javascript, so I can do something with it. I have found a way to do it, but it is little bit broken, since string from file can be really large. This is what I use now:  var text; $( "#p1" ).load( "smejanje.html" ); text = $("#p1").text();   In html:  <p id="p1"> Text </p>   And... It works (kind of), I use intervals, stuff like that, but it seems to do the trick. But, problem is that this method sets text of p1 element to be string from file and then it gets text of p1. Is there any way to load DIRECTLY to string, without editing html element?

I have a text file in the root of my web app  and I'd like to load it into a variable in javascript.. in groovy I would do this:  def fileContents = 'http://localhost/foo.txt'.toURL().text; println fileContents;   How can I get a similar result in javascript?


I am not sure if I am asking a very complicated question but I want to know exactly what is happening at the molecular level that exerting force along center of mass produces linear motion and not torque and force away from COM produces torque and not pure linear motion. Does force not get distributed properly or something when force is away from COM thus producing torque where individual molecules of an object move at different velocity, acceleration. If this is part of the explanation, what is the mechanism for this. I have searched the net exhaustively for an intuitive and non mathematical explanation and so far I feel like I have not progressed as all on this question. Can anyone please give a non-mathematical explanation for why this is so?

The definition of centre of mass on Wikipedia is given as  This is the point to which a force may be applied to cause a linear acceleration without an angular acceleration.  How can I prove that such a point is the weighted average of the radius vectors of all discrete masses mathematically? Also see .


Do I have to have meat thawed before putting it in my pressure cooker.

I would like to cook frozen chicken breasts in a pressure cooker for shredding and making chicken mole.  I do not want to add anything except water, but I'm having a hard time finding specific guidelines on the time to cook frozen meats with no added ingredients or steps.   In my case, I have 3 pounds of frozen chicken breasts to cook.  What are the general rules to follow for frozen meats and, in my case, how long and at what heat should I cook this for?


I'm trying to calculate the area of some census tracts in qgis I go to vector -> geometry tools -> export/add geometry columns   in the resulting dialog, I calculate using project CRS. What comes out in the attribute table is something like 0.000018 or 0.0000152. I don't know what units these are in; most other information on the internet seems to say that this issue is a map projection issue.  For the record, the current map project is NAD83 EPSG 4269  I do not know what unit this is in. If I knew the unit, it would be pretty trivial to add a new 'calculating' column to the attribute table to determine the area in language I can understand.

Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the:   area of each polygon and another column with length of the perimeter of each polygon?


I am trying to remember the name of a paperback book that I was given by a friend in the United States sometime in the early 2000s.  The book was part of a trilogy that followed the story of a group of people who were surviving in a post-apocalyptic world where water was so scarce that there were "water merchants" or "watermen" or similar who sold water to small colonies.  I do remember that the book was religious fiction written for a Christian audience, and I think that it ended up being specifically marketed as young adult fiction.  I read only the prologue or part of the first chapter, and the only thing that definitely I remember about it was that there was a group of people waiting to meet someone (possibly a water merchant), and there was a guy who was so sick that he was coughing up blood as he spoke to the others in the group.  I also seem to recall that the government in the region was totalitarian and may have been the reason why the water was so scarce. Other details that I remember are that the cover of the book was mostly blue and contained a sort of cyberpunk-styled image (possibly of a person wearing a hoodie).  I seem to recall that it looked similar to the .  In the book was an advertisement for the other books in the trilogy, and I remember that other books had similarly stylized covers with different images of a different predominant color.  (I think one of the other covers was mostly green with an image of another person.) What I can say for sure is that it is NOT one of the books in the Left Behind series, but it was definitely something in the same general genre.

A friend and I are trying to find an old book series, probably by a Christian author, that we read in the late 90s or early 2000s. It takes place after the "Water Wars," and fresh water is super scarce.  Manhattan has been turned into a giant prison/slum, all the metal has been stripped from crumbling buildings and they get a very small ration of water from the main land.  A guy convinces a board of trustees on the mainland to take a guy from the island to determine if they should continue to get water by testing his virtue and bravery.  He gets stuck in this cyber-world where he relives events in history from Egypt, Rome, the Crusades, etc. and eventually encounters Jesus or God (in the machine, literally).  We have no idea what the name of these books are except that we're pretty sure that the name "Cyber-" is in the title.  Also, if I remember rightly, each individual book is pretty thin (just a couple hundred pages) but the anthology is a pretty decent-sized novel.  Anyone have any thoughts?  EDIT: I am 28 (was 15 in 2000), but tend to read genre fic from above and below my reading level.  I feel like this series was about at my intended level (even though I was reading above it).


If was pointed out to me that one of my questions was a duplicate, so I went to delete it. No such option available?

Currently, the only way to vote to delete (and undelete, since you can't see deleted posts) in the Android app is to open the post in a browser, and then vote to delete from there.  Can we get delete vote functionality within the app, as well as the ability to delete our own posts?  Worth to mention: users , so it's possible in the API.  Related:


Recently I came across the expression "dain-bramaged".  I assume that there are other seemingly flippant instances of the exchange of initial consonants of words, but is there a general term for such a practice?  Edit:  Please note, this refers specifically to (a) initial consonants only, and not to whole syllables, and (b) intentional, not accidental or ignorant, exchange of consonants.  Second edit:  By popular (and quite reasonable) demand, I am emphasizing that, yes, these are spoonerims.  So what I'm looking for is a name for the paricular activity of deliberately creating a spoonerism by changing only initial consonants or consonant groups, and changing only that.

Primary question: A common speaking mistake is to exchange syllables of words, saying "It's trace rhyme!" instead of saying "It's race time!", or pronouncing "kickin' chackatory" instead of "chicken cacciatore." Is there an existing name in poetry, linguistics, or English studies for switching syllables of (quasi-)consecutive words? I am not especially interested in the case when switching syllables results in interpretable homonyms or portmanteaus, like in the first example.  Secondary question: if not, what would you call it?  Tertiary question: is there somewhere a (playful?) taxonomy of fruitful or unfruitful lingual aberrations?


I have a polygon which is defined by a set of vertices and I need the smallest sphere encompassing the mesh.  The spheres are defined by a position vector (x,y,z) and a radius.  Is there an algorithm that given a solid collision mesh with no holes generates the smallest sphere that encompasses a solid collision mesh with no holes in all cases    This is not a duplicate of  question because the question is only about a sphere encompassing a polygon soup a. I'm asking if there is an algorithm that given any solid collision mesh with no holes generates the smallest sphere that encompasses a solid collision mesh in all cases.

How can I generate AABB, OOBB and Sphere from a polygon soup, where the bounding volumes are defined as follows:   AABB should be specified by min(x,y,z) max(x,y,z) OOBB should be specified by min(x,y,z) max(x,y,z) and a quaternion for rotation Sphere is specified as position(x,y,z) and radius


Sample input file: abcd <Space> 1234 <Space>  Desired output: abcd 1234

I want to remove all empty lines from a file. Even if the line contains spaces or tabs it should also be removed.


I have 2 classes   public class A {     public A(string N)     {         Name = N;     }     public string Name { get; set; }      public void GetName()     {         Console.Write(Name);     } }  public class B : A {     public B(string N) : base(N)     {     }      public new void GetName()     {         Console.Write(new string(Name.Reverse().ToArray()));     } }   I create a new object B which I want to call GetName from A and GetName from B  B foo = new B("foo"); foo.GetName(); //  output "oof"   Expected Output "foooof"  I already tried public new void GetName() : base but that does not compile

In the code below I tried in two ways to access the parent version of methodTwo, but the result was always 2. Is there any way to get the 1 result from a ChildClass instance without modifying these two classes?  class ParentClass {     public int methodOne()     {         return methodTwo();     }      virtual public int methodTwo()     {         return 1;     } }  class ChildClass : ParentClass {     override public int methodTwo()     {         return 2;     } }  class Program {     static void Main(string[] args)     {         var a = new ChildClass();         Console.WriteLine("a.methodOne(): " + a.methodOne());         Console.WriteLine("a.methodTwo(): " + a.methodTwo());         Console.WriteLine("((ParentClass)a).methodTwo(): "          + ((ParentClass)a).methodTwo());         Console.ReadLine();     } }   Update ChrisW posted this:     From outside the class, I don't know   any easy way; but, perhaps, I don't   know what happens if you try   reflection: use the Type.GetMethod   method to find the MethodInfo   associated with the method in the   ParentClass, and then call   MethodInfo.Invoke   That answer was deleted. I'm wondering if that hack could work, just for curiosity.


On , I have starred the question .  In the comments, the author has requested that their question be migrated from Meta Super User to Meta Stack Exchange.  If a question is migrated, will my account still list the question as favorited, or will I need to wait until the question has been migrated to re-star it?

Didn't find any talk of this so my curiosity got the best of me.  How do migrations handle favorited questions? My guess would be the favorite link would stay on the original site to the closed migrated question and I would assume any favorite marks would be reset on the site migrated to.  This isn't really that important, but just curious what happens.


Brand new to WordPress. Using it from GoDaddy and when I try to upload my video .mov file (it's only 10MB) I get an error saying it's not a valid media type. Any ideas? Thanks.

I know since WP 3.6 we've been able to upload and embed various file formats and that the 'Add Media' button effectively implements the correct media embed shortcode for us.  I'm having a problem in WP4.0 using 'Add Media' to embed quicktime (.mov) files. The embed works fine for the other supported video MIME types but I'm not offered 'Embed Media Player' when I try adding a .mov file to a post.  See screen grabs/explanation:   See how .mov embed has reverted to a simple hyperlink (recorders) at   Does anyone have any suggestions as to why this is, or to a possible fix so I can embed .mov as easily as .mp4 - seems to be the preferred format of the client. For the moment we're having to manually add the [video] shortcode ourselves in the text editor.  How do I check that embed is supported/enabled for .mov?


Can you describe the spectrum of the Laplacian $ \Delta : H^2(\mathbb R^n) \subset L^2(\mathbb R^n) \rightarrow L^2(\mathbb R^n)$?  I am interested for which values $z \in \mathbb C$ the equation  $\Delta u + z u = f$  has a solution $u \in H^2(\mathbb R^n)$ for every $f \in L^2(\mathbb R^n)$. I think that the point spectrum is empty, but is every $z$ in the resolvent set?

I know very well that Laplacian in bounded domain has a discrete spectrum. How about Laplacian in $\mathbb{R}^n$?(not in some fancy-shaped unbounded domain, but the whole domain)  Where can I find such results?  Moreover, is there a counterpart of Hilbert-Schmidt theorem for Laplacian in $\mathbb{R}^n$? Hilbert-Schmidt asserts there is a countable set of eigenfunctions $\phi_n$ so that $x=\sum \langle x,\phi_n\rangle \phi_n,\forall x\in H$.  Is there a similar theorem saying $x=\int_0^\infty \langle x,\phi_\lambda\rangle \phi_\lambda\,\mathrm{d}\lambda,\forall x\in H$ where $\phi_\lambda$ is the eigenfunction of Laplacian to spectral value $\lambda$?


One can use . However Preview on Mac OS X 10.7 does a too hard compression for my taste. There is only one compression setting.  Are there alternative tools that allows you to adjust the compression ratio?

Background  I want to decrease size of the .pdf filled with images. In Preview in can be dome through Export and set Quartz Filter-> Reduce File Size before saving.    Problem  The file indeed decreased from ~30MB to 0.37MB.   But the result has such poor quality that images are barely readable.  Question  I saw an examples of using Image Magic to achieve that - but can it be done by Preview without any external software?


If I label an equation I use   \label{bla} \eqref{bla}   since then it automaticalls copies the number of the equation e.g. 1.1 and with \eqref{bla} I get (1.1) with the link to the equation - perfect... However, I defined many other things like "Lemma", "Remark", "Example", Theorem" etc. Now is there something like eqref that automatically checks the title, e.g. Lemma 1.2 and then writes "Lemma 1.2" with the link to it similar to eqref?  Or do I need to define it? If yes- how could I do it?

Sometimes when I work I write something like  \begin{proposition} \label{my new result} ... \end{proposition} ... blah blah in Proposition \ref{my new result} blah...   but then I realize that the Proposition should actually become a Lemma. So I change it to  \begin{lemma} \label{my new result} ... \end{lemma}   The problem is that I then have to hunt down all the places where I wrote Proposition and change it to Lemma, which is tedious and error-prone. Well, we have search facilities in editors, so it is not really that complicated, but still it feels the wrong way to do this. I would be happier to write  \begin{proposition} \label{my new result} ... \end{proposition} ... blah blah in \labelNameFor{my new result} \ref{my new result} blah...   where labelNameFor is a hypothetical magic command which outputs "Proposition". Then I could forget about all the places where I reference the result and just make any changes I wish.  Is there a way to do something like this? As far as I understand the label/ref mechanism is simply based on counters, so I do not see a straightforward way, but maybe someone more clever and industrious then I am has given the problem some thought.


Evaluate the limit $\lim_{x\to 0} \left(\dfrac {\tan x}{x}\right)^{\dfrac {1}{x}}$  My Attempt: $$\lim_{x\to 0} A= \lim_{x\to 0} \left(\dfrac {\tan x}{x}\right)^{\dfrac {1}{x}}$$ Taking $\ln$ on both sides, $$\ln (\lim_{x\to 0} A)=\lim_{x\to 0} \dfrac {1}{x}\cdot \ln\left(\dfrac {\tan x}{x}\right)$$

Find $$\lim_{x \to 0} (\frac{\tan(x)}{x})^{\frac{1}{x}}$$   My first idea to solve this was to try to evaluate it and then apply the L'Hospital's rule. This is what I managed to achieve: $$\left(\frac{\tan(x)}{x}\right)^\frac{1}{x}=e^{\frac{1}{x}\ln\left(\frac {\tan(x)}x \right)} $$ However, this is problematic, because the L'Hospital's rule is not applicable in the exponent, therefore my transformation was not a good shot. What transformation should I apply to get the desired form?


I am trying to develop a model for prediction of retention. The problem is that the retention is very rare - aprox. 0.2 %. So far I have been using logistical regression. Without much success however. For example, in the interval of predicted probability above 70 % I am getting 4 true retention clients and 157 wrongly predicted retentions.  I have spent quite a lot of time deciding what covariates to choose and what transformation to apply. I don't think I can improve that.   The question could be formulated also as the following. How to use (or what to use instead of) logistical regression when the response vector "Y" contains very few 1's (0.2 % in my case)?  If you think you should know what data I have, tell me and I will provide you with this information. But I don't think it's important. Anyway, I have enough data. About 1.5 mil rows, so about 3000 of 1's.

I have a dataset with lots Y=0 and few Y=1. I have to run logistic regression, so I'm using a retrospective sample in order to get a more balanced sample. Could someone give me some references that explain which are the problems arising when I use logistic regression in an unbalanced sample? I kwow that the main problems are instability of estimated coefficients and poor predictive power of the model, but I need some references.


I have a dual booted system. Since upgrading 18.04 to 20.04 beta I can no longer delete files or save files in the Windows file system. Delete and shift-delete seem to be disabled.

I have an NTFS partition. The idea is I can use this for data on either Ubuntu Mate or Windows 10 dual boot. It worked fine when I first installed Mate, but recently I no longer have the delete option when I right-click on a file or folder. The delete key does nothing. I also can't paste into the partition (Paste greyed out). It's as if the whole partition is read-only. In Gparted, the partition is marked with a key. Does this mean anything? I'm not aware of having changed anything, however, Windows recently did a big update - have they hijacked my drive?  I've read related posts, but people speak of returned errors - I have no errors, just nothing happens. Also, suggested solutions seem far too technical for what must surely be a simple tick-a-box fix!  Please note - for me the Terminal is where I get off a train and Sudo sounds like a Japanese noodle dish. ;) GUI's preferred if possible! Thanks for your patient help!


I have a 4TB hard drive but I don't know how to put Ubuntu on my hard drive.

I would like to see a full how-to guide on how to install Ubuntu.


Let $(A_i \mid i \in I)$ be a family of non-empty set. Then $A_i \neq \emptyset$ for all $i \in I$, thus $\exists a_i \in A_i$ for all $i \in I$. We define $f:I \to \bigcup A_i$ by $f(i)=a_i$.   From reading other posts in MSE, I'm sure that my argument is wrong without Axiom of Choice, but I can not understand why it's wrong. The usual answer is that you can not appeal to Existential Instantiation infinite many times. However, I'm unable to understand this explanation under set theory. Maybe the problem is related to underlying logic, with which I'm not familiar.  Please explain me why you can not appeal to Existential Instantiation infinite many times?

In terms of purely set theory, the axiom of choice says that for any set $A$, its power set (with empty set removed) has a choice function, i.e. there exists a function $f\colon \mathcal{P}^*(A)\rightarrow A$ such that for any subset $S$ of $A$, $f(S)\in S.$ Is this correct?  My question then is about proving this fact, so that we do not need to put it as an axiom. Now as per the research done on this single object- Axiom of Choice, I believe here that there should be some falsity in my argument. I do not find the mistake.  For any $S\in \mathcal{P}^*(A)$, since $S\neq \emptyset$, $\exists s\in S$. Define $f(S)=s$. Then $f$ is a choice function.  This was showing me that the axiom of choice is proved, but then why it had been put as an axiom? For example, in  book, the author asserts that      It is a metatheorem of mathematical logic that it is impossible to specify the function that assigns to each non-empty subset of $\mathbb{R}$, an element of itself.     There are several notes and books on axiom of choice, but here I am trying to understand through doing some argument for some problem, where problem actually arises.


For certain websites on my Nexus 5 running stock Android 5.1, I would like to always display the desktop version instead of the mobile version.  My current workflow is as follows to navigate to a desktop version of a frequently-visited website:   Open Chrome bookmark from a Bookmark widget Wait for Chrome to begin to load the mobile version of the website Check the "Request desktop site" option in the Chrome menu Wait for Chrome to load the desktop version of the website.   I'm aware of  that shares how to configure Chrome to always request the desktop site. Is there a way for to set up a bookmark so only that bookmark loads the desktop site?

When I tap one of my favourite site, Chrome suggests me the link to mobile version, but I do not want it. I want to disable it only for my favourites.  I want to set the desktop mode only for some selected website, not for all  I use Chrome with Lollipop on Nexus 4. How can I disable this feature?


How can I find out what Irony has been used in a sentence?

Recently I had a test in college that asks us to give an example of irony.  I wrote this word by word:     An astronaut had over 200 missions into space over two decades. Ironically, two days after he returned from his latest mission, he tripped on a banana peel and died.   But I did not get any marks for it (it weighs 3 marks). Is it not an example of irony?


I was recently thinking about how I could evaluate the famous limit of 'e' as I haven't ever seen a proof. I can't really find anything online so I've tried to evaluate the limit myself. And I was also thinking it would be nonsensical to use L'Hopital's rule, am I right?  So I did the following:  $$\lim_{n \to \infty} \left(1 + \frac{1}{n} \right)^{n} = \exp \left(\lim_{n \to \infty} n \cdot \ln \left(1 + \frac{1}{n} \right) \right)$$  $$=\lim_{n \to \infty} \exp \left( n \cdot \left( \frac{1}{n} - \frac{(1/n)^{2}}{2} + \cdots \right) \right)$$  $$= \lim_{n \to \infty} \exp \left( 1 - \frac{(1/n)}{2} + \cdots \right)$$  $$= e$$  I am not sure, is my logic correct or does it create circularity by taking logarithms and assuming $$f(x) = \exp \left( \ln f(x) \right)$$ ?

How to prove the following limit?   $$\lim_{n \to \infty} (1+1/n)^n = e$$    I can only observe that the limit should be a very large number!   Thanks.


Let $G$ be a group and $H$ a subgroup with finite index $n$.  Prove that $G$ has a normal subgroup $N$ such that $N\subseteq H$and $|G: N| \le n!$.

Let $G$ be a group and $H$ be a subgroup of $G$ with finite index. I want to show that there exists a normal subgroup $N$ of $G$ with finite index and $N \subset H$. The hint for this exercise is to find a homomorphism $G \to S_n$ for $n := [G:H]$ with kernel contained in $H$.   The standard solution suggests to choose $\varphi$ as the homomorphism induced by left-multiplication $\varphi: G \to S(G/H) \cong S_n$. I'm not 100% sure if I understand this correctly. What exactly does $\varphi$ do? We take $g \in G$ and send it to a bijection $\varphi_g: G/H \to G/H, xH \mapsto gxH$? If so, how can I see that its kernel is contained in $H$? Also, the standard solution claims its image is isomorphic to $G/N$ and thus $N$ has a finite index in $G$, how can I see that the image is isomorphic to $G/N$?  Thanks in advance for any help.


when anyone actually hits an armoured target in star wars e.g; the average stormtrooper, the armour serves no protection against any form of laser fire. this would lead me to believe the armour is used to protect against less advanced races who more likely wield swords and shields however in the return of the Jedi the stormtrooper's armour does nothing to protect against the Ewoks and their rocks.following my previous logic I assume that the armour is resistant against certain weapons/materials, however, I'm not versed in the star wars universe, so does armour serve any purpose in the star wars universe other than aesthetics?

It seems that it didn't actually protect them from any form of attack.   Every direct hit from a laser seemed to kill a stormtrooper outright, and a slice from a lightsaber cuts straight through.


I used these commands to allow access to git clone katoolin to be stored in usr  sudo chmod -R 777 /usr/ sudo chown www-data:www-data /usr/   I don't know which one ruined my sudo access. Also, I don't have access to root. I tried entering into recovery mode then into root shell and used commands from  but it didn't work.  Kind of new to it. Some help would be helpful.

I needed to edit a .config file (which I know for a fact is not creating these problems, just to clear that up) and it wouldn't let me save it, so I took ownership of /etc and all contents with the command chown -hR username /etc and that let me edit the .config file but now whenever I try to install any packages or use any sudo commands, it doesn't work  (I've checked for errors in the sudo file in sudoers.d and there was nothing wrong with that).   So how do I return it to the previous owner?


I am trying to install Lubuntu to replace Ubuntu, when executing the command on terminal it gives an error (below), please can someone shed a light? Many thanks fd@fd-lenovo:~$ sudo apt install lubuntu-desktop [sudo] password for fd:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies.  gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.28.4-0ubuntu18.04.2 is to be installed  lubuntu-desktop : Depends: lxqt-core but it is not going to be installed                    Recommends: hplip but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Someone on my friend's realm set up a constantly active repeating command block that does "/say Hello! How are you?" and it spams the chat so fast and makes everyone lag really bad, and we can't figure out how to fix it...

I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it?


Is this normal or is there some thing wrong?  The installation options are still on the desktop.  I had selected the restart now option.

I am installing Ubuntu 14.04 LTS using a USB


I tried to implement outlier detection for one dimension using inter quartile. For instance, a given variable cost or revenue or profit. but I'm missing outliers in other dimensions when running for one dimension.  How to detect outliers for multi dimensional data , like cost and revenue and profit at once.  Is there any efficient algorithm for this?

Suppose I have a large set of multivariate data with at least three variables. How can I find the outliers? Pairwise scatterplots won't work as it is possible for an outlier to exist in 3 dimensions that is not an outlier in any of the 2 dimensional subspaces.  I am not thinking of a regression problem, but of true multivariate data. So answers involving robust regression or computing leverage are not helpful.  One possibility would be to compute the principal component scores and look for an outlier in the bivariate scatterplot of the first two scores. Would that be guaranteed to work? Are there better approaches?


I have an equation that is so large that it needs to span over several lines. However I also have a particular alignment that I want, so I used the flalign environment to lay it out as I want it to be. However, I end up with each line being numbered, when I only want one number for the whole equation:      \begin{flalign} \label{soundness:goal}     &   \gamma \tdash \{p\}\cmd\{q\} \implies \forall \sigma \in \TStore. \; \forall h \in \THeap. \; \forall \rho. \\     &   \quad (\sigma, h) \vDash_{\rho} p \implies \forall t \in Trace_{\gamma}(\state{\cmd}{[\sigma]}{ h}). \; \exists n \in \mathbb{N}. \; length(t) < n     \end{flalign}   Is there anyway that I can have an flalgn environment or similar, but only have the last line numbered?

I have an align environment with 5 equations. I want 3 of them numbered, and the other 2 not numbered. I understand that there's other posts on the issue of selective numbering of those equations that are referred to in the body of the text, but that's different to what I'm trying to achieve.  I want the first three lines (equations) of the following to be numbered and the last two to be without numbering. Thanks.  \documentclass[a4paper,11pt]{article} \usepackage[fleqn]{amsmath} \begin{document}  \begin{align} &R_{i,t} = \alpha_i  \\ &R_{i,t} = \beta_i  \\ &R_{i,t} = \gamma_i  \\ &\mathbb{E}[\epsilon_{it}]=0;\textrm{   } \textrm{Var}[\epsilon_{it}]=\sigma^2_{\epsilon_{i}}\\ &i \in \{1,2,...,N\};\textrm{   } t \in \{1,2,...,T\} \end{align}  \end{document}


Random rand = new Random();         var list = new object[] { 1, 2, 3, "A", "B", "C" };         object item = list[rand.Next(0, list.Length)];   I want to return item then remove it from list[]

Lets say I have this array,  int[] numbers = {1, 3, 4, 9, 2};   How can I delete an element by "name"? , lets say number 4?  Even ArrayList didn't help to delete?  string strNumbers = " 1, 3, 4, 9, 2"; ArrayList numbers = new ArrayList(strNumbers.Split(new char[] { ',' })); numbers.RemoveAt(numbers.IndexOf(4)); foreach (var n in numbers) {     Response.Write(n); }


I use backticks in programming on mostly OS X but sometimes Windows.  Can I configure the system so that I can type them in a single press? I don't care for those òìè just these `

To get a ^ (caret) character, I have to press the ^ key two times. The first time, nothing happens, the second time two ^ appearing. So I have to delete the second.  Same behaviour when I want to print a single ´ (apostrophe) or a single ` (backtick)