I have three functions: getMeses(), getDias() and getHoras(), these functions I want to call or invoke them from a Map like myMap.get("meses").invoke and it calls the getMeses() function.  I'm trying using  the Hack Reflection one.  But when execute the *.invoke method an error appears:  02-20 13:36:01.153 27778-27778/com.urbanclouds.finntime E/AndroidRuntime: FATAL EXCEPTION: main Process: com.urbanclouds.finntime, PID: 27778 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.urbanclouds.finntime/com.urbanclouds.finntime.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2543) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5683) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference at com.urbanclouds.finntime.MainActivity.onCreate(MainActivity.java:39) at android.app.Activity.performCreate(Activity.java:6270) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2609)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1465)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5683)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)   This method can't be use on Android? If not, how can I do what I want?  This is my actual code:  String time_data_keys[] = {"meses", "dias", "horas"}; HashMap<String, TextView> time_data;  @TargetApi(Build.VERSION_CODES.KITKAT) @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      int id;      time_data = new HashMap<>();      for ( String key : time_data_keys) {         id =  getResources().getIdentifier(key,"id",getApplication().getPackageName());         time_data.put(key, (TextView) findViewById(id));     }      Map<String, Method> methodMap = new HashMap<>();      try {         methodMap.put("meses", MainActivity.class.getMethod("getMeses"));         //methodMap.put("dias", MainActivity.class.getMethod("getDias"));     } catch (NoSuchMethodException e) {         e.printStackTrace();     } /*     try {         methodMap.get("meses").invoke(null);     } catch (IllegalAccessException | InvocationTargetException e) {         e.printStackTrace();     } */     time_data.get("meses").setText(getMeses());     //time_data.get("dias").setText(getDias());     //time_data.get("horas").setText("Horas: %128:%32:%17"); }  private String getMeses() {      // some stuff     int num_meses = 2;     String meses = String.valueOf(num_meses);      Log.i("getMeses()", "He conseguido entrar!!");      return getResources().getString(getResources().getIdentifier("meses","string",getApplication().getPackageName()))             .replace("%m",meses); }   EDIT: Using this instead of null have the same result

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


Prove or find a counterexample: For all real numbers x and y it holds that x + y is irrational if, and only if, both x and y are irrational.  Can anyone give me a hint just about how to start cause i cannot come up on how and where to start.   Do I have to look for 2 irrational numbers and add then , iff, both have to be irrational and how do i come up with a counterexample or a prove? i need help

The following is a Homework Question that I've been working on and I would like some feedback on my answer: Prove or find a counterexample: For all real numbers $x$ and $y$ it holds that $x + y$ is irrational if, and only if, both $x$ and $y$ are irrational.  So I've got (or at least like to think I've got) a counter example.  Let $x = 1$ and $y = \sqrt{2}$.   Thus $x$ is rational and $y$ is irrational. Adding $x$ and $y$ gives us $1 + \sqrt{2}$ which cannot be simplified any further (right?) and is an irrational number.  Thereby proving that $x + y$ can be irrational without both x and y being irrational.   Is this okay? Any feedback is greatly appreciated thank you!


I have the following code below  Map<String, Integer> buyingItemEnumerationMap = this.toBuyItemEnumeration; for (Entry<String, Integer> item : buyingItemEnumerationMap.entrySet()) {    if(RandomEngine.boolChance(50)){ //will delete?     buyingItemEnumerationMap.remove(item.getKey());    }    if(buyingItemEnumerationMap.size() == 1){     break;    } }   now I am working with an android game and the code above is running in multithreaded way. Now I am having an exception which is java.util.ConcurrentModificationException. I already researched on how I can solve the problem but seems not to work on me.  What I am doing on the code above is to remove an entry randomly. How can I implement it there?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


From what I understand the Gamma function was created to expand the factorial to the real number line (and complex plane). So why is it that $\Gamma(x)=(x-1)!$ and is not equal to $x!$, where transitioning from discrete to continuous is much simpler?

As a physics student, I have occasionally run across the gamma function  $$\Gamma(n) \equiv \int_0^{\infty}t^{n-1}e^{-t} \textrm{d}t = (n-1)!$$  when we want to generalize the concept of a factorial.  Why not define the gamma function so that   $$\Gamma(n) = n!$$  instead?  I realize either definition is equally good, but if someone were going to ask me to choose one, I would choose the second option.  Are there some areas of mathematics where the accepted definition looks more natural?  Are there some formulas that work out more cleanly with the accepted definition?


Here is a question that combines uncertainties in measurements and significant figures.  Consider the following results to measure the value of g:  $$g={9.7,9.8,9.7,10.0,10.1,10.3}$$  Then to four decimal places $\bar{g} = 9.9333$, while the uncertainty of the mean is $$0.2422/\sqrt{6} = 0.0989$$  But clearly we would not quote these values as they stand.  So, what would be the statement of the mean value of g and its uncertainty to the correct number of significant figures? Would it be $\bar{g}=9.9 \pm 0.1$ or $\bar{g} =9.93 \pm 0.10$? The original measurements had two significant figures, but it would seem using the mean and its uncertainty would permit an additional significant figure. And what is the general rule for the significant figures for mean values and their uncertainties?

I have a number of measurements of the same quantity (in this case, the speed of sound in a material). Each of these measurements has their own uncertainty.  $$ v_{1} \pm \Delta v_{1} $$ $$ v_{2} \pm \Delta v_{2} $$ $$ v_{3} \pm \Delta v_{3} $$ $$ \vdots $$ $$ v_{N} \pm \Delta v_{N} $$  Since they're measurements of the same quantity, all the values of $v$ are roughly equal. I can, of course, calculate the mean:  $$ v = \frac{\sum_{i=1}^N v_{i}}{N}$$  What would the uncertainty in $v$ be? In the limit that all the $\Delta v_i$ are small, then $\Delta v$ should be the standard deviation of the $v_i$. If the $\Delta v_i$ are large, then $\Delta v$ should be something like $\sqrt{\frac{\sum_i \Delta v_i^2}{N}}$, right?  So what is the formula for combining these uncertainties? I don't think it's the one given in  (though I may be wrong) because it doesn't look like it behaves like I'd expect in the above limits (specifically, if the $\Delta v_i$ are zero then that formula gives $\Delta v = 0$, not the standard deviation of the $v_i$).


Hey i Created this Shader which i think really gives good results on cloth but i want to have a bit translucency in it but cant figure out the best way somethign with SSS maybe ? I dont know. You can Improve my Shader or give an even better Shader as Answer if you want.  PS: I figured out best way is with SSS just need to figure out the correct settings

I'm making an animation with a flag, and I was wondering if anyone knows how to create like a transparent fabric material?   The flag looks a bit dull, and doesn't look realistic at all. After some references I noticed that flags are a bit transparent, seeing as they are woven.  Reference :    I need to make this flag have the same type of material  If you can tell me how to make it look like fabric and not like rubber, I'd be very thankful.  P.S: If anybody knows how to make little "ripples", please comment and let me know.


I am attending college for computer programming and came across a practice question where I am keep getting a compiler error: local varialbe movieFee, snackFee and couponeFee is not initialized at line 85.   I am new to this and I feel like I have done everything right. Could someone kindly help me out?  Thank you! Joseph  Question is: Calculate the cost of going to the movie theatre.  Pick the appropriate age range – child, adult, or senior; choose a snack bar combo – none, popcorn and pop, chocolate bar and pop, or popcorn and candy and pop; indicate if the patron has a coupon which gives him $2 off the movie fee.  Patron Age Ranges       Movie Fee       Snack Bar Options       Fee child ( < 12)       $5.50       A - popcorn and pop     $7.90 adult (12 - 65)     $8.50       B - chocolate bar and pop       $6.30 senior ( > 65)      $6.00       C - popcorn and candy and pop       $8.90   My code is:  import java.util.Scanner; public class MovieFee {  public static void main(String[] args) {     //scanner class     Scanner input=new Scanner(System.in);      //display the age options and prompt the user to enter one     System.out.println("Child (<12)");     System.out.println("Adult (12-65)");     System.out.println("Senior (>65)");     System.out.print("Choose your age category: ");     String age=input.nextLine();      //display the snak bar options and prompt the user to enter one     System.out.println("\n\nA - popcorn and pop");     System.out.println("B - chocolate bar and pop");     System.out.println("C - popcorn and candy and pop");     System.out.print("What is your snack bar option(enter a letter): ");     String snackOption=input.nextLine();      //calculate the movie fee     //declare fee variables     double movieFee, snackFee;     if(age=="child"||age=="Child")     {         movieFee=5.50;     }     else if(age=="adult"||age=="Adult")     {         movieFee=8.50;     }     else if(age=="senior"||age=="Senior")     {         movieFee=6.00;     }     else     {         System.out.println("\nYou did not enter a correct age group.");         System.out.println("Please try again using one of: child, adult, senior");     }      //calculate the snack fee     if(snackOption=="A"||snackOption=="a")     {         snackFee=7.90;     }     else if(snackOption=="B"||snackOption=="b")     {         snackFee=6.30;     }     else if(snackOption=="C"||snackOption=="c")     {         snackFee=8.90;     }     else     {         System.out.println("\nYou did not enter a correct option");         System.out.println("Please try again using either A, B or C");     }      //ask the user if he/she has a coupon     double couponFee;     System.out.print("\nDo you have a coupon? Type yes or no: ");     String coupon=input.nextLine();     if(coupon=="yes")     {         couponFee=2.0;     }     else if(coupon=="no")     {         couponFee=0;     }       //calculate the total fee and total fee     double result=movieFee+snackFee+couponFee;   //**GETTING ERROR HERE     System.out.println("Final price is "+result);    } //end main } //end class

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


Let $G$ be a group. Let $x,y,z \in G$ such that $[x,y]=y$, $[y,z]=z$, $[z,x]=x$ (the commutators; $[x,y]=xyx^{-1}y^{-1}$). Prove that $x=y=z=e$. I tried to show it by proving that $zx^mz^{-1}=x^{2m}$ with induction. Therefore, if the order of $x$ is even, we can take $zx^{|x|/2}z^{-1}=x^{|x|}=e$ and thus, $x^{|x|/2}=e$ proving it. However, what if the order of $x$ is infinite (or even just odd)? I don't know what to do about that cases. Thank you very much in advance!

In Serre's book "Trees" on page 10 the following exercise is given:     Show that the group defined by the presentation    $$x_2x_1x_2^{-1}=x_1^2, \hspace{7pt} x_3x_2x_3^{-1}=x_2^2, \hspace{7pt} x_1x_3x_1^{-1}=x_3^2$$   is trivial.   Comparing to what was done before, clearly, the approach he used to prove that a smilarily defined group is infinite - will fail. My question is - how would you approach this? just sequentailly substiuting one word into another to show that, say, $x_1=1$? Is there any smarter way that just brute-forcing something that cancels out?  Thanks in advance for any help.  N.B: Being an exercise from "Trees", I would expect it to be asked here before. I did my best trying to find it - but  couldn't. So I'm sorry if it turns out to be a duplicate...


I am given that $$\vert f \vert\le A+B\vert z \vert^{3/2}$$ and I would like to show that $f$ is a linear polynomial. A generalization of Liouville's Theorem says that if $\vert f\vert\le C\vert z \vert^k$ for some positive integer $k$, then $f$ is a polynomial of degree at most $k$. Since there is a power of $3/2$, this fact doesn't immediately apply. So we can write $\vert fz^{1/2}\vert\le D\vert z^2\vert$ for $\vert z \vert>R$ for some sufficiently large $R$.  Hence $fz^{1/2}$ is a polynomial of degree at most $2$. Say, $fz^{1/2}=a+bz+cz^2$ ($c$ may be $0$). Then $f=az^{-1/2}+bz^{1/2}+cz^{3/2}$, which is not a linear polynomial for two reasons (it's not a polynomial in $z$ and it's not linear in $z$). Where am I going wrong?

The problem is as follows:     Suppose $f$ entire satisfying   $$ |f(z)| \leq A + B |z|^{3/2} $$   for some fixed $A,B > 0$. Prove that $f$ is a linear polynomial.   I know I want to reduce it to a function where I can use a Cauchy bound, but I'm not sure how.


I'm comparing two groups on the # of hospitalizations they have in a 5 year period. Length of hospitalization stay is highly variable. For example, a patient might have 3 hospitalizations that in total lasted 100 days, where as another patient might have had 50 visits, each lasting a single day. Therefore, It would seem natural to factor in length of stay (in days) into the picture.  Right now I'm thinking of a Poisson Rate Regression, with a single categorical predictor (Group) and # of hospitalizations as the DV. I'd like to include Total Length of hospitalization stays as an offset, which is in days. My question is, I have some patients who did not have any hospitalizations, therefore their length of stay is effectively 0.   In order to hit the Poisson Rate Regression model (in SAS anyway), I must log the offset term. I clearly can't take the log of 0, so I'm wondering what can I do in this situation? Can we add a constant of 1 to both Hospitalization and Total Length of Hospitalization to remedy this?  (cross posted @ Talkstats.com)

I  modeled insurance claim frequency assuming a Quasi-Poisson distribution in R. My frequency dependent variable was calculated, in advance of modeling, as the number of claims per underlying exposure. Someone  that it would be incorrect to do this, and that the correct method was to model the observed claim counts and use the underlying exposure as an offset.   Can someone explain the theoretical and practical differences between scaling and offsetting? I ran the code both ways and noticed that the deviance residuals are significantly smaller when using offsets, but otherwise there were no material differences in variable selection.   P.S. Note the similar but still different question .


An independent variable in a linear regression I am working on has positive coefficient but this variable has a negative correlation with the dependent variable. I know that this is mathematically possible given each variables' coefficient in a multiple regression is a results of complex interaction between the relationship of the variable of interest with the other independent variables as well as the dependent variable. But is there any intuitive way I can explain this phenomenon to my business stakeholders without going into the math, maybe using a real life example? Thanks

Simpson's effect is key to understanding potential pitfalls in medical research, particularly in the area of meta-analysis, where multiple studies with dissimilar methodologies are brought together to provide a more definite answer to a problem. The cases reported tend to deal with count tables and ratios that change because of a "lurking" variable or confounder that is ignored (usually different group sizes). However, it is interesting to look at the continuous case to understand it conceptually.  Unsurprisingly, there are a number of posts touching on this issue, but hopefully this Q&A-post will provide with some discussion or entry level intuition, unrelated to any more specific question. To look into the paradox different studies composing a meta-analysis are regarded as random effects in a mixed model.


If the four-vector $x^\mu$ is defined as $x^\mu\equiv(ict,{\bf x})$, instead of $x^\mu\equiv (ct,{\bf x})$, the Lorentz group will be the compact(?) ${\rm SO}(4, \mathbb{C})$ group. But the Lorentz group is regarded as the noncompact group ${\rm SO}(3,1)$. But I could never figure out what is the real problem of using $ict$ instead of $ct$? In short, what will go wrong if I choose to work with $ict$? Does it pose a problem from the point of view of representation theory? I am only interested in flat spacetime.

I read somewhere that part of Minkowski's inspiration for his formulation of Minkowski space was Poincare's observation that time could be understood as a fourth spatial dimension with an imaginary coefficient.  Clearly, taking the Euclidean norm of the vector $$(i \Delta t, \Delta x, \Delta y, \Delta z)$$ gives the correct spacetime interval (assuming appropriate units), but I don't really know where it goes from there (possibly something to do with Moebius transforms?)  I think this is mentioned in Taylor and Wheeler's book, but I may have read it elsewhere. After the historical note, the author (whoever it was) said it was "preferable" to use Minkowski geometry straight off, rather than mucking about with time as an imaginary space coordinate.  Could anyone elaborate on Poincare's formulation? Why is Minkowski's methodology better?


I'm working with moderncv and keep getting the following warnings:  C:\Users\USER\AppData\Roaming\MiKTeX\2.9\tex\latex\moderncv\moderncvheadii.sty: LaTeX Warning: You have requested package `moderncvheadii',               but the package provides `moderncvheadii'. C:\Users\USER\AppData\Roaming\MiKTeX\2.9\tex\latex\moderncv\moderncvbodyi.sty: LaTeX Warning: You have requested package `moderncvbodyi',               but the package provides `moderncvbodyi'. C:\Users\USER\AppData\Roaming\MiKTeX\2.9\tex\latex\moderncv\moderncvfooti.sty: LaTeX Warning: You have requested package `moderncvfooti',               but the package provides `moderncvfooti'. PATH_TO_MY:FILE.tex:64: LaTeX Font Warning: Font shape `U/fontawesometwo/m/sl' undefined(Font)              using `U/fontawesometwo/m/n' instead on input line 64. PATH_TO_MY:FILE.tex: LaTeX Font Warning: Some font shapes were not available, defaults substituted.   There was a lot more of such stuff before I did what dmtree explains . Do you know how I can get rid of the last five warnings? I'm using Windows 10 with MikTex.

I know what this message means in general ("do not add path names in package names"), and my question is not a duplicate of , where the two names differ (by the path name). In my case the package names are really identical (without path name in both cases)!  I'm working on MiKTeX 2.9, with latest updates (I refreshed FNDB). I get this with the latest moderncv package (version 2.0), MWE:  \documentclass{moderncv} \moderncvtheme{classic} \name{Foo}{Bar} \begin{document} \end{document}   where I get  You have requested package `moderncvheadi', but the package provides `moderncvheadi'. You have requested package `moderncvbodyi', but the package provides `moderncvbodyi'.   What does trigger this warning in this case and how can I solve it? Is it a bug in moderncv? The official source on  looks fine to me.


I've seen variations of this idea... in HTML, the <hr /> tag creates a horizontal line that can be used as a spacing tool to separate headings, blocks of content, etc... I'd like to create such a line using Photoshop and have it look like this...   Click image for full resolution  How would I do this in Photoshop? Are there tutorials dedicated to this?

How to create the shadow effect like the URL/image below? Specifically, the rounded/curved shadow at the bottom:


Bit of a newbie question. I have read somewhere (can't seem to find it now) that if you wish to write Mr. John Doe or Dr. Jane Doe that LaTeX with treat the . as a full stop and add an extra space.  Is there a simple way of writing Dr./Mr.etc in LaTeX so an additional space is not added.

Does latex do anything special with periods?  If so, is there a way to differentiate end-of-sentence periods from periods indicating abbreviation?


There exists a well-ordered set $A$ having a largest element $\Omega$ such that the section $S_\Omega$ of $A$  by $\Omega$ is uncountable but every other section is countable.  Can anyone make me understand this theorem?  I can not understand what Mukres has tried to say  in his Topology's Book.. I can  not visualize what Mukresh has said in the proof.  I can not understand why we always get an element $\Omega$ such that the section less than $\Omega$ is countable. What ensures the availability of $\Omega$ in a uncountable well ordered set?  Can anyone make me understand with proper example?  Thank you in Advance.

Math people:  The title is the question. I am convinced that uncountable sets exist, thanks to Cantor's diagonal proof.  It is not intuitively clear to me that uncountable ordinals or cardinals should exist.  What axioms of set theory are needed to accept their existence?  I think I have read here that the Axiom of Choice is not necessary.  I am reluctant to accept as "true" any theorems that rely on the Axiom of Choice.  EDIT: This question may be a duplicate: I just found  .  I apologize if this is so.


Is there any way to programatically find the port that was assigned to the client when the client calls a connect() function.  getsockname is implemented in the server. But what should be used in client ?

I create a TCP socket without bothering about the port number to bind to [socket.sin_port = 0]. However later on if I want to print the port number of client how do I do that? The client C application (on Linux) creates many clients which get connected to server. To debug issues I capture the traffic on ethereal. I thought of printing the port number in logs while issue arises so that filtering on ethereal becomes easy.    Any help would be appreciated.  -Prabhu


We have a few dedicated servers and we want to move these to a fully managed environment.    We are probably looking at using some sort of Linux/Apache/mysql/tomcat/php stack on the server.  Those are the main requirements.  With about 10-20k hits a day.  (there are several servers in the same situation).  So basically we want our own server, want to be able to be able to load software (very industry standard stuff not whatever) if needed via raising a ticket or using a control panel.  We want to be able to create new database users, database tables, update htaccess on server and folders and all of the normal stuff that you might get in a $20 a month service.    Only difference is we will pay more for dedicated server, for more memory (32GB), and for support.    My question is what should I be looking for in a hosting company that will manage a dedicated server, but also allow some sort of ability for us to manage the individual sites and add new sites.  Is there industry standard terminology or do I need to be specific (I will before signing anything) when looking?

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


This might look wrong, but I know that using ./ you are basically "BASH"ing your scripts in Linux/Unix environment. For Windows users, this is same as running an .exe file from command prompt. However, I don't understand why use ./  Is it because ./ means "RUN" in short or does "./" have a specific meaning in UNIX like environment?  P.S. I know that cygwin allows you to execute batch files using ./ prefix.

What does "/" , "./", "../" represent while giving path?


Including with respect to a tiebreak game.

This  says:      A player has to win six games, and at least two more than the foe, to claim a tennis match. Players switch sides after every odd game, as in the first, third and fifth games, and so on. Players also switch sides at the end of a set if they're playing an odd number of games.   So, you start, 1-0, and change sides. If the game ends 6-0, 6-2 or 6-4 (or an even number of games), you play the first game of the new set, change sides, and you are back to the previous rule.  But what if a player wins 6-1 or 6-3? You win the set, then change sides. Now, you play a new set, do you change again at 1-0 (therefore after having played just one game), or wait until the 1-1 or 2-0, therefore now changing after an even number of games in the second set?


Is it advisable to use RFE for linear or logistic regression when we have some dummy features. Reason I am asking this is: in RFE we will eliminate some features which will also include dummy features and as per this  for a categorical variable which is dummy encoded we should not keep some features & drop others, we should keep all dummy features of a categorical feature.   Reasoning given is :  "You should leave all five indicator variables in. Dropping predictors because they are non-significant leads to biased estimates for regression coefficients and inflated p-values."  "The problem with dropping the indicator is that you'll change the p-values of the remaining levels as well, as you're shifting the intercept (aka the reference group.)"  If ideal thing to do is keeping all levels/dummy features of a categorical variable then how do you use RFE for dummy features or how do you eliminate unimportant dummy or categorical features?

When using RFE in linear regression and logistic regression, do we one-hot encode the features (K levels and K dummy features) or dummy-encode the features (K levels and K-1 dummy features leaving one out).   As per a comment by @Matthew Drury in an answer (URL below), one hot encoding is applied for a regularized linear model and for unregularized linear model dummy encoding. My doubt is what type of encoding when using RFE without any L1/L2 penalties.    My understanding is since in RFE some features gets eliminated so if for a categorical variable with say 4 levels we do dummy encoding and have 3 features/levels in model & RFE eliminated 1, we will only have 2 features/levels left and the interpretation of its coefficient would not make sense in absence of the one level which was left out as reference.  Whereas if we have done one-hot encoding and RFE considers 2 features as important and eliminates other 2 then we can very well judge/interpret the coefficients or importance of 2 features RFE keeps.  So question which type of encoding is needed to be done when using RFE with linear and logistic regression?


I’m not familiar with canon work outside the main seven books.  We know at least the prime minister of the UK is aware of the wizarding world as, if I recall correctly, he’s notified when Voldemort comes back.  Given the UK situation during WWII and specifically the London bombardment, I was wondering if there’s any canon story, comment or similar clarifying whether any wizard would have participated in such conflicts (I’m quoting WWII as probably the most significant but WWI or any other military conflict works as an answer).

This came up to me while I was reading the question about Magical being using firearms in battle to raise their power (which I think I have a good answer for, but it's too long to fit in this question... and it would also be inappropriate).  Anyways, I was reading it and then the following thought came into my mind: If wizards decided to use guns on their battles (the ones agains Voldemort for instance), that would create that opening for much bigger battles than we see in the books (after all even a muggle can fire a gun, so lots of guns + the Imperio curse, and presto manifesto (is that racist? talking about wizards and all) you have yourself an army). Those kinds of battles, however, would most definitely not go unnoticed by the muggles - even though they wouldn't be able to link it to magic.  Well, that thought brought up my one and final question, which I bring forth to you guys. Is there any mention on how the Wizards and Witches viewed the two world wars (which had taken part by the time Harry got to Hogwarts, and which he had probably heard about in muggle school), and what was the Wizards' part in it? What about the cold war? Did the magical world even recognise the existence of weapons such as nukes, which could render all life on earth extinct?  EDIT  DVK has brought up an  regarding the connections between the Second World War and the wizarding world (more specifically, the wizard Grindelwald). Although it doesn't fully answer my question, it does help by showing that there was indeed some form of connection between the two world at the time.


I've heard that aperture can change the exposure, but I would like to know if this is true, and how it does it.  P.S. I hope this question isn't dumb like my last two.

How does aperture affect my photographs?  Why should I care about the aperture with which a photo was taken?


This question had already been asked here by someone else few years ago but I could not see any satisfactory answer so I am asking it again.  All I can see relevant in that post was the image attached here. Now I want to know how the circuit with diode are working. I am attaching the link of that thread so you can reach there and see the answer given there.

Why cant we replace diode connected BJTs by simple diodes in a current mirror circuit?


(FYI, here are the guidelines on dups:  ) I know that this question has many duplicate versions. That in and of itself should be a reason to pay attention to it. My question is: Why is it NOT possible to follow somone on SE network sites when it is a win for the user, a win for the network, and a win for the advertisers? Pseudo-dup Questions: Q: Why is there no easy way to follow someone on Stack? A: "Stack is not a social networking site!" Yes. It is. We are here asking our peers for advice. GitHub isn't a social networking site either. I can follow people on there. I can look for a job on here. How much more of a 'Social Network' do you need when you can potentially gain a livelihood through peer contact? A: "There is an obscure RSS link!" Yes. There is. But I'm only on this site during Pomodoro breaks and on my iPhone app in the Uber on my way home. I just want a quick way to see what random bits of knowledge I can pick up from other users who I've seen give, or have had give, quality answers that have helped me. With the new ad revenue they plan to draw in, keeping people on the site longer by letting them be lured in to browsing other's posts seems a sure-fire way to increase revenue. Plus, as it's been mentioned dozens of times with THOUSANDS of combined views across those mentions, it's obviously something users are interested in. Heck, I've been learning a lot lately and I'm sure I could ask Stack for advice along the way: if you guys want, I could probably implement this for you. You can find my developer profile by following me on StackOverflow.....

I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like.


A writer for one of the company websites is fond of randomly capitalising words in their content, which they say is for emphasis.  I have never seen this before and I don't like it. My gut tells me that anybody reading their content is going to be tripped up by finding capital letters where they don't expect them (like I was).   I am looking for supporting evidence for this please? I don't want to shut them down just because I think it looks silly. I want to back it up with evidence.  Examples:     At Company Name We make sure that your International transition is seamless         Get your free quote Now!

I've noticed that many sites and user interfaces tend to capitalize certain words or sentences like so:  Choose File  Select a File to Upload  Account Settings  How to Format   but in some other cases, they don't:  Please select a file to upload to our system  Browse the complete list of questions, or popular tags.   Help us answer unanswered questions.   And sometimes, particularly in list items, all in lowercase.  Are these good practices? What's a reasonable rule to decide when to capitalize or not, or even when to write all in lowercase?


I have an interest in quantum mechanics rather than classical mechanics , so should I read Feynman Lectures with those red cover and is it correct or would you suggest some other book for start . And I like to study by making my own notes and my own thoughts , so pls I know you're not a psychiatrist , but pls suggest. PS : I am a beginner in quantum world

I'm an aspiring physicist who wants to self study some Quantum Physics. My thirst for knowledge is unquenchable and I can not wait 2 more years until I get my first quantum physics class in university, so I want to start with a self study. I am enrolled in a grammar school and the most gifted among the gifted (not my description, mind you, I hate coming off as cocky, sorry) are enrolled in a special 'project'. We are allowed to take 3 school hours a week off in order to work on a project, which can be about anything you want, from music to mathematics. On the 4th of April we have to present our projects. Last year an acquaintance of mine did it about university level mathematics, so I thought, why not do it about university level physics? It is now the 3rd of October so I have half a year. My question is, where can I conduct a self study of quantum physics? Starting from scratch? And is it possible for me to be able to use and understand the Schrödinger equation by April? What are good books, sites, etc. that can help me? My goal is to have a working knowledge of BASIC quantum physics and I would like to understand and be able to use the Schrödinger equation. Is this possible? What is needed for these goals?


What is the best free automation tool for Windows application using object ID's. So NOT with keystrokes and x,y coordinates.

I need a list of some good tools which are open source and meant for automating the UI testing of Windows GUI. Any help will certainly be appreciated.


Probably a complete newbie question. When writing with LaTeX I have no problem with my bibliography but of course it only compiles entries that I have cited in my document. I would have all my readings in the .bib file even if they have not being cited yet.  I am wondering if there is a way to produce with LaTeX just the contents of the .bib file?  PS. Not sure what extra info I may need to give. Don't think I can give a MWE as don't know how to recreate issue. I use TeXstudio on Ubuntu 14.04 and use the following as my bibliography settings.  \usepackage[notes, backend=biber, bookpages=false]{biblatex-chicago}   If any other info is needed please leave a comment.

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


After adding a new ppa to the repository, is it necessary to update the whole database? By "whole database" I mean is it necessary to update index's of each and every packege?  If it's not necessary, then how can I update only that specific package whose ppa I have just added into the repository.  For example,  if I add an ppa by typing the following in terminal,  sudo add-apt-repository ppa:tiheum/equinox   then we normally run the following command after it,  sudo apt-get update   But how can I update the only package which is associated with the above ppa, instead of updating the whole database.

When I add a PPA and I want to install some of its content, it is quite annoying to re-update all my apt list using apt-get update.  Is it instead possible to only sync the content of a given repository?


I'm trying to understand some sequence of bash scripts, and on one of the steps there is a condition: if [ "x/usr/bin" != "x" ]; then <do some actions>  What do the following mean?  x in x/usr/bin x in the right hand side of the testing equation?

Playing around in my system, I stumbled upon  ~$ echo $XDG_DATA_DIRS /usr/share/ubuntustudio:/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/usr/share   Asking myself why /usr/share is twice in the path I found out that the following snippet in /etc/alternatinves/x-session-manager which is a link to /usr/bin/startxfce4 is responsible:    #!/bin/sh . . . if test "x$XDG_DATA_DIRS" = "x" then   if test "x/usr/share" = "x/usr/local/share" -o "x/usr/share" = "x/usr/share"; then     XDG_DATA_DIRS="/usr/local/share:/usr/share"   else     XDG_DATA_DIRS="/usr/share:/usr/local/share:/usr/share"   fi else   XDG_DATA_DIRS="$XDG_DATA_DIRS:/usr/share" fi export XDG_DATA_DIRS . . .   When I look at the line  if test "x/usr/share" = "x/usr/local/share" -o "x/usr/share" = "x/usr/share"; then   I have difficulties to understand this if-statement, for me it looks like a comparison of strings where the first one is always false and the second one is always true.  Combined with a logical or the test always evaluates to true, so I could shorten the line to  if true; then or I could say I don't need an if-statement at all.  Where is my mistake? Or is it written like this to confuse beginners like me?


I have heard Frank Close say that the reason you can't put your hand through a solid object is the Pauli exclusion principle. However Richard Feynman in his "Fun to Imagine" series attributes it to electrostatic forces.  I have two questions: Firstly, who is correct here (or maybe both)? Secondly, on a classical scale can the Pauli exclusion principle be interpreted as a force? The reason you can't put your hand through a solid object is because of a normal reaction force. So if the PEP is responsible for this it must be creating a force. I have sometimes seen the singularity at 0 in the Lennard-Jones potential interpreted as due to the PEP.  EDIT: I understand that the PEP is not a "fundamental force" carried by force-carrying particles. But it seems to clearly manifest as a force on a classical scale.

There is this famous example about the order difference between gravitational force and EM force. All the gravitational force of Earth is just countered by the electromagnetic force between the electrons on the surface of my feet and the ground.  But also wave-function of electrons(fermions) do not overlap each other due to Pauli exclusion principle.  So which one is the true reason of me not flopping inside the earth forever? Is it only one of them(my guess is Pauli exclusion) or is it both?


We are travelling to Dusseldorf next April have booked tickets from Singapore Flight LH791 to Dusseldorf which takes us through Munich. The flight has just been updated - arriving now Munich at 05:50am and the flight to Dusseldorf is LH2002 at 06:30am to Dusseldorf? Do we have time to transfer the agent suggest okay?

I bought a single ticket from Lufthansa, of Mumbai to Paris. My first flight (LH765) lands at 5:55am at Munich, from where I have another Lufthansa flight (LH2226) to Paris at 6:40am. This is a single ticket so I guess its responsibility of the airline to get me on the second flight, but since it's Non-Schengen to Schengen, will customs etc. be a problem? I am assuming the checked-in luggage would transferred automatically by the airline. Will I be able to make it?


It is a rather common practice that teachers prepare multiple  versions of a test for the same exam in order to reduce cheating. Can \LaTeX do this? I want to design a math test with a set of parameters that are randomly chosen from a given set to create problems that have same wording but different numbers (something that online homework systems do).   Is such a thing possible with any latex package? Is it possible at all?   A basic example is:  Produce 10 pages, each a with a copy of the following question  What is the sum $p+q$?   Where the program chooses and inserts $p$ randomly from the range 20 to 30 and $q$ from 50 to 60.

I want to create a math problem-solution sheet. The coefficients a, b, c must be assigned on the fly at random so the generated pdf will show a numeric quadratic equation rather than a symbolic quadratic equation. Note a must not be zero.  \documentclass{article} \begin{document} \section{Problem} Let \(x_1\) and \(x_2\) be the roots of \(a x^2 +bx +c=0\). Find  \(x_1x_2\).  \section{Solution} \[ x_1x_2=\frac{c}{a} \] \end{document}   Please kindly make the solution get automatically simplified. For example: \frac{c}{a}=3 when a=2 and c=6.    Actually the real case is more complex than this one. Not only the equations must be generated at random, but also the associated graphic plots that I write in PSTricks.     I chose Paulo's answer because using Maxima as the computation engine is very very great idea. Other answers are also good and creative, especially Altermundus'.


We, know every splitting field a finite algebraic extension. So, therefore every splitting field over the field with characteristics $0$ is a simple extension. But, here I choose the irreducible polynomial $x^{3}-2 $ in $\mathbb{Q}[x]$. Then , the splitting field of $x^{3}-2$ over $\mathbb{Q}$ is $\mathbb{Q}[\sqrt[3]{2},\sqrt{-3}]$ , But , now how could this extension $\mathbb{Q}[\sqrt[3]{2},\sqrt{-3}]$ generated only by one element? Also, how to show that Every finite extension of the field with characteristics $0$ is simple extension ?

Is there any elegant way to show that $\mathbb Q(\sqrt[3]{2}, w)=\mathbb Q(\sqrt[3]{2}+w)$, where $w=e^{i\frac{2\pi}{3}}$.  I was thinking to show that $ 9+9 x+3 x^3+6 x^4+3 x^5+x^6$ is the minimal polynomial of $\sqrt[3]{2}+w$, but checking irreducibility seems a bit tedious.


When opening system settings on a clean installation of Ubuntu 18.04 I get logged out. It happens if I open it from the launcher, from the menu or from the terminal with gnome-control-center (even with sudo). This is funny as I installed 18.04 on two "identical" machines, and one has the issue while the other one does not... any idea what might be going wrong here? Thanks!

I've recently installed Ubuntu 18.04 in a dual-boot configuration with Windows 10. I noticed today that, when trying to open system settings, Ubuntu seems to log me out to the lock screen. When I log back in, all previously-running applications are now closed. Very unsure what to do from here, any help much appreciated.


I have a Python list with a variable number of elements.  [a,b,c,d,e]   I need to rearrange these elements inside the list and find all possible unique combinations.  [a,b,c,d,e] [d,b,a,e,c] [e,d,a,c,b], etc.   I cannot have same elements repeated, or have any elements removed:  [a,a,a,d,e]  <-- bad

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


@user-123:~$ Downloads/execfile-3.4/execfile @user-123:~$  @user-123:~$ cd Downloads/execfileparentdir-3.4/ @user-123:~/Downloads/execfileparentdir-3.4$ execfile execfile: command not found @user-123:~/Downloads/execfileparentdir-3.4$ ./execfile @user-123:~/Downloads/execfileparentdir-3.4$    What's exactly the reason of using ./ behind execfile?   Note that I'm not asking about the functionality of ./. In other words, I wanted to know why in order to run an executable file from terminal it requires the address from current directory to the given file? Why when we are in current directory like the way that the terminal behaves in other cases behave and just recognize the file name automatically so that we run it by just typing the file name instead of putting and ./ behind it?  Edit:  One reason might be the security and preventing the user to accidentally execute another (probably malicious) file. That however is a very credible reason to do so but aren't they sacrificing the consistency of a rule for the sake it? And aren't other ways to handle this problem and not make an exception in a unified rule (the prediction of the file names in current dir)? This may sound like a trivial exchange but I want to be sure if it's the tiniest one.

Why do we use ./filename to execute a file in linux?  Why not just enter it like other commands gcc, ls etc...


What is the difference between the two? Don't both of these have the same functionality? I don't understand the whole point of the object parameter.  class Car(object): # object parameter     def foobar():         print("Hello World!\n")     vs.  class Car(): # No parameter     def foobar():         print("Hello World!\n")

What is the difference between old style and new style classes in Python?  When should I use one or the other?


I'm writing my thesis. I have several captions of tables like this:   \caption{Composição química média de folhosas, em percentagem ponderal (base seca) \citep{ferreira}.}   I use citep in caption. But I dont want this in my list of tables. It it possible ?

I have list of figures page. Some of these figures' captions have citation. How can I remove the citation from the list of figures page and keep the citation on the normal pages ? Regards  ::::::::::::::::::::::::: Addendum I am using the following command :   \newcommand{\munepsfig}[3][scale=1.0]{%     \begin{figure}[!htbp]         \centering         \vspace{2mm}         \includegraphics[#1]{figures/#2.eps}         \caption{#3}         \label{fig:#2}     \end{figure} }   Sample Usage:  \munepsfig[scale=0.5,angle=90]{barchart}{Population over time}


I've added the (f)cronjob  */1 * * * * DISPLAY=:0 notify-send testing   to display a notification every minute, but it doesn't work; why not? (Using i3.)

I am using Arch Linux with KDE/Awesome WM. I am trying to get  notify-send to work with cron.   I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without result.  I am able to call notify-send interactively from the session and get notifications.  FWIW, the cron job is running fine which I verified by echoing stuff to a temporary file. It is just the "notify-send" that fails to work.  Code:  [matrix@morpheus ~]$ crontab -l * * * * *  /home/matrix/scripts/notify.sh  [matrix@morpheus ~]$ cat /home/matrix/scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority echo "testing cron" >/tmp/crontest sudo -u matrix /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest  [matrix@morpheus ~]$ cat /tmp/crontest testing cron now tested notify-send  [matrix@morpheus ~]$    As you can see the echo before & after notify-send worked. Also I have tried setting DISPLAY=:0.0   UPDATE: I searched a bit more and  needs to be set. And after hardcoding this using the value I got from my interactive session, the tiny little "hello" message started popping up on the screen every minute!   But the catch is this variable is not permanent per that post, so I'll have try the the named pipe solution suggested there.   [matrix@morpheus ~]$ cat scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BouFPQKgqg,guid=64b483d7678f2196e780849752e67d3c echo "testing cron" >/tmp/crontest /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest   Since cron doesn't seem to support notify-send (at least not directly) is there some other notification system that is more cron friendly that I can use?


I was trying to shrink one drive (in order to add the space to another one), using Computer Management -> Disk Management. However, it told me that the space for shrinking is 0.  How can that be? The disk is only around half full. What might be the cause of that?

I have just bought an HP laptop with Windows 7 (64 bit). It has a 500 GB HDD with three partitions: a small hidden system partition, a 12 GiB HP recovery partition, and a 450 GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100 GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20 GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows 7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows 7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions.


I noticed that some float variables are being shown wrong in Visual Studio 2017 debugger, although the internal value is right, that is, it is only wrong in the debug view.  For example:  obj_carro.vel1000rpm.push_back(stof(parte[2].substr(0, pos)));  cout << stof(parte[2].substr(0, pos)) << endl; cout << obj_carro.vel1000rpm[obj_carro.vel1000rpm.size() - 1]  << endl;   It shows the correct value:  9.9 9.9   But VS 2017 debugger shows:  9.89999962  float   What is wrong? How to solve this?  Update: the cout output rounds to 6 decimal places after the point. This should be an answer, but the question is on hold...

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


A box contains $200$ balls and $10$ of them are red. I need to pick up $20$ balls. What is the probability that $4$ of them are red?

Suppose there are $m$ red balls and $n$ blue balls in an urn. We randomly choose $p:m<p<n$ balls uniformly from the urn. What is the probability that exactly $q$ red balls are chosen?  Note:- Normally the answer would be $\frac{{m}\choose{q}}{{m+n}\choose{q}}$. However, since the number of balls that are chosen are provided, it is confusing me out. Any hints for the answer will also be appreciated.


How could I use scalebox to rescale a table such that it fits exactly in the usable page width (i.e., between the margins)? Is there some way in which something such as \hsize could be used as an argument for \scalebox?

I have a table that is just a little too wide for a 3.33" column. Is there a way to simply shrink the table a little to make it fit? I'm OK if the 10pt font becomes 9pt-something. Here is an example.  \begin{table} \centering \begin{tabular}{r|lll} \multicolumn{1}{r}{} & \multicolumn{1}{l}{Heading 1} & \multicolumn{1}{l}{Heading 2} & \multicolumn{1}{l}{Heading 3} \\ \cline{2-4} Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\ Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3 \end{tabular} \end{table}


claims that URLs can contain spaces:   Is this true? How can a URL contain an un-encoded space?  I'm under the impression the  uses a space as a delimiter, being formatted as {the method}{space}{the path}{space}{the protocol}:  GET /index.html http/1.1   Therefore how can a URL contain a space? If it can, where did the practice of replacing spaces with + come from?

Is a URI (specifically an HTTP URL) allowed to contain one or more space characters? If a URL must be encoded, is + just a commonly followed convention, or a legitimate alternative?    In particular, can someone point to an RFC that indicates that a URL with a space must be encoded?  Motivation for question: While beta-testing a web site, I noted that some URLs were constructed with spaces in them. Firefox seemed to do the right thing, which surprised me! But I wanted to be able to point the developers to an RFC so that they would feel the need to fix those URLs.


I can't install it. Qhen I am installing build-essential_11.4build1_amd64.deb getting error of wrong architecture still I am using amd turion 64 and then i am trying to install build-essential_11.4build1_i386.deb getting error of Dependency is not satisfiable:g++(>=4:4.3.1)   I don't have an internet connection in ubuntu that's why I have downloaded from windows so what to do now?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


how can someone set permissions on a folder so that they themselves, but noone else, can delete folders or files within that folder on a shared network drive? this is a windows 7 question.

Is there a way I can set create file/folder permissions for a user in Windows 7 without giving delete permission for a folder?  I don't want the user to delete any files in that folder, but he should be able to make new files,rename them, and copy new files to that folder. Is this possible in Windows?


Under Wild Shape it says "assume the shape of a beast" you have seen before. Does this mean they can only transform into creatures that have the beast type, such as bear, wolf, crocodile, etc.? Or can they turn into things with other types, like dragon, monstrosity, humanoid, fiend, etc.?

Starting at 2nd level, you can use your action to magically assume the   shape of a beast that you have seen before.   This doesn't say anything about the gender or age of the beast, so can a druid change into a female bear if he has only seen male bears? Can he change into a bear cub if he has only seen adult bears? What about hens/roosters/chickens, which look quite a bit different? Or does the gender of the animal shape just match the gender of druid?


I'm planning to take a trip from Los Angeles to Houston, and found the ticket price is too high. However, I found a flight Los Angeles to Dallas/Fort Worth with a stop in Houston (LAX-IAH-DFW) that is more than $200 bucks less than the non-stop flight. Since I won't have any checked bags, can I just skip the IAH-DFW segment? What kind of problems could I run into if I do so (like being placed on the blacklist, shutting down my frequent traveler program, being charged for price difference, fine, etc.)? It's United I'm planning to take.

Say I want to book a flight from Fort Lauderdale to Chicago.  Say the airline also flies to St. Louis from Fort Launderdale but has a connecting flight through Chicago.  If I book that flights from FLL->ORD->STL and just get off in Chicago, what possible problems can I run into, assuming I didn't check any bags and only have carry on?  This scenario exist for Southwest, but I wanted this be more of a general question that would apply to all airlines.


The graphics card (Intel Iris graphics 6100) sends 16:9 video to the TV. 1-2 cm of its borders are cropped. How can I correct this?

I've connected a HDTV with HDMI on my Radeon 4670, using the open source ati driver. However there is "overscan" which cuts off a bit of each edge of the screen, about the size of the gnome-panel. How can I fix this so it displays the full resolution?


I am new to Ubuntu.   I wrote a script to add a dir to the PATH environment. When I run the script it runs fine and the dir is added to the PATH. But it seems that the change only lasts until the script exits instead of lasting for the length of the session. When I look at the PATH after the script is ran the dir is no longer there. Any suggestions?

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


It is stated that the Earth is a 'squashed sphere' due to the very slight bulge at the equator. (Thought in reality it's such a small difference, it's essentially spherical)  Typical values:  Equatorial Diameter: 12,756 km Meridional Diameter: 12,714 km  I'm looking at why the Earth has this tiny bulge.   Some sources I read talk about the tidal effect from the moon. But others talk about the Earth spinning causing this.   The books I have (and videos I've watched) just talk about this things separately and don't really explain the difference  Surely the bulge due to a mixture of both? which one has a greater effect? Does the rotational bulge not effect the oceans or something? Does the tidal bulge only effect the water? I'm really confused

The question I am working on is, "Consider the following. (a) Find the angular speed of Earth's rotation about its axis. rad/s (b) How does this rotation affect the shape of Earth?"  I am fully capable of solving part (a); however, I am not sure how to describe the effect earth's rotation on its shape. I tried to search my textbook for the answer, but could not find anything. Is there an actual effect on the shape?


I have created some blocks of a specific type, in Drupal 8, and I want to import them into the cloned instance.  There is no core import feature available. How can I achieve the task?  They don't get imported by the configuration synchronization; if you try, you will get the error     This block is broken or missing. You may be missing content or you might need to enable the original module.   and no listing in custom block library.

I have two identical sites on Drupal 8 (A and B), on (A) I created a custom block(block/add), and then I export the configuration(drush config-export) and import this config on (B) (drush config-import), no error, but on the site (B) the block that I imported said on any region that I put "This block is broken or missing. You may be missing content or you might need to enable the original module." And I cant edit the content of this block. How I can fix that?  Site A:    Site B:


When a polygon intersects more than one pixel, and each pixel within the polygon occupies a different area, does the mean take into account the area of each pixel and its correspondent value (i.e. weighted average)?  When I used Zonal statistics to determine the sum of precipitation in each sub-basin, the sum of precipitation for those sub-basins smaller than a pixel was lower than the value of each pixel that intersected the polygon (e.g. the sum of precipitation for the polygon was 50 while the value of precipitation of the pixels that intersected it was 300 and 150).   Does it consider the area of the pixel in the polygon to calculate the sum? (i.e. if only half of the pixel intersects the polygon, only half of its value is summed?)

There are a couple Stackexchange posts asking this question, but neither of them were sufficiently answered:       I am writing Python scripts that perform essentially the same operations as Zonal Stats, and I have been using Zonal Stats to check my scripts' outputs.   I have noticed that when there are many cells in the polygon being queried, my results match perfectly, but there are discrepancies when there are only a few raster cells in the polygon. The following is an example of this. I am computing "count" for each polygon.  Exhibit 1:   The returned count is 0.45, which looks roughly correct if pixels can be treated fractionally rather than simply in/out.  Exhibit 2:   Similar result; count is 0.39.  Exhibit 3:    With a larger poylgon, now we see the count is exactly 2. Note that there are exactly 2 pixel centers contained in the polygon.  Exhibit 4:    Here, only one pixel center is within the polygon. The count is 1.008, though. If you exclude the polygon area from the pixel whose center is in the polygon, the remaining area is obviously greater than 0.008 of a pixel.   From these exhibits, it seems that Zonal Statistics treats these cases specially. It looks like to me that if there are less than 2 pixel centers within the polygon, it performs some kind of averaging such as polygon_area/raster_cell_area to return the count. I should note that I have 48 of these polygons, and all returned counts greater than or equal to 2 are integers; fractional counts are only returned for <2.  How are these fractional-pixel counts incorporated into the other statistics output by Zonal Stats?    indicates strange behavior with max/min when using large raster cells, and my own testing returns mean values not congruous with simple "pixel center in/out of the polygon." To reiterate, I get exact agreement when the underlying raster contains many pixels within the polygon. I couldn't find any documentation about this, and it may be important when people have never had problems with Zonal Stats but use a coarse raster and remain unaware that there is a different behavior when there are only a few pixels within the polygon.


Prove that  $|e^z - 1| \le e^{|z|} - 1$ for all complex number $z$  How to prove this? I have tried a lot, like z=x+yi. But it doesn't give a way to correctly solve this problem

I am trying to prove this inequality  $$|e^z-1|\leq e^{|z|}-1\leq |z|e^{|z|}$$  I've tried calculating the difference in their power series   $$\sum_{k=0}^\infty\frac{|z|^k}{k!}-1-\left|\,\sum_{k=0}^\infty\frac{z^k}{k!}-1\,\right|$$   but did not get anywhere.


I want to connect some of the spheres below with pipes/lines. These spheres should move around a center with varying distance. How can i add bones to them and the pipes so that:  the spheres can be controlled by the bones the pipes stretch according to distance the spheres keep their form the start/end of the pipes stay in the center of the spheres

I am trying to animate a swimming robot. It looks like this I can easily calculate the centers of the spheres during one swimming strokes and set the keyframes accordingly. Now, is there a way to "stick" the jacks to its two corresponding spheres such that it deforms during the animation? The idea is that the spheres always stay connected. In reality, the arms would elongate and retract. More precisely, the spheres move along the axis defined by the jack around some initial length, while the whole structure translates and rotates.


I'm stuct at if with string, error calls like this:     Unreachable statement, comaparing strings with == or !=   Tried equals also, but calls same error here, any help please?  public boolean register(int hwork, String album) {     hwork=6;     album="116614";     throw new UnsupportedOperationException();     if(album=="166614")         return true;     else         return false; }

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


I have a global dataset of ecoregion boundaires. There are ~809 unique polygons in this dataset. I've imported it into PostGIS with SRS of 4326 and built a spatial index using the function below  CREATE INDEX ecoregionsindex ON ecoregions USING gist(geom);   Querying with a point takes ~150ms to run  SELECT id FROM "ecoregions" WHERE ST_Within (ST_PointFromText('POINT(-111 45)', 4326), geom);   Buffering ~20,000m around this point using the ST_DWithin() method takes about 15,000ms to run.   SELECT id FROM "ecoregions" WHERE ST_DWithin(ecoregions.geom, ST_MakePoint(-111,45)::geography,  20000);   Is there a way to optimize my data or the query above to run more quickly?

I'm building an application that is supposed to query and return every Record in a table that is X kilometers away from PointX. Records and PointX's positions are determined from (long/lat) information provided by Google Geocode API. I'm new to PostGIS. After a quick research, I've found . The answer seems to be along the lines of: SELECT * FROM your_table WHERE ST_Distance_Sphere(the_geom, ST_MakePoint(your_lon,your_lat)) <= radius_mi * 1609.34  The problem is that even though I'm only getting started at GIS, when I look at the above query, I can't possibly imagine how this can use an index. There are 2 function calls. I imagine the table being scanned for every Record. Does PostGIS have any index type capable of making the above query performant and, if not, what would be the recommended approach doing what I need?


Let $\mathcal{C}$ be a category, and suppose for all objects $X, Y$ of $\mathcal{C}$, Mor$_{\mathcal{C}}(X,Y)$ is equipped with the structure of an Abelian group, such that the composition of morphisms is bilinear.   Now it can easily be shown that Mor$_{\mathcal{C}}(X,X) =:$ End$_{\mathcal{C}}(X)$ is a ring (under composition as multiplication). (In the absence of any knowledge about the Abelian group structure, distributivity still arises from bilinearity in this case.)  Now let $(S, i, j)$ be a coproduct (or sum) of objects $X$ and $Y$.  It can then be shown (ask me for the proof), that there exist unique morphisms $p : S \rightarrow X$ and $q : S \rightarrow Y$ such that $p \circ i = \text{id}_X, p \circ j = 0_{YX}, q \circ i = 0_{XY}$ and $q \circ j = \text{id}_Y$.  To demonstrate: $i \circ p + j \circ q = \text{id}_S$  The first thing to observe is that by bilinearity,  $$(i \circ p + j \circ q) \circ i = i \circ \text{id}_X + j \circ 0 = i$$ and $$(i \circ p + j \circ q) \circ j = i \circ 0 + j \circ \text{id}_Y  = j $$  What we need however, is that $(i \circ p + j \circ q) \circ f = f$ for all morphisms $A \xrightarrow{f} S$. If somehow $i$ and $j$ would generate any such morphism, we would be done (as $(i \circ p + j \circ q) \circ (i+j) = i+ j $), but I wouldn't know what 'generate' would mean in this context.  The last step would be to show that for all morphisms $S \xrightarrow{g} B$, $g \circ (i \circ p + j \circ q) = g$, but I suppose this will be similar to the first problem.   I'm afraid there is so much to unpack in the suggested other proof (what are preadditive categories, wedges, mediators, what is monic, jointly monic, etc.?) that I don't see how this is relevant to this (very elementary) exercise in my first introduction to category theory. You need to be a lot further along in the subject to understand all that, and my question is still very much worthwile for those who don't know all that jargon.

$\renewcommand{\phi}{\varphi}$ $\require{AMScd}$ My question is different from .  I want to see how in a preadditive category $\mathcal{C}$ a product is a coproduct, following . I'll write the proof up to the point where I get stuck.  Let $A=A_1,B=A_2$ be objects and suppose their product $P$ does exist, with projections $\pi_i:P\rightarrow A_i$. By considering a wedge  $$\begin{CD}A @<{id_A}<<  A @>{0_{AB}}>>  B\end{CD}$$  and the obvious analogous one with $A$ and $B$ exchanged, where $0_{A,B}$ is the zero morphism, we see that the product property implies the existence of two unique morphisms $k_i\in\mathcal{C}[A_i,P]$ s.t.  \begin{align*} \pi_j\circ k_i=\begin{cases} \mathrm{id}_i &\text{if }i=j\\ 0_{A_i, A_j} &\text{if }i\neq j \end{cases}. \end{align*} Using these equations and the definition of zero morphism, it's easy to see that the morphism $m\equiv k_1\circ \pi_1+ k_2\circ \pi_2$ satisfies $\pi_i\circ m=\pi_i$.   This is where I get stuck: In the linked proof, they now state that this implies $m=\mathrm{id}_P.$ But I don't see why this should be true.   Specifically, if $\phi\in\mathcal{C}[S,P]$ for some arbitrary object $S$, it is not apparent why $m\circ\phi=\phi$. All that we know is that there are some morphisms $x_i\in\mathcal{C}[S,A_i]$ that factor through $P$ via the universal property, but these are not necessarily unique.  And we learn even less about $m$ by looking at morphisms in $\mathcal{C}[P,S]$.  What am I missing here?


I want to build a Mater-Slave structure with console applications.  In the root directory I have my main application. After the application started it starts the slaves which are located in a subdirectory of the root directory.  Not a problem so far. The real problem is that all applications are started like they are located in root directory. So I get all files that the slave application in the root directory and no files in the slave directory.  Is it somehow possible to start the application (preferrably using the Process class or similar ones) like you would do in windows explorer with double click?

I'm firing off a Java application from inside of a C#  console application. It works fine for the case where the Java application doesn't care what the "default" directory is, but fails for a Java application that only searches the current directory for support files.  Is there a process parameter that can be set to specify the default directory that a process is started in?


Is there a way which I can know which user made export to report?  Details about the user, date and time and the report name?  (A free tool will be great).  Thanks!

I would like to be able to track exports of reports including the filters of the reports. Do you know of any way that this is possible outside of manual recording?


I'm current learning Java and working through a text book.   I have this piece of code given by the book which works bit like a calculator:   int num1= Integer.parseInt(args[0]); int num2= Integer.parseInt(args[2]); String msg = args[0] + args[1] + args[2] + "=";  if (args[1].equals("+")) msg += (num1 + num2)); else if (args[1].equals("-")) msg += (num1 + num2));   and so on.   In console you would do something like: java Args 10 + 2  What I want to know is if something like this can work (I haven't managed to make it work yet)  if(args[1] == "-") msg += (num1-num2));


I have just started learning standard deviation and I'm trying to understand the formula.  $$ s = \sqrt{ \frac{\sum(x-\bar x)^2}{n-1} } $$  Can anyone explain to me the square (and square root) part? If they are using the square & square root to prevent having negative value, why not just use | | for absolute value?  And I have another question. Why is the $-1$ sometimes omitted?  $$ \sigma = \sqrt{\frac{\sum(x-\bar x)^2}n} $$  Should I -1 or just omit it? I googled the standard deviation formula and some show -1 while some don't.  Thank you so much.

Steps of getting standard deviation. :        Work out the average (mean value) of your set of numbers   Work out the difference between each number and the mean   Square the differences   Add up the square of all the differences   Divide this by one less than the number of numbers in your set -   this is called the variance   Take the square root of the variance and you've got the standard   deviation      Am I missing out something, or why do we need to square the differences in step 3?  Why not simply do a Abs (multiply all negative numbers by -1) in step 3?  Also, my second question is why do we need to divide by one less than the number of numbers in the set in step 5? why not simply divide by the number of numbers?


I wrothe this application in java that makes one of the buttons escape from the coursor. The app works just fine, but I'd like to add another functionallity: changing "ok" button text to "Test" when button "nie" is clicked. I just cant figure out how to do that. Please help. here's the code:  import javax.swing.*; import java.awt.*; import java.awt.event.*; public class escButton extends JFrame implements ActionListener  {      public escButton(){          super("Wybierz odpowiedź");          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         setSize(400,400);         BorderLayout border = new BorderLayout();          setLayout(border);         JLabel msg = new JLabel("Some Question");         add(BorderLayout.NORTH, msg);         PrankPanel panel = new PrankPanel();         add(BorderLayout.CENTER, panel);          panel.ok.addActionListener(this);         panel.nie.addActionListener(this);         setVisible(true); }      public void actionPerformed(ActionEvent event) {         String source = event.getActionCommand();             if (source == "Nie") {                 this.setVisible(true);                 JOptionPane.showMessageDialog(null,"Zgadza się!", "Odpowiedź",                         JOptionPane.INFORMATION_MESSAGE);                 setTitle("abcd");                 ok.setText("test");              }             else {                 System.exit(0);             }  }        public static void main(String[] args) {        new escButton();      }   } class PrankPanel extends JPanel implements MouseMotionListener{    public JButton ok = new JButton("Tak");     JButton nie = new JButton("Nie");     int buttonX, buttonY, mouseX, mouseY ;      int width, height;         public  PrankPanel(){             super();             setLayout(null);             addMouseMotionListener(this);             buttonX = 110;             buttonY = 110;             ok.setBounds(new Rectangle(buttonX, buttonY, 70, 20));             nie.setBounds(new Rectangle (200,110,70,20));             add(ok);             add(nie);          }           public void mouseDragged(MouseEvent e) {      }      public void mouseMoved(MouseEvent e) {         mouseX = e.getX();         mouseY = e.getY();         width = (int) getSize().getWidth();         height = (int) getSize().getHeight();         if (Math.abs((mouseX)- buttonX) < 50){             buttonX = moveButton(mouseX,buttonX,width);             repaint();         }         if (Math.abs((mouseY )- buttonY) < 50){             buttonY = moveButton(mouseY,buttonY,height);                repaint();            }      }      private int moveButton(int mouseAt, int buttonAt, int bord){         if (buttonAt < mouseAt) {             buttonAt-=10;         }         else {             buttonAt+=10;         }          if (buttonAt > (bord - 20) ) {             buttonAt = 10;          }         if (buttonAt < 0) {             buttonAt = bord - 100;         }         return buttonAt;     }      public void paintComponent(Graphics g){         super.paintComponent(g);         ok.setBounds(new Rectangle(buttonX, buttonY, 70, 20));     }  }


I have a PC with 4 CPUs that is running four jobs. I would like to run another job on it, but only when one of the CPUs becomes available. Is there simple command to do this (I know this is what cluster management systems do, but there should be a simpler solution?)?

When I run sudo apt-get upgrade with a lot of packages on my low-end laptop, I get a perceptible system slowdown, sometimes with up to 3 second screen freezes.  Is there any way to mark this job as very low priority, i.e.  use very little CPU, MEM and HDD? I don't really care if it would make apt-get upgrade two hours longer to finish, I just want to keep working without the disruptions during the upgrade.


I'm using Google Chrome on Windows 7. Whenever I'm writing a post and leave it incomplete, or if I'm using a web chat site, like omegle, when I attempt to close the tab, Chrome gives me a pop-up, asking me to confirm if I actually do want to leave the page.  Is there any way to disable these pop-ups?  I've checked all the settings but I can't seem to find anything.

Is there a way to disable the Are you sure you want to leave this page? message on a website? I'm using Chrome.


When I use the command  +chmod +x appname.run   and then    ./appname.run   I get the following message, but nothing more happens:   libpng warning: Application jmp_buf size changed Segmentation fault (core dumped)

I trying to install XAMPP on my ubuntu 18.04 but I got this warning from libpng by running this command:   sudo ./xampp-linux-x64-7.3.9-0-installer.run   The thing need to be considered is that I got this warning on all versions of XAMPP. Someone already asks the same question there  but the answer is useless. Its a humble request please help.I am not able to install XAMPP since last two days.


I have applied for Schengen Visa for Germany in Abu Dhabi on 06/09/2015 for 10 days and the Embassy Refused my application on 22/09/2015. Beacuse of reason no 8.  It was mentioned in German Language (Die vorgelegten informationen uber den zweck und die bedingungen des beabsichtigten Aufenthalts waren nicht glaubhaft) and also in English (the embassy does not hold that you have convinced it that you are going to Germnay for the purpose stated in your application)  Now What is the process, what should I do in this case. Is it good to wait for three months and reapply or it will be better to appeal.

Schengen refusal formulae can be difficult to understand sometimes.  Sometimes an applicant receives a refusal with:       Justification for the purpose and conditions of the intended stay was not reliable.     often accompanied by:       Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.   What is meant by this refusal reason?  What are they trying to say?


I have a 2D sidescrolling game and I want the character to be able to rewind time on him if he messes up. I don't want anything else to change, just the main character's position. Any idea how I can do this?

I was wondering how to implement time travel into a game. Nothing super complex, just time-reversal like what's in Braid, where the user can rewind/fast forward time by 30 seconds or whatever.  I searched around the web a lot, but my results usually referred to using time as in like "it's 3:00" or a timer and such.  The only thing I could think of was using 2 arrays, one for the player's x position and the other for the player's y position, and then iterating through those arrays and placing the character at that position as they rewind/fast forward time. Could that work? If it would work, how large would the array have to be and how often should I store the player's x and y? If it doesn't work, what else could I try?  Thanks in advance!


I want to porve the triangle inequality:  $x, y \in \mathbb{R} \text { Then } |x+y| \leq |x| + |y|$  I figured out that probably the cases:   $x\geq0$ and $y \geq 0$ $x<0$ and $y < 0$ $x\geq0$ and $y < 0$ $x<0$ and $y \geq 0$ <- Here I am not sure...   have to be proven. However, I do not figured out a concrete method. Are my assumptions true?  How to finish the prove with these assumptions. I really appreciate your answer!!!

I understand intuitively that this is true, but I'm embarrassed to say I'm having a hard time constructing a rigorous proof that $|a+b| \leq |a|+|b|$. Any help would be appreciated :)


If I equip a % EXP bonus or % Magic Find item to my follower, does it count towards my character?  Would inserting a  in my follower's jewelry count towards my exp?

There are a lot of different side effects an item can have, and I assume that things like magic find have no influence on any of "our" found items at all.  However, I'm not sure about other things. For example:   Do followers get life-steal on weapons, too? Does increased orb healing make any difference? What about +experience after kills? Will my follower level up faster?   and probably a lot more.  Is there some general rule as to what effects of an item apply to followers, and which don't?


i click play in VLC, with my cowboy bebop disc inserted, it recognizes it,makes a noise, then does nothing and gives me the option to hit play again. any ideas? Lubuntu 18.10

My machine can't play encrypted DVDs on a fresh install.  How do I add this capability?  Another useful bit of information would be what programs are best for playing DVDs, once I'm able to do so.  See the .  Will I be able to play DVD movies from ?


We are upgrading to SharePoint 2013 and we want to make a new design to take advantage of the new features.  But is it possible to create a responsive design in SharePoint 2013? (In both 2007 and 2010 it was almost impossible)

Does SharePoint 2013 have support for responsive design or do you have to create it from scratch? On a side note: How important is it to learn responsive design when you work as a SP developer?


I'll soon get my engineering diploma (~MSc, from a "renowned-but-not-in-the-top-3" so-called french grande école). The degree itself is not specialized, but I mainly studied mechanical and industrial engineering. I aim to work in the industry – or, in other words, I don't want to make an academic career.  So I'm now wondering if doing a PhD in France (i.e. during 3 years) would be worth it, regarding my estimated career plan. Question: What would then be pros and cons I should consider before choosing to do (or not) a PhD?    Here are some questions I've already consulted, but did not fully answered my questions:

I'm a beginning doctoral student in the field of Machine Learning and I've been given several contradicting opinions on whether a PhD is worth it or not. I don't want to spend the rest of my life in front of a desk doing research, but I would like to deepen my understanding on my field. I am interested for a career on industry. Some people say I'm wasting my time for doing the PhD and some people say it is worth it. My plan at the moment is to finish PhD as fast as possible and then continue my career in industry when I'm still young. Any opinions or recommendations on what I should do? :)   P.S.   I want to add to this that I have already 2,5 years of work experience on industry (IT) already. For example I designed and implemented an online language skill tester for my university and have worked as a software engineer. So I wouldn't be entirely newbie in programming after I finish my PhD...  My subject is about applying the techniques of Machine Learning on Big Data.   Thank you for any suggestions and guidelines :)


I'm doing one of the courses on bash, which seems a bit outdated.I have a  simple script below, which should allow me to see lines as they are read or executed, but my console gives nothing back. The $1 argument passed to bartek_report.sh is missing on purpose as I wanted to see what happens when the console hangs. Using the latest Ubuntu. #!/bin/bash -v    #or -x     # creates a report for a single container  # exercise: add a variable called 'directory' # that determines where we save our output file  directory="reports"  mkdir -p $directory grep $1 shipments.csv > $directory/$1.csv echo Report created in $directory under filename $1.csv  When I call the script under bash it just hangs like without -x or -v, why? bartek@Lenovo-LAB~/Desktop/Devs/bash_learning/02/demos/after_m2$ sh bartek_report.sh [blinking cursor]

If script.sh is just something typical like  #!/bin/bash echo "Hello World!"   Is there a preferred way to run the script? I think you first have to chmod it so it becomes executable?


Solve the given equation. Let k be any integer.  $$\cos θ − \sin θ = 1$$  What do I do? Am I allowed to square everything? I was thinking about squaring everything and then substituting in $1-\sin^2θ$ for $\cos^2θ$ and then factoring out a $\sinθ$, then setting both equations $=0$ but I'm not sure if I am allowed to square everything.

No matter how I do it, I always end up with $x = 0, 90, 270$ and $360$. All of those except $270$ is right, but I can't quite figure out how to get the $270$ degrees out of the answer. I've tried using trig identities, I've tried squaring both sides, but I always end up with $$2\sin x\cos x$$ which then leads me to $x = 0, 90, 270, 360$. But $$\sin (270) + \cos (270) = -1$$ so I'm doing something wrong.


<select id="selectid"> <option value="1">User1</option> <option value="2">User2</option> <option value="3">User3</option> </select>     I have a select with 3 option .I have a requirement in which by button click i want to show the select dropdown .Is there any way to achieve this in all browser using jquery .Any help is appreciated

For this dropdownlist in HTML:  <select id="countries"> <option value="1">Country</option> </select>   I would like to open the list (the same as left-clicking on it). Is this possible using JavaScript (or more specifically jQuery)?


Let a function $f:[0,1]\to\Bbb R$ given by $f(x)=\sin(\frac lx)$ for $x\ne 0$ and $f(0) = 0$. Show that although $f$ is not continuous, the graph of $f$ is a connected subset of $\mathbb{R}^2$.  I was wondering on how to prove this.  I have read that the closure of a connected set is also connected, so if I can show the given set is a closure of some connected set then I am done.  Could you please help me out.

I just came across the example of the topologist's sine curve that is connected but not path-connected. The rigorous proof of the non-path-connectedness can be found .   But how can I prove that the curve is connected? To be honest, even intuitively I am not being able to see that the curve is connected. I am thinking if it is proved that the limit point of $\sin(1/x)$ as $x \to 0=0$, then it would be proved. But, why is this true? IMO, this limit doesn't exist. Intuitively also, it seems that the graph would behave crazily and not approach a particular value as a tends to $0.$  EDIT (Brett Frankel): There are a few different working definitions of the topologist's since curve. For the sake of clarity/consistency, I have copied below the definition used in the linked post: $$ y(x) = \begin{cases} \sin\left(\frac{1}{x}\right) & \mbox{if $0\lt x \lt 1$,}\\\ 0 & \mbox{if $x=0$,}\end{cases}$$


I'm trying to gain a more intuitive understand of the concept of an . When physicists speak of an infinitesimal quantity, if that basically the same as the first order term in a Taylor series expansion of a function they're analyzing?

Just as background, I should say I am a mathematics grad student who is trying to learn some physics. I've been reading "The Theoretical Minimum" by Susskind and Hrabovsky and on page 134, they introduce  transformations. Here's the first example they use:  Consider a particle moving in the x,y plane under the influence of a potential, $V$, which depends only on the radius, with Lagrangian:   $L=\frac{m}{2}(\dot{x}^2+\dot{y}^2)-V(x^2+y^2)$  This is clearly invariant under rotations:  $x \rightarrow x\cos \theta + y\sin \theta$  $y \rightarrow -x\sin \theta + y\cos \theta$  All well and good. Now they say "consider what happens ... when the angle $\theta$ is replaced by an infinitesimal angle $\delta$." Already I could say "What the heck is $\delta$ really?", but I'm willing to play along with my intuition. Since $\delta$ is infinitesimal, we work to first order and say   $\cos \delta=1$ and $\sin \delta= \delta$.  Plugging this into our rotation formulas above, we obtain:  $x \rightarrow x+y\delta$  $y \rightarrow y-x\delta$  By differentiating, we see that:  $\dot{x} \rightarrow \dot{x}+\dot{y}\delta$  $\dot{y} \rightarrow \dot{y}-\dot{x}\delta$  Plugging these into the Lagrangian and ignoring terms higher than first order, we see that the Lagrangian is invariant under this transformation.  My main problem with all of this is that I don't understand what the physical nature of an infinitesimal transformation actually is. All I got from the above was that if you do this formal calculation by following rules like "only work to first order in $\delta$," then the Lagrangian is invariant. This is in contrast to the case where we have an actual transformation, like a rotation, where there is no question about what is going on physically.  I would also like to know how all of this relates to rigorous mathematics. In mathematics, I can't recall ever using infinitesimals in an argument or calculation, so it would be useful if there was some way of formulating the above in terms of limits/ derivatives/ differential forms (for example). I sense a connection to Lie Algebras, as the infinitesimal version of the rotation is $(I+A)$ where $I$ is the identity matrix and $A$ is an element of the Lie Algebra of $SO(2)$.   Here are some questions whose answers I believe may be useful to me (feel free to answer some or all):  -What is an infinitesimal quantity like $\delta$ to the physicist?   -Why do physicists argue using infinitesimals rather than "standard" calculus?  -What is the physical meaning of infinitesimal transformation? How does it relate to Lie Algebras?   -Is there a rigorous theoretical apparatus for justifying the computations shown above?  -What is meant by the Lagrangian being invariant under infinitesimal transformations?  If any of the questions seem too vague, please say so. Thanks in advance for your insights!


The question Let $(X,\mathcal{A},\mu)$ be a measure space. Let $A_n$ be a sequence of sets in $\mathcal{A}$. Define $A := \{ x \in X $ such that  for all but finitely many $n \in \mathbb{N}$ it holds that $x ∈ A_n$ $ \}$ Show that $\lim_{n\to\infty}\inf \mu (A_n) \geq \mu(A)$ My attempt $ \mu (A_n) = \int_X \chi_{A_n} d\mu$ and so by Fatou's lemma: $\lim_{n\to\infty}\inf \mu (A_n) = \lim_{n\to\infty}\inf \int_X \chi_{ A_n} \geq \int_X \lim_{n\to\infty}\inf \chi_{A_n} d\mu$ Now all I need to show is that $\lim_{n\to\infty}\inf \chi_{A_n}(x)  = \chi_A(x)$ a.e Consider $x\in A$ then eventually $x\in A_n \forall n $ eventually and so $\chi_{A_n}(x) = 1 \forall n $ and so $\lim_{n\to\infty}\inf \chi_{A_n}(x)  = \lim_{n\to\infty} 1 = 1= \chi_A(x)$ Now consider $x\not\in A$ then $\forall N \in \mathbb{N} \exists n >N$ such that $x \not\in A_n$ and so $\inf_{m \geq n} \chi_{A_n}(x) = 0 \forall n$ and hence $\lim_{n\to\infty}\inf \chi_{A_n}(x)  = \lim_{n\to\infty} 0 = 0= \chi_A(x)$ Ando so the required follows. However this feels awfully complicated and I was wondering if anyone has any tips for something simpler

I don't know how can I imply Fatou's lemma for any measurable sets $A_k$, that is, $$\lambda(\liminf A_k)\le\liminf\lambda(A_k).$$ How can I prove it? And is there any example in $\mathbb R$ of sequence of measurable sets $A_k$ such that $A_k\subset[0,1]$, $\lim\lambda(A_k)=1$, but $\liminf A_k=\varnothing$ ? Thanks for your help!


I work with many first-time models and often do boudoir.  On the checklist I give them it says DON'T do this, but sometimes there will be someone who shows up to the shoot wearing a tight push-up bra.  Of course, this means any nudes or other photos we do without the push-up will have heavy marks on their body. These are a pain to edit in post.  How do I fix this DURING production?

Clothing marks are very annoying in nude/erotic photography and demand a lot of work to remove them in Photoshop.  How do you get rid of them before starting the session? Do you allow the model to be naked 15 minutes earlier of the session and then dress her again? Do you handle them in post-production?


Yes this a repeat of a previous question, but I could not figure out how to post this answer, so I shall try to re-ask the question and answer it myself:     Book V Chapter XVII: "Sixteenth Year of the War—The Melian Conference—Fate of Melos"  is known as the Melian Dialogue, and is one of the most famous portions of one of the greatest books of antiquity.  Wikipedia describes it under the heading "Melian Dialogue" as follows:  "The Melian dialogue takes place fifteen years into the Peloponnesian war, during the confrontation in 416–415 BC between the Athenians and the people of Melos, a small island located in the southern Aegean Sea just east of Sparta. The Athenians demanded that the Melians surrender their city and pay them tribute or face the destruction of their city. The Melians claimed their right to remain neutral, appealing to the Athenians' sense of decency and mercy toward a small, peaceful, and defenseless city."  The Athenians said to the Melians:  "you know as well as we do that right, as the world goes, is only in question between equals in power, while the strong do what they can and the weak suffer what they must."  The Melians refused to surrender, so the Athenians defeated them, killed the adult men, and sold the women and children into slavery.

Context - One might use it in the following situations:   "An employee has an argument with her boss and a dispute follows." (she gets fired a few weeks later) "A student having an argument with his teacher over his grades takes the problem to the headmaster." (the headmaster doesn't want to get into it and says the teacher is right) "Workers go on strike for a week, get no raise and are considered absent from work."    You can say it to your son/daughter as a prediction: “Be careful mate, remember…(the saying)…  And you can also say it when he/she comes to you for comfort and support: “I told you, mate, they say that........(the saying).


I'm running torbrowser on Debian. klipper saves the history of my clipboard. I would like to desactivate this feature for tor browser, so that I can use the copy-paste functions "locally", without sharing them with the rest of my system.  Is that achievable? Is this a linux-oriented question?

Is it possible, on Debian with Klipper running, to have a separate "clipboard stack" for a particular application?  I'd like the text that I copy in application Y not to be shared with all the other applications running.  All the solutions mentioned at  seems like overkill.


Hi i am having problems storing default instances of a class in a vector, when i use no default constructor everything go fine.  this is the class structure:  #ifndef NEURO_H #define NEURO_H  #include<iostream> #include<fstream> #include<vector>  using namespace std;  class neurona { private:     double v_r; //potencial de reposo     double v_u; //potencial umbral     double v_d; //potencial alcanzado al disparar  public:     neurona(double=-65.,double=-55.,double=35.) ;     ~neurona()          ;     neurona(const neurona &)    ;     neurona & operator = (const neurona &);  };   neurona::neurona(double r,double u,double d):v_r(r),v_u(u),v_d(d) {}   neurona::~neurona() {}  neurona::neurona(const neurona &z) {     v_r=z.v_r;     v_u=z.v_u;     v_d=z.v_d; }  neurona & neurona::operator = (const neurona & z) {     if(this!=&z)     {     v_r=z.v_r;     v_u=z.v_u;     v_d=z.v_d;     }     return *this; }  #endif   and this is the main      int main()     {     neurona n1()        ;     neurona n2(3.,3.,3.)    ;     neurona n3=n2   ;      vector<neurona> v_neu(3)    ;  v_neu.push_back(n1);  //v_neu[0]=n1; //v_neu[1]=neurona2; //v_neu[2]=neurona3;    cout<<"okidoki"<<endl; }   i get the following error     neurona.cc: In function ‘int main()’:   neurona.cc:15:11: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits >::value_type {aka neurona}’ and ‘neurona()’)     v_neu[0]=n1;   In file included from neurona.cc:1:0:   neurona.h:41:11: note: candidate: neurona& neurona::operator=(const neurona&)    neurona & neurona::operator = (const neurona & z)              ^~~~~~~   neurona.h:41:11: note: candidate: neurona& neurona::operator=(const neurona&)    neurona & neurona::operator = (const neurona & z)              ^~~~~~~   if instead of using n1 in the push_back() use n2 everything works fine, the same with n3.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?