Best way to "Clip" (saturate) a variable

What is the best (fastest) way to clip a variable using C++ on a modern processor. e.g. If it is below a value, clip it to that value.  I'm aware of a few ways to do it, however, branch prediction comes to mind about the speed.  For example:  double ClipValue(double value) {   if (value < 0)   {     value = 0.0;   }    return value; }   I would guess that the above would have to branch some of the time.  double ClipValue(double value) {   return value < 0.0 ? 0.0 : value; }   This may not.  double ClipValue(double value) {   return std::max(value, 0.0); }   And I'm unsure how this would behave.  I guess a lot of it comes down to the compiler and optimizations settings, but what is generally considered the fastest method to saturate a variable. I have used double in this example but I'm equally interested in integers.


Diagnostics and residual analysis for Poisson regression

Recently, I was asked to check for serial correlation after doing a panel Poisson regression. I haven't seen such a test and in general, researchers (at least in the econom(etr)ics literature) don't report many diagnostics.   There is some discussion going on on this forum about the nature of residuals from a Poisson regression (see for example ,  and ), specifically about the questions 1) whether residuals should normally distributed, and 2) if not, what their theoretical distribution is. My understanding so far is: 1) no, and 2) it's complicated.   Am I correct in thinking that the distribution of residuals for panel Poisson analysis is also complicated, probably more so than for cross-section; and that because of that, there simply are not as many formal diagnostic tests as for linear models?  (My immediate question is about serial correlation in panel Poisson models, but I would be interested in a more general discussion for Poisson models, non-linear models and other diagnostics than serial correlation)


How to help my 8-year-old son who is not potty trained whatsoever?

My 8-year-old son has regressed in his potty training. He was fully potty trained when he was 4 or 5, then slowly stopped. Now he won't use the bathroom at all.   He's in second grade and has to wear diapers to school. Even kids making fun of him at school didn't push him to try to potty train again. We have seen doctors, specialists and a therapist. Nothing has helped.   The only thing the specialist did was put him in hospital and clean his intestines of all poop by doing a complete flush out of his system. The doctors just said he was being lazy and they couldn't find anything wrong in x-rays either. We even had him tested for autism and ADHD, but he doesn't have anything.  My son says he can't help it, but the doctors keep telling me that nothing was wrong with him. Punishment doesn't work. Reward charts and bribery don't do anything.  I'm going crazy. I just want him out of diapers already. He's going into 3rd grade soon. Is he ever going to be out of diapers? Is there a reason why he does it?  Another thing that the doctors ignore is how many times a day he poops and the fact his poop looks like baby poop. It doesn't come out as turds or logs.


How to change Href for multiple Anchors within Table?

How does one change the HREF value of a table using the following
  test1 test2  test3 	 foo1	 foo2	 foo3
   To this:
  test1 test2  test3 	  foo1	 foo2	 foo3
   Essentially I am relabling the anchors based on data from another column. I would prefer to use jquery. THanks!


I installed  using apt-get and followed some of the tutorials online.   I ran sudo edquota username which opened  and gave a chart for me to edit. What does the chart mean when it says soft, hard, etc.?  Is there a proper tutorial for quota on Ubuntu? What's the official website for quota?  Or is there another option for setting user disk limits?


White's test for heteroskedasticity in R

I am trying to estimate heteroskedasticity in R. I had Eviews available in my college's lab but not at home. I have been trying to use "het.test" package and whites.htest but the value that I get is different from what I get in Eviews. According to the author of the package, it is meant to do the same test as is done in Eviews.   My model looks like A~B+C. Kindly guide me what I am doing wrong.   I 1st run ols for equation A~B+C, after getting results, I clicked View>Residual diagnostics>Heteroscadicity tests>White's (with Include white cross terms) and then Press ok. The result i got was Prob. F(5,27) = 0.2948.   For R, i tried code at this link [this link][1], here is the edited code that i used.  library(vars)  library(het.test) dataset <- data.frame(A,B,C))  model1 <- VAR(dataset, p = 1)  whites.htest(model1)   This gave me value of 0.63.  I tried searching this forum but none question seemed related. I am not a programmer not statistician so please pardon my ignorance.


Add a list of values of column A and B separated by space and show the summation result

I have a file called fold.txt. It has two values in each lines separated by a space. If I say that first value represent column A and second value after space is column B then how can I add all the values of column A and all the values of column B and show the summation of each column individually? I am expecting something like this: $ cat fold.txt 100 500 200 300 700 100  Output: Total count Column A = 1000 Total count column B = 900


I am trying to install Lyx via ppa in Ubuntu 18.04. I tried following the instructions  and added the ppa. It is giving the following error message:  arpan@arpan-laptop:~$ sudo add-apt-repository ppa:lyx-devel/release [sudo] password for arpan:   Look here for updated release versions of LyX.   More info: https://launchpad.net/~lyx-devel/+archive/ubuntu/release Press [ENTER] to continue or Ctrl-c to cancel adding it.  'Error reading https://keyserver.ubuntu.com/pks/lookup?op=get&options=mr&exact=on&search=0xEDE9A1109EB3355B591159DCA64833C9F8214ACD: [Errno -2] Name or service not known'   After this when I try doing apt update, I again get a similar error:  W: GPG error: http://ppa.launchpad.net/lyx-devel/release/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A64833C9F8214ACD E: The repository 'http://ppa.launchpad.net/lyx-devel/release/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


Find all ordered pairs $(x,y)$ of positive integers such that the expression $x^2+y^2+xy$ is a perfect square.

My approach so far:  Let $x^2+y^2+xy=n^2,$ where $n\in\mathbb Z$.  $\implies (x+y) ^2-xy=n^2$  $\implies (x+y) ^2-n^2=xy$  $\implies (x+y+n) (x+y-n) =xy$  Only one case is possible:  When $x+y+n=xy$ and $x+y-n=1$. On adding, we get: $2(x+y) =xy+1$. Since LHS is an even number so is RHS. That's why, $xy$ must be odd$\implies x$ and $y$ both are odds. So I checked for few odd numbers and found out that for $x=3$ and $y=5,\;x^2+y^2+xy$ becomes $49$ which is a perfect square.. I didn't dare to check for more odds as there could be many...  Recently I found out that for $x=5$ and $y=16$(an even number), $x^2+y^2+xy=361=19^2.$ (Surprising!!)   So now I can say, I am stuck very badly.. All of my observations miserably failed...  Please suggest something!


When I make objects they point towards me

So i was messing around with some settings but I don't know what i did to do this. Whenever I add like a plane for example, it is always facing towards wherever I am instead of straight up like it normally would. Anyone know the setting that does this?


Can I just fit a cassette with more gears with the same derailleur?

I've got a Boardman Road Sport which I use for commuting and doing reasonable length rides during the week etc. I have Shimano Claris as my rear derailleur and so is some of my groupset. I would like to upgrade my cassette to an either 9 or 10 speed to give me a greater variety of gears. To do this do I need to change my rear derailleur from 8 speed to Shimano 105 or something similar? Or can I just change my cassette? Do I also need to change my shifters as well?


$$Rad(I)=\{a \in R | \exists n \in \mathbb{N} \text{ such that } a^n \in I\}$$   R is a commutative ring, I is an ideal.   To show that $Rad(I)$ is an ideal of $I$, we have to show that for $a,b \in Rad(I)$ it stands that $a-b \in Rad(I)$ and for $r\in R$ it stands that $a\cdot r\in Rad(I)$, right??   When $a,b \in Rad(I)$ we have that $a,b \in R$ and $a^n, b^m \in I$.   $a-b \in R$.   But how can we show that $(a-b)^x \in I, x \in \mathbb{N}$ ??


I know that it is required to first create a database of references stored in a .bib file. Mendeley exports my reference list in .bib format. But how can I know what to write in curly brackets in \cite{} to refer to a particular author? Do I need to keep the .bib file open and find the relevant name to cite? Or am I missing something? What is your recommendation for referencing in LaTeX?


How do I prove that the Riemann curvature tensor is indeed a tensor?

