Can we use bootstrap samples that are smaller than original sample?

I want to use bootstrapping to estimate confidence intervals for estimated parameters from a panel dataset with N=250 firms and T=50 month. The estimation of parameters is computationally expensive (few days of computation) due to use of Kalman filtering and complex nonlinear estimation. Therefore drawing (with replacement) B (in hundreds or more) samples of M=N=250 firms from original sample and estimating the parameters B times is computationally infeasible, even though this is the basic method for bootstrapping.   So I am considering using smaller M (e.g. 10) for bootstrap samples (rather than the full size of N=250), drawn randomly with replacement from original firms, and then scale the bootstrap-estimated covariance matrix of model parameters with $\frac{1}{\frac{N}{M}}$ (in example above by 1/25) to calculate the covariance matrix for the model parameters estimated on the full sample.   Desired confidence intervals can then be approximated based on normality assumption, or empirical ones for smaller sample scaled using a similar procedure (e.g. scaled down by a factor of $\frac{1}{\sqrt{\frac{N}{M}}}$.   Does this workaround make sense? Are there theoretical results to justify this? Any alternatives to tackle this challenge?


How to create a flat base to a photogrammetry model in Blender?

I am trying to create something like this in Blender, but I don't know how exactly.  I captured a model of a WWI bunker with photogrammetry and processed it with Agisoft Metashape but I like to add an “earth base” for a nicer presentation. I imported the OBJ file into Blender but I'm having trouble making it work (I'm kind of new to Blender). Extruding the model downwards gave bad results, so I tried duplicating the model, making it flat, selecting the edges of both the model and the base with Edge Loops and then Bridging the Edge loops but that gave really funky results (I think not all edges were correctly selected, resulting in an uneven amount of edges between top and bottom).  Could anyone propose a workflow to achieve this in Blender?


TikZ/pgf: Why does `\newline` and `\\` not split text in node?

The MWE:  \documentclass{standalone}  %====================================== \usepackage{tikz} \usetikzlibrary{graphdrawing} \usetikzlibrary{arrows} \usetikzlibrary{graphs} \usegdlibrary{force, layered, trees} %======================================  \begin{document}  \tikz  \graph [spring layout, nodes = draw] {     a/"dispersive\newline collision";     b/"non-dispersive\newline  collision";      a -> b };  \end{document}   The output:    The question:  As you can see above, the \newline command does nothing. Trying to use \\ instead of \newline, like how the pgfmanual does in some examples (see pg. 386) has the same effect. Why? What can I do in order to have the words appear on separate "lines"?


To what extent is $\textbf{Fld}$ not a filtered category?

EDIT: Basically, I want to see if one can construct examples of fields $F,K$ such that they don't have a common extension field.  Apologies in advance if this is obvious, but for example, is there a field containing isomorphic copies of both $\mathbb{C}$ and $\mathbb{Q}_p$ for any prime $p$? If not, what's a good field invariant that could tackle a lot of these kinds of questions? I was thinking of using Galois groups somehow, but not sure where to begin.  This comes from the observation that the underlying set of the geometric realisation (as a locally ringed space) $|F|$ of a functor $F: \textbf{CRing} \to \textbf{Set}$ can be given by $\text{colim}_\textbf{Fld} F(k)$ (limit taken over the functor sending a field $k$ to $F(k)$ and sending $f: k \to K$ to $F(f): F(k) \to F(K)$), where $\textbf{Fld}$ is the full subcategory of $\textbf{CRing}$ where the objects are fields.  If you want to see what this actually looks like, you can consider $\bigsqcup_{\textbf{Fld}} F(k)/\sim$, where $\sim$ is the equivalence relation generated by the relation $x \sim y$ for $x \in F(k)$ and $y \in F(K)$ if there exists $L$ and $f: k \to L$ and $g: K \to L$ such that $F(f)(x) = F(g)(y)$. Now, if such an $L$ existed always, then this would be an equivalence relation, but if not, then you have to basically force transitivity. So I'm wondering to what extent you really are doing this.


What kind of rhetoric is (this particular) "No one ever [...]"

The President also knows that we have to stop blaming victims for these crimes.  No one ever asks the person who got robbed at gunpoint in the street -- why were you there, what were you doing, what were you wearing?  What did you say?  Did you offend someone?  We encourage people to come forward.  We don't have to explain why someone took our money.     I think the "No one ever [...]" claim is literally false, and actually obviously so. So, I understand it to mean:          The President also knows that we have to stop blaming victims for these crimes.  No one in their right mind ever asks the person who got robbed at gunpoint in the street -- why were you there, what were you doing, what were you wearing?  What did you say?  Did you offend someone?  We encourage people to come forward.  We don't have to explain why someone took our money.      Supposing that I am right, what is this kind of rhetoric called?


Is there a general form of summation of $N$ to $N!$? Let's say $N = 5$: $$5 + (5 \cdot 4) + (5 \cdot 4 \cdot 3) + (5 \cdot 4 \cdot 3 \cdot 2) + (5 \cdot 4 \cdot 3 \cdot 2 \cdot 1)$$


How did Iron Man fly without a big tank of fuel?

When Iron Man flies he is shown with fire coming out of his feet just like a fuel-propelled rocket.     Where is the combustible material generating the fire coming from? Does he have a fuel tank? What is his operative range?


Young adult's first credit card - what to look for and what to avoid

What should a young adult - with no credit history, moving out of the parent's home, and not going to college - look for in their first credit card?  I mean for comparing various credit card programs & companies in order to choose which one(s) to apply to. What should it have (eg. interest free pay off in the same billing cycle), and what should it not have (eg. an annual fee)?   Also, what are the reasonable expectations for what said young adult can get? (Like credit limit, interest rate, anything else you can think of)   I'd prefer a detailed answer, with reasons why for each pro and con you advise looking for. Assume complete ignorance about credit cards. :-)


How to view network traffic requested by a specific app?

There are lots of discussion on how to see which app is requesting network connection. I have tried the following apps:  tcapturepacket wifi monitor connection tracker   However, none of them was useful. For example, for a short period of time, I uploaded a 30KB pcap file which can be viewed . Still I haven't find out which app is requesting connection and to where it is trying to connect.  I also tried to look at adb logcat, but didn't find useful information. Maybe something has been missed here. Any guess?


Prove that $\displaystyle \lim_{x \to a} x^2 = a^2$   Let $\varepsilon > 0$, and let $\delta = \min(\frac{\varepsilon}{2|a|+1}, 1)$. Suppose $x \in\mathbb{R} - \left\{a\right\} $ and $|x-a| < \delta.$ Then $|x-a| < 1$ hence $ -1 < x-a <1 $ hence $ a-1 < x < a+1$ therefore $2a-1< x+a <2a+1.$ Thus $ |x+a| < 2|a|+1.$ So $|x^2-a^2| = |x-a||x+a|$ $ \displaystyle < (2|a|+1)\delta =(2|a|+1)\frac{\varepsilon}{(2|a|+1)} = \varepsilon. $  Is this correct? Is there another choice of delta we could have chosen?


Allowing `sudo su` without password over Ubuntu

This question is answered a number of times in the net, but none of those answer resulted useful in my case.  The problem  Accessing a remote machine using private key, I usually require root permissions, which imply writing a long password and is annoying.  For the purpose of having sudo su, I tried following steps:   Ensure the line <user> ALL=(ALL) NOPASSWD: ALL is in /etc/sudoers Ensure the user is in sudo user group: $groups <user> ->  sudo   But trying sudo su will just prompt me for my own password: [sudo] password for <user>:  The question  How to have password-less sudo su?


Why ls and stat shows different modified dates?


If $A^n = B$ and I know $B$, can I find $A$?

Suppose that $A$ and $B$ are invertible, $p \times p$ matrices. If $A^n = B$ and I know all of the entries in $B$, can I find an $A$ for some or all integers $n \ge 0$? How many solutions for $A$ exist? If I'm thinking correctly, then $A = B * (A^{-1})^{n-1},$ but this is sort of self referential. Thanks!


Graphic novel: white-haired Lovecraftian occult detective living in 1920s

A bit of a long shot, but I am looking for a comic series about an occult detective taking place sometimes before  WW II, written probably around 1990s (it is definitely not  Hellblazer)  The main character had characteristic snow-white hair - he looks like he is in his thirties, but apparently he is much, much older. The story that I've read was showing seemingly unconnected cases:  A writer falls asleep and finds that he kept writing while unconscious using strange alphabet. The detective finds that underwater civilization tries to send him a warning. An inventor discovers a method to locate a point on any sphere that can shatter it using relatively low pressure. Someone attempts to use it on Earth. The detective finds a "dead zone" in the middle of a jungle - every creature that wanders inside dies and quickly turns into dust. In the cave under this area, he finds a sleeping woman (I think she was later able to kill with a touch).  Almost certainly, it is nothing from Marvel.


Determine the location of the snippet to be removed

I am absolutely unfamiliar with Drupal, but have a task of removing a snippet of code from one of its pages.   The snippet in question had been determined by Google Wabmaster tools to be malware, and I need to just delete it from the code.   How can I find that directory via FTP (or cPanel?)   Or perhaps there's some other, better – easier – way to remove the malicious snippet?  Thank you very much for your help!


I have some question about Non-Planar geometry  1. What is non planar geometry?  2. Why this happens after rendering?  Why did I get this line in the middle and the shading is different.


Creating a .desktop file for a new application

I just installed the lastest version of . I works fine but in order to use it, I have to enter the following in the terminal: cd ugene-1.11.5/ then execute ./ugene -ui to launch UGENE GUI.   This takes too long. I would like to build a .desktop file for UGENE to be used in Ubuntu 12.04 so that I can simply open it from the unity launcher.  Not sure if this is helpful but the website says: By default ugene script launches the command-line version of UGENE.  Here's what I have (not sure if it's right):  [Desktop Entry] Version=1.0 Name=my Unipro UGENE GenericName=Integrated Bioinformatics Suite Comment=Unipro UGENE is a cross-platform visual environment for DNA and protein sequence analysis. MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; Exec=/home/samuel/ugene-1.11.5 ./ugene -ui -c %F Icon=/usr/share/icons/hicolor/scalable/apps/ugene.svg Type=Application Terminal=true Categories=Utility;Development; StartupWMClass=UGENE   I added the launcher named my Unipro UGENE to my unity bar and tried opening it but it doesn't appear. I must be missing something. I don't know what the StartWMCClass field is suppose to be nor do I know whether I entered the correct MimeType.


I have 5 tower servers (Lenovo system x3500 m5) and they can get a bit noisy in the office.  I think it might be the fan for the power unit or cpu. We don't have access to the server room.  What solutions are there?


So assume that $a^n|b^n$ then $b^n=a^n(x)$ for some integer $x$ taking the nth root of both sides you get $b=a(x^{\frac{1}{n}})$. Now I'm not sure if this is ok since $x^{\frac{1}{n}}$ is not always an integer. But it seems like it should always work so I"m not sure if this is the correct approach.


How to set "date modified" by "date taken" with Exiftool?

I'm still struggling with Exiftool's commands; even with, what should be (and probably is) a simple operation.  How to set the "date modified" by "date taken / original date" for all images in a folder, that is overwrite current "date modified" with the current "date taken"?


Resolving system with Chinese Remainder Theorem

Consider following system : \begin{cases} x  \equiv 2 \, \text{mod} \,  9   \\ x \equiv 3 \, \text{mod} \, 5 \\ x \equiv 8 \ \text{mod} \, 21 \end{cases} I can't apply the Chinese remainder theorem because the $\text{gcd}(21,9) \neq 1.$ So I want to factorize $21$ and $9$ in prime factors and make new equations. A theorem in my books says if the $\text{gcd}(n,m) = 1$ then $ x \equiv x' \, \text{mod}\ nm  \iff \begin{cases} x  \equiv x' \, \text{mod} \,  n   \\ x \equiv x' \, \text{mod} \, m \\ \end{cases} $. But how do I apply this with the first equation. Because $9=3*3$ and the $\text{gcd}(3,3) \neq 1$. I heard some solution who said that $x \equiv 2\,\text{mod}\, 9$ is the same as  $x \equiv 2\,\text{mod}\, 3$ but I don't understand why they are the same.  Thanks in advance!


Should I buy a camera with kit lens, or body plus lens separately?

I am planning to buy a DSLR soon.  Before I zero in on the model, I want to know whether it is advisable to buy a kit (body + 18-55 lens) or not? OR should I go for the camera-body and the lens separately?


Which partition is which? (Installation help)

I am trying to install Ubuntu 18.04 alongside Windows on this new hard drive (not new but I never used it before).  Here's how I formatted the disk (from Windows disk management)   Partition 1: 25GB Partition 2: 47.68 GB (this is where I want to install Ubuntu) Partition 3: .5 GB (Reserved) Partition 4: 49.43 GB (Windows 10 boot) Partition 5: 60GB Unallocated: 282 GB   (all are NTFS partitions)  However the Ubuntu install screen shows something like this:   sdb1: 78GB (unknown) sdb2: 600MB (NTFS) sdb3: 53.1GB (NTFS) sdb4: 368.4GB (NTFS, according to Windows it is unallocated)   As you can see, it's nothing like what Windows shows.  Any ideas why is this happening?  Edit: The lsblk command returns this:  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT loop0    7:0    0   1.6G  0 loop /cdrom loop1    7:1    0   1.5G  1 loop /rofs loop2    7:2    0    91M  1 loop /snap/core/6350 loop3    7:3    0  19.3M  1 loop /snap/ubuntu-budgie-welcome/92 sda      8:0    0 465.8G  0 disk  ├─sda1   8:1    0   500M  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda3   8:3    0 152.8G  0 part  ├─sda4   8:4    0 192.3G  0 part  ├─sda5   8:5    0  78.2G  0 part  ├─sda6   8:6    0    30G  0 part  └─sda7   8:7    0    10G  0 part  sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0    25G  0 part  ├─sdb2   8:18   0  46.9G  0 part  ├─sdb3   8:19   0   579M  0 part  ├─sdb4   8:20   0  49.4G  0 part  └─sdb5   8:21   0  60.6G  0 part  sdc      8:32   1  29.3G  0 disk  └─sdc1   8:33   1  29.3G  0 part /isodevice


How about tipping users on Stack Exchange sites?

I recently sent an email to SE Team, offering the idea to allow "tips" on Stack Exchange sites. They advised me to post it here, since SE is maintained and build by the community.   Below is an email text, that sent to SE Team, and I would like to hear what the great Stack Exchange community is thinking about allowing Dogecoin "tips" on SE sites:     Hello SE Team,        It's a first time I'm writing to this email, and the first thing that I want, is to thank you for a great service and site you're providing!   You have a great community sites, that helps me each day multiple   times and actually, I don't know what would I do, if Stack Overflow   would not exists. And I'm sure I am not alone with my feelings.    Again, great work and thank you!        Now for a business :)   I'm sure geniuses like you, heard about Bitcoin like cryptocurrencies, and Dogecoin especially   (). In case of not, Dogecoin is an alternative to   Bitcoin currency that grows very fast and has a huge community.   Dogecoin exists less then two months, but community counts almost 70k   members on reddit ().        What I think, it would be a great thing, if it would be possible to make Dogecoin "tips" on Stack Exchange sites. Not just up-voting a   good answers, but send some "tip" to person who helps to solve the   problems. I don't think it's something hard to implement, since there   already exists the tipping bot that works on Reddit, Twitter,  Youtube   and more.        In my opinion, such service can be as useful for Dogecoin as for Stack Overflow. As a beta, it could be used on    and if it proves yourself, it can   move further for other SE sites.        Thank you, hope you will like it and we will see Dogecoin on Stack Exchange soon!   Regards,   Alex Danilov     Edit: After receiving some comments, I think it important to state that Dogecoin is not a "real currency" and do not want to be. It is a "virtual tipping value". As huge Dogecoin community states: 1 Dodge = 1 Doge :)


Is there a word or phrase for someone who is repeatedly told NOT to do something, does it anyway, and gets hostile when it's mentioned?

Someone who is repeatedly told NOT to do something, does it anyway, and gets hostile when it's mentioned?   Someone who repeats behavior after being told not to nicely >6 times, gets called out and reacts as if the person requesting the change is being cruel or abusive. (Victimizes self to deflect blame for their own behavior).


Updating Table via .on('click') Only Works One Time