I know that to prove that something is a tensor I have to show that this thing transforms like a tensor, i.e., like below:  $$ R^{'\alpha}{}_{\gamma\phi\lambda} = \partial_{\beta}x^{\alpha'}\partial_{\sigma'}x^{\gamma}\partial_{\mu'}x^{\phi}\partial_{\nu'}x^{\lambda}R^{\beta}{}_{\gamma\phi\lambda}.$$  But I don't know actually how to start the proof. Do I need to apply this tensor to a vector or something like that? Thanks in advance.


Im building two models, (model1 and model2) I trained and tested them on the same test dataset,  model1 will have mean absolute error (MAE) 10.3, rooted mean squared error (rMSE) 30.1 model2 will have mean absolute error (MAE) 11.8, rooted mean squared error (rMSE) 29.5  Can any one help me to explain why one model is better in MAE while the other is better in rMSE? whats going on my data or models? Thanks!


When do we use a multivariate regression?

I understand that multivariate regression models contain more than 1 dependent variable, but what is the difference between running a multivariate regression with dependent a and b to a set of independent variables, rather than running two regression models, one for a and one for b against the same set of independent variables?


mouseEntered does not work as hover over

I am relatively new to the Java Swing library and I am attempting to write a program that detects a mouse hover event and shows a popup. I am using the mouseEntered event, however it is only being triggered when the mouse enters from outside the entire frame, as opposed to hovering over different components within the frame. Is there anyway I can fix this?


Leeway for spammers promoting stack exchange sites and Area 51 proposals?

Browsing the new questions queue in , I see several rapid-fire questions from an  with a spam-like name:     is quite forthcoming about it's intent:      However, there is no visible solicitation activity besides the account name and description. Questions appear to be clear and on-topic, and they enjoy neutral to positive reception (that I can see; I am not 10k).    This is an established account (+1k rep) on four Stack Exchange sites, with +6k rep on Math.SE. As such, I am inclined to let it go where I would have otherwise flagged it.  Should this type of "passive" spam be given leeway, considering it promotes an in-network community resource in a non-disruptive manner, or is spam spam and should be treated as such?  I understand that 100% is easier than 98%, but I would like to know the community's position on this.


The question is a fairly open one. I've been using Stored Procs with MS SQLServer for some time with classic ASP and ASP.net and love them, lots.  I have a small hobby project I'm working on and for various reasons have gone the LAMP route. Any hints/tricks/traps or good starting points to get into using stored procedures with MySQL and PHP5? My version of MySQL supports Stored Procedures.


WSOD - White screen of death only for administrator

I'm Getting white screen of death only for administrator user for the Drupal site i'm working on. I don't have any problem with users of other roles.  Once I try to log in using admin credentials I'm getting white screen of death (In Chrome - "This site can't be reached"). Then I have to type www.mysite.com/user/logout to logout admin session.  I have removed last two modules I installed to make sure that those modules does not interfere. Please help me regarding this. Thanks


Let : $$f(x)+f\left(\frac{1-x}{x} \right)=x$$ then: $$f(x)=?$$   My Try :  $x\to  \dfrac{1-x}{x}$  \begin{align}f\left(\dfrac{1-x}{x}\right)+f\left(\frac{1-\dfrac{1-x}{x}}{\dfrac{1-x}{x}} \right)&=\dfrac{1-x}{x}\\ f\left(\dfrac{1-x}{x}\right)+f\left(\dfrac{2x-1}{x^2} \right)&=\dfrac{1-x}{x}\end{align}  And $u=\dfrac{1-x}{x}$  $$f(u)+f\left(\dfrac{2x-1}{x^2} \right)=u$$  Now what ?


why i get error "Exception in thread "main" java.util.InputMismatchException"

I was given a simple assignment to accomplish, creating a grading scale that would give a student a letter grade for a value that was submitted.  Everything seems to run smoothly except after the student is done - they need to enter "E" to exit the program... This is where I am lost because I receive this exception "Exception in thread "main" java.util.InputMismatchException". I know the outcome is something small that I am missing, but I cant figure it out here is the code that I currently have:  public static void main(String[] args) {      int letterGrade;//The overall letter grade     boolean prompt = true;     while (prompt) {         //Prompt the student to input their data         System.out.print("Please enter your exam score, or press E to exit :");          @SuppressWarnings("resource")         Scanner keyboard = new Scanner(System.in);         letterGrade = keyboard.nextInt();          if ((letterGrade >= 90) & (letterGrade <= 100)) {             System.out.println("The letter grade is A");         } else if ((letterGrade >= 80) & (letterGrade <= 89)) {             System.out.println("The letter grade is B");         } else if ((letterGrade >= 70) & (letterGrade <= 79)) {             System.out.println("The letter grade is C");         } else if ((letterGrade >= 60) & (letterGrade <= 69)) {             System.out.println("The letter grade is D");         } else if ((letterGrade >= 0) & (letterGrade <= 59)) {             System.out.println("The letter grade is F");         } else {             System.out.println("Invalid input, try again.");         }     }      String firstChar = "e";     String secondChar = "E";      {         if ((firstChar == secondChar)) {             System.out.println("Thank you for using the grading system");         } else {             System.out.println("Thank you for using the grading system");         }          {          }      }      {      } } }   WHAT am I missing? I've been at this for two weeks?


Can I have polymorphic containers with value semantics in C++?

As a general rule, I prefer using value rather than pointer semantics in C++ (ie using vector<Class> instead of vector<Class*>). Usually the slight loss in performance is more than made up for by not having to remember to delete dynamically allocated objects.  Unfortunately, value collections don't work when you want to store a variety of object types that all derive from a common base. See the example below.  #include <iostream>  using namespace std;  class Parent {     public:         Parent() : parent_mem(1) {}         virtual void write() { cout << "Parent: " << parent_mem << endl; }         int parent_mem; };  class Child : public Parent {     public:         Child() : child_mem(2) { parent_mem = 2; }         void write() { cout << "Child: " << parent_mem << ", " << child_mem << endl; }          int child_mem; };  int main(int, char**) {     // I can have a polymorphic container with pointer semantics     vector<Parent*> pointerVec;      pointerVec.push_back(new Parent());     pointerVec.push_back(new Child());      pointerVec[0]->write();      pointerVec[1]->write();       // Output:     //     // Parent: 1     // Child: 2, 2      // But I can't do it with value semantics      vector<Parent> valueVec;      valueVec.push_back(Parent());     valueVec.push_back(Child());    // gets turned into a Parent object :(      valueVec[0].write();         valueVec[1].write();          // Output:     //      // Parent: 1     // Parent: 2  }   My question is: Can I have have my cake (value semantics) and eat it too (polymorphic containers)? Or do I have to use pointers?


Newton's second law states $\vec F  \propto \vec a$. The proportionality constant is defined as the mass ($m$) of the particle on which the force ($\vec F$) is acting and whose acceleration ($\vec a$) is being measured. Therefore, a definition such as $\vec F = m^2 \vec a$ would be consistent with Newton's second law.  what problem will "$\vec F = m^2 \vec a$"  cause in the formulation of mechanics. What about a multi-particle system.


Convergent series with general term limit different from 0??

I want to study the convergence of the series of general term $sin(\pi en!)$ In my naive way I see that this limit does not exist at infinity since e is an irrational number but they say it's zero Any explanation to this???? Thanks in advance


Slovenia characters in phpmyadmin database are not fetching using select where clause

I'm using Slovenia characters and PHP MySQL select where clause to fetch results from the database. This query is working properly with English letters but has an issue with Slovenia letters like (ć, č, đ, š). I have set database collation to utf8_slovenian_ci. And encoding of php files is utf8


it's been a few times now that my system completely freezes up (Ubuntu 16.04) where my mouse and touch pad seizes to work. The keyboard also doesn't respond. All that helps is to power down and restart via the power button.   Note: may it be that low RAM is the root cause? I have an Asus with 2GB RAM and 500GB HDD (Just asking)


Im unsure of an example Give an example of a sequence of real numbers with subsequences converging to every real number


Can a person be infected with HIV viruses without contacting them by person-related stuffs?

We know that a person can be infected with HIV viruses when he/she has sexual relationship with those having HIV viruses (and very, very, very rarely, urine/defecation-related transmission) - but I wonder if there are other sources of HIV transmission - so for example, let's say during sexual relationship, some cuts on body (for example, inside vagina) occurred. Then even if the partner did not have HIV viruses, and a person afterwards does not sex with partners with HIV viruses, is there a chance that he/she may get HIV viruses, still?


Why does this planet (J1407 b) and Saturn's ring center on its equator?

Why is the material in J1407 b's or Saturn's rings stay in a disk not scattered? Is it the gravity and/or magnetic field that causes this? Does it differ with other large bodies that might not have a electromagnetic field?


Is there a word or adjective to describe an unnecessary correction?

When in casual conversation, being full accurate or detailed on what you mean isn't always necessary. For example, if I were to tell someone I want to buy a certain "waterproof" speaker and they correct me by saying it is water resistant, although it wasn't necessary. In the context of that conversation, they understand what I mean and it isn't needed to make clarification.


i don't know how, but i blocked some option that i really need sometime and it is driving me insane.  Please tell me how to fix this or what i have to do to prevent this in the future.


How to show that ${m \choose n} + {m \choose n-1} = {m+1 \choose n}$?

This is from Serge Lang's book Basic Mathematics. I've stuck at this for over six hours now. Read multiple posts, forums, and even checked the answer key. The main thing I'm confused about is how can we get this common denominator: $n!(m - n + 1)!$ Everything else is easy.


Whilst I've seem some similar questions, I can't troubleshoot the problem I am having as they tend to be specific to that user asking.  When I run my PC > 24 hours (I have reasons why I do this), my RAM usage creeps up. I had my PC on all weekend, and my ram was maxed out at 100%.  When I check in task manager, the usage is not accounted for at all. I have 32GB RAM, and usually the highest usage on the RAM will be a Google Chrome process with half a gig usage, a handful of processes over 100MB total, then others with smaller amounts. Never enough to account for the actual usage.  After looking through other answers I downloaded Process Explorer, and looked at the Working Set column. There is a process there called "memory Compression", with 6,344K private byes but a working set of 2,6922,748K. Thats at time of writing, where my PC hasn't been on as long as I noramlly would let it run in total before a reboot. Total RAM usage currently sits at 50%.  Some people suggested it might be a driver with a memory leak, but I am unsure how to diagnose a problem further here.  Theres an image of some of what I'm seeing. In 1-3 days, I would expect to see that at 32 GB, but with seemingly no extra processes using RAM etc.


change directory in bash is not affecting the post-commit hook

i've made the following bash script to commit the parent repo after some change in submodule. it's all about that the script want to cd .. to check the parent repo current branch but the problem is that the cd .. is not affecting the upcoming commands because i guess the subshell  i've tried to run 1- cd ../ && before each command 2- make alias but didn't succeed 3- run exec but the script didn't continued  #!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments.  The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "post-commit". commit_msg= git log -1 --pretty=%B if [[ $(git branch | grep \* | cut -d ' ' -f2) == "int1177/next" ]]; then     cd ..     if [[ $(git branch | grep \* | cut -d ' ' -f2) == "B0/next" ]]; then         git add 6_Tests         git commit -m "bs esss"         echo "development branch B0/next has now new commit"     else         echo "development branch isn't B0/next"     fi else     echo "current branch isn't int1177/next"     fi


I have this problem with NRPE, all the stuff I've found so far on the net seems to point me at things I've already tried.  # /usr/local/nagios/plugins/check_nrpe -H nrpeclient   gives  NRPE v2.12   as expected.  Running the command by hand (as defined in nrpe.cfg on "nrpeclient", gives the expected response  nrpe.cfg:  command[check_openmanage]=/usr/lib/nagios/plugins/additional/check_openmanage -s -e   -b ctrl_driver=0 bat_charge  "Expected response"   But if I try to run the command from the Nagios server I get the following:  # /usr/local/nagios/plugins/check_nrpe -H comxps -c check_openmanage NRPE: Unable to read output   Can anyone think of anywhere else I might have made a mistake with this? I've done the same thing on multiple other servers with no problem. The only difference I can think of with this is that this box is RHEL 5 based, whereas the others are RHEL 4 based.  Those two bits above that I've tested are the what most people seem to suggest when people have had this problem.  I should mention that I get a weird error in the logs when I restart nrpe:  nrpe[14534]: Unable to open config file '/usr/local/nagios/etc/nrpe.cfg' for reading  nrpe[14534]: Continuing with errors... nrpe[14535]: Starting up daemon nrpe[14535]: Warning: Daemon is configured to accept command arguments from clients! nrpe[14535]: Listening for connections on port 5666  nrpe[14535]: Allowing connections from: bodbck,combck,nam-bck   Even though, it's plainly reading that /usr/local/nagios/etc/nrpe.cfg file to get the stuff it's talking about further down..


grep ignoring pipe when aliased to 'grep -R'

I'm trying to pipe the output of a grep search into the input of another grep. Such as:  grep search_query * | grep -v but_not_this   But the second grep is not using the output of the previous search. It looks like the second grep is just using * instead. For example,  grep lcov *                                                                                tst/bits/Module.mk:21:$(call func_report_lcov) tst/drivers/Module.mk:27:$(call func_report_lcov)   But when I want to filter out the results containing "call",  grep lcov * | grep -v call ...   Grep gives me every single line in my workspace that doesn't contain "call".  Environment Info:   This is happening in both bash and fish I have aliased the grep command like so alias grep='grep -nR --color=always'   Anything else I might be missing?


is the datasheet of the driver IC I am working on (LM5112).  Following is the application diagram of the module.    Basically this is the GATE driver circuit for the MOSFET with PDM signal as the input. I am looking for how to calculate value of the MOSFET input resistor (R3) ?  MOSFET input voltage (VDS) = 10V Output power required is 200W.  Questions:  1) How to calculate the MOSFET input resistor?  2) What are the factors affecting the MOSFET input resistor calculation?  3) What will be the maximum, minimum resistor value possible and effect in the circuit if the resistor value is changed (Increased or decreased) ?   Please let me know if any further info is required.