I have a table:

               AuthDB User	               Unset

               AuthDB Password	               Unset

               Web Session Timeout 	               12

               Runtime Session Timeout	               14400

   that I am updating values for by clicking in the spans, changing the HTML and saving the new value with a button click from the changed markup:      $(document).ready(function() {       $('span[class^=config]').on( 'click', function (){         var thisSpan = $(this);         var cellText = $(this).text();          var cellID = $(this).attr('id');         $(this).html('
<input type="text" value="' + cellText +'" class="config_input">&nbsp;&nbsp;<button id="config_long_edit_save_8" class="detailsbutton_nomarg save_config" role="button">Save</button>&nbsp;<button id="config_item_edit_cancel_8" class="detailsbutton_nomarg cancel_config" role="button">Cancel</button>&nbsp;<button id="config_item_reset_8" title="" class="detailsbutton_nomarg reset_config" role="button" disabled="disabled">Reset</button>
').insertAfter(this);          $('.save_config').on( 'click', function (e){             e.preventDefault();             var inputText = $(this).prev('input').val();             $(this).closest('td').html(''+ inputText +'');         });           }); });   Clicking the "Save" button definitely updates the span (BTW, I would definitely prefer to not clear out the  every time, but it was the only dependable way to get this functionality working). But it only works one time per session. I don't want to refresh the page every time I click this "Save" button and I thought the using .on() was asynchronous and that any function invoking that would work with whatever HTML that was dynamically generated during a single session.  This may be an elementary programming principle I've missed somewhere along the line. I welcome your help in finding out how to get this working more than once. Thanks for your attention.


While running the below pig script I am getting error in line4: If it is GROUP then I am getting error. If I change from GROUP TO group in line4, then the script is running. What is the difference between group and GROUP.  LINES = LOAD '/user/cloudera/datapeople.csv' USING PigStorage(',') AS ( firstname:chararray, lastname:chararray, address:chararray, city:chararray, state:chararray, zip:chararray );  WORDS = FOREACH LINES GENERATE FLATTEN(TOKENIZE(zip)) AS ZIPS;  WORDSGROUPED = GROUP WORDS BY ZIPS;  WORDBYCOUNT = FOREACH WORDSGROUPED GENERATE GROUP AS ZIPS, COUNT(WORDS);  WORDSSORT = ORDER WORDBYCOUNT BY $1 DESC;  DUMP WORDSSORT;


I have a doubt on something. I have a theorem that says that if $R$ is a ring, then $R/I$ is a domain iff $I$ is prime. Since $X^2-1$ is note prime, $\mathbb Z[X]/(X^2-1)$ is not a domain. But, $X^2-1=(X-1)(X+1)$, and since $X-1$ and $X+1$ are prime in $\mathbb Z[X]$, there are coprime, and thus, by the chinese remainder $$\mathbb Z[X]/(X^2-1)\cong \mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1),$$ since $\mathbb Z[X]/(X-1)\times \mathbb Z[X]/(X+1)$ is a domain, then so is $\mathbb Z[X/(X^2-1)$. What is the mistakes here ?


Is the following statement is True/false?$f : \mathbb{R} \rightarrow \mathbb{R}$

Is  the  following statement is True/false  ?  A continuous function $f : \mathbb{R} \rightarrow \mathbb{R}$ is uniformly continuous if it maps Cauchy sequences into Cauchy sequences.  i thinks  its true  take  take  $f(x) = x$


Can anybody give me advice on how to label contours as shown in Figure 2 below? I would like to be able to put the label "on" the line, which is easy enough. But I'd also like for the contour line to have a break in between the label, as shown in Fig. 2. Without the break it is very hard to read the label, unless I use a mask with white background as in Fig 1. Maybe there is some sort of "invisible" masking option that creates the break?? I'm using ArcMap 10.1 on Windows 7 (64 bit)  Figure 1   Figure 2


Access user group history (see what groups I was in before I ran usermod without the -a flag)

Running Xubuntu 16.04  Made a newbie mistake; while I was adding my own account to the 'wireshark' group so I can start wireshark without using sudo, I've removed myself from all the other groups I was in, including sudo.  I used this command:  sudo usermod -G wireshark my_user_account   I'm thinking I forgot the -a before the -G?  Does anyone know how to view the history of a user as it relates to group membership. Or view a group history as it relates to user membership?  Just trying to get my user back into the groups it was in before I had a brainfart.


How do I execute a command on system start in Ubuntu 18.04?

According to linuxaudio.org, I should add the command echo 3072 >/sys/class/rtc/rtc0/max_user_freq to my startup scripts.   In previous versions, I've done this by adding the line to the file /etc/rc.local, however as I understand, this does not work in 18.04 anymore.   Then, I found an answer that mentions creating a startup script in /etc/systemd/system/ like so:   [Unit] Description=RTC Max User Freq  [Service] ExecStart=echo 3072 >/sys/class/rtc/rtc0/max_user_freq Type=oneshot RemainAfterExit=yes  [Install] WantedBy=multi-user.target   The script was found by the systemctl autocomplete command and I enabled it successfully, however it does not come into effect upon reboot.   What do I have to do in Ubuntu 18.04 to execute this command on startup?   Edit: The solution to this issue is a simple syntax change, the code in the .service-file when using systemd to run the script on startup should actually be:   [Unit] Description=RTC Max User Freq  [Service] ExecStart=/bin/bash -c "echo 3072 >/sys/class/rtc/rtc0/max_user_freq" Type=oneshot RemainAfterExit=yes  [Install] WantedBy=multi-user.target   After wrapping the command in /bin/bash -c "...", the script worked immediately.


Question Let $f$ be continuous on $[0, 1]$ and differentiable on $(0, 1)$ such that $f(0) = 1$ and $f(1) = 0\ $. (i) Show that there exists $c$ in $(0, 1)$ such that $f(c) = kc\ $, where $k$ is a positive constant. (ii) Show that there exist $a$ and $b$ in $(0, 1)$ such that $cf'(a) + (1 - c)f'(b) = -1\ $.  My working I believe I am able to show (i). Consider $g(x) = f(x) - kx\ $, where $k$ is a positive constant. $\implies g(0) = 1 > 0$ and $g(1) = -k < 0\ $. By IVT, $\exists\ c \in (0, 1)$ such that $g(c) = 0\ $. $\implies f(c) = kc\ $, where $k$ is a positive constant.  However, I am not sure how to go about (ii), although I have a hunch that it requires MVT and may be linked to (i). Any help/suggestions on how to work (ii) will be greatly appreciated :)


Visibility of the posts deleted by authors in 10k tools

As far as I see posts deleted by the author are not visible in recently deleted section of the 10k tools. What is the reason to don't show them?


Receptacle replacement voltage shows as 11V

Thank you for any help or advice you can provide. I am replacing a receptacle in my basement. The first problem I noted was I had a three prong receptacle, but there was no ground wire. The main incoming wires have a ground connected in the back of the box, but the receptacle ground was not attached to anything.   After the receptacle was removed I switched the breaker on to troubleshoot why the bottom receptacle doesn't work. There are two breakers labeled basement.  If I open both breakers labeled basement, no power. If the bottom one is shut with the top one open, the voltage is normal 110V. However, If I reverse it, with the bottom open and top shut I get 11 volts. What would give me the measured 11 V?


what's difference between interface.method() and method()

I've got 1 solution contains 2 project - 1 console app, 1 class library. Class library:  Istep.cs  interface Istep {     bool Excute(); }   Sample.cs  bool Istep.Excute() {    // do something }   Console app - program.cs  Sample sample=new Sample(); sample.           // this can't found Excute method   if i change Sample.cs as following:  Public bool Excute()   sample can find excute method .  public class Sample : Istep   after i changed Excute without full qualified function name, right click Istep, click implement interface, VS will genarate a new excute method with full qualified name. so that's my question.  Thanks in advance!


Hey everyone so I have a few questions and I would really appreciate a response from those that are "100 factually certain of their answers" over someone who is merely speculating.  So I know that when I create my hangout, a URL is created for me to plug anywhere on line.  Is that URl for those to watch my hangout or to join it?  Also, who can join my Google+ hangout? Anyone? Only those with Gmail? Those with Google+?


Testing for coefficients significance in Lasso logistic regression

[A similar question was asked  with no answers] I have fit a logistic regression model with L1 regularization (Lasso logistic regression) and I would like to test the fitted coefficients for significance and get their p-values. I know Wald's tests (for instance) are an option to test the significance of individual coefficients in full regression without regularization, but with Lasso I think further problems arise which do not allow to apply the usual Wald formulas. For instance, the variance estimates neded for the test do not follow the usual expressions. The original Lasso paper:  suggests a bootstrap-based procedure to estimate the coefficients variance, which (again, I think) may be needed for the tests (section 2.5, last paragraph of page 272 and beginning of 273):  One approach is via the bootstrap: either $t$ can be fixed or we may optimize over $t$ for each bootstrap sample. Fixing $t$ is analogous to selecting the best subset (of features) and then using the least squares standard error for that subset  What I understand is: fit a Lasso regression repeatedly to the whole dataset until we find the optimal value for the regularization parameter (this is not part of the bootstrap), and then use only the features selected by the Lasso to fit OLS regressions to subsamples of the data and apply the usual formulas to compute the variances from each of those regressions. (And then what should I do with all those variances of each coefficient to get the final variance estimate of each coefficient?) Furthermore, is it correct to use the usual significance tests (for instance Wald's test which makes use of the estimated betas and variances) with the Lasso estimates of the coefficients and the bootstrap-estimated variances? I am fairly sure it is not, but any help (use a different test, use a more straightforward approach, whaterever...) is more than welcome. According to the answers  I suspect inference and p-values just cannot be obtained. In my case, p-values are an external requirement (although the use of L1 regularization was my choice). Thanks a lot EDIT What if I fit an OLS logistic regression using only the variables selected by a previous run of the Lasso logistic regression? Apparently (see ),  There's no need to run the model again after doing cross-validation (you just get the coefficients from the output of cv.glmnet), and in fact if you fit the new logistic regression model without penalisation then you're defeating the purpose of using lasso  But what if I do this with the sole purpose of being able to compute p-values while keeping the number of variables low? Is it a very dirty approach? :-)


How do I get the difference in days between 2 dates in SQLite? I have already tried something like this:  SELECT Date('now') - DateCreated FROM Payment   It returns 0 every time.


I am trying to vertically align a button within a row (bootstrap). I can't get it to work out... any tips?

         <input class="form-control" name="new-project" value="" placeholder="Type project name"></input>

         <button type="button" class="btn btn-sm" style="position: absolute; vertical-align: middle">Save</button>


I have a below Java Class.  public class MyClass {  private final String id;  public MyClass(final String id) {     this.id= id; }  public String getId() {     return id; }  @Override public int hashCode() {     final int prime = 31;     int result = 1;     result = prime * result             + ((id == null) ? 0 : id.hashCode());     return result; }  @Override public boolean equals(final Object obj) {     if (obj == null)         return false;     if (getClass() != obj.getClass())         return false;     final MyClass other = (MyClass) obj;     if (id== null) {         if (other.getId != null)             return false;     } else if (!id.equals(other.getId))         return false;     return true; }  }   Now I am creating 2 objects of this class.  MyClass obj1 = new Object("ABCD"); MyClass obj2 = new Object("ABCD");   As per my class definition these 2 objects are equal. But in heap I believe 2 different objects would be created.  If I want to prove although both the objects are equal but still they are different how can I do it?


I notice I got  for , the system tells me I get "+5" and "-2" on this question, but clearly this question has no upvotes or down votes. So why do I get "+3' reputations?  PS:Please don't up vote or down vote .


Moore plane / Niemytzki plane (Topology)

I am supposed to show that by adding a point to the Moore plane, that the subspace of a $T_4$-space is not necessarily a $T_4$-space. I do know that the Moore plane is NOT a $T_4-$space. Does anybody here know which point could be meant?


prove that $2^{35}-1$ is divisible by 31 and 127

Can you give me a hint to how to approach the problem.How one can show that $2^{35}-1$ is a multiple of 31 and 127?


How to decrease ubuntu disk space and increase windows' on a dual boot win10/ubuntu 15.04?

I have Ubuntu 15.04 26G in the / 4G in Swap and 70 in /home and i have win10 on a dual boot taking 20G all on a 120G hard drive  now i need more space on the win10 partition let's say 20G more and i need to take it from the 70G /home without the risk of losing any data


How to get a vintage/dreamy look like this photo?   It has some yellow color cast and seems like extra blur added in post process?


how to find out real data usage of C drive in windows 8.1

I have a wired issue as in below screen shot.  from within C drive, select everything and view from properties, total is around 40GB. however, if i view from "This PC", suppose to see 60GB free, but only 33GB free. where are the other 30GB?  any idea?


Strategies to make it difficult to cheat + easier to identify cheaters in Javascript/HTML5 game

I intend to have a Javascript/HTML5 game with a global leaderboard. I have devised a very simple system for submitting highscores as follow:     When the game finishes, the game client makes a POST request to server hosting the leaderboard that contains the name of the player and their score. Then, the server inserts the submission into its database.   However, this system can easily be cheated by an individual with an html form submitting POST requests with whatever score they want to my server.  I already know that a foolproof anti-cheat system is impossible because of how easy it is to modify Javascript and HTML on the client. I also know that I should never trust the client. However, implementing everything on the server side will be impractical for me since my server will not have the resources necessary to perform all the calculations for all the players.   So instead, I simply wish to make it as hard as possible for the average individual to cheat (and recognizing that it will always be possible to cheat), while making it as easy as possible for me to identify when a score that was submitted might possibly be fake.   What are strategies I can use to accomplish such? Please include examples whenever possible. For example, I have heard someone suggest using "pre-shared keys". However, I am not a cryptography expert and I have no idea how to go about implementing that.


Why I will feel colder when I get out from a swimming pool?

A friend of mine told me that because water heat capacity is higher. He also mentioned that it was similar to alcohol on skin effect.  Assume that there are 3 situations. 1. I did not get wet 2. I got wet by water 3. I got wet by pure alcohol  I believe the cold order is 3>2>1  Base on the heat capacity order is water>alcohol>air. This does not match with the cold order.   I also think about whether it would be due to the burning point of the material. At the burning point, the material may need more energy because change from liquid to gas. But the burning point of alcohol is still  much higher (78.2C) than outdoor temperature (25C).   Why?


Why are Stack Exchange site rules for each site not easily visible on the front page?

This is my usual experience:  "I want to post a question but I don't know what kind of questions are within the rules on this site. And since I don't want a question that took me 10 minutes to write to be instantly flagged as off-topic, deleted or down-voted into oblivion I won't post until I know the rules."   But the rules are nowhere to be found. The short site description is often not enough and doesn't include any extra information, for example Server Fault says "Q&A for server administrators" and nowhere does it say "Don't post questions about home servers on Server Fault" etc.  With the increasing amounts of new users wouldn't it be a good idea to have the rules defined on the front page of each site like on reddit for example?


an old version of R is already installed on the server I am working with, but it is not really useful for my work. I have tried to install R 3.1.1 on my own directory (/local/data/project/behi) on the server using this command :  $ wget  $ tar xvf R-3.1.1.tar.gz $ cd R-3.1.1 $ ./configure --prefix=$HOME/R $ make && make install  when I tried to run R (by just typing R in my directory) again it showed me the old version of R. would somebody please let me know what the problem is and how I can install and run the new version of R?  thanks in advance, Behi


The word that always gets me mixed up : JUST

I had just arrived at the hotel, checked in and gotten into my room. Just as I was about to unpack, I noticed that one of my bags was missing. At first I thought I had left it back at the airport, but it turned out that I had left it on the taxi.  Here, what's the meaning and role of "just"?  Why do you guys input the word "just" here?  What exactly does the word do grammatically?   Could you help me?


Function returning two things seperated by a comma in C

Okay, so here is the code.  #include <stdio.h> int addmult (int,int); int main (void) {     int i=3,j=4,k,l;     k = addmult(i,j);     l = addmult(i,j);     printf("%d %d\n",k,l);     return 0; }  int addmult ( int ii, int jj ) {     int kk,ll;     kk = ii + jj;     ll = ii*jj;     return(kk,ll); }   How is it that a function is returning two things simultaneously in C?  Edit: This code is perfectly working. I wish to know, why is it working?


Package fwupd-signed being kept back on Ubuntu 20.10

sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   fwupd-signed 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.   apt-cache policy fwupd fwupd-signed fwupd:   Installed: 1.5.8-0ubuntu1pop0~1617221312~20.10~a9de48d   Candidate: 1.5.8-0ubuntu1pop0~1617221312~20.10~a9de48d   Version table:  *** 1.5.8-0ubuntu1pop0~1617221312~20.10~a9de48d 100         100 /var/lib/dpkg/status      1.4.7-0~20.10.2 500         500 http://us.archive.ubuntu.com/ubuntu groovy-updates/main amd64 Packages      1.4.5-1 500         500 http://us.archive.ubuntu.com/ubuntu groovy/main amd64 Packages fwupd-signed:   Installed: 1.5.8-0ubuntu1pop0~1617221312~20.10~a9de48d   Candidate: 1.30.2+1.4.7-0~20.10.2   Version table:      1.30.2+1.4.7-0~20.10.2 500         500 http://us.archive.ubuntu.com/ubuntu groovy-updates/main amd64 Packages      1.30+1.4.5-1 500         500 http://us.archive.ubuntu.com/ubuntu groovy/main amd64 Packages  *** 1.5.8-0ubuntu1pop0~1617221312~20.10~a9de48d 100         100 /var/lib/dpkg/status


How does an app reads an OTP SMS without SMS permission?

I have recently installed an Android app from the Play Store. While registering in it, I realized that it was able to read my message of OTP without even asking for my permission to read the message.  I have AOSP Extended 5.8 with the August security patch. It's an Android Oreo 8.1 based custom rom.


What does limit notation with an underline or an overline mean?

I've never seen this notation before, and I'm having trouble finding a reference through search.  Could someone explain what these notations mean for me?  In context, the statement they're in is the following: a bounded $f$ is Riemann integrable iff $$\varliminf_{||C||\to 0}\mathcal{L}(f; C)\ge\varlimsup_{||C||\to 0}\mathcal{U}(f;C)$$ where $C$ is a non-overlapping, finite, exact cover of a rectangular region $J$ in $\mathbb{R}^N$, $||C||$ denotes mesh size, and $\mathcal{L}, \mathcal{U}$ represent the lower and upper Riemann sums, respectively.


Where to ask questions related to the junction between programming and mathematics?

I am asking very basic but deep questions related to programming, mathematics etc...   Unfortunately I am losing my reputation. Suggest for me the best site in the Stack Exchange network to ask questions like these:     Is a program written in any programming language ultimately a function/relation in math or not?


If $x$ and $y$ are irrational numbers then $x$ to the power of $y$ is irrational I am asked to prove or disprove this statement. To do so I got an idea to use the contra-positive, for that I need to prove if $x$ to the power of $y$ is rational then $x$ and $y$ are rational. I took $\ln$ for both sides, because keeping some element in power would make the sum more difficult, now I have $y\ln(x) = \ln(p/q)$. How could I show that $x$ and $y$ are rational?


quick selection of a random row from a large table in mysql

What is a fast way to select a random row from a large mysql table?  I'm working in php, but I'm interested in any solution even if it's in another language.


windows 10, adding more functionality to keyboard keys

so basically I want to add more commands into a single key for e.g:  When ingame, I need to press Q for skill but after that I must press ctrl+6.   How can I combine both of them into the Q key? when I press Q it will activate the skill AND the ctrl+6.  Thanks


customise firefox popup box using javascript

When a user tries to close the browser window a popup box pops up. But the problem with that is, it displays its own popup data. So please let me know how can I customize it content of popup box in "Firefox".    window.onbeforeunload = function() {       return "my text";  };   Here instead of "my text" it is displaying its own data. Note: its working fine in Chrome!   Thank you.


I've been playing for a while, but the only problem I have is generally not having enough money. I want to build my house for Hearthfire, but I don't want to spend all my money solely on wood and stone and stuff. What are some quick ways to get money?


In $\phi^3$ theory, are there any formula for determining the Symmetry factor as that is found for the $\phi^4$ theory in any standard book of Quantum Field Theory?


Prove that $G$ is abelian if and only if the mapping $f : G → G$ defined by $f(g) = g^{-1}$ is a group isomorphism.

Let $G$ be a group. Prove that $G$ is abelian if and only if the mapping  $f : G → G$ defined by $f(g) = g^{-1}$, for all $g\in G$, is a group isomorphism.    Anyone who can help me solving this one?


Should one use has been or was in the following sentence, and why?        For many years the USA has been a British colony.   For many years the USA was a British colony.


How do I get a Windows batch script to wait a few seconds?  sleep and wait don't seem to work (unrecognized command).


I was trying to run the command sudo apt update, but I'm getting the following error: $ sudo apt update     E: Malformed entry 1 in list file /etc/apt/sources.list.d/lutris.list (Suite)     E: The list of sources could not be read.  How can I fix this? I checked the file /etc/apt/sources.list.d/lutris.list and is a text file containing only the following line: deb http://download.opensuse.org/repositories/home:/strycore/xUbuntu_17.10/ Thank you


Rudin asked (Real Complex Analysis, First edition, Chapter 6, Problem 4):  Suppose $1\le p\le \infty$, and $q$ is the exponent conjugate to $p$. Suppose $u$ is a $\sigma$-finite measure and $g$ is a measurable function such that $fg\in L^{1}(\mu)$ for every $f\in L^{p}(\mu)$. Prove that then $g\in L^{q}(\mu)$.   I am being troubled with the fact that $|g|_{q}$ might be unbounded if we select wierd enough $f$. Holder inequality only gives us $$|fg|_{1}\le |f|_{p}|g|_{q}\leftrightarrow |g|_{q}\ge \frac{|fg|_{1}}{|f|_{p}}$$All  the constructions I know proving $g\in L^{q}$ starts by assuming $f\rightarrow fg$ is a bounded linear operator，so I cannot use circular reasoning at here.   It suffice to prove the statement for finite measure spaces and simple functions. So emulating Rudin we can assume $|g|=\alpha g$, where $|\alpha|=1$ and $\alpha$ is measurable. Let $E_{n}=x:|g(x)|\le n$ and let $f=\chi_{E_{n}}\alpha g^{q-1}$. Then we have $$\int_{E_{n}}|g|^{q}d\mu=\int_{X}|fg|d\mu\le K_{n}$$ for some $K_{n}<\infty$. But this constant obviously shift with the $n$ I choose, hence probably does not have a finite upper bound (for example $K_{n}=n$). And I got stuck.   In problem 6, Rudin now ask:  Suppose $1<p<\infty$, and prove that $L^{q}(\mu)$ is the dual space of $L^{p}(\mu)$ even if $\mu$ is not $\sigma$-finite.   I keep thinking about it but do not know what is the best way to prove it.


When does a point count as a winner and when as unforced error?

The tennis statistics at the end of a set always show the number of winners and unforced errors of the players. But when does a point count as a winner and when as unforced error?


Is it possible to create a scalebar in ArcMap that shows distances in custom units? I understand how to do this manually, but it would be great if I could define a custom unit of measurement (let's say "1 swimming pool") and use that to dynamically generate a scalebar.


Homology groups of $\mathbb{R}^3\setminus \ S^1$ and $\mathbb{R}^3\setminus E^1_+$

Here is a problem and my attempt at the solution. If my conclusion or the proof is incorrect I would appreciate a pointer in the right direction. Thanks in advance.  Let $S^1$ be the unit circle in the xy plane in $\mathbb{R^3}$ and let $E^1_+$ and $E^1_-$ be two of its semicircles. Find the homology groups (with integer coefficients) of a) $\mathbb{R^3}\setminus E^1_+$ and b) $\mathbb{R^3}\setminus \ S^1$.  Attempt of solution:   a) $H_n(\mathbb{R^3},S^1)\cong H_n(\mathbb{R^3}\setminus E^1_+, E^1_-)$, by excision. Then $H_n(\mathbb{R^3}\setminus E^1_+, E^1_-) \cong H_n(\mathbb{R^3}\setminus E^1_+, {pt})$, since $E^1_-$ is contractible. Then we know $H_n(\mathbb{R^3}\setminus E^1_+, {pt}) \cong \tilde{H_n}(\mathbb{R^3}\setminus E^1_+)\cong H_n(\mathbb{R^3}\setminus E^1_+)$ for $n>0$. So we get $H_n(\mathbb{R^3}\setminus E^1_+) \cong H_n(\mathbb{R^3},S^1)$. From the long exact sequence of relative homology we know that $H_n(\mathbb{R^3},S^1) \cong H_{n-1}(S^1)$, so $H_n(\mathbb{R^3}\setminus E^1_+)\cong \mathbb{Z}$ for $n=1,2$.  For $n=0$ we also get $\mathbb{Z}$ since $\mathbb{R^3}\setminus E^1_+$ is arcwise connected.  b) the same reasoning but starting with $H_n(\mathbb{R}^3,E^2_+)$, where $E^2_+$ is the upper hemisphere of $S^2$, gives $H_n(\mathbb{R}^3 \setminus S^1) \cong H_{n-1}(E^2_+)$, but  $E^2_+$ is contractible so $H_n(\mathbb{R}^3 \setminus S^1)\cong \mathbb{Z}$ for $n=1$ and for $n=0$ it is also $\mathbb{Z}$ since $\mathbb{R}^3 \setminus S^1$ is arcwise connected. For $n>1$, $H_n(\mathbb{R}^3 \setminus S^1)=0$.  EDIT @msteve pointed out that b) is wrong. Excision can't be used like in a) since $S^1$ isn't in the interior of $E^2_+$. So a different approach is needed here.


I am looking for a Python3.0 version of "py2exe". I tried running 2to3 on the source for py2exe but the code remained broken.  Any ideas?


I don't expect that any user should have noticed this, since only guests will see them.  Well, it seems that the Stack Overflow welcome splash, containing the basic info of the site, is cropped from the bottom.    Please don't mind the sides, I cropped them to fit on the screen. Just on the bottom is my concern.


Show that the ideal generated by a polynomial and a prime is maximal

I need to show that the ideal generated by $x^2 - x + 1$ and 17 in $\mathbb{Z}[x]$ is maximal   As far as I know, it would be sufficient to show that the polynomial is irreducible mod 17, what could be a good approach to prove this?


Periodic solution of differential equation $y′=f(y)$

Let $f\in C^\infty(\mathbb R^2,\mathbb R^2)$ and $\forall x \in \mathbb R^2$ $f(kx)=k^2f(x)$ for $k\in \mathbb R$ Show that any periodic solution of $y′=f(y)$ is constant.  My attempt : Let $\lambda \in \mathbb{R}$. Let $g$ a periodic solution defined by $g_{\lambda}(t) = \lambda g(\lambda t)$. With Cauchy-Lipshitz theorem $g_{\lambda}$ and $g$ do not intersect for $\lambda \neq 1$ and for $\lambda >1$, if $g(0)>0$ we have $g_{\lambda} > g.$ but I do not see how to continue.