I need to justify whether $(f_{n})_{n}$ as a sequence of real-valued functions converges almost everywhere or not. Note that $f_{n}: \mathbb R \to \mathbb R$ where $f_{n}(x)=1_{[n,n+1]}(x)$. Now I have two views on this:  $1.$ $f_{n}$ converges pointwise to $0$ and thus $f_{n}(x) \xrightarrow{n \to \infty} 0$ for almost all $x$. This was my initial thought.  But then I started thinking about the fact that:  $2.$ for any $n \in \mathbb N$ we know that $\exists A_{n} \in \mathcal{B}(\mathbb R)$ so that $\lambda(A_{n})=1$ where $\lambda$ is the Lebesgue-Borel Measure on $\mathbb R$ and $\vert f(x)\vert \geq 1$ for all $x \in A_{n}$ and hence how can I say that it to zero almost everywhere, since there is always a part of the function of positive measure that is exactly a distance of $1$ away from the $0$ function.   Any ideas that could illuminate this for me?


Is it possible to show an arbitrary image across the console / X11?  In essence, I just want the video output to be the image.  Is there a way to do that?  I would want the console virtual terminals to be disabled as well as X11, so I'd like to just display an image through the video driver some how.  I can disable the console and X11, but don't know how to load an image.  Thanks,  Walter


I'm going to have to build a custom control for a WinForms application. But in the near future that same control will have to be used in a WPF application.  I've already written all the logic in a controller class which I can use for both WinForms and WPF (I will only have some databinding to do and that's it), but of course it would be easier to develop and maintain the control only once.  So can I build the control in WPF and then put them on a WinForms form? My projects currently have 3.0 as their target framework.


I  signed the variable bubbleL1 to 1, but why the first variable in the bubbles list, which is bubbleL1 still shows undefined? I know this maybe a stupid question, but I really don't know why.      let bubbleL1, bubbleL2, bubbleL3, bubbleR1, bubbleR2, bubbleR3;     let bubbles = [bubbleL1, bubbleL2, bubbleL3, bubbleR1, bubbleR2, bubbleR3];      bubbleL1 = 1;     console.log(bubbleL1) // 1     console.log(bubbles) // [undefined, undefined, undefined, undefined, undefined, undefined]   What I want is a list with a specific name for each item in it (for the declared reason, I really don't just use bubbles[0], bubbles[1]...)  Let's say we have a list named bubbles, and we also have six variables called bubbleL1, bubbleL2, bubbleL3, bubbleR1, bubbleR2, bubbleR3. I want to put all these six variables into the bubbles list, so later I can assign values to each variables that in the list, like this:  bubbles.forEach((bubble) => {   bubble = "something"; })


Re-entering USA after short trip to Canada after visa expired

My J-1 visa will expire on the 14th of December 2018 and I am aware of the 30 day grace period however, I was planning to go to Canada for 4 days to visit my family friends for Christmas (during the 30 day grace period) and want to know if I will be allowed back into the US to catch my already booked flight home from LA?  I dont want to risk going there if I am going to miss my flight home from LA but really wanted to see my friends as it has been many years and I rarely get to come to the US.  I know there is no guarentee of re-entry but was wondering if anyone has any experience, or knowledge of this?   Thanks!


Suppose a complete metric space $M$ and $f:M\rightarrow M$ such that $f^p = f\circ f\circ\ldots\circ f$ ($p$ factors) is a contraction, for some $p\in\mathbb{N}^*$. Show that $\exists!a\in M$ such that $f(a) = a$ (a fixed point) and $$\lim_{n\to \infty} f^n(x)= a,$$  $\forall x\in M$.   Does anyone know how to solve this exercise?


What happens to a bounty question if it gets migrated?