Python 'is' operator behavioral difference while running as a script and running on terminal

I came across different behavior of 'is' in python.  n = 50000 if n is 50000 :   #comparison is success     print "Its 50k" #Holds true   Switch over to python 'Terminal' (command prompt)  >>> n = 50000 >>> n is 50000 False   Why is the behavior different?  Version: 2.7.5+


How do I prepare my system for cloning, before using CloneZilla?

Part 1 is here if anyone is interested:      I've got 100 PC's to setup. Is it possible to set up 1 of these PC's   with software, drivers, settings, configs, licenses etc, then   clone/image exactly the same setup onto the other computers where each   computer would have a different computer name, different user name for   each application etc?   Basically, I found that I cannot use sysprep to prepare the system for cloning with CloneZilla.  This is because sysprep pulls the OEM key out of the image from Dell computers.  We have Dell computers.  So, as all the 100 computers are identical, how do I prepare the system for cloning, before using CloneZilla?


I am trying to figure out what package/font was used to typeset this example and I cannot really recognise it. I figured I'd ask some of you as you'd probab


Where does the food industry term "86" come from?

Such as in "that item is 86, we need to buy more"


Drawing perfect circle with set radius in meters on map using QGIS?

Following this istructions on  I can make buffer layer on each point I need.  I am not able to draw perfects circle because the buffer will be elliptic?  The CSR is EPSG:4326 - WGS 84  And I am also not able to set unit misure in meters as I need (300 meters)  Where is my error? I use QGIS 1.8 on windowx 7


Method/approach to show given set is closed

I have to show that the domain defined by the half unit circle: $\left \{ \left ( x,y \right )\in \mathbb{R}^2: x^2+y^2\leq 1, x\geq 0 \right \}$ for the function $f:D\rightarrow \mathbb{R}$ is closed (the function is $f(x,y)=2xy^2-2x^2$), so that I can argue the function has a min/max value. I have shown it is bounded and continuous. I just can not seem to find a method or way to “formally” show it is closed? I get the intersection of 2 closed sets is closed but how would one ACTUALLY show these sets are closed?


How to install Windows and Ubuntu on the same machine?

I tried to install Ubuntu on a machine having Windows OS.While installing Ubuntu I was not able to see all the partitions and I had to format the hard drive. Now the result is that I am having the clean Hard Drive with no primary partition and I am not able to install Windows OS also.  Please suggest me some steps to how can I install Windows OS and Ubuntu on the same machine?Also suggest me steps to create primary partition.  I googled but while following the steps got messed up.Please suggest me some links.


I've tried following the instructions at  But, when I try to run the small file  \documentclass{article} \usepackage{fontspec} \newfontfamily\myfont{Lucida Calligraphy} \begin{document}  Hello \myfont Hello  \end{document}   I get the following error  xdvipdfmx:fatal: Cannot proceed without the font: /Library/Fonts/Microsoft/Lucida Calligraphy   The font is in that directory.  I found the following similar request  But I'm not finding the provided answer very helpful: I don't know what fondu is, nor, even if I did have this utility(?), I don't know how to use and am very nervous about tinkering in a library which is not specific to the user.


I have a Macbook that runs Catalina OS, but I would like to have a VirtualBox version of it.   I was able to successfully download Catalina from the App Store, and followed a tutorial to convert it into an .iso image. The problem now is that whenever I try to launch it in VirtualBox all I see is the UEFI Interactive Shell v2.2  The shell displays a Mapping Table and it just hangs there waiting for a command.


What's the quickest Schengen consulate to issue a visa in London?

What's the quickest Schengen consulate to issue a Visa in London? Basically I want to travel as fast as possible to France, and since any Schengen visa will work, I want to go to the consulate with the shortest processing time.


When trying to launch steam, I get   Steam needs to install these additional packages:      libgl1-mesa-dri:i386, libgl1-mesa-glx:i386   Then it tries to install the packages and gives me   E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.


Can we merge [tag-watching] and [favorite-tags]?

It has been a while since  and some new features were added. When that happened, a new tag [tag-watching] is created. This was created as a master tag of already present .   However, there is some inconsistency after this process.    There are many old questions tagged with  like this one  So, merge these tags. In the  section, it shows that there are 420 questions with  and only 16 with . When we click on former, we see all 420 questions. But the hover and tags give a wrong count. While we write a question, we are shown tag suggestions. When we write questions on this topic i.e,. favorite tags, we are suggested the synonym  but not the master tag . Is this also caused due to the same reason         To solve this, can we merge both these tags?  This is a request asking merge of these two tags different from asking why is a tag synonym showing up on a question. By performing merge, inconsistency in showing number of questions in search and tags section will be solved.


Regex Pattern not stopping at first occurance

I have the following regex expression.  /<img.+src=['"](?P<src>.+?)['"].*>/i  However When I run this on any string that has more than one image in it, it is returning the last image.  In fact it is returning the last src occurance regardless if it is an image or not.  And this is because it is selecting from <img to the last next linebreak and not stopping at the end > of the tag.  How can I change my regex to stop at the > of the <img> tag  Take a look at this example


Ruby stepping through decimals and casting to Array produces unexpected results

So.. I'm trying to refactor a piece of code, namely:  v = [0.0, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.0]   By using the .step method. Tried this but it's giving me some odd decimals for some of the numbers. Trying to figure out why this is?  0.0.step(by: 0.1, to: 1.0).to_a   Gives me this result:  => [0.0,  0.1,  0.2,  0.30000000000000004,  0.4,  0.5,  0.6000000000000001,  0.7000000000000001,  0.8,  0.9,  1.0]   Ruby version: 2.3.0p0  How can I go about figuring out why this is happening? Each of those numbers returns a float.


How can I prevent Postfix from accepting mail from domains it owns, that it didn’t send?

I have Postfix configured with a few domains, delivering to Dovecot locally.  I’ve noticed some interesting spam that comes in, purporting to be from an address at one of those domains, but that address does not exist.  How can I configure Postfix to drop those emails? Real email from this domain a. originates from the same server it is being delivered to, and b. is DKIM signed.


Is it possible to remove the Villager GUI and replace it with other right click abilities?

The title is a mouthful, I know, but basically my question is exactly what Wynncraft managed to do. When right-clicking a villager, you would normally open their trading GUI. However, is there a way in Vanilla Minecraft to replace the opening of the GUI with let's say... activating a tellraw command? If you need a visual, I suggest going to the server "play.wynncraft.com" and interacting with the NPCs there.


Low quality tinny sound from my headphones when using them with my laptop

When I plug my headphones into my HP laptop, the sound is very quiet, tinny and low quality. The fault is not with the headphones as I got them new today and it works well in my phone. I tried to fix the problem by installing the latest driver but there was an error installing it and now Beats Audio is gone and it never fixed it, so I reinstalled the original driver. What can be done to fix this?


Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink

Context: I am looking to upgrade to Ubuntu 20.04 LTS  I performed following steps:  $ sudo apt update $ sudo apt upgrade -y $ sudo reboot $ sudo apt --purge autoremove $ sudo apt install update-manager-core -y $ sudo do-release-upgrade -d   And this where I get the Py3 error message (in the subject)  I spent about 3 hours researching on what could be the problem. I also navigated to threads for the same question asked earlier but have not been able to figure out to fix the problem. I am hoping folks could help me here...  $ python --version Python 2.7.17 $ python3 --version Python 3.7.5 $ update-alternatives --list python3 /usr/bin/python3.6 /usr/bin/python3.7   I checked the config, ofcourse nothing shows up for python, for python3 I have 3.6 and 3.7. I have selected 3.7 as default.  Using Ubuntu version below:  DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"   And some more details:  $ ls -l /usr/bin/python3 lrwxrwxrwx 1 root root 25 Dec 15 23:08 /usr/bin/python3 -> /etc/alternatives/python3   What more do I need to do fix the symlink problem?


program not starting on login as it requires UAC prompt

I have a program that requires administrative privileges to run (i.e. the UAC prompts when it starts)  Can i have this program run at start-up?  its in the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run  but fails to start when i log in.  How do i fix this?


Seeking world map with boundaries of regions and communities for commercial use?

I am looking for a vector file worldmap which should include as many boundaries reaching to a very small level (like ZIP-Codes/small communities/etc) as possible.  The data of Natural Earth is quite good, but does not go that much in detail. The  data would be nearly perfect, but it is not allowed for company use.  Requirements:   Consistent boundaries for nearby countries (no overlapping!). As much detail as possible (refering to boundaries). Country boundaries and subdivisions should be separated. The data is for company use, therefore I should be able to buy it, or it should be free to use for companies.   I also thought of extracting it from the OpenStreetMap data. Do you think this is possible?


Is there a preference of when to use \text and \mathrm?

I'm unsure of when it is preferable to use \text versus \mathrm, is there some unwritten rule about the use of these?  For example, I saw the following code in a math post:  \frac{\mathrm{lcm}(m,n)}{\mathrm{gcd}(m,n)}\quad\text{divides}\quad  \frac{\mathrm{lcm}(m,n)}{|\langle x\rangle\cap\langle y\rangle|}\quad \text{divides}\quad \mathrm{ord}(ab)\quad\text{divides}\quad \mathrm{lcm}(m,n).   and there is a mix of both. Is there a general reason why the author would choose to do so?


ASP.NET MVC Application - Support for multiple languages

I need to add a support for my site for both Hebrew and English Languages. At the first page, there will be a selection of the desired language: Now, by this selection am I supposed to hold some parameter in the config file and the fill my whole application with  if (LanParam == English) --> Return Info In English else --> Return Info In Hebrew  Sounds like a lot of code replication. What is the common way to this Nowdays?  I've read different threads here and other forums and I know about the resource file: I'm going to use it for Labels and static texts in my site.   The point is that Hebrew is a language written from right to left while English written from left to right. Am I supposed to prepare different CSS files?  Moreover, I also work with WCF services in my web site (which are also developed within our oragnization).  We have 2 options of design:  1. Change the services to accept input of Language and then the correct info is returned by the service as a single output parameter.  2. The service will return 2 properties: info in English and info in Hebrew, and I will manipulate it (on the client side) again using the if (LanParam == English) mentioned above or another way you might suggest me.  I've never done something similar to that, so I would love to hear about how it is done, about popular approaches for multiple language support in web sites and any other useful advice. Thanks in advance.


Let $X$, $Y$ be normed space and $$T:D(T)\subseteq X\to Y$$ be linear operator.  Prove $T$ continuous if and only if $T$ bounded.  $(\Leftarrow)$  Given $T$ bounded, so there exist $c\in \mathbb{R}$ such that $\Vert T(x)\Vert\leq c\Vert x\Vert$.  Let $\varepsilon>0$, we choose $\delta=\dfrac{\varepsilon}{c} >0$ such that $\forall x\in D(T)$ with $$\Vert x-a\Vert<\delta.$$   We can see that  $$\Vert T(x)-T(a)\Vert=\Vert T(x-a)\Vert\leq c\Vert x-a\Vert<c\delta= \varepsilon.$$  So, we can conclude that $T$ continuous function.   Is it correct proof? Please correct if I made mistake.  $(\Rightarrow)$  Given T continuous, so for all $\varepsilon>0$ there exist $\delta>0$ such that for all $x\in D(T)$ with $\Vert x-a\Vert<\delta$ imply $\Vert T(x)-T(a)\Vert<\varepsilon$.  $$\Vert T(x)-T(a)\Vert=\Vert T(x-a)\Vert<\varepsilon.$$   Now I confuse how to prove $\Vert T(x)\Vert\leq c\Vert x\Vert$, for some $c\in \mathbb{R}$  Anyone can give me hint how to proof this part?


In this diagram, can the op-amp be used as the error detector? Can it compare the load position to the input position at CX and produce an error signal?


What happens when I target an indestructible card with an "if that would die this turn, exile it instead" effect?

says:     Annihilating Fire deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead.   If I deal lethal damage to an indestructible creature with Annihilating Fire or after Annihilating Fire has been played on it this turn will the the creature be exiled?


Files on my system renamed and file types also changed automatically on Windows 10. When I reasearched online I found that CTB Locker, ransomware are some of the viruses that do that. But I ran my system through Kaspersky, Malwarebytes, Eset Online scanner and they found nothing. I want to know to know what is doing this.   Running chkdsk returned nothing. Data recovery software Recuva, Easeus isnt helping either.  I want to know the root cause of this.  Anyone has any idea on this. Any help is appreciated.


I want to completely delete my windows OS from my computer but keep my ubuntu OS. How do I successfully do this and expand the space freed by the windows partition?


Difference between a power strip, a power distribution unit (PDU) and a remote power switch?

I would like to know what is the main differences between a , a  (PDU) and a .  Thank you.


Unexpect differences between calling \ifmmode from within a command and outside a command

In answering , I proposed the following command   \newcommand{\testa}{%   \ifmmode     ^{12}\text{CO(1-0)}%   \else     $^{12}$CO(1-0)%   \fi }   But @egreg pointed out that I should be writing either:  \newcommand{\egrega}{%   \relax   \ifmmode     ^{12}\text{CO(1-0)}%   \else     $^{12}$CO(1-0)%   \fi }   or  \DeclareRobustCommand{\egregb}{%   \ifmmode     ^{12}\text{CO(1-0)}%   \else     $^{12}$CO(1-0)%   \fi }   and proposed I test things out in an array environment to see what happens.  \[\begin{array}{c}   \testa \end{array}\]   Sure enough, \testa results in the following warning:  ! Missing $ inserted. <inserted text>                  $ l.42   \testa  ?    whereas the two command \egrega and \egregb work as expected.  I wasn't happy with just this.  My understanding of robustness is quite shacky.  And, while I've read various posts such as , I still felt a bit in the dark.    So, I tried a different approach.  I tried writing  \[\begin{array}{c}   \ifmmode{Math}\else{NOT MATH}\fi \end{array}\]   Really, I don't why I did this.  I expected to the same error as with the faulty version of the command.  But instead I didn't get an error at all.  Instead, I got the following unexpected and erroneous result:    Clearly something is going very wrong here, and not in any way I anticipated.  If instead I write   \[\begin{array}{c}   \relax\ifmmode{Math}\else{NOT MATH}\fi \end{array}\]   or precede the \ifmmode by anything else to be processed, all seems to go well.  What am I failing to understand here?


Size of enums in bytes of different compilers

is the size of an enum always the same among different compilers (gcc, visual c and others?). That is, does sizeof() of a specific enum gives the same values with every compiler that follow the C/C++ standards?


After Abomination was beaten by Hulk in The Incredible Hulk, we never heard about him. So, it's safe to assume that S.H.I.E.L.D. took him in custody somewhere classified.  But now      S.H.I.E.L.D. is out of commission. Also, in Marvel's Agents of S.H.I.E.L.D., it is shown that the Fridge had fallen, freeing all supernaturals locked in there.   Can we assume that Abomination is also free now? Or is there any glitch with this assumption?


I want to create a toggle button in html using css. I want it so that when you click on it  , it stays pushed in and than when you click it on it again it pops out.   If theres no way of doing it just using css. Is there a way to do it using jQuery?


I have a new rear wheel (Shimano Ultegra WH-6800) and the freehub has about 1mm-2mm of play in it. When the cassette is installed and the wheel is on the bike I'm getting a lot of wobble which is noisy and affects shifting. The cassette is installed correctly. All the spacers are in place as per the Shimano manual and the lock ring is tight. The wobble is so bad that the chain moves laterally while pedaling which is causing all the noise and slippage.  My old wheel had no play in the freehub at all. I've canvased my friends and one guy who's always had problems with shifting said his freehub had play but everyone else said their freehubs have no play. I've taken the wheel to the LBS and one mechanic said that there shouldn't be any play but another said that there is always some play and it seemed OK to him. There is also conflicting information about this on the wider Internet.  Is it common for a freehub to have 1mm-2mm of play?


Visual Studio: How to break on handled exceptions?

I would like Visual Studio to break when a handled exception happens (i.e. I don't just want to see a "First chance" message, I want to debug the actual exception).  e.g. I want the debugger to break at the exception:  try {    System.IO.File.Delete(someFilename); } catch (Exception) {    //we really don't care at runtime if the file couldn't be deleted }   I came across  notes for Visual Studio.NET:     1) In VS.NET go to the Debug Menu >>   "Exceptions..." >> "Common Language   Runtime Exceptions" >> "System" and   select "System.NullReferenceException"      2) In the bottom of that dialog there   is a "When the exception is thrown:"   group box, select "Break into the   debugger"       3) Run your scenario. When the   exception is thrown, the debugger will   stop and notify you with a dialog that   says something like:              "An exception of type "System.NullReferenceException" has   been thrown.              [Break] [Continue]"       Hit [Break]. This will put you on the   line of code that's causing the   problem.   But they do not apply to Visual Studio 2005 (there is no Exceptions option on the Debug menu).  Does anyone know where the find this options dialog in Visual Studio that the "When the exception is thrown" group box, with the option to "Break into the debugger"?  Update: The problem was that my Debug menu didn't have an Exceptions item. I customized the menu to manually add it.


What is the highest possible permanent AC at character creation?

Assuming you are level 1 and have access to any item that you can afford at character creation rolling the maximum amount of starting gold, how high can your permanent  AC become (permanently, not for any lesser set duration)?  Constraints:   Only , Unearthed Arcana is not legal for this character creation. All  are legal, all other races are illegal for character creation. Items are those that you can purchase. All skills, feats and abilities available to a player character are eligible. A sole player character has to achieve this AC on their own, without any help from allies (pet companions, PCs, NPCs etc.) Starting attributes can be rolled (that includes all 18s down the line) or achieved by point-buy. I have no preference for either.     Heavily related:   This linked question also includes temporary AC. My current question, however, is strictly about permanent AC.


Noise reduction in physiological measurements (EEG/ECG)

I am building a hobby EEG and I am interested in quantifying how effective are the various noise reduction techniques.  The basic circuit would be two electrodes going to an instrumentation amplifier. Then the signal goes to various filtering stages and then to a final "mundane" amplifier. I am interested in noise reduction before the filtering. Here are the steps that I am considering (hopefully this can evolve into a community wiki).   Adding a right leg electrode directly linked to the ground of the circuit. (against 60Hz hum) Adding a driven right leg electrode for common mode rejection. (against 60Hz hum) Adding passive low pass filters in front of the inputs of the instrumentation amplifier (). (against DC difference between the electrodes and bias current from the inputs) Faraday cage (against 60Hz hum) Shielded cables for the electrodes (against 60Hz hum)   Are there any technical manuals discussing these approaches? Could you share your knowledge about the effectiveness of each approach? Could you suggest other approaches?


Just upgraded to 13.10, no desktop icons/menu, just the wallpaper.  I've tried :  sudo apt-get update sudo apt-get install --reinstall ubuntu-desktop sudo reboot  sudo apt-get upgrade sudo apt-get dist-upgrade


How to re-download Lion from Mountain Lion

I'm currently running Mountain Lion, but I'd like to redownload Lion (to create a bootable install drive). However, when I click the download button in the App Store, I receive a message telling me my current OS X is newer and the download will not start.    Does anyone know a way to download Lion when already running Mountain Lion?


Running Yosemite 10.10.2 (14C109). The icons in the Dock cannot be dragged. When I click on an icon, it darkens, but then moving the mouse simply removes the focus on the icon. I cannot move the icons around, or off of the icon bar.  Things I have tried:  - killing Dock process  - deleting/moving preference files  - restarting


Date of questions on stackoverflow is not correct

I don't know if this is considered as a bug, but I've noticed on Stackoverflow that questions that have been posted like two days ago, still have the title "yesterday" on them, eg :    Regards


$\zeta_{15}$ is $15$th primitive $n$th root of unity.   Question: Find the structure of the group $Gal(\mathbb{Q}(\zeta_{15})/\mathbb{Q})$  I know that if $p$ is prime then $G=Gal(\mathbb{Q}(\zeta_{p})/\mathbb{Q})=\mathbb{Z_{p}}^*$ but when $p$ is not prime, I am not show how to solve this if not prime.  Does my required group have any relation to some cyclic group $\mathbb{Z_n}$, i.e. abelian  Would really appreciate your guidance as I have not got my head around these concepts of cyclotomic fields and Galois structure. Thanks


Can I get off a Eurostar train at an earlier stop?

For an upcoming Eurostar journey I'm considering taking, I've noticed a very odd pricing situation. For some reason, the cost of a ticket on the 19:34 Lille & Brussels service is cheaper if I book to Brussels rather than Lille, even though Brussels is further away!  In this case, I know that the Eurostar will stop in Lille (not all do, so you have to check). However, I'm not sure if I would be allowed to get off early? (In this case, I'm interested in booking a ticket to Brussels but getting off in Lille, but I guess it could apply equally to buying a Brussels or Paris ticket and getting of in Calais, or booking a London ticket and getting off in Ashford or Ebbesfleet)  What are the rules on getting off a Eurostar and ending your journey at a station earlier than the one you were booked to go to? (This is somewhat the )


Why is it rational to pay out a dividend?

Imagine a mature company, which has stable earnings and made a profit this year. The company is planing to pay out a part of this earnings to its shareholders. Assuming the stock price goes down exactly what is paid out per share the shareholders wealth doesn't change.  Now a few weeks later the company decides to start a new project, for which it needs to borrow money (because it paid out its excess returns) and therefore pay some interest for this borrowed money. Even when it would not do any investments it could lend the excess money to someone else and earn a little interest on that.  When the company doesn't pay a dividend the money stays within the company and therefore the company is worth more, which will be reflected in the share price (assuming efficient markets). So when the shareholders need money they could sell some of their (higher priced) stocks.  As we see from the example above the company can either choose to pay out the money and earn nothing, or keep the money and use it for investments or earn some interest on it. The company has an (opportunity) cost by paying out dividends, and is therefore not the optimal choice to do so.  Also if we assume that the increase in the share price is generally taxed as a capital gain, and capital gains are often taxed at a lower rate than income in the case of dividends.  So my question is: Why does it make sense, from a economically rational point of view, assuming both the company and also the investors want to maximize the shareholders value, to pay out a dividend?


I want to convert image with multi-colors to two colors

As there a possible way to make a multi-colors PSD/AI/Image to be only two colors


Most elegant pipe to get rid of empty lines you can think of?

For e. g., less has option --squeeze-blank-lines (or -s in short) and it squeezes multiple blank lines into single blank line, buuut, less wouldn't do this being used as filter (i. e., having its output sent not to a tty).  Similar option can be found in cat too, it's also called -s usually, and it also makes single blank line instead of several.  What about removing empty/blank lines all together? One approach I can think of is using grep, but may be I've overlooked something more simple?


Software Tester Skill Matrix with Levels

I would like to know if there's a standard Skill set for Skill Matrix for a Software Tester of different levels, like for example, what are the skills needed for an Entry level tester as well as what technologies and responsibilities he needs. And for the Mid Level tester and Senior Level as well.  Note that I am working in a company who designs and develops websites.


Why doesn't searching for the unique name of my website bring the site up in a top position on Google?

I have a website with a unique name, already indexed and with a perfect SEO. Although there are no websites with the same unique name, when I'm searching on Google I found my homepage listed on the 6th page.  Why something like this happens, and what can I do to improve?


if $A,B,C$ are real numbers such that ,${ A }^{ 2 }+{ B }^{ 2 }+{ C }^{ 2 } = 1 $ and $A+B+C = 0 $ find the maximum value of $(ABC )^2$

$$A,B,C$$ are real numbers such that ,$${ A }^{ 2 }+{ B }^{ 2 }+{ C }^{ 2 } = 1 $$ and $$A+B+C = 0 $$   find the maximum value of ${ (ABC) }^{ 2 }$   I don't know how can I start to solve this question . I hope you can help me in solving it or even giving me hints .


How to install Ethernet in my Ubuntu 18.04?

I'd like to install Ethernet in my Ubuntu, but the error message still be occurred like this:  tcpdump: eth0: No such device exists (SIOCGIFHWADDR: No such device)    root@ubuntu:~# tcpdump -D 1.ens33 [Up, Running] 2.any (Pseudo-device that captures on all interfaces) [Up, Running] 3.lo [Up, Running, Loopback] 4.bluetooth0 (Bluetooth adapter number 0) 5.nflog (Linux netfilter log (NFLOG) interface) 6.nfqueue (Linux netfilter queue (NFQUEUE) interface) 7.usbmon1 (USB bus number 1) 8.usbmon2 (USB bus number 2)   I have only these things in my Ubuntu.


Does $-1$ have a square root in the ring $\frac{\mathbb R[x]}{\langle(x^2+1)^2\rangle}$?

$\mathbf {The \ Problem \ is}:$ Does $-1$ have a square root in the ring $\frac{\mathbb R[x]}{\langle(x^2+1)^2\rangle}$ ? Justify your assertion .  $\mathbf {My \ approach} :$ Actually, the above quotient ring $R$ is obviously not an integral domain, and $\langle(x^2+1)^2\rangle \subset \langle(x^2+1)\rangle$ and we knnow $\frac{\mathbb R[x]}{\langle(x^2+1)\rangle} \cong \mathbb C$, but I can't get that what is meant by square root of $-1$ in $R$ ?  A little help is greatly appreciated.


No Operating system - how to install ubuntu to a flash drive

My laptop does not have an operating system because my daughter removed it. Can I install Ubuntu on to a flash drive?  Actully i have a windows 7 disc but after downloading that, the laptop asks for drivers to be installed but I do not have such a disc for the drivers. Any help will be greatly appreciated.


If you take a level in Warlock, do all your other spell slots suddenly start recharging over a short rest?

The  feature says:  Spell Slots The Warlock table shows how many spell slots you have. The table also shows what the level of those slots is; all of your spell slots are the same level. To cast one of your warlock spells of 1st level or higher, you must expend a spell slot. You regain all expended spell slots when you finish a short or long rest.  If you multiclass from another caster class and take a level in Warlock, do all your other spell slots suddenly start recharging over a short rest?


Physical meaning behind the line integral of a vector field

For the line integral of non-vector field functions, I know that you can kind of consider the line integral to be the area of a fence, with the base of the fence slinking along the curve of interest and the roof of the fence bordering on a function f(x,y). But for the line integral of a vector field, I'm not sure how I should visualize or conceptualize it. Any help would be awesome!


What constitutes measuring in the double slit experiment?

In the double slit experiment attempting to measure which slit the particle passed through causes the wave function to collapse.  According to the question:      Until we have an accepted solution of the Measurement Problem there is no definitive definition of quantum measurement, since we don't know exactly what happens at measurement.   And:     The many-worlds interpretation defines measurement as any physical procedure in which the observer gets entangled with a quantum system.   To me, the most obviously arising avenue of investigation would be to narrow down on precisely what does or doesn't cause the wave function to collapse.  Have physicists extensively experimented with what conditions cause it to collapse? Do you have to be taking a measurement to make it collapse or will any interaction cause it to collapse? For example, what if you measure it with an apparatus that then destroys the data gathered without allowing the data to exit a faraday cage, so that it is impossible for any information to ever be accessible to the outside universe? Then what ever the answer, one might invent even more obscure hypothetical circumstance to test...  Has this avenue been explored?


I have a Macbook Pro running Yosemite, but no iPad or iPhone. Photos.app transferred the entire contents of my iPhoto libraries, but I cannot see how to delete an unwanted event.  Although I am using Photos.app, and iPhoto has now gone, the events are still referred to as iPhoto Events.    It is my belief that the lack of "iPhoto" as an app anywhere on my system means that I am running wholly on "Photos" despite the events being referred to as iPhoto Events.   Am I correct in this belief?


Can I re-cook a ham that was left out overnight?

I left a fully cooked ham in a bag out overnight. It was refrigerator temperature when I took it out at 9pm. Our Seattle home was not heated; it was about 50 degrees last night. I found it at 6am and threw it back in the fridge, in case it was still good. I would cook it again and then use it with eggs or sandwiches. Would this be ok?


My daughter is a US Citizen. We (parents)are also planning to permanently settle in US. We will go their as Permanent Resident,as per US Law. We have a house here in India worth Rs.2 Crores.  We want to sell it and take money with us. We have ordinary savings Bank account here in India.  My US Citizen Daughter is a Income Tax payer.  Now your advises are required as under:   What are the routes to take money from India to US and our tax liabilities Can I gift this whole amount to my US Citizen Daughter or what is the maximum limit of Gift amount.  What will be the tax liability on me and on my Daughter in case of Gift   Whether I have to show it in my Income Tax Return or in my Daughter's Tax Return. What US Income Tax Laws says. What will be the procedure to send money as Gift to my Daughter. Will the money will go directly from my Bank Act.to my Daughter's Bank Account. Will there will be wire transfer from bank to bank Can I send money through other money sender Certified Companies also.    Please advise. If there is something more on the subject to make me understand, please advise. Thanks,


NullPointerException when setting viewPager.setCurrentItem

Error:     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setCurrentItem(int)' on a null object reference                                                                         at com.example.iswipe.MainActivity.onRestoreInstanceState(MainActivity.java:68)   public class MainActivity extends AppCompatActivity { TabLayout tabLayout; ViewPager viewPager; FragmentPagerAdapter adapterViewPager;  public static String POSITION = "POSITION";  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main2);     ViewPager vpPager = (ViewPager) findViewById(R.id.viewpager);     adapterViewPager = new MyPagerAdapter(getSupportFragmentManager());     vpPager.setAdapter(adapterViewPager);      // Give the TabLayout the ViewPager     tabLayout = (TabLayout) findViewById(R.id.sliding_tabs);     tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);     tabLayout.setTabMode(TabLayout.MODE_FIXED);     tabLayout.setupWithViewPager(vpPager);      // Attach the page change listener inside the activity     vpPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {  }  @Override public void onSaveInstanceState(Bundle outState) {     super.onSaveInstanceState(outState);     outState.putInt(POSITION, tabLayout.getSelectedTabPosition()); }  @Override protected void onRestoreInstanceState(Bundle savedInstanceState) {     super.onRestoreInstanceState(savedInstanceState);     viewPager.setCurrentItem(savedInstanceState.getInt(POSITION)); <----------- LINE 68 }   Hi, I'm following this  to learning (Getting or Selected the Current Page). Stating that I can save and restore the last known tab position by implementing methods on onSaveInstanceState() and onRestoreInstanceState() to persist this data during screen rotation.  But I'm getting NPE on line 68. Help is much appreciated. Thanks!


I have upgraded from Ubuntu 19.10 to 20.04, and now I have a problem with my graphics rendering (strange squares on background and font problems). I use the i915 driver. Graphics card: Skylake GT2 HD Graphics 520. I tried to reinstall GNOME shell and Xorg server. Nothing helped. Also Chrome browser breaks on most of pages.


I find a lot of the time users who don't accept answers are usually new(er) users. They don't know  that the accept option is there or they just don't know how to do it. I know this because a lot of the time I'll add a comment as such:     Glad to help! If this answer helped you out you should  it!   And they're comment back telling me they didn't know about it.  A lot of the time I notice they will add comments like:   "Thanks, this helped" "It's working now, thanks!" "Just what I was looking for! Thanks!"    If key words such as those are detected, there should be a small one liner telling them they should consider accepting the answer or maybe even go so far as to add a checkbox or button next to the comment to allow them to accept an answer. Maybe an illustrated example will help:    Or:    I know it seems like a small change but I think it'll help newer users learn about accepting answers.  Also, the accepting link points to


What is the regular expression for parsing a log entry

This question is different from the "normal" parse new lines in a string because this question uses three different regular expression strings to parse a single line of text... which may or may not have multiple lines  I have the following log entries and would like to have a regular expression that parses both of them... currently it only parses the first line.  Here are the log entries  NOTE: the second log entry has a hard return ("\r\n") in it   [2018-05-25 08:23:54.6040][Manager.Calls.Manager][GetManagerID] [2018-05-25 08:23:54.6040][Manager.Calls.Manager][Status as of 5/25/2018 8:23:54 AM Expires 1/1/0001 12:00:00 AM]   Here is the regular expression that I am currently using:  (\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{4}\])\[(.*?)\]\[(.*?)\]   I think I need something to get the "\r\n" line endings...  Here is how I am calling Regex  match = Regex.Match(logEntryText, pattern, RegexOptions.Compiled | RegexOptions.Multiline);   More info:  I tried this for the last reg expression  \[(.*?)(\n|\r|\r\n)\]   but it too fails