clearly belongs elsewhere, but the asker already put a bounty on the question.  If the question is migrated, does the rep get refunded? Does the question continue to be a bounty question on the target site if the user has enough rep? (The asker in the referenced question does not have any associated accounts, but I'm curious about what happens.)  Edit: I just tried to add my own close vote, but apparently you can't when there's an open bounty. However, a mod should still be able to close/migrate/etc.


If $d_{1}(x,y)$ and $d_{2}(x,y)$ are distance metrics, is $\sqrt{d_{1}(x,y)^{2} + d_{2}(x,y)^{2}}$ also a metric? How do you prove this? Thank you.


What is the meaning, history, and current popularity of "of a Monday" (or Tuesday, or Wednesday, etc.)?

I was watching a 1934 Hollywood film today and one of the American characters used the phrase, Of a Tuesday. I don't think I'd ever heard an American use this in real life or in a film before then, even though I watch a lot of 1930s and 1940s Hollywood movies. I have since heard it used occasionally in films from about the 1920s to the 1960s, but I have still never heard it used outside of films.  Perhaps this, like the MidAtlantic accent in the first half of the century, was and is something used by actors, and in this case writers, far more commonly than by regular (non-theatrical) Americans.  Does phrase Of a Tuesday simply mean the same as On a Tuesday? Is it a commonly used phrase? Has the meaning or popularity changed significantly over time? Are there differences in meaning or usage between British and American English?  So, what are the meaning(s) and usage(s), history, and current popularity of both in American and British English?


Given the basis $\beta = \{ (1, 1, 0),\ (1, 0, -1),\ (2, 1, 0)\}$ and the matrix:  $$ A =         \begin{bmatrix}         1 & 1 & 0 \\         1 & 1 & 0 \\         0 & 0 & 1 \\         \end{bmatrix} $$  with respect to  $\beta$.  How to change this matrix with respect to standard basis?


Flawed proof that $P(\mathbb N)$ is countable

I was working through Abott's Understanding Analysis and during his discussion of power sets, I thought of the following proof that $P(\mathbb N)$ is countable:  Let $S_n$ be the set of all subsets of $\mathbb N$, whose elements sum to $n$. So $S_1 = \{\{1\}\}, S_2 = \{\{2\}\}, S_3 = \{\{1,2\}, \{3\}\}$, and so on. In this case, this construction would provide you with countably many sets, each of which is finite, and thus the union is at most countable, was the thought process I had.  The discussion in the book completely omits ZFC and I do not have any background with set theory, but the book does state that the union of countably many countable sets is also countable. I have read and understood Cantor's theorem and how he shows that no bijection exists between $S$ and $P(S$), but I couldn't work out for myself how that breaks this argument above. Any help would be greatly appreciated.


Can you wear padded armor under chainmail with plate armor over it?

I mean realistically, historically, and definitely reasonably speaking, mail has been worn over a gambeson with plate armor over them for extra protection and doesn't hinder movement. So i mean how would that work if i wanted to do that? Any rules against it in d&d 5th edition?


Creating letters with zero-margin colored headers, in addition to the regular letterhead

I'm trying to use LaTeX for creating corporate letters. What I have found is that there are many tools to write letters, but they are mostly focused on letters of more personal nature rather than corporate letters, in the sense that I can not find many ways to configure colored styles that are more common in corporate letters. What do I refer to? Something like this (taken from ):    This letter consists of two 'headers':   The orange header with the logo and some text (part of the corporate style) The contact / meta info of the letter (organization contact details, reference, etc).    In most examples and documentation (eg the ), it is explained how to set up textual letterhead, but not the header that forms part of the corporate style. So my question is: what is the proper way to do this? I have found similar information, for instance here:       But the problem is that they are not letter documents, and I feel these solutions are not the correct way to do this. Also, in a letter this header part is logically repeated on every page, and that is not the case in the samples either. I am also considering using the  for this top header (the orange part), but I am not sure if this is correct either.   What is the right way to set this up?


Minimize currently focused window keyboard shortcut in Ubuntu 17.10

I'm trying to find a keyboard shortcut in 17.10 to minimize the currently focused window.  There doesn't seem to be one in Keyboard settings.  Tried adding a new shortcut, but not sure what the command is to minimize.  Any ideas?


I need to drop a table that is 500 GB in size. It contains historical data that's not needed or used. There are no FK constraints. Any consequences of just dropping the table? I'm also using DB Mirroring. Will there be blocking or some other things that I should be concerned?  Microsoft official statement:     Large tables and indexes that use more than 128 extents are dropped in two separate phases: logical and physical. In the logical phase, the existing allocation units used by the table are marked for deallocation and locked until the transaction commits. In the physical phase, the IAM pages marked for deallocation are physically dropped in batches.


What is the main difference between having ubuntu downloaded on the computer and using a flashdrive to boot it on a computer? Can I still save things to the flashdrive like files or is it like a reboot of the whole thing everytime? Or is it just for that one computer that it is saved to and I would have to start from a clean slate with the other computers I use it on? Sorry for all the questions I am just really and new to the whole spectrum of of this kind of os.


How do I disable need to authentication when an app asked for inhibit of shutdown / suspend

I would like to disable so I never get this popup. And also I would like to know what application has asked for it, so maybe I can stop it. Does anyone know?    Edit: A solution can be found here:


can't interact with jquery loaded button that uses jquery

Working on a poll/voting system where people can click to see results before voting, and then click back again to see the options once more.  The problem is when loading in the results, the button I load to show the options again won't seem to work:  The code for them is basically the same (I've put an alert to test if it was even picking up the button, it is not):  $('.results_button').click(function() {     var poll_id = $(this).data('poll-id');     $('.poll_content').load('/includes/ajax/poll_results.php', {'poll_id':poll_id}); });  $('.back_vote_button').click(function() {     window.alert("Test");     //var poll_id = $(this).data('poll-id');     //$('.poll_content').load('/includes/ajax/poll_options.php', {'poll_id':poll_id}); });   The actual code to the back_vote_button is this for example:  <button name="pollresults" class="back_vote_button" data-poll-id="1">Back to voting</button>   Is there something I am missing about interacting with jquery loaded content?


Heisenberg Uncertainty Principle scientific proof

states that:    $$\sigma(x)\sigma(  p_x )\ge \frac {\hbar}{2}.$$  What is the scientific proof of this principle?


Error with an If Statement within a GUI (Always falls into ELSE never IF)

I'm making a really basic Login prompt GUI for revision for my Java exam next week (this exercise could possibly come up in the exam so that's why I'm trying to ace it first). Basically when you type in a certain name, in this case 'joe' it'll say verified, otherwise it'll say unverified. However, even when I type in joe it'll still say unverified. Can anyone see where I've gone wrong? Thanks.   package gui.eventHandler;  import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane;   import javax.swing.JPanel; import javax.swing.JTextField;  public class EventHandlerExample2_NameConfirmation {  private JFrame frame; private JPanel panel; private JButton button1; private JLabel label; private JTextField fname;  public EventHandlerExample2_NameConfirmation() {      frame = new JFrame("Log In");     panel = new JPanel();     label = new JLabel("First Name: ");     fname = new JTextField(20);      // Actions for when the OK button is clicked     // Implementing the ActionListener as an anonymous inner class     button1 = new JButton("Submit");     button1.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {              String inputname = fname.getText();              if (inputname == "joe") {                 JOptionPane.showMessageDialog(null, "Verified user " + inputname);             } else {                 //selects this option regardless of entry                 JOptionPane.showMessageDialog(null, "Invalid user " + inputname);             }          }     });      panel.add(label); // add the label     panel.add(fname); // textField     panel.add(button1); // and button to the panel      frame.add(panel); // add panel onto the frame     frame.setVisible(true); // By default its invisible     frame.setSize(600, 70); // 600 width 70 height     frame.setLocation(350, 350); // roughly center screen     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // exit when closed  }  public static void main(String[] args) {     EventHandlerExample2_NameConfirmation app = new EventHandlerExample2_NameConfirmation(); }  }


Why im not getting thickness with shrinkwrap modifier

I have a subdivided mesh. I have added shrinkwrap modifier to it. Before adding shrinkwrap modifier its has a solid thickness but after adding the shrinkwrap modifier the thickness disappear. I have tried all options but its working. When it is shrink its perfect but no extrude or thickness to the mesh. Any suggestion or help.


The update fails with the following error messages:  bob@Proliant-Server:~$ sudo apt-get dist-upgrade Reading package lists... Error!  E: Encountered a section with no Package: header  E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_universe_i18n_Translation-en  E: The package lists or status file could not be parsed or opened.   I have run the following commands to no avail:  sudo apt-get clean sudo apt-get update   I am getting desperate! Any suggestions would be appreciated! TIA


Tikz style conflicting with clip command

Below is my example. I'd like to use a global style for all my tikz pictures to set up the line width. It is working well until I use a clip. I guess that it is not possible to pass some style option to clip. The code below gives the error msg   Package tikz Error: Extra options not allowed for clipping path command. \clip (2,0) circle (2cm);   Here is the MWE.  \documentclass{article} \usepackage{tikz} \tikzset{every path/.style={line width=2pt}} \begin{document} \begin{tikzpicture} \clip (2,0) circle (2cm); \draw (0,0) circle (3cm); \end{tikzpicture} \end{document}   Any help?


When will my device get the Android 5.0 update (Lollipop)?

Android 5.0 (Lollipop) was officially announced on October 15th, 2014.  You can review the high-level changes at the  and the announcement on the official .  Of course, not all devices will get this update right away and others won't get it at all. Each manufacturer and carrier often choose to add their custom modifications which tend to delay the official release.  When will each device get Android 5.0, either officially or unofficially, if ever?  See also:


Maximum value of x such that $y=x^y,y \epsilon R $

Consider this $$y=x^{x^{x^{x^{x^{......\infty}}}}}$$The above expression can be rewritten as $y=x^y$At first glance the above expression may look as though it will explode to infinity but it won't.Actually for small values of x that infinite series converges.My question is that for what range of x this series converges.I tried taking its drivative and and tried finding the point of discontinuty but i was not successfull Can someone help me outTake look at the above expression's graph


WinDirStat shows 244GB unknown space on external drive

I recently noticed that one of my external hard drive seems to be missing a lot of space. It was recommended that I try WinDirStat, as it could help identify how much space each file was taking up. This is the result:     As you can see, there is about 244.7GB "unknown" usage.  Doing a bit of research online, the most common suggestion was (a) Recycle Bin and (b) System Volume Information.  (a) As you can see, empty. To double check, I ran Disk Cleanup. It confirmed that it was empty. (Note that a new file appeared by the time I took this screenshot, but it's only 129 Bytes.)  (b) Harder to tell. However, according to various forums, the most common reason for System Volume Information to grow large is due to System Restore Files. I had a look, and it is definitely turned off for this drive, as seen here:     What else could be causing this issue? It is an enormous amount of storage to have gone missing!


Excel - How to vlookup to return multiple values?

I'm looking to use Excel to look up and return multiple reference values for a given key. VLookup does something very similar to what I need - but only returns a single match.   I assume it'll involve array-returning and handling methods, though I haven't dealt with these before. Some Googling starts to lean on the if([lookuparray]=[value],row[lookuparray]) as part of a solution - though I can't get it to return a single match...  For example, if I have this reference data:  Adam    Red Adam    Green Adam    Blue Bob     Red Bob     Yellow Bob     Green Carl    Red    I'm trying to get the multiple return values on the right. (Comma separated, if possible)  Red      Adam, Bob, Carl Green    Adam, Bob Blue     Adam Yellow   Bob   (I already have the key value on the left - no need to pull out those values)  Any help as to how to approach handling multiple values in th this context is apprecited. Thanks.


This is a all in one printer (printer, scanner). Tried to run hplip-3.19.1.run according to HP, but seems not working. How to troubleshoot?


How much do figures need to differ to avoid copyright claims?

It sometimes arise that I need to use, for an article, a book chapter or any other written work, figures that I have already published (not figures published by others). These are usually schematic figures explaining what a chemical or physical system look like, how an algorithm works, etc. Thus, instead of reusing the exact same figure, I can easily create another one, conveying the same message with (more or less subtle) differences in presentation.  However, I have no idea how to answer the following question: how different need two figures be to avoid the second one infringing on the copyright of the first? What is a good rule of thumb to be used? Is it enough to change one of the following:   color scheme viewpoint of a 3D visualization moving around blocks in a 2D diagram (or mind map) changing axis properties (labels, tick mark positions, etc.) in a graph


Why doesn't \makeatletter work inside \newcommand?

After hours of banging my brain against my skull, I narrowed down an issue I'm having to the fact that \makeatletter doesn't work inside \newcommand. Commands that I call after \makeatletter are registered as undefined, as if \makeatletter didn't do anything.  Why is this the case?  In the example below, I define two commands. Calling one of them from the document body causes the undefined error, while the other doesn't.  \documentclass[11pt]{book} \usepackage{kvsetkeys}  \newcommand{\commandThatFails}{     \makeatletter \comma@parse{}{} \makeatother }  \makeatletter     \newcommand{\commandThatWorks}{         \comma@parse{}{}     } \makeatother  \begin{document}  Hi there.  \commandThatFails \commandThatWorks  \end{document}


Filter out 2nd occurance of text betwen quotes with sed?

I have a grepped output of a file like so:  "name" "Andrew Spokes"   I want to extract the name by piping the output of grep through sed.   My expected output would be: Andrew Spokes  I require all white space thats not in between the quotation marks to be removed too.


I have ubuntu 16.04, want to play games,  But nvidia driver is not installed, Should I install the driver for better performance or Intel Graphics will cope up with it?   In additional drivers nvidia is not showing up! But when I run lspci the graphic card is there!    If I have to install the driver, which version is stable?


I have 3 variables like this: $first = 2; $second = 5; $operation = '*';  how can I programaticly assign the solution to this math problem to the $answer variable? I have tried eval(), but that does not work.


Suddenly, my Ubuntu reports an error and no longer does updates because of this error. The error seems to be the following:  Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_i18n_Translation-en E: The package lists or status file could not be parsed or opened.              It seems that this prevents me from doing everything. Apt-get stops with an error, synaptics manager also, and so on and so forth. Any solutions out there?  Thanks,  Jim


gnuGPG : decrypting an encrypted file does not require password

I am new at gpg and I have just encrypted a file and decrypted it. I was asked to enter the passphrase for the first time.  Then, when I decrypt the file again gpg does not ask for any password anymore. This is not secure.  I would like to make it ask for my password everytime I try to dercypt the file.  Thanks for your help.


I already tried fixing it with margin, table styles, and the bootstrap css but it isnt working  I need the A tags to center in the label-row-overview div and be responsive  HTML

EXTRA FOTO'S

MAATTABELLEN

PRODUCT SPECS

CERTIFICATEN

   Style.css  .label-row-overview a {   color: #FFF;   background-color: #12a19b;   padding: 10px;   display: inline-block;   margin: 5px;   overflow: hidden; }


Standardized coefficients larger than 1 - a layman explanation?

EDITED TO POSE DIFFERENT QUESTIONS THAN DUPLICATE:   poses the question:     Can standardized coefficients become greater than |1|? If yes, what   does that mean and should they be excluded from the model? If yes,   why?   The accepted answer can be summarized as:     Standardized coefficients can be greater than 1.00... They are a sign   that you have some pretty serious collinearity.   The second answer there nitpicks on the meaning of standardization, and states that:     (when you fit a) regression (with only a single predictor) then it is   mathematically impossible to see a coefficient outside of the -1 to 1   range since the slope will be the same as the correlation)   The two answers do not agree upon what to do with such coefficients, the first says:      Whether they should be excluded depends on why they happened - but   probably not.   While the second:     some sources suggest dropping those variables.   To summarize both answers: Yes, it can happen - only with collinearity, never in simple regression.    Given the above, my questions are:  (1) Is multicollinearity the only situation in which the standardized coefficient will be greater than +- 1?  (2) Why can't a standardized coefficient in simple regression exede +-1? I mean, what is the logical explenation here? From my own (very non-mathematically oriented) point of view, why can't 1 standard deviation in one variable contribute more that one standard deviation to a second variable?  Suppose we are predicting wages (y) by school years (x), and wages has a points at +6 s.d (people who make a lot of money), yet school years has only 3 s.d of data. Than why cant the standardized coefficient for school years be greater than 1?


How to remove items from Places sidebar in Nautilus 3.6?

I am attempting to remove bookmarks from the Places sidebar in Nautilus 3.6. Specifically, I would like to remove the "Pictures" item.  I have found answers for older versions in which one can remove or edit entries in ~/.config/user-dirs.dirs. However, this does not seem to work in 3.6. I am running Ubuntu 12.10 with Gnome.  Removing things in the bookmarks menu does not seem to change anything and the option to remove by right clicking is grayed out.  Thanks!


Let's say I have a time independent Hamiltonian so my system conserves energy. It's initially in an energy eigenstate with $E=1$ in whatever energy units you like. I measure a different observable that doesn't commute with $H$, then I measure $H$ again. I have some probability now of finding my system in an energy eigenstate with $E\neq1$.  What gives? If this was a harmonic oscillator for example, it could be the case that I end up in a state with hugely more energy. Where does this extra energy come from?  In this question, the accepted answer says that the probe particle imparts the energy:   I get that idea, but after the probe interacts with the system and I measure the energy again, then my energy may go down, stay the same or go up. How does this relate to the energy of the probe particle? I feel I'm missing something fundamental here.


Using a variable from a different subprogram

I need to create program code in python that uses a defined variable from a different subprogram using a simple version:  x = 'ham'  def a():     x = 'cheese'  def b():     print(x) a() b()   How do I get this to save the global variable x as cheese instead of ham?


"10th patient" is the answer to the question. I want to know as to how to ask a question to get this answer in English

Similarly, if the answer is 10th president, how do you ask a question in English to get this answer. I wanted to ask a doctor to find out how many Corona patients had been diagnosed. But, when he said that this is the 100th patient, I didn't know how to ask a question to get that answer.  Hope my question is clear.


I have to add .tif graphic in my LaTeX file, but it is not working.  \usepackage{graphicx}  \begin{figure}[h]     \begin{center}        \includegraphics[width=15mm]{myGraphic.tif}     \end{center} \end{figure}   After some research, .tif files won't work in pdfLaTeX or something. But I need to have my figure with .tif extension (not .jpg or others). How can I add .tif figure in my .tex file?


I'm in a relatively basic Physics class in university, and was reading the section in my textbook about The Principle of Relativity.  It says:     Einstein's Theory of Relativity ... added the conjecture that the speed of a beam of light must be the same as measured by observers in different frames of reference in uniform motion with respect to each other.   I'd like to start off and say I certainly don't doubt that. People much more familiar with relativistic physics take this as fact so I see no reason to pretend I've found a loophole in the fabric of reality.  I'm just wondering... how? How can I be moving at 0.9c relative to the Cosmic Microwave Background (which my textbook says is the most reliable inertial reference frame) and watch light go past me, in the same direction, at 1.0c? Doesn't that mean the light is moving at 1.9c relative to the CMB?  Further, the textbook says that, in the case of two or more observers traveling at different speeds, the observers will see that the light has a different color. Is that evidence of a Doppler effect? Doesn't that imply that to see different colors observers would have to be observing the light moving at different velocities than each other?  I've just been puzzling about this for a while now. I'm hoping someone more learned than me can chime in and help clear things up, because so far the best explanation I can think of is localized time dilation changing just how long a "second" is in order to ensure that the photons always move at c, but that just seems like such a convenient answer.


Let $0<a<b $ and $ f: [a,b] \rightarrow [c,d]$ be an increasing bijection. Prove the following equality by area  $\int_{a}^{b}f(x)dx=bd-ac-\int_{c}^{d}f^{-1}(y)dy$.  Use integration by parts to prove the equality.  I honestly have no idea with this problem. I need full and detailed answer.


I have 17.10 installed in a dual-boot with Windows 7 pro on a home built AMD machine.  When I log in, it tells me that 17.10 is no longer supported and I should upgrade to 18.04LTS.  When I click "upgrade" it asks for authentication, which I provide.  Then nothing happens.  If I click the software updater (icon with tools) it searches, then says it cannot connect to the repository and to check my internet connection, which is working fine at about 500 Mb hardwired to Comcast.  Then it again gives me the message saying I should upgrade...  Tried this 3 times with no results.  What can you suggest?  I really don't want to screw up the dual boot installation.


Is it possible to use \addfontfeature for specific characters? Something like this MWE in order to get every e of the document with double size:  \usepackage{fontspec} \usepackage{hyperref}  \setmainfont{Latin Modern} \setmainfont{Latin Modern}[Scale=2.0, range = {e}]  \begin{document}  Test   \end{document}


Several variations of the same chip, what does it mean?

When I look for ICs online, I often come across a list like .  For example, I just searched for the 4N35 optocoupler, and came up with a list:   4N35M 4N35SM 4N35SR2M 4N35SR2VM 4N35SVM 4N35TVM 4N35VM   And this is a relatively short list. Sometimes, differences are obvious (i.e. package type). But the aforementioned are all in DIP package. So is there some sort of a general convention that all manufacturers follow when naming these chips? I mean, how am I supposed to choose which one is right for me? Reading the datasheet searching for a minute difference each and every time can be tedious (sometimes it certainly helps), but I'm wondering if there is a fast way, based on the suffixes of the variants of a component, to tell how it differs from other members in its family.


Why is the serial connection faster than the parallel connection?

As a software developer the concept of parallel processing usually meant faster processing because it meant things don't have to wait for the other processes to finish if they don't need to.  So how come the serial connection is looked at (arguably) as the future  while the parallel one as a thing of the past?


The generating function for a Bessel equation is:      $$g(x,t) = e^{(x/2)(t-1/t))}$$      Using the product $g(x,t)\cdot g(x,-t)$ show that:      a) $$[J_0(x)]^2 + 2[J_1(x)]^2 + 2[J_2(x)]^2 + \cdots = 1$$      and consequently:      b)      $$|J_0(x)|\le 1, \forall x$$      c) $$|J_n(x)| \le \frac{1}{\sqrt{2}}; n=1,2,3,\cdots$$   For a) I tried the product:  $$e^{(x/2)(t-1/t))}\cdot e^{(x/2)(-t+1/t))} = 1$$  I at least arrived at the right side of the equation. Since this generates the bessel functions, I should arrive at something related to $J_n$ in the left side. I know that  $$e^{(x/2)(t-1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)t^n$$  $$e^{(x/2)(-t+1/t))} = \sum_{n=0\infty}^{\infty} J_n(x)(-t)^n$$  but it's not just a matter of multiplying coefficients from the two infinite series, right?  For $b$, I tried to use  but it's not as obvious  I have no idea how to deal with $c$, could somebody help me?