How to retrieve deleted hard drive files (NTFS) during Lubuntu installation?

Today I have installed Lubuntu on my old laptop and removed Windows 10 from it using a bootable usb stick. There are 3 hard drives in it. I wanted to install Lubuntu specifically on C drive but there was no option for it in the installer menu of Lubuntu, so I just continued and ended up using all the 3 hard drives unknowingly. I know it is my bad but the installer was quite different from the one being used in Standard Ubuntu. The other 2 drives (other than C drive) had some important files and photos. I want to restore them. I have tried searching all over the internet and ended up wasting 4 hours. I don't know how to live boot Lubuntu (so that I can try something like testdisk or photorec), but there's no option to live boot it like Standard Ubuntu (Try Ubuntu option after booting to bootable usb) I really need those files and photos. If you guys can help me out, I would really appreciate it! Thank You! Pardon me if I used wrong terminology anywhere, I am kind of a beginner.....


Reviewing Close Votes, is just too painful, make it easier

I have been reviewing close voted questions for a while now. And I am not feeling encouraged to close questions since the numbers are just growing. I feel really responsible for allowing SO to have so many badly formatted questions to be around. May I request that we review our close vote policy to make the following changes   Should need about 2-3 votes utmost to decide if a question is closed If someone with a reputation / minimum gold badges closes a question, it should not need more than one more person to vote to close.   Overall, that would help bring down that 84.1k questions down.  More over, the number of clicks it takes to close a question is too much, 4 now (worst case). I suggest making this a 2 click process. At least until we can get some control on that huge 84.1k questions.  Edit : OR lets just start a campaign to close and bring that huge number down. In short it annoys me to see such a huge number of questions under review :).  Edit 30th Jan 2014 : The number of questions have increased dramatically, there by reducing the quality of our system. I urge the moderators to make closing of questions easier. Today, frankly, the correct reasons are not chosen since its easier to say "Unclear what you are asking", in one click. Its really painful to close. The number of votes needed is REALLY high. I suggest that we systematically make changes.   Blanket close all questions that have 4 votes No reopening of questions, a bad question has under gone 4 mins of review, is bad enough Prioritize 3 votes for all reviewers (line them up earlier) Once we have lesser than 5% questions with 4 votes, reduce the votes needed to 3 votes At this time prioritize 2 vote questions for reviewers.   My point is, it used to be hard to get into SO. Now its easy, and easy to get away, we have 112k questions for review. And I have stopped reviewing, its just too painful.  Edit 1st Feb 2014 : Close votes increase 1k every day 112.6k now. Wake up, SO is the only community that is high quality, lets keep it that day. WAKE UP!!


I'm trying to transfer all my files over from my laptop, which is slow and laggy, to my newer desktop, which is nice and fast. I want to be able to play Skyrim on it. I've been looking into how to transfer the game over to it, but all the answers I find are how to move the save files and access them after, etc. That's good, but my current question is how to get the game on my new computer? I saw one reply to someone that you have to install it. Ok, that makes sense. But do I have to pay for a whole new version of Skyrim? Or how would I just install the one I already bought a couple years ago? I don't have it on Steam, though I'm not sure why since I thought I remembered buying it on there. A little confused about that cause I have Skyrim Script Extender on there. Is this what I'm looking for?  The desktop is running Ubuntu, I've installed WINE already, and I'm not sure if I need to get anything else. My laptop is running Windows 10 and it's messed up so I can't use it, but I refuse to lose my Skyrim saves!  Not moving it to a different folder within the computer, but moving it from an entirely different computer using an entirely different OS.


how to print for multiple files differently?

Give a single command line for searching a file ‘datafile’ for the string “Internet”, sending the output of the command to a file called ‘Internet.freq’ and any error message to a file ‘error.log’. Rewrite the command line so that both the output of the command and any error message go the a file called ‘outerrfile’  this is the question..the command i wrote is  grep "Internet" datafile >Internet.freq 2>error.log | tee outerrfile   but outerfile is always empty


I cannot sign up to Area 51. The error is  Unable to log in with your OpenID provider:  An unexpected error occurred while logging in. It's not you, it's us. This is our fault. Detailed information about this error has automatically been recorded and we have been notified.   Is there a fix? I am signing up with my StackExchange account. I selected sign up from the menu.  Related:  (not a duplicate because of the request is completed and the error happened again.)  I am getting a 404 when I try to sign up on the Area 51 meta. (url that shows 404: )


Incorrect side-by-side visual diff when adding ` characters to links

In , a user edited my post to, among other things, have ` characters. The side-by-side Markdown diff shows that [the zsh manual][1] was changed to have ` characters around "zsh", but the visual side-by-side diff shows that "manual" was changed in addition to "zsh".


ajax preventDefault() is not working with django form

I have a problem with ajax form submission. My problem is whenever I click submi it redirect me to a new page and show me the responses there. here is my django view @csrf_exempt def my_view(request):     if request.is_ajax and request.method == "POST":         # do something and if successfully         return JsonResponse({'success': True}, status=200)          # if not success         return JsonResponse({'fail': True}, status=400)      # other thingss  my template <div id="form-div">     <form action="{% url 'my_view' %}" method="POST" id="my-form">         # some fields ..         <button type="submit">submit</button>     </form> </div>  ajax $("#my-form").submit(function (e) {     e.preventDefault();     $.ajax({         type: "POST",         url: my_url,         data: {some datas},         success: function (response) {             # some jquery code to update DOM         },         error: function (response) {             # some jquery code to update DOM         }     }) })  Now the code above that i showed you works fine for me but the problem comes if I append the form on event like this. <button id="my-btn">my btn</button>  $("#my-btn).click(function(e) {     e.preventDefault();          $(#form-div).append(     "     <form action="{% url 'my_view' %}" method="POST" id="my-form">         # some fields ..         <button type="submit">submit</button>     </form>     "     ); })  after I clicked the button and inspected the form it showed the exact same as my original form but if i do the post request it will redirect me the other page rather than execute the query code I defined. What is the problem here?


It is said that the integral of the cardinal sine is $1$. How do I integrate the cardinal sine? $$ \int_{-\infty}^{\infty} \frac{\sin(a)}{a} \, {\rm d} a $$


do we save oracle ref cursor result in any file like txt or xls from sql terminal

i am running my procedure using help pf ref cursor like  SQL> variable rcq refcursor; SQL> DECLARE amount NUMBER; BEGIN Getresults('null',1,1,1,1,1,1,1,40,1,'  ','NameWithDates',amount,:rcq); dbms_output.put_line(amount); END; /   PL/SQL procedure successfully completed.  SQL> print rcq   do we save this result any xls file or (txt file in correct format)


View follows object when object moves? How do I turn this off?

I did something unbeknownst to me and have made my view constantly follow an object. If i move that object it remains constant in the center of my view while the rest of the scene moves around instead.  What is this setting? I've tried pressing . on the number pad and it did nothing.


How Can I Safely Move /var to a New Disk or Partition

I'm working with a client that has their own VM images of RHEL 7 that they want to use for a project. Unfortunately, all of / is only  50GB. I asked for /var to be 300GB but all they did was mount a raw 300GB Disk onto the VM.  How can I safely move everything in /var to this new 300GB disk?  I initially attempted to follow  which seemed sensible but after a reboot broke just about everything. Polkit wouldn't start, which meant I couldn't control systemd, and I couldn't reboot. So I'm very wary of trying that way again.


An innocuous question. Is there a way to combine Latex and IntelliJ Idea 15.2  I am astonished by realization on this as it was shown in this


GrossOne? The arXiv blog's pick of the day.

The arXiv blog having chosen GrossOne for , I read the arXiv paper concerned, and posted a comment there. The arXiv blog used to be quite high profile as these things go.  Is there an existing well-known (but not to me) mathematical construction that does what Sergeyev proposes?


Remove PCs older than X days from Active Directory

I am trying to remove all of the older computers that AD stores that have not been active for 60 days. I just started working with AD recently and noticed that the AD has not had a proper cleanup in a long time. I only have about 120 computers/servers but ad has over 300 registered. Does anyone have any advice or solutions for this?   Thanks in advanced!


Calculate variance from mean and variance of bins

I have an unbounded process which generates normal distributed values (could be ints, but lets assume floating points for now). These values are put into bins of fixed size (e.g. bin 9 gets values in range [900.0, 1000.0) ). In the bins the following values are stored: number of observations, min, max, mean and variance. The mean and variance are calculated using Knuth's algorithm:  $M_k = M_{k-1} + (x_k – M_{k-1})/k$  $S_k = S_{k-1} + (x_k – M_{k-1})*(x_k – M_k)$  Where $x$ is the input value, $M$ is the mean and the variance is calculated from $S \over {k-1}$.  Now, I COULD calculate the global mean and variance while adding the values, but I was wondering how I could do this when I only have the means and variances of the bins (the values themeselves are not stored). The mean is trivial, but I'm not sure how to calculate the variance of the underlying process. Can someone please show me how?  Thanks in advance!


Disable save (Ctrl+S) confirmation possible?

Confirmation for Save As is logic but for Save is absurd. No other program that I use has this. How can I disable it?


$\sin$ as covering map between Riemann surfaces

$\newcommand\C{\mathbb C} \newcommand\bs{\backslash}$There is a book on Riemann surfaces by Forster that I like very much. I am curious about the first exercise in chapter 1 section 4 on branched and unbranched coverings:     Let $X:=\C\bs\{\pm1\}$ and $Y:=\C\bs\{(2k+1)\pi/2 : k\in \mathbb Z\}$.   Show that $\sin: Y\rightarrow X$ is a topological covering map.   Consider the following curves   $$u:[0,1]\rightarrow X \qquad t\mapsto 1-e^{2\pi i t}$$    $$v:[0,1]\rightarrow X \qquad t\mapsto -1+e^{2\pi i t}$$      and let $w_1:[0,1]\rightarrow Y$ be the lifting of $u\cdot v$ with   $w_1(0)=0$ and $w_2:[0,1]\rightarrow Y$ be the lifting of $v\cdot u$   with $w_2(0)=0$. Show that ($w_1$ and $w_2$ are not "loops")    $w_1(1)=2\pi$ ad $w_2(1)=-2\pi$ (and with this one concludes that the   fundamental group $\pi_1(X)$ is non-abelian).   I think I am able to do all this, but I think what I get is that $w_1(1)=4\pi$ and $w_2(1)=-4\pi$ (I tried to visualize the whole thing graphically, which is not easy). Is it really the case that $w_1(1)=2\pi$ and $w_2(1)=-2\pi$ or did I just found an error in the book?


Community bot's question labeled with incorrect user - or vice versa

As per this screenshot, from the Home page:  It says that the Community bot asked that question.  But why does it say, when you visit the question, from this screenshot:  That it was asked by user825151?  And that, when you hover over the username, it doesn't take you to the profile page?  Shouldn't it say Community?  The community bot didn't ask a question, then delete its account, did it?