I have an unmanaged C++ DLL which merely exports a single class (not COM...it's just a simple C++ class) as its interface. I want to use this class in C# but am told that it cannot merely be imported into C#.  What is the right way to use this class in my C# application?


$L^2$ function with compact support is in $L^1$?

I'm reading Real analysis(Stein) and confused by a statement: If $f\in L^2$, then $f\chi_R$ is in both $L^1$ and $L^2$, where $\chi_R$ is the characteristic function of $[-R, R]$.   But $f$ in $L^2$ does not mean that $f\in L^1$. Such an example given by . How could this function on $[-R, R]$ be in $L^1$?


Big O Notation for the given code fragments

I am looking for some help regarding big O notation. The goal is to give the order of growth for the given code fragments.  int sum = 0 for (int k = n; k > 0; k/=2 )   for (int i = 0; i < k; i++)     sum++;   For this code fragment I got (N logN). The first for loop is logN and the second for loop is N.  int sum = 0 for (int i = 1; i < n; i *= 2 )   for (int j = 0; j < i; j++)     sum++;   I had some trouble on this one. The first for loop is logN, however the second for loop is where I get stuck. The second for loop in dependent on the first for loop. I'm not sure how to show that in big N notation.   int sum = 0 for (int i = 1; i < n; i *= 2 )   for (int j = 0; j < n; j++)     sum++;   The first for loop is logN. The second for loop is N. So this is (N)?  I am struggling with this and would appreciate some help. Thank you


Proper order for scripts in head of my document

I have multiple script tags in my game and the order in which I call them really makes me confused. My game was even crashing at some point. This is how it looks in my code    <script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js'></script>    <script src="client/js/generateHTML.js" defer></script>   <script src="client/js/HackTimer.js"></script>   <script src="client/game.js" async></script>   The async and defer confuse me.  generateHTML.js script needs to be run only once, and that's when the <body> is loaded. It just generates bunch of HTML content in the body (upgrade, mastery, crafting boxes etc). After that, it does nothing (the content generated is later used by game.js)  HackTimer.js is a small script I found online which fixes the problem where setIntervals are automatically set to 1000ms if the game tab is out of focus. (ie damage per second actually does 2.5% DPS every 25ms (40FPS) to create a smooth health bar, or 2.5% damage per 1000ms (bad) if the user is browsing another tab). HackTimer fixes this problem.  game.js is where all the functions, objects etc for my game are.  Is my order bad? When, and where should I use defer and async, and do I really need to use them?


Adaptation by standing genetic variation and fitness variance

I've read a couple of paper on Fisher's Fundamental Theory of Natural selection that states: $W(t+1) = W(t) + Var_{W}(t)$  Given a population with some degree of genetic variability, and assuming that no new mutations can appear, eventually the most fit strain will be fixed (discarding the effect of drift). The FFTNS allows to predict, given the mean fitness at any point and the fitness variance, the mean fitness of the population in the next generation. However, can we predict the variance on fitness for the new population?  Given the possible complexity of the problem, the situation I'm focus have specific conditions, but I would also like to know the general answer. But in my case:   Individuals reproduce asexually Random mating Diploids Expanding population with recurrent bottlenecks (we can approximate to Wrigth-Fisher population with certain effective population size)   More generally, given only the initial mean fitness and variance of the fitness can we predict the trajectory of the mean fitness during adaptation? If not, what do we need more? Number of strains present? Or only the full composition of the population allow for such prediction?  Thanks in advance


Is this site, which seems to be copying the content from stackexchange sites, legal?

This website called  came to my attention. It looks like a full copy of the various StackExchange sites. It does not add any information beyond the original contents from StackExchange, and its sectionings look like they were somehow programmatically generated from the tags on the question. Is this legal? Does StackExchange acknowledge this? It is scary because I can find my own contribution to the StackExchange sites copied on FAQoverflow, which I never knew before.


How can I explain how to play D&D to new players without them falling asleep from boredom?

Some of my friends just started playing Dungeons & Dragons [5e] for the first time and don't know anything about how to play. I have tried explaining to them the things that are completely necessary and teach them the rest while playing but I could not get them to understand. None of them have a players handbook and they can't afford one and they really want to play. I really want a simple way to explain the basics and since I have a habit of explaining things in ways that are much too complicated. I have already told them the basic rules so all I need to know is a simple way to explain how to play.


Can my EOS 1200d autofocus with1.4x canon teleconverter and canon 300 mm f4 lens. What will be my maximum aperture using both of these.


I installed Xubuntu on a friend's PC and he understood, that is it greater than Windows 10. He has no practice with shell and dont want to use it! The PC is used by several people. He (the owner) is doing weekly backups. Is it possible to copy the whole home dir without root? I dont want, that he is working to much while he is root, so i tried to add a group called "home" and chown -R :home /home and chmod -R g+w /home, but it is not possible to copy other users homedirs. A easy solution is to create a shortcut, which opens the explorer with root, but this is also very dangerous.  Edit: I was able to read and write to the other dirs, but I couldnt copy them without root.  A possible fix is a rx-only script, so he has just click on it. ´sudo copy -R /home /media/[user]/foo´ Is it possible to show a progressbar and the time remaining?  Edit: Thats not really a duplicate. He can read and write to other homedirs, but not copy them    Solution: I created a readonly script, which looks, if the hdd is mounted and askes, if the pc should shutdown afterwards and I created a alias "backup=sudo /path/to/backup.sh"


Why can we say 'an American' but not 'a British'?

I am confused with the use of an indefinite article in front of British or Chinese.  To my understanding, we can place an indefinite article in front of any “countable noun”.  So, we can say a cup and an orange.   But when it comes to nationalities, it is very confusing. For example, we can say an American or a German. But we cannot say a British or a Chinese.   I looked them up in a dictionary as at first I thought British and Chinese are adjectives in the above statement and that is why we cannot place an article in front of it.   However, the dictionary mentions that they are nouns.  Does that mean they are uncountable nouns?


Any way I can remove these fireflies/noise?

I have made a model of an apartment and I am trying to get rendered images from the individual rooms and in the end in orthographic view but no matter what I do there is too much fireflies or noise.  I have Clamp at 1.00, Clamp indirect at 1.00, 1000 Samples, disabled caustics and my lamps are points with x, y and z scales of 10  Here is my model, is it possible that theres too much for it to render properly?    Results where I used denoise(set clamp settings to 0):      Thanks!


How to be more specific on generic constraints?

I am having the following type where T should only be of int, double, string and datetime. However using a constraint on class would be too broad.   public class Field<T> where T : class  {     public int Tag { get; set; }      public T Value { get; set; } }   Possible solutions that come to my mind:    Add a constructor that does a check (if ((typeof(T) != typeof(string)) ...) Change the class to be abstract and move Value to the concrete implementing class. This however would result in having several additional types, like StringField : Field, DateTimeField : Field, etc.    Also I would like to be more specific about the Tag property and replace it with an enum, which ensures that only values of predefined range can be used. This approach however would result in a (tiny) overhead, as I need to instance representation of Field as a string.   What would be the best model to choose? Anything I am missing? Thanks in advance


package makeidx: print first letter for each group of keys

I've created index with makeidx package. It works. What really need is to print the first letter above every group of keys (i.e. referring to the image I want to print the red letter, that I have manually inserted).


How to monitor battery condition and pop-up notification?

Essentially, I would like  into a working answer.   I know how to extract the battery percentage from :   upower -i $(upower -e | grep BAT) | grep --color=never -E percentage|xargs|cut -d' ' -f2|sed s/%//   And how to pop-up a basic notification:   notify-send "battery low"   But how can I set up a (bash?) script to permanently monitor the output and send notification as per this pseudo-code:   if battery_status < 10% then notify-send "battery low" and put my system to suspended state sudo pm-suspend


differences between using of first and firstly

When Eva was first diagnosed with diabetes she was twenty.  When Eva was firstly diagnosed with diabetes she was twenty.  Which one is grammatically correct to say and as I know both first and firstly we can use as an adverb.


How to find where a method is defined at runtime?

We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, we were good little boys and girls and ran rake test after every check-in but, due to some oddities in Rails' library loading, it only occurred when we ran it directly from Mongrel in production mode.  I tracked the bug down and it was due to a new Rails gem overwriting a method in the String class in a way that broke one narrow use in the runtime Rails code.  Anyway, long story short, is there a way, at runtime, to ask Ruby where a method has been defined? Something like whereami( :foo ) that returns /path/to/some/file.rb line #45? In this case, telling me that it was defined in class String would be unhelpful, because it was overloaded by some library.   I cannot guarantee the source lives in my project, so grepping for 'def foo' won't necessarily give me what I need, not to mention if I have many def foo's, sometimes I don't know until runtime which one I may be using.


Can we re-request features that were declined a sufficient while ago?

As I was browsing earlier today, I really happened to like an answer to a question. The question didn't interest me so much, and the answer was actually a tangential reply to some of the comments in the post, and was by far more valuable than the original question or the accepted answer. Now, my only options to favorite that answer are   Favorite the question. Add the link to the answer to my browser's bookmarks.   I was pretty sure others have had the need for this, and sure enough, I found a  and a , both nearly two years ago and a , nearly a year ago.  Now, there might have been several reasons why it (and several other old feature-requests) was denied. SO was pretty young back then, there probably weren't enough developers on board, perhaps they didn't have the resources to track favorite answers. But SO has grown since then from 1-3 sites to 30+ sites. Requests that might have at one point been too demanding, might now be easily implementable, which could greatly enhance user experience.  So, my question is: "Can we re-request features that were previously declined, provided the request and the denial are sufficiently old, so that the team can reconsider their decision?"  After how long is sufficient enough needs to be decided by the community and is only to prevent re-requesting a feature that was only declined say a week ago.


Sign convention for the Minkowski metric $\eta_{\mu\nu}$

In special relativity, the proper time is defined as  $$d\tau^2 = c^2t^2-(x^2+y^2+z^2).$$ One usually introduces a matrix $\eta$ to represent it. I have seen two . One has three minuses: $$\eta_3=\left(\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 \\ 0 & 0 & -1 & 0 \\ 0 & 0 & 0 & -1 \end{array}\right),$$ and the other one has only one, so $\eta_1=-\eta_3$. Thus, $\tau^2=x^\mu\eta_{3,\mu\nu}x^\nu=-x^\mu\eta_{1,\mu\nu}x^\nu$, summing over repeated indices.   I have been told this is an issue in the physics community, and that relativity typically uses the $(-,+,+,+)$ East coast sign convention while particle physics/quantum field theory often uses the $(+,-,-,-)$ West coast sign convention. Why is that?


Prove that $𝓢_n$ is generated by the two permutations (1 2), (1 2 3 ... n)

I've to prove that 𝓢n is generated by the two permutations (1 2), (1 2 3 ... n). I've already proved that the symmetric group can generated by the following transpositions (1 2) (2 3) (3 4), ..., (n − 1 n) in a previous exercise. So I think I've to prove that those two elements are able to generate all elements of the form (m,m+1) with $m = 1, \ldots n-1$


This is my first time trying to import plots created by MATLAB into LaTeX and it's not turning out very nicely. I have saved my MATLAB plot as a .png file  and an .eps file . Using the .eps file, I have the following code:  \documentclass[twoside, a4paper, 12pt]{article} \usepackage{graphicx}     \begin{document}  \begin{center}    \includegraphics[scale=0.6]{graph2.eps} \end{center}   \end{document}   which turns out to look like: (half the image is missing)    So then I changed the scale to 0.4:   \includegraphics[scale=0.4]{graph2.eps}   which produces the output:    However now the image is way too small to be eligible (and it doesn't feel like it's centered properly). Does anyone have a good solution for this? How can I get the image to look "good" when imported into LaTeX? Thanks.  EDIT:  I have saved the three plots separately:  The first graph is called g1 and can be found   g2 can be found   and g3 can be found   How can I combine them into one figure using the tabular environment? Could someone provide a template code?


Proving first supplement of the quadratic reciprocity law

I'm trying to prove the first supplement of the quadratic reciprocity law in its particular form: $$-\bar{1} \text{is a square in} \mathbb{Z}/p\mathbb{Z} \iff p \equiv 1 \pmod 4$$ For the forward part, I'm thinking about applying Euler's criterion, since we know $-\bar{1}$ is a square. For the backward part, my starting point is that I have proved that $x^{p-1}=\bar{1}$ and that implies that: $$\Bigl(x^{\frac{p-1}{2}} - \bar{1} \Bigr)\Bigl(x^{\frac{p-1}{2}} + \bar{1} \Bigr) = \bar{0}$$


Starcraft 1 disc 2 isn't continuing the installation

A couple years ago I bought Starcraft Battle Chest. I got a new computer and I'm trying to install it. The problem is that it gets halfway there, and tells me to insert disc 2. But when I insert Brood War it brings up the Brood War installer instead of continuing the installation. If I try to install using the Brood War installer it says that i have to have the original installed. If I close the Brood War installer it just stays at 51%. I am on Windows 7 64 bit if it matters.


recommended computer monitor brightness, contrast and gamma settings for eyes?

I'm a software developer. I'm working up to 10 hours per day in computer.    How to properly adjust monitor brightness and contrast.


For which $f,g \in k[t]$, $k[f,g]$ is integrally closed?

Let $f,g \in k[t]$, $k$ is a field of characteristic zero, $\deg(f)=n \geq 2$, $\deg(g)=m \geq 2$.     Is it possible to characterize all such $f$ and $g$ for which $k[f,g]$ is integrally closed in its field of fractions $k(f,g)$?   I do not mind to further assume that $k(f,g)=k(t)$ (but I do not want to assume that $k[f,g]=k[t]$, which makes my question trivial).  Thank you very much!  Edit: (i)  is relevant.  (ii) If also $k(f,g)=k(t)$, then being integrally closed is equivalent to $k[f,g]=k[t]$. Indeed: (a) If $k[f,g]=k[t]$ then $k[f,g]$ is integrally closed (since $k[t]$ is). (b) If $k[f,g]$ is integrally closed then, in particular, since $t \in k(t)=k(f,g)$ (= the field of fractions of $k[f,g]$) and obviously $t$ is integral over $k[f,g]$ (for example, $t$ is a root of $f(T)-f \in k[f,g][T]$) hence $t \in k[f,g]$, so $k[f,g]=k[t]$.  For example: $f(t)=t^2+1$, $g(t)=t^3-4t$. We have, $t= \frac{t(t^2-4)}{t^2+1-5}=\frac{g}{f-5}$, so $k(f,g)=k(t)$. By Abhyankar-Moh-Suzuki theorem, $k[f,g] \neq k[t]$, so $k[f,g]$ is not integrally closed. Similarly, for every $f,g$ such that $k(f,g)=k(t)$ and one of the degrees does not divides the other, then $k[f,g]$ is not integrally closed.  (iii) If also $k(f,g)=k(t)$ and $k$ is algebraically closed, then being integrally closed is equivalent to $H(t)=(f(t),g(t))$ is injective and $H'(t)=(f'(t),g'(t)) \neq (0,0)$ for every $t \in k$. Indeed, $k[f,g]=k[t]$ is equivalent to the new conditions (it is important that $k$ is algebraically closed!!).  Edit: What if we replace $k$ by an integral domain $D$ (which is a $k$-algebra)? See also  question.


I found this line in a korn shell script:  var=${var:-/temp}   I am able to figure it out what it is doing   $ var=/data $ var=${var:-/temp} $ echo $var /data $ var= $ echo $var  $ var=${var:-/temp} $ echo $var /temp   Does it have advantage over checking the value and then assigning?


Is it possible for the correlation between principle components to be negative when the correlation of the highest covariant variables is positive?

I just did my first full PCA on the Iris dataset. I understand the math behind PCA, but less so the statistics. I started by plotting the two variables that had the highest co-variance, just for the fun of comparing their plot to the final PCA (after reducing to two PCs). The result surprised me. There was the same general shape in the scatter plot, but it appears that the slopes were opposite in nature. This makes me think maybe I messed up somewhere.  Here is the graph of the variables that I calculated as having the highest co-variance:   And then, here is the graph of my top two principle components:    My full calculations are here, in a Jupyter notebook. I was wondering if there are any obvious errors, or if this sort of behavior is possible:


Proving $N(x) = (A(x,x))^\frac12$ is a norm in $V$ given that A is a positive definite bilinear form

The problem: Given a vector space $V$ with scalars in $\mathbb{R}$, and a positive-definite bilinear form $A$, show $N(v)=(A(v,v))^\frac12$ defines a norm on $V$. I have easily handled everything but the inequality requirement: $N(u + v) \leq N(u) + N(v)$ From searching around I have found the hint to use the Cauchy-Schwarz inequality: $(\sum u_i v_i)^2 \leq (\sum u_i^2)(\sum v_i^2)$ But I still don't see it. If I take $A$ to be a dot product, an example of a function that satisfies the definition, I can finally do it: $N(u + v)^2 = \sum (u_i + v_i)^2 = \sum u_i^2 + 2u_i v_i + v_i^2$ $(N(u) + N(v))^2 = N(u)^2 + 2 N(u) N(v) + N(v)^2 = \sum u_i^2 + 2 \sqrt{\sum u_i^2 \sum v_i^2} + \sum v_i^2$ Subtracting and dividing out the common parts and squaring it fits right into Cauchy-Schwarz. However I don't know how to do this if I can't assume $A(u,v) = u \cdot v$


Not able to see the GRUB after updating with rerular updates...in14.04

After updating with regular updates of packages of 14.04 .. my system started to boot directly to windows .... how i would be able to get it back


How do you tell a spelling mistake from a grammar mistake? For example:  Your the best. This iz the end. I likes music. She preatend to be asleep.  One method is to read the erroneous sentence aloud (let’s call it the ‘speech method’): if the sentence sounds correct then it has a spelling mistake, otherwise it has a grammar mistake. Applied to the examples, 1 and 2 have spelling mistakes, and 3 and 4 have grammar mistakes. Another method is to look up each word of the erroneous sentence in a dictionary (let’s call it the ‘dictionary method’): if the sentence uses a word that is not in the dictionary, then it has a spelling mistake, otherwise it has a grammar mistake. Applied to the examples, 1 and 3 have grammar mistakes, and 2 and 4 have spelling mistakes. The problem is that these two methods give different results (for 1 and 4, not for 2 and 3). Which method should I use?


I want to ask a question politely to the client. What is the best way to say it?     Could you please let me know when you want to go to a bus station?   Do you think it is a correct way to say it?


Why are the textures rendering with white lines and dots?

I've used some stock collada files and imported them into Blender. I did not make any changes to the models, aside from reducing their size. For testing purposes, the runway can be found .  In the below picture, you'll see that the models look fine until the scene is rendered. My output setting is 1920 x 1080 with 100% resolution and 15% compression.  Any help is greatly appreciated!


I am unable to install wine. What should I do?

I tried to install Wine in order to install some Windows software, like IDM 6.38, but I could not do it. What should I do to install it? In addition to this, when I try to update Ubuntu there is always an error which is related to apt-secure(8).


Cutting down on Exchange 2013 .log Files in Mailbox Database folders

The logs found in: C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database   Are these used to support the indexing or something important? I only ask because they take up a chunk of space and if they're just used for error/warning logging I was wondering if it was possible cut down on them through a setting I'm unaware of?


"define:" oneboxing is still not quite ok

So, apparently the wiktionary oneboxing feature had a little makeover and now it doesn't just onebox into some ugly dump straight from the page.    Except when it does. As you can see, "they" expanded into the garbage format, while the rest was ok.


I just began filling out a survey for a contest that Walmart is hosting. Since I live in Canada there is a skill testing question which was as follows: $$(4×2)+(6/3) ? 5 =$$ The answer to the equation is/was omitted.  What kind of mathematical significance does the question mark hold?  I have tried Googling the equation for an explanation, but to no avail. Is the equation bunk?  FWIW, the answer turned out to be 5... so obviously the question mark represented a subtraction symbol, but how was I ever supposed to induce that if the answer is/was omitted?


Does the detele operator in C++ de-allocate a single address or a block?

Suppose a block is allocated on the heap to hold an array of integers. While de-allocating, should I use the delete operator once on the entire block or once on each byte? As an example, consider   int *ptr=new int[n]; //n is a natural number  ..... delete[] ptr;   //Is this the right approach? or  for(unsigned int i=0;i<n;i++) delete[] (ptr+i); //this one?    To me, the second approach seems more natural. Otherwise, when passed an address, how does the delete operator know how far along the line should it de-allocate? Or does it just continue to de-allocate as far as it can see an allocated byte?


A different approach in distributing $8$ distinct balls into $6$ distinct boxes

Find the number of ways in distributing $8$ distinct balls into $6$ distinct boxes such that there is at least $1$ ball in each box.  We are well acquainted with the traditional Inclusion-Exclusion principle in solving this and it will come up as $191520$ ways.  I tried in this way:  When we distribute $8$ balls into $6$ boxes we have two possible cases  Case $1.$ There are exactly $2$ boxes with $2$ balls each  Case $2.$ There is exactly $1$ Box with $3$ balls in it.  For Case $1$, the distribution is done by choosing $2$ boxes from $6$ boxes and $2$ balls from $8$ balls and those two balls can be arranged in $2!$ ways. But I require another two balls from remaining $6$ balls to be placed in each of these two boxes which can be done in $\binom{6}{2} \times 2!$ ways. Finally remaining $4$ balls can be distributed in remaining $4$ boxes in $4!$ ways. So total number of ways for Case $1.$ is  $$\binom{6}{2} \times \binom{8}{2} \times 2! \times \binom{6}{2} \times 2! \times 4!=604800$$  For Case $2$, the number of ways is  $$\binom{6}{1} \times \binom{8}{3} \times 5!=40320$$  I am pretty sure the value obtained for Case $2.$ is correct. but I could not find where I went wrong in Case $1.$


Downloading ArcGIS Online Feature Service to local Geodatabase using ArcPy?

I want to grab some feature services from ArcGIS Hub and put them on a GDB on my local PC. Here's the code that I've got so far:   import arcpy  # Set project directory proj_dir = 'C:\\Users\\rhard2\\Documents\\am_ml_mainlines_v_01'  # Grab online data (feature services): from arcgis.gis import GIS gis = GIS()  # Connect to AGOL LA_geological_faults = gis.content.get(('4bb7809eac534689b36b2d347ac96220')) LA_streets_cl = gis.content.get(('d3cd48afaacd4913b923fd98c6591276')) LA_streets_width = gis.content.get(('13c2f36f37894faa8ecc918b29f9b156'))  # Return items (feature services) above: display(LA_geological_faults, LA_streets_cl, LA_streets_width)  # Set out location for the containers container_1_gdb = os.path.join(proj_dir,'container_1.gdb')  # Place them to container_1.gdb arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_geological_faults, out_path=container_1_gdb, out_name='LA_geological_faults', config_keyword="") arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_streets_cl, out_path=container_1_gdb, out_name='LA_streets_cl', config_keyword="") arcpy.FeatureClassToFeatureClass_conversion(in_features=LA_streets_width, out_path=container_1_gdb, out_name='LA_streets_width', config_keyword="")   But this gave me an error:     RuntimeError: Object: Error in executing tool   Questions:  I read somewhere (I couldn't find the link) that FeatureClasstToFeatureClass is supposed to support feature service. What have I done wrong? How do I download a feature service layer and put them into a GDB in my computer?   I use ArcGIS Pro 2.4


Merge two arrays of both values and make as one array like as one key other value in php

I have two arrays $arr1 and $arr2 and want make one array like this $arr.  <?php $arr1 = [0=>'x-api-key',1=>'username',3=>'password']; $arr2 = [0=>'cb2312b123113b321b',1=>'john',3=>'1234567']; ?>   Expected Output:   ['x-api-key'=>'cb2312b123113b321b','username'=>'john','password'=>'1234567'];   Any help?


LuaLaTeX, TeXLive 2016, standalone: undefined control sequence

Since I installed TeXLive 2016 I cannot build documents with the standalone document class any more using LuaLaTeX (PDFLaTeX works fine). For example:  \documentclass{standalone} \begin{document} hi \end{document}   Gives me:  ! Undefined control sequence. \sa@placebox ->\newpage \global \pdfpagewidth                                                =\wd \sa@box \global \pdfpageh...  l.4 \end{document}   How to fix that?


Installing Ubuntu 18.04 on Dell Alienware Aurora R11

Is there any way to install Ubuntu 18.04 on Dell Alienware Aurora R11 (fitted with Nvidia 2080Ti GPU). Whenever I try to install 18.04 in it I end up getting a black screen (which I think is because of the graphics driver). . I am not able to really figure out what the problem is. I was able to flawlessly install Ubuntu 20.04 in it, but failed while installing 18.04. Any source of information/work around would be of great help to me. Thanks in advance.


Voltage divider resistor power disipation

I am trying to create a power supply circuit for the , using a voltage divider and a cellphone charger rated at 5V, 1A as power supply.  I have resistors connected like this:    The resistors are rated at 1 - 6 W. Using an online calculator for power dissipation i get 900W per resistor for the ESP8266 max current of 300mA. I am using 3 10K resistors with two in series for the 20K part.  I guess this is the correct reasoning.   Could someone explain if I'm doing something wrong and if this will work?


How can I ping a VM on a hypervisor from outside the host?

I have a CentOS 7 hypervisor running. The hypervisor IP is 192.168.195.10, and I created a VM with the IP address of 192.168.122.136 and the gateway of 192.168.122.1. I can ping from hypervisor to the VM. When I try to connect other computers to the network I can ping from it to the hypervisor, but I cannot get to the VM and not to the gateway of the VM.  Host to VM: Good Outside to Host: Good Outside to VM: No Good  Can someone give me direction to solve this issue?


I know there isn't a way to export a map from ArcMap to PDF and keep the hyperlinks, but is there a way to add hyperlinks to the map in Adobe Acrobat? I have a simple map of a few states and I am wanting each state to link to a webpage. I know how to get to seeing the attributes in Adobe Acrobat, but can't figure out if I can add a hyperlink there.  I think this is different to  which instead explains how you would have to go through the model tree to find the link. I am asking how to create a link on the states on the pdf, so that you wouldn't have to search through the pdf to find the links.


I had a fiver.com contractor create some models for me, and when I open the .blends I get this error (though the files open perfectly well whether I accept or not):  I'm having trouble finding any specific versions of the error online, but I'm kind of getting hints that it's a Maya crossover thing. I tried opening the console in the file but there's nothing there to read.  I also ran Python in the Terminal while opening the file and allowing execution, but there was nothing to see. My question is: is this anything to worry about security-wise?  Did I open myself up to an exploit by executing it? System: Catalina 10.15.7 Blender 2.80


We’ve got plenty of time. We don’t need to/needn’t hurry

Do "don’t need to" and "needn’t" mean the same or not? This is a question from an English test:     We’ve got plenty of time. We ... hurry.         don’t need to   needn’t      What's the right answer?


Faces won't appear regardless of it being in wireframe or solid

So as you can see the faces are there, but the object is not in wireframe. It is in solid. How do I make it so the faces appear? I have tried alt+H and pressing z too many times to count.


UK Standard Visitor Visa refusal due to mismatching bank statement. What are my options?

My daughter wanted to travel to UK on tourist visa as her student visa expired. She wanted to go there to meet her sister working there on tier 2 (general visa). She by mistake showed my bank statement instead of her own as she had her current account in Lloyd bank in the UK. Visa was denied to her on the ground that in India she did not show any evidence that she is able to maintain herself – No evidence to show that she will leave england at the end of visit.   Is it ok to buy ticket before getting visa? How long should she wait before reapplying for visa?


How can I set up Samba shares to only be accessed by certain users?

I have a RAID10 array mounted on Ubuntu Server 12.04. I have created a few folders within the mount point and want the following functionality.  There will be 4 users, 3 of them are windows users: 'one' 'two' & 'three'. 'four' is a media streamer that only needs to access the MEDIA share. One Two and Three need to have full access to the media share and their own personal shares (for documents) which no other users but them can access.  Currently, User Four works perfectly (Has full access to the MEDIA folder and can't access folders owned by other users). The problem is, when logged in as the other user, I can't access either share; (tried using valid users =  and using chmod to add permissions to no avail).  TL;DR: I need to know how to configure Samba properly to restrict access to certain shares for certain users and allow all of them to access one communal folder (all files on a RAID10 mount).


How do I delete a network from my Mac?  I removed it from network preferences in the advanced pane but it still appears connected in my list.   I also tried looking for it in Keychain Access but it's not there and I'm still connected.


Proof there is a rational between any two reals

This is a problem from Rudin, but I wanted to add my own intuition to it. It uses Rudin's definition of Archimedean property. I'd just like to know if my version holds  If $x \in \mathbb R$, $y\in \mathbb R$ and $x<y$, then $\exists p \in \mathbb Q$ such that $x < p < y$  Since $x < y$, then $y-x>0$. Applying Archimedean property, we see $\exists n \in \mathbb Z^+$ such that $n(y-x)>1$. Allow $A=\{i\in \mathbb Z\mid i > nx\}$. Obviously $A$ is bounded by $nx$, so take $m = \inf A$. So we have $m > nx$ and $m-1 \leq nx$ by set and $\inf$ definition. This gives us $m-1 \leq nx < m$. Combining and rearranging with $n(y-x) > 1$ gives us $nx < m \leq nx +1 < ny \implies nx < m < ny$. Thus $x < \frac{m}{n} < y$


I couldn't gush over him enough    I can't gush over him enough        Which one is correct and why?


CentOS cp shell glob operation with asterisk (*) fails

In a CentOS shared web hosting environment (I don't know a CLI way to check CentOS version) with Bash 3.2.52 I tried the following command: cp "${domain_dir}/google*.html" "${specific_backups_dir}"  Although the variables have been declared and already used successfully for other commands and although a file in the domain directory with a matchable name (googleNUMBER.html) exists, I got the error (relating to that file):  No such file or directory  What may cause that problem?


What is the AcceptedAnswerId field in Stack Overflow data MSR 2015?

I mean, how can I find the total list of description for AcceptedAnswerId in the post schema?


Automatically include a listing of all files in a folder

My thesis supervisor requires me to include all my MATLAB code in the PDF. My code is scattered in a dozen .m files, all in the same folder. I know I can include code, using the matlab-prettifier package, and I do so as follows: \lstinputlisting[style=Matlab-editor]{codice/ICCplot.m}  In essence, I want to do the following: for \filename in codice/*.m     \section{\filename}     \lstinputlisting[style=Matlab-editor]{codice/\filename.m} end for


I'm facing some issues with the upload of a custom font on Marketing Cloud. My clients purchased this new custom font and they would use it in cloud pages and email. I have only the css file and the font file (eot, tff, woff extensions). How can I use them? Anyone could help? Thanks in advance, Alessia


What's the application extension? (aka .exe, .app, etc.)

I'm new to Ubuntu. What's the application extension for development reasons? I know Windows is mainly .exe and Mac is .dmg or .app. Does Linux have an unique one?


Why do multiple people have to review an edit, when I have edit privileges anyway?  Should it not just automatically apply if I approve it?


Do migrated questions migrate reputation and badges?

When a question is migrated, is the reputation earned by its author on the original site subtracted from the author's total? What about votes? Badges? Do the same rules apply to the question's answers?


I have been a writing a simple program using TeX programming like  Hello, World! How are you. \bye   I want the two sentences to in different lines but they come in same line. Using \\ it gives an error undefined control sequence. How can it be shifted to new line and also how to start a new paragraph?


I have a VARCHAR(255) primary field field in an InnoDB database table. I only store values of length 32 bytes in it (32 ASCII characters). My primary key has a prefix length of 767 bytes. Clearly, this longer prefix length than I need. Does this have any performance impact?


On Karmic (9.10), my system time is currently off by 17 minutes, e.g. when I type date on the terminal I get Thu Jan  6 16:22:29 CST 2011 while the correct time is 16:05pm. I went through the standard time set and cannot fix this.  If it were off by a multiple of an hour I would blame timezone or daylight savings time settings, but 17 minutes, I have no idea.  Thanks


Java - Issue with boolean value not being changed

I'm working on a student database managing program, and am working on the login phase. I query the database for the students id and password and try and match an entry to what the student enters. When a match is found login should be set to true, and it should go to the next page, but for some reason its never passing my if then statement. I'm not entire sure whats wrong,the code for this is below. You'll notice the system.out.println statements, those are there so I can see if it is actually going through the database correctly, and as far as I can tell it does, but login next gets set to true. I would really appreciate any help.   public void actionPerformed(ActionEvent e)     {         //int i;         //String name;          if(e.getSource()==logInButton)         {             String name="";             String password="";              name=inputField.getText();             password=inputField2.getText();              System.out.println(name);             System.out.println(password);              boolean login = false;              try {                 connection = DriverManager.getConnection(connectionString, username, pass);                 PreparedStatement statement = (PreparedStatement) connection.prepareStatement("SELECT * FROM students");                 data = statement.executeQuery();                 while(data.next()){                     System.out.println(data.getObject("student_id"));                     System.out.println(data.getObject("password"));                     if (data.getObject("student_id") == name && data.getObject("password") == password){                         login = true;                      }                 }             } catch (SQLException e1) {                 // TODO Auto-generated catch block                 e1.printStackTrace();             }             if(login == true){                 System.out.println("login = true");                 logInPanel.setVisible(false);                 postLogInPanel.setVisible(true);             }         }


My Windows edition has no "secpol.msc". How can I edit security policies?

It seems that some Windows editions don't include the GUI secpol.msc tool. I would like to change some data at Local Security Policy, like, for example, Create a token object. How can I do that? All I have found until now is the secedit command-line tool, but it allows only export/import of a complete tree, not changing specific parameters. Command-line method prefered, please, but GUI allowed too.


I'm stuck on the following problem:  Find the smallest number $n$ for which the following statement is true: "The number of isomorphism types of abelian groups with $n$ elements is equal to 10". How many such $n$ are there?  My thoughts: I think that the smallest number is $n=144$. How would I prove this? Also, am I correct in saying that there are infinitely many such numbers $n$?  Any help is appreciated!


A function $f\colon E\to F$ between finite sets is injective iff it is surjective iff it is bijective

i cant solve this exercise, if you can help or give me a lead. I would like to also say its not marked.  Let $f$ an application from $E$ to $F$, with $\#E=\#F=n$. Show that these propositions are equivalent:    $f$ is injective $f$ is surjective $f$ is bijective   Going from 2 to 3 is fairly simple, and from 3 to 1 is automatic but I can't go from 1 to 2.  Thank you, cordially, JF


I have a simple code in java that always returns "Game over.".  import java.util.Scanner; public class nextQuestion {     public void newQuestion() {         Scanner choice2 = new Scanner(System.in);         System.out.println("What is my name?");         System.out.println("A. Mark");         System.out.println("B. Robert");         System.out.println("C. Mio");         System.out.println("D. Samantha");         String answer2 = choice2.nextLine();         if(answer2 == "a" || answer2 == "A") {             System.out.println("Game over.");             System.exit(0);         } else if(answer2 == "b" || answer2 == "B") {             System.out.println("Nice guess!");             System.exit(0);         } else if(answer2 == "c" || answer2 == "C") {             System.out.println("Game over.");             System.exit(0);         } else if(answer2 == "d" || answer2 == "D") {             System.out.println("Game over.");             System.exit(0);         } else {             System.out.println("Game over.");             System.exit(0);         }     } }   However if I use switch statement, it does work. What is the problem with this?


alert box not printing my user input variable from promp

Noob here. I do not know why the userInput variable is not coming out in the alertbox i am creating <!DOCTYPE HTML> <html>     <head>         <title>fns</title>     </head>     <body>         <button onclick="namebox()">Enter Name</button>         <button onclick="yoyoyo()">Generate Greeting!</button>      </body>     <script>     function namebox() {         var userInput = prompt("Enter your name");     }     function yoyoyo() {         alert("Hello" + userInput);     }     </script> </html>```


I have a Type D long stay visa issued by Germany. On the visa itself, the Valid For label states Deutschland.  Can I enter the EU through Spain on this visa?   Edit: This is not a question about entering other Schengen states after I reach Germany. It is about the port of entry into the EU.