I can appreciate the value of factory methods, but I'm struggling with the value of using dedicated factory classes.  This will work:  class Brady {     int age;     String name;     static Brady create(String who)     {         if(who.equals("Cindy"))  return new Cindy();         if(who.equals("Jan"))    return new Jan();         if(who.equals("Marcia")) return new Marcia();         return null;     } } class Marcia extends Brady {} class Cindy extends Brady {} class Jan extends Brady {}  ... Jan jan = (Jan)Brady.create("Jan");   So is there any good reason to use a factory class instead?  class Brady {     int age;     String name; } class Marcia extends Brady {} class Cindy extends Brady {} class Jan extends Brady {}  class BradyFactory  {     static Brady create(String who)     {         if(who.equals("Cindy"))     return new Cindy();         if(who.equals("Jan"))       return new Jan();         if(who.equals("Marcia"))    return new Marcia();         return null;     } }  Jan jan = (Jan)BradyFactory.create("Jan");   It just seems like a waste of additional code.  I do understand the usefulness of a factory class when an instance is needed:  class BradyFactory  {     Brady brady;     BradyFactory(String who)     {         if(who.equals("Cindy"))             brady = new Cindy();         else if(who.equals("Jan"))             brady = new Jan();         else if(who.equals("Marcia"))             brady = new Marcia();     }     public BradyFactory addChore(Chore chore)      {          brady.addChore(chore);         return this;     }     Brady create()     {         return brady;     } }  Jan jan = (Jan)new BradyFactory("Jan")             .addChore(Chore.Dishes)             .addChore(Chore.Washing)             .create();   ...or when a subclass of the Factory is needed.    So my question is: is there any value to putting simple factory methods in a dedicated factory class other than when an instance of the factory, or a factory subclass, is needed?


Causing error when setText a value in edittext. Id Given is Correct ,if i give set Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference  Code Given Below here i cant setText Otp Code "otpcode.setText("12345");" in oncreate it works perfectely. when i give it in the method"recivedSms".it didn't work.  public class Change_Password_Activity extends AppCompatActivity { EditText user_name,pass_wd; public   EditText otpcode; private Button btn_submit; private String username,otp,password; private ProgressDialog prgDialog; private Typeface typeface;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_change__password_);     typeface = GlobalVariables.getTypeface(Change_Password_Activity.this);     prgDialog = new ProgressDialog(this);     // Set Progress Dialog Text     prgDialog.setMessage("Please wait...");     // Set Cancelable as False     prgDialog.setCancelable(false);      otpcode = (EditText)findViewById(R.id.otpedittext);     user_name = (EditText) findViewById(R.id.edittext_ch_user);     pass_wd = (EditText) findViewById(R.id.edittext_ch_passwd);     btn_submit = (Button) findViewById(R.id.button_changepswd);     otpcode.setTypeface(typeface);     user_name.setTypeface(typeface);     pass_wd.setTypeface(typeface);     btn_submit.setTypeface(typeface);    } public void recivedSms(String message) {     try     {         int smsnumbr= Integer.parseInt(message);         otpcode.setText(smsnumbr);      }     catch (Exception e)     {         Log.e("error", String.valueOf(e));     }


Is it possible to use Windows 7 with B550/X570 motherboards and Ryzen 9 CPUs?

I understand that official support of Windows 7 ended a few years ago. However, I'm interested to know if any manufacturers (or users) have released fully-working drivers for B550/X570 motherboards or the Ryzen 9 CPUs like the 5600X or 5900X. I would like to know if it's possible to replace my faulty Windows 7 hardware with modern, high-performance hardware without having to upgrade to Windows 8 or 10. I can't find reliable information about this anywhere. If I ask on other websites I am simply downvoted, insulted, or ridiculed for daring to ask about Windows 7. Thank you.


I'm looking for the jungle temple in Terraria, but, I've not had much luck yet.   I figured I'd make a lot of Hellevators, and I'd soon bump into it, but, I'm not sure how deep down it is.  Does anyone know how deep down it is located, and is there a better method for finding it?


Delete my unintended SO [serverfault] tag?

I suspect that I totally goofed and too eagerly retagged  with  based on  following a comment on the question.  Upon noticing that the question was then the only one tagged [serverfault], I did ...and now suspect that I did something unholy: I subsequently dropped the [serverfault] tag that I added to the question.  (This just keeps getting messier I know....)  :/  What confuses me is that the  led me to believe that [serverfault] was an appropriate tag to use...and post-dates the  that led me to think I resurrected a demon; but the second round of MSO reading included Jeff Attwood's rather unflattering thoughts on the tag (or maybe more specifically [belongs-on-serverfault] - same meaning I think, though).  (Yes, "confuses" is mild.  I am totally confused at this point!)  :}  Bottom line, the SO  tag I seem to have created(?) still exists but now has no questions tagged with it: should/would someone please delete it?


holomorphic functions and boundedness at the boundary

Let $f$ be a holomorphic function on a bounded region $U=\{z:|z|<1\}.$ Show that there is a sequence $\{z_n\}$ in $U$ such that $|z_n|\rightarrow 1$ and $\{f(z_n)\}$ is bounded.  How can I approach this problem, without any continuity condition at the boundary?


Ubuntu Minimal Install - No desktop environment?

Note: I installed Ubuntu Minimal because of a bug in (apparently) all *buntu 15.04, 14.04 and 14.10 versions which cause the installer to hang when installing on my system before the partitioning stage... See these questions... Example:  But I am not running on a laptop and that question did not help fix that problem, so I resorted to the minimal (text based) install. Question I have installed Ubuntu using the Ubuntu Minimal Install image (~40MB) on a USB disk. When I boot my computer I get the message on tty7 (CTRL+ALT+F7) starting version 219  That's it, there's nothing else there. (What does this message mean?) I figured there was no desktop environment, since one wasn't specified during the install process. (I'm sure the installed used to ask for a desktop environment option? Has this been removed from the install process?) So I ran sudo apt-get install mate-core sudo reboot  Still nothing, same message appears. I can log into any of the other tty's, but if I run startx, I get the error: The program `startx` is not currently installed. ... install package xinit  Do I want to install xinit? Or do I need to install mdm service or something? Graphics card is a GTX 260 although I don't think this is of any relevance. The question tagged as a duplicate is of no relevance to me. I acquired this problem through a completely different set of steps. (This is a new install, not a replacement of 1 desktop environment with another.) In addition, the fault is not "that I see this message" the fault is that I don't have a desktop environment. My question about starting version 219 is merely something I happen to be interested in. Update I believe I have no desktop manager installed? The file /etc/X11/default-desktop-manager does not exist. How can I fix this? Update 2 Okay so I might be breaking my system now... but I tried: sudo apt-get install mdm  Because I figured I need a display manager of some sort. (Not sure what it is or does, but it's probably important.) This didn't seem to help, so I then tried: sudo apt-get install xinit  Which installed a vast number of packages. I now have a desktop environment, but it's broken. When I run startx I get a desktop environment... but it looks like the 1990's linux desktop environments. (That sort of blocky grey everything.) I think this might be a fallback desktop environment for when you screw up your mate/gnome/unity/kde one? What should I do now?


How to setup Maven to generate regular as well as executable JAR files from a single POM

I know how to setup Maven to generate a regular JAR file for my project with mvn package. I also know how to setup Maven to generate an executable JAR file with the same command. What I would like to be able to do is to generate a regular JAR file with mvn package and also generate an executable JAR file, either from the same command or with another mvn command. All setup in the same POM file. Thanks!


Do SAS expanders work transparently with SAS controllers?

I'm new to SAS expanders and I'm trying to get things right. I understand that SAS expanders, when used with SAS controllers which supports expanders, allows you to utilise the full capacity of supported drives on a controller.  However, say I've got a SAS controller with 4 x SSF-8087 ports, which by itself would support 16 disks. I could then, as far as I understand, instead connect each of these ports to an expander to increase disk capacity.  However, will the SAS controller "see" all disks as if they were connected directly to the controller and not through an expander. Could I look at controllers as switches in a network? Would I be able to create a RAID from a disk on expander 1 and expander 3?  UPDATE:  I don't really have a specific project where I need to use SAS expanders. I'm just curious about how they work, and was thinking about how it would work if I used one or more SAS expanders with a LSI MegaRAID controller (9260-16i) which is running in one of our servers. However, I haven't really put any thought into the distinction between "local" disks and disks in another enclosure. The LSI MegaRAID controller has 4 SFF-8087 ports, which makes it capable of accomodating 16 drives.


Null pointer exception in designing a zoo in java

I have written a code to design a Zoo. But I am getting the following error. Please can anyone help me understand why I am getting a null pointer exception.  package Zoo;  class Animal{      int legs = 4;      boolean veg=false;      String name= "";      public void setFood(boolean foodType){         this.veg = foodType;     }      public void setLegs(int foodType){         this.legs = foodType;     }      public void setName(String name){         this.name = name;     }      void setValues(String name, int legs, boolean foodType){         setName(name);         setFood(foodType);         setLegs(legs);     } }  class Wildanimal extends Animal{     boolean foodType = true;     Wildanimal(String name,int legs){         setValues(name, legs, this.foodType);     }  }  class Herbivorose extends Animal{     boolean foodType = false;     Herbivorose(String name,int legs) {         setValues(name, legs, this.foodType);     } }  class Cage {     Cage next = null;     Cage root ;     Animal animal;      //Put in wild animal cage     public void putInWildCage(Wildanimal animal) {         this.next.animal = this.root.animal;         this.root.animal = animal;     }     //Put in herbivores cage     public void putInHerbCage(Herbivorose animal){         this.next.animal = this.root.animal;         this.root.animal = animal;         } }   public class Zoo{      public static void main(String[] args){         //Create cage for different animal type         Cage putinWildCage = new Cage();         Cage putinHerbCage = new Cage();          //Create some wild animals         Wildanimal tiger = new Wildanimal("Lisa", 4);         Wildanimal lion = new Wildanimal("Lina", 4);         Wildanimal panthor = new Wildanimal("bett", 4);          //Create some herbivorous         Herbivorose dear = new Herbivorose("teli", 3);         Herbivorose bear = new Herbivorose("tame", 3);         Herbivorose monkey = new Herbivorose("tepp", 3);          //we can not keep wild animals with herbivorous. So          //Put Herbivores in herb cage         putinHerbCage.putInHerbCage(dear);         putinHerbCage.putInHerbCage(bear);         putinHerbCage.putInHerbCage(monkey);          //Put wild animal in wild cage         putinWildCage.putInWildCage(tiger);         putinWildCage.putInWildCage(lion);         putinWildCage.putInWildCage(panthor);          System.out.println(putinHerbCage.next.animal.name);      }     }   ERROR  Exception in thread "main" java.lang.NullPointerException     at Zoo.Cage.putInHerbCage(Zoo.java:54)     at Zoo.Zoo.main(Zoo.java:80)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:483)     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


Should I use Photoshop or Illustrator for a large print design?

I'm new to this site and am taking on some graphics work that requires a big print out. I have never worked on such a large scale and was wondering if you guys could answer some basic questions for me.  I pretty much want to create something like the image below with a chalkboard and chalk lettering effect. I know how to do this in photoshop, but I don't know if the text and images will be blurry if scaled up?  The dimensions are 5' Wide and 7' Tall. I don't know what print company they are using or what the PPI needs to be.  So my questions are: Am I better of trying to create a similar effect in Adobe Illustrator since it's a vector based program? If not, can you explain how I can set it up in photoshop to be printable at that size?  Thank you very much if you read all this. I hope you can help :)


My .jar file run with terminal but not by "clicking"' on it

I made a little program in Java, and it run perfectly when I use the java -jar myFile.jar but when I use the "open with OpenJDK Java 7 Runtime" option, nothing happen.  I have no idea why it doesn't launch. If anybody got an idea... Thank you


Setting a variables to contain a range of numbers in a bash script

I have a case statement for a dialog menu, and want it to refer to multiple numbers (one to nine), if any number from one to nine is selected.  How do I make a word have multiple values? Now  : ${EXAMPLE=9}   but how would I make it equal multiple numbers?  I've tried so far:  : ${EXAMPLE=1,2,3,4,5,6,7}  : ${EXAMPLE=1-9}  : ${EXAMPLE=1 && 2 && 3}   Context:  I made a menu dialog that lists all files in a certain area, and want to make a case such as   case $example in         **1)**  # but not just 1, it should be 1-9     echo "blah blah" ;;  esac


sum of the digits of the number 2^1000 in java

import java.math.*;  public class PowerDigitSum {     public static void main(String[] args) {         double[] digits ;         digits = new double[302];         double i = Math.pow(2, 1000);         double c = 301;         double c1 = 0;         double d = 0;         while(c>=0) {             c1 = Math.pow(10, c);             d = Math.floor(i/c1);             i = i - d*c1;             digits[(int)c] = (int)d;             c = c-1;         }         double sum = 0;         c = 0;         while (c<302) {             sum = sum+digits[(int)c];             c= c+1;         }         System.out.println(sum);     } }   The output is 1281 but that's not correct according to projecteuler. What am I doing wrong?


Finding the unbiased variance estimator in high dimensional spaces

The problem comes from linear regression. Assume the regression function is linear, i.e.  $$ f(X) = \beta_0+\sum_{j=1}^pX_j\beta_j $$ .Given a set of training data $(x_1, y_1),\ldots,(x_N,y_N)$,we try to estimate the parameters $\beta$ by minimizing the residual sum of squares:  $$\text{RSS}(\beta) = (\sum_{i=1}^N(y_i-\beta_0-\sum_{j=1}^px_{ij}\beta_j)^2$$ Here each $x_i=(x_{i1},\ldots,x_{ip})^T$ is vector in $\mathbb{R}^p$,$y_i\in\mathbb{R}$,and $\beta=(\beta_0,\ldots,\beta_{p+1})$. Let $\mathbf{X}$ denote matrix $(x_1,\ldots,x_N)^T$, $\mathbf{y}=(y_1,\ldots,y_N)$ and assume it has full column rank, it's easy to get $$\hat{\beta}=(\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{y}$$ Suppose $\mathbf{\hat{y}}=\mathbf{X}\hat{\beta}$, and $\mathbf{y}=\mathbf{X}\beta$ for some $\beta$, to pin down the sampling properties of $\hat{\beta}$, now assume that the observations $y_i$ are uncorrelated and have constant variance $\sigma^2$, and that the $x_i$ are fixed(non random). It's easy to see that $$\text{Var}(\hat\beta) = (\mathbf{X}^T\mathbf{X})^{-1}\sigma^2$$ ,so we turn to estimating the $\sigma^2$, and now comes the question: Let $\hat\sigma$ defined as below: $$\hat\sigma^2=\frac{1}{K}\sum_{i=1}^N(y_i-\hat{y_i})^2$$ It is said that only when $K=N-p-1$ did $\hat\sigma$ be an unbiased estimator of $\sigma$. But how do $p$(the dimension of $x$) be introduced in?


What "propagates" a force through the rest of a solid?

So, in typing the title of this question I was recommended , which confirmed my guess that this effect "propagates" at the speed of sound (though I just had a feeling, I don't really understand why).  I also only have high-school level physics experience.  I feel like I don't know physics well enough to really know what to ask correctly, but I'll try to explain.  So, I rotate my arm, and, even though tendons are just pulling it at a certain location, the rest of it follows suit.  Why is that?  What is happening at an atomic/molecular scale that ends up "conveying forces" over a distance?  And, something else I don't understand- what is so special about the speed of sound that makes it this "fundamental unit of translation", or something?  Maybe the better question is "what processes at an atomic/molecular scale lead to the speed of sound being associated with all of these behaviors", which ties both questions together.


Swift, I want to get phone number(not udid) and email from device

all I'm developing app and it contains function which gets phone number and email from device. I've looked at some samples on internet but all of them are about unique id. How can i get phone number and email from device? Is there anybody who has experience in this area?


Deleted email associated with Steam, can't access account

I deleted the address associated with my steam account. Now i cannot access it so I can change the email to my new one. Does anyone know how to change the email without being logged in, or if not, a way to bypass the Steam email authentication? Thanks in advance. :D


I can't change keyboard layout ubuntu 13.10

I ve just installed ubuntu 13.10 and I've installed my local language keyboard and I can't find a way to simply change from one to another for example with the "traditional" keys Alt+Shift!


How to find $\int \sqrt{x^8 + 2 + x^{-8}} \,\mathrm{d}x$?

The integral to be solved is $\int \sqrt{x^8 + 2 + x^{-8}} \,\mathrm{d}x$. I tried substitution $t=x^8$ which got me to $\frac{1}{8} \int \sqrt{t + 2 + \frac{1}{t}} t^{-7/8} \,\mathrm{d}t$ and I'm stuck. Can you help?


Can spells and magic items be used to satisfy a feat's prerequisites?

Seeing  made me curious as it seems that a magic item is used to meet a feat's prerequisite.  Can items or spells be used to satisfy a feat's prerequisites? I know that if the character loses the item or the spell's duration runs out the character loses the ability to use the feat, but, until then, could the character take the feat?  For example, could a character with Strength 11 put on a  or have the spell  cast on him so that he could take the feat  that has as a prerequisite Strength 13?


How to `grep -v` and also exclude 'n' lines after the match?

I've been reading  and wondering how to exclude the 2 lines, or any number after the match using sed or any other practical tools.  user@linux:~$ cat -n file.txt       1  SomeTestAAAA      2  Random String      3  EndTest      4  SomeTestABCD      5  Random String      6  EndTest      7  SomeTestDEFG      8  Random String      9  EndTest     10  SomeTestAABC     11  Random String     12  EndTest     13  SomeTestACDF     14  Random String     15  EndTest user@linux:~$    1st Question  I was able to accomplish this using grep -P as follows; unfortunately there is unwanted -- character in the output.  How to remove this?  user@linux:~$ grep -P -A 2 'SomeTest(?!AA)' file.txt SomeTestABCD Random String EndTest SomeTestDEFG Random String EndTest -- SomeTestACDF Random String EndTest user@linux:~$    Question 2  I've also managed to do this with awk as shown in previous answer. However this is only working on this case because of the similar EndTest pattern. What if EndTest is some random word and doesn't have pattern.   Could we do something similar as grep -v -A 2 SomeTestAA? I know this won't work, but the desired output would be similar as follows.  user@linux:~$ awk  'BEGIN{ RS=ORS="\nEndTest\n"} !/'"^SomeTestAA/" file.txt  SomeTestABCD Random String EndTest SomeTestDEFG Random String EndTest SomeTestACDF Random String EndTest user@linux:~$


Setting GUI Visible Environment Variables with OS Catalina

I need to set a number of Environment variables that can be seen by GUI apps (i.e. Xcode). When running from a terminal this is trivial and is simply a case of adding a. number of export commands to my .bash_profile e.g.  export BOOST_INCLUDE=~/boost/boost-XXXX/boost   Unfortunately GUI apps do not see values set in .bash_profile. I am using Catalina and it appears that Apple modifies the mechanism every time MacOs is updated. Many online guides are out of date....  This article:  suggests that launchctl should do what I need but even the following simple example does not work:  In a terminal:  /bin/launchctl setenv FOO BAR   Then close the terminal and open a new one  Check the value:  echo $FOO   The output should be   BAR   But it is unset. Note it is also unset in the original terminal so I am not convinced that the command /bin/launchctl setenv FOO BAR is doing anything.  Note: This is about setting the environment variable for GUI apps NOT just for the terminal.


Why is 12 Grimmauld Place in the middle of a Muggle neighborhood?

The Blacks were shown to be very anti-Muggle. Their house has anti-Muggle spells placed on it. Yet, their house is placed in a Muggle neighborhood, with a Muggle number.  Why?


I am taking pictures of performers on stage.  Sometimes they have tungsten lighting, but then they can also have funky color lights of all sorts go off at them.  Here is a Flickr Album of the pictures I recently took:   I'm shooting with a Nikon D7000 on Auto, No flash, high speed multi shot, RAW mode.  I took about 1000 pictures, and about 15 of them were worth editing.  I figured that a monopod would be really helpful in keeping the camera steadier (most of my shots were blurry), and keeping me mobile to change angles.  I got a monopod, and I will use it at the next event.  I did see , but it is more about a point-and-shoot than a DSLR  What can I do to improve the quality of pictures that I take?


Find the function $f(k)$, $k > 1$ that is the largest integer and is a divisor of $n^k - n$ for all integers $n$.

For example,$ f (2) = 2$, and $f(3) = 6$.   I don't know what kind of technique I should use.   By putting $n = 1, 2, 3, \cdots$ it's even hard to know if $f(2) = 2$ for ALL integer $n$.


Why did Dobby want to help Harry Potter?

I loove Harry and all, but why is he so popular?


How to remove duplicate lines from file?

I have file  for example 'a'  aaa aaa bbb ccc ccc bbb ddd   After executing   uniq a c   i get file 'c'  aaa bbb ccc bbb ddd   How to delete duplicate bbb lines?


Schengen Type C visa overlapping with Type D visa

I already have schengen type D visa for Poland for one year expiring in November 2018. However, due to change in circumstances, I have not travelled to Poland and like to visit Italy for one week for holidays in April 2018. Is it possible to apply for overlapping type C visa for Italy even though I have type D visa?


Why does Flash (2014) not simply disarm or knock out his opponents in the moment he arrives?

I'am aware of the "Why is the Flash not unstoppable" question but it does not answer the question for the 2014 TV-show.  Here we see the following very often:  Flash arrives and stops and talks to his opponents, often giving them time to shoot at him or invoke environmental effects that harm him. Perhaps in the first season we could argue that he is overconfident and unexperienced, but later in the show this argument does not hold, I think.  He has to "distract" them somehow with some clever trick because he can't get near them (Why? With his speed he can be behind them, disarm them and/or knock them down before they can even "fire" once at him.)  When they are "distracted" he does exactly that. In a split second he just disarms them or knocks them down.  Yes. If an opponent creates conditions that harm or hinder Flash BEFORE he arrives, it makes sense. If the opponent has super fast reflexes (like Flash himself) so he can shoot and hit him even when speeded, it makes sense. If the opponent is invulnerable and the flash when trying to knock him out hurts himself it makes sense. If the flash is surprised by the opponent and not in speed mode, it makes sense.  But we often see opponents that shoot on him with some weapons or abilities and while they don't seem to have super fast reflexes and moving, Flash isn't able to get near them and just disarm them or knock them out.  This especially is obvious in some encounters with Captain Cold. It should be no problem for Barry to disarm him and get his gun in the moment he arrives before Captain Could could even think of firing at him (later he has a dead man switch at his could gun that could in some situations prevent this).  Another example is his encounter with Dr. Light. He has to move so fast that he creates several images of him where Dr. Light fires on. Then he is able to attack her from behind and knock her down. There shouldn't be any problem doing this without the false images.  On other occasions he has no problem even with warned opponents. When he is blackmailed to let his two opponents beat him to death (otherwise several bombs will kill 100 children) his team succeeds to disarm all the bombs. The villains (who in the past were a match for him even without the other) notice that (and even say "Oh oh") and in the next moment one is bound and the other nearly beaten to death.  So is it just very very bad writing or is there any theory why Flash has problems to handle such opponents without difficulties?


C++ template  undefined reference in header file

Sorry for asking a pretty shallow question, but I can't find the mistake that I made. I was trying to pass a template <typename T> in my header, but g++ threw a lot of errors that I don't know how to fix. Before this is marked as duplicate, I'd like to stress the point that I wasn't able to find such problems using template classes, as that's where the problem occurred in my case. Output: C:\Temp\cc52Nkf5.o:executesort.cpp:(.text+0x1cc8): undefined reference to `void Utils::message_input<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' collect2.exe: error: ld returned 1 exit status  utils.h: #pragma once #ifndef utils_h #define utils_h // inputs are appropriate  class Utils {     public:         // ...         template <typename T> void message_input(string, T&); };  #endif   utils.cpp #include "utils.h" // inputs are appropriate // ...  template <typename T> void Utils::message_input(string str1, T& into) {     cout << str1;     cin >> into; }  How I called: #include "utils.h" // #include blah, blah, blah  int multicnt; Utils uts; uts.message_input(">>> How many times to run? (positive whole number) ", multicnt);  Any help is greatly appreciated


verifying an incorrect integrating factor

I was doing some practice problems that my professor had sent us and I have not been able to figure out one of them. The given equation is:  $-y^2dx +x^2dy = 0$  He then asks us to verify that:  $ u(x, y) = \frac{1}{(x-y)^2}$  is an integrating factor.   I multiplied through to get:  $\frac{-y^2}{(x-y)^2}dx + \frac{x^2}{(x-y)^2}dy = 0$   However, the partial derivatives of these do not equal each other so I am a bit confused...


Where to ask Question that can be flagged too broad or opinion based

I came across the following question:    This can be easily flagged for too broad or opinion based, but I wonder on which stack-exchange site can one ask answers for such a question?


I've found an exact copy of a Stack Exchange site answer without giving any credit, is that legal?

I was searching for answers for one of many daily issues we all normally have and found something quite odd. After finding  Stack Overflow, I've stumbled upon , which is an exact copy of the first one. Should this be allowed? I thought about posting on Stack Overflow, but I believe that this matter is about Stack Exchange as a whole.


Overfitting on the loss graph, but not the accuracy graph

I am looking at learning curves (, which is based on ) and trying to play with regularization to prevent overfitting. This model uses L2 regularization and dropout.  What is interesting is that by looking at the accuracy graph I cannot really tell which model is the best. On the other hand the loss graph shows some differences. See pictures below.  Here are my question:    should we always look at the loss curves to check for overfitting? the accuracy graph is not very precise because accuracy is discrete and a lot of information gets lost when we compute it?


? and ! after a question, what does it mean

I grew up learning that an exclamation mark at the end of a sentence refers to a sentence that should be read with, anger or loud emphasis or excitement:   What is the general consensus for sticking one after a question mark? Does it make the question a loud one, an angry one? For example, what is the emotion intended here:  we'll just go and get you some?!  Without the ! to me it reads as a simple question, but with an ! it suddenly feels like the question is intense or angry?


How do birds deal with their eyes drying out at high speeds?

My eyes tear up when cycling at 15 mph, which is nothing compared to bird airspeeds.  Do birds continuously produce lots of tears and blink a lot, or do the eyes self-moisturize from the inside without need of blinking, or are their eye surfaces just dry most of the time and they don't mind?


how to solve fatal error of exhausted memory in phpmyadmin

I uploaded an sql file of about 300k and I got this error each time I try to access phpmyadmin: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 100663304 bytes) in C:\xampp\phpMyAdmin\libraries\Util.php on line 2302  I have tried so many methods to get over it, they did not work. I tried increasing memory limit too.  so, I need a way to only drop the last file i had uploaded.


This is a follow up to .  I'm using a function to download a file:  void downloadFile(const char* url, const char* fname, const char* id ) {   //.. }   This is called like :  downloadFile("", "/user/tmp/file.txt", "/home/user/Download/xxxx");  This works fine with a fixed id as shown, but I need xxxx to replaced with a random number:  srand(time(NULL)); int rdn = rand();   If I try:  downloadFile("http://servera.com/file.txt", "/user/tmp/file.txt", "/home/user/Download/" + rdn);   I get      error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]   So how do I append rdn to the string "/home/user/Download/"?  For example, if rdm == 123456789, I would like to pass "/home/user/Download/123456789" to the function.


What is the correct way to implement heavy-write persistent memory?

I'm designing a current meter, which should retain the Ampere-hour count during power loss (e.g. power cable is disconnected without regard for first saving the data). The Ampere-hour value could be written every 60 seconds, e.g. +500k writes per year.  I was considering EEPROM, but commonly only support up to 100k writes. But perhaps by using a 32k memory space, each byte could be cycled 100k times? And using a few seperate bytes for keeping track of the current address, as well as counting every 1k writes or similar, to essentially achieve a small storage with high number of writes?  Another way could be to use volatile memory with a battery, to sustain for at least a few days.  Or, a power-loss detection circuit, and just enough backup power, to allow the MCU to write the current state before shutting down.  Is there a better way?


Is there an equivalent Python function to JavaScript's String.fromCharCode?  The use case is a string generator and I'd like to use the ASCII decimal or hex values to generate the characters (numbers, symbols, upper/lower letters).  JS example:  String.fromCharCode(97) // Gives 'a'


Powershell equivalent for wget switches "-nc" and "-i"

What is the Powershell equivalent of this wget command?   wget -nc -i downloadList.txt   Where      -i downloadList.txt   downloads a list of urls' in the specified file.          -nc   skips the already downloaded files.


Longs Term Effects and Impact of Masturbation

So, I'm bringing a kind of sensitive topic to here. Usually there are lots of articles on the web saying that masturbation is a good stress-relief mechanism and that it can avoid some kinds of prostate cancer and some other good things.  However  based on my own experience (and some friends too) long term masturbation doesn't seem to be that good at all. From my personal case I can say if I masturbate 2 or 3 times a day and keep it for more than a week I feel the following:   I'm always tired and lack energy; I work less efficiently;  I have a shorter temper, don't really have head to deal with anything;  Always bored;  It no longer gives me pleasure; Ruins my sexual life;  Lack of sexual desire; More passive than active behavior; No longer have self-discipline; Completely drained.   Why does this happen, is there any specific research on this subject?  Does this happen because I'm stimulating way too much the "reward"-center of the brain or because in the process of the ejaculation I'm taking a lot of proteins and chemicals out of my body that need to be produced / acquired again?  Are there any long terms effects of this one might experience?   Note: I actually stopped masturbating on my freshman years when I had issues getting achieving an erection. After few weeks everything was normal again.


Update from 18.04 to Ubuntu 20.04 problem

Whenever I try to run: apt --fix-broken install  It shows: E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?  How to fix this?


Mann-Whitney-Wilcoxon Test on highly unbalanced groups.

I have two groups of independent samples whose means I want to compare. The data comes from a distinctly non-normal distribution. (Unimodal, but heavily right skewed).    Let's say that one group (Group A) has 14,000 observations and that another group (Group B) has 700 observations. Thus each group has a decent amount of observations (we are not talking about 2000 versus 5 here).   I am of the opinion that this strong unbalance in the group sizes will not make the Mann-Whitney-Wilcoxon Test any less applicable, however a colleague is suggesting that we randomly sample 700 observations from Group A so that our group sizes are perfectly balanced. He feels that the unbalance of the groups is making the test fail to find the "correct" result. (Where correct result means "result he wants," i.e. that the two groups are statistically significantly different).   As I said, I think that having highly unequal groups does not cause the Mann-Whitney-Wilcoxon Test to somehow stop working.   As far as I understand it, I do believe that the size of the smaller group will have implications for the power of our test, but even there, I am thinking that we probably have at least a decently sufficient sample size for Group B.   Will this highly unbalanced data somehow invalidate my analysis?


Why in calculus the angles are measured in radians?

Why is the formula $\lim\limits_{h\rightarrow 0}\frac{\sin h}{h}=1$ not valid when $h$ is measured in degrees?


Algebraic Property inherited by a "lift"?

Suppose $K$ is a field, and $K\subset E$ is an algebraic extension, and $K\subset F$ is any extension.  Suppose that $L$ is some field which contains both $F$ and $E$ as subfields.  I want to show that $FE$ (the smallest subfield of $L$ containing both $F$ and $E$) is algebraic over $F$.  Lang mentions that the result is true because an element remains algebraic under lifting, but I can't prove the claim with this.  I interpret his comment to mean that if $x\in E$ is algebraic over $K$, then $x\in FE$ is algebraic over $F$.  This is certainly true.    But this doesn't seem enough if I start with any element of $FE$.


How do I get the full url of the page I am on in C#

I need to be able to get at the full URL of the page I am on from a user control.  Is it just a matter of concatenating a bunch of Request variables together?  If so which ones? Or is there a more simpiler way?


How can glass breaking effect from Smash Hit be achieved?

I saw  the other day and was amazed by the physics of the game, specially the shattered glass effect:    I've read   about this subject but I still feel that they don't share enough details to let me get started on implementing this on my own with OpenGL/GLSL.   Is it possible for somebody with an enhanced perception and graphics understanding to  and give some pointers on how this effect could be replicated?  I rather not use 3rd party physics engine and do the entire thing on my own for educational purposes, so could you mention some of the physics that goes behind this as well?  References to other documents and demos are highly appreciated.


How can I access something like Task Manager in Windows to kill processes that are hogging memory?

When I was using three windows in Chromium and two windows in Firefox my system suddenly hung while I was switching between them. In Windows I used to open task manager and close a specific window which was stuck. How to do this in Ubuntu?


Login MSSQL using Active Directory account from local Windows account

Due to Coronavirus, we on my company are working from home. I had setup a virtual machine and am using VPN to connect to company's intranet.  It happens that we use company's AD account to log in MSSQL. We log in Windows with our account, and use Windows Authentication to log in MSSQL.  Now, I'm unable to log in local Windows using AD. I'd need to configure it to connect to AD, but for that Windows/PC needs a machine digital certificate, and be approved by some domain admin. That won't happen.  Anyway, I'm looking for a way to run SSMS using AD account, without needing to use it on Windows. I tried Run as different user but it also didn't work.


A proof that $1=2$. May I know why it’s false?

im not good at formatting. May I know why it’s false   $x^2= x+x+x+\ldots(x\; \text{times})$  apply derivative on both sides  $=> \frac{d}{dx}(x^2)=\frac{d}{dx}(x+x+x+\ldots(x\; \text{times}))$  $=> 2x=1+1+1+\ldots(x\; \text{times})$  $=> 2x=x$  $=> 2=1$


Confused about the definition of subspace

The definition from my textbook is:     A subspace of a vector space is a set of vectors that satisfies   two requirements:       If $v$ and $w$ are vectors in the subspace and $c$ is any   scalar, then      (1) $v + w$ is in the subspace.      (2) $cv$ is in the subspace.   And my textbook says vector space $\mathbb{R}^2$ is not a subspace of $\mathbb{R}^3$ but let say $V=\begin{pmatrix}a\\b\end{pmatrix}$ and $W=\begin{pmatrix}c\\d\end{pmatrix}$, so $V$ and $W$ are all in $\mathbb{R}^2$, and clearly $V+W$ is in $\mathbb{R}^2$, $cV$ or $cW$ is in $\mathbb{R}^2$ too, so the first two requirements are met, why we say $\mathbb{R}^2$ is not a subspace of $\mathbb{R}^3$? It looks like we have to add $V$ and $W$ should be in $\mathbb{R}^3$ as well, but why we don't have this in the definition?


Internet Explorer 11 showing up as tablet on desktop

I need the latest version IE (it was like 11.0.66.11 but I needed 11.0.77.00) but IE kept telling I had the latest. I uninstalled it and installed it again through windows features and now this is what I see, Internet Explorer as if I was on a tablet. There's no developer tools, nothing!  How do I get Desktop Internet Explorer back?


Masking pixels inside the polygons using Google Earth Engine?

I am working on a classification problem on agricultural fields. To make things easier, I first identified road, cities, water, fields, and etc. I am planning to eliminate road, cities, and water out of the image to improve my model. I got all these areas as polygons in a .shp file and I want to mask out these areas.  Wherever I check, all applications are for clipping a polygon.   Is there a method to mask the polygons I provided in GEE code editor?


I am making a tree, in which I have a texture for the central tree object or bark, and branches have a different texture.    I applied the branches on tree with particle system.  Till then the textures were fine.    Then I convert the particle system and delete the particle system.    Then ctrl+j join to the main bark texture with the branches, with the bark or central stem as parent.    Doing this, texture from my branch material disappears.    Please anyone help me out.  ASAP.!😊 Thanks


See download time remaining in macOS Catalina App Store

After upgrading to macOS Catalina, the download progess indicator changed to an IOS-style circle, which doesn't give the more specific details of download speed and time remaining that were visible in previous versions. Is there any way to still see how long an app will take to download/upgrade?


Question:     If $x = \sin 1^\circ$, find the value of the expression:    $$\frac{1}{\cos0^\circ \cos1^\circ} + \frac{1}{\cos1^\circ\cos2^\circ} + ... + \frac{1}{\cos44^\circ\cos45^\circ}$$   in terms of $x$   I really can't see how I would simplify this expression in terms of $x$. Any hint would be appreciated.


Does a bounded sequence having a single limit point always have a limit?

Every bounded sequence has at least one limit point. (Bolzano Weierstrass Theorem) If such a sequence has a unique limit point, need that point be the limit of the sequence?


What should you do if you cannot reproduce published results?

I am trying to reproduce published results in a paper. Those results come from numerical simulations. The original authors and I do not use the same software, and theirs is proprietary (I don't have access to it). I have tried to reproduce their results, and it works qualitatively but not quantitatively: the differences between their results and mine on typical quantities of interest are between 2 and 5 times the expected accuracy of the method.  So far, I have communicated with the original authors, trying to clear out all possible sources of error I could think of (checked that I got the tricky parts of the algorithms right, checked that the “usual” parameters that were missing from their paper had the “usual” values, everything I could think of). They are forthcoming enough, and reply to my questions quickly, but it's clear they don't want to invest time in doing any serious follow-up on their side. And without access to their software, it appears I'm stuck.  Now, my question is on how to proceed. The “ideal case” for unreproducible results is to make a detailed analysis of how and why they cannot be reproduced, and possibly find out a source of failure (or at least plausible issues). This advances the field, and is probably publishable (not in a very high-profile journal). Here, this is not possible.  I have, however, nice results that I have obtained (extending their work far beyond what was already published), and if I didn't have these differences with their paper, it would make a very attractive paper. What can I do with those? Is it possible to publish them, merely noting the different with their paper without more comment? Or are my results simply unpublishable? I welcome any comment, especially from people who have found themselves in such an uncomfortable situation!


I have a file named EX.txt with content inside of it:  user='\''member'\''   I want to use sed to replace those '\'' to ' so it would be like this:  user='member'   But it didn't work when i use   sed -i "s/'\''/'/g" EX.txt   How to solve this?


How to use variables in a MySQL Select query

There are several questions with similar titles, but all of them seem to have more complicated queries than what I am working with.  I'm trying to use a variable as part of a select query. The variable $theindex indicates the value for the field theindex which I am selecting for.  This is the code I am trying to use, which generates HTTP ERROR 500...  $sql_stmt = "SELECT * FROM products WHERE theindex='$theindex'"; $result = mysqli_query($conn,$sql_stmt);   This works...  $sql_stmt = "SELECT * FROM products WHERE theindex='1'"; $result = mysqli_query($conn,$sql_stmt);   Clearly the apostrophes around $theindex may be causing the problem, but all the approaches that I've tried thus far don't help and just generate HTTP ERROR 500. How can I use a variable in this select query?  Thank you for taking a look at this.


Why does wetting something change its colour?

I have noticed that wetting something almost always changes its colour. For example sprinkling water onto a t-shirt creates darker spots on the fabric; but this effect is not limited to fabric, almost everything once wet appears darker. Why is that?


I am visiting Denmark for 4 months. I will need a mobile tariff with data for my Android phone. I won't be making many calls. Does any of the Danish providers offering a prepaid card with large data quota (at least 500 MB/month)? Or will I have to sign a contract?


Auto-incrementing field in feature class using ArcGIS Desktop?

So I'm relatively new to ArcGIS and ArcCatalog.  I have created a field name of PROJECTID in a feature class in a Personal Geodatabase.  The data type is TEXT.  This will be a ten digit ID.  The first five characters will be a acronym.  The sixth character will be a digit that represents the type of feature.  It will be a number.  The last four characters will be numbers that should be incremented starting at 0001.    Example:     WATER-1-0001  Screen shot of the field:   So my question is how can I do this in ArcCatalog.  I've seen some Python code that will autoincrement like the following:  rec=[OBJECTID] def autoIncrement(a):   global rec   return "water" + str(a) + "-" +  format(rec, '04d')   Again I'm a newbie when it comes to ArcGIS . Now I am getting an error NameError name 'OBJECTID' is not defined.


Prove that for any infinite poset there is an infinite subset which is either linearly ordered or antichain.

Let $(X, \leq)$ be an infinite poset. Prove that there is an infinite $X' \subset X$ for which holds one of the following:  1) Induced order on $X'$ is linear.  2) $(X', \leq_\mathrm{ind})$ is antichain. (Every two elements in $X'$ are incomparable)    My attempt:  Let's start trying to construct a linearly ordered set $(X', \leq_\mathrm{ind})$ element by element. First we take some element $x_1 \in X$, then we take another $x_2 \in X$ such as $x_1 \leq x_2$ or $x_2 \leq x_1$. Basically, we take an element from $X$, if it is "good" we put it in our chain, otherwise we throw it away. We continue constructing the chain that way. If we do not stop at some finite step, then we are done, we have constructed linearly ordered subset.  If we do stop at some $x_n$ that means that we have finite amount of comparable elements, which means that $X \setminus X'$ is an antichain.    a) I am not sure about the soundness in the last step, could somebody please check it?  b) Can this be proved without a choice function?


Select distinct for one column and many in another column

I have:  Name PhoneNo JOHN 555555 JOHN 555554 MIKE 111111 MIKE 122222   I want to display output like:  Name PhoneNo JOHN 555555      555554 MIKE 111111      111112


Why does $\mathrm{Tor}_0^R(M,N)\cong M\otimes_R N$?

Several texts on commutative algebra (Eisenbud, Peter May's notes) state this fact as an obvious consequence of the fact that $(-\otimes_R N)$ is a right-exact functor, however, I think I'm missing their argument.  Let $$\cdots\to P_1\to P_0\to M\to 0$$ be the end of a projective resolution, so that $$\cdots\to P_1\otimes_R N\to P_0\otimes_R N\to M\otimes_R N\to 0$$ is a complex, and by right-exactness, the map $P_0\otimes_R N\to M\otimes_R N$ must be surjective. However, $P_1\otimes_R N\to P_0\otimes_R N$ need not be injective, so I don't see how to show that $$\mathrm{Tor}_0^R(M,N) = \mathrm{im}\left(P_1\otimes_R N\to P_0\otimes_R N \right)\big/\mathrm{ker}\left(P_0\otimes_R N\to M\otimes_R N \right)\cong M\otimes_R N.$$ What am I missing?


Why can't I cd into any subdirectories of my home folder?

I am using Ubuntu 10.04.1 in a terminal window. When I am in my home user directory like /home/jeg#, I cannot cd into any directories below this. For example, if I enter cd downloads, or cd /home/jeg/downloads, I get the message No such file or directory. But when I do a ls command it shows me all the directories and files below /home/jeg. I can go into any other directory, so why is this a special case?


How can I get a list of all packages in a repository section from command line?

In Synaptic, one can list packages by section. For example, in the image below all packages of the "Amateur Radio (universe)" section are listed.  How can I get such a list (edit: with package description) at the command line?  I need a raw list; a terminal application like aptitude will not do.


So unbelievably I have never cleared my history in SMS/iMessages/Messages. Ostensibly, I should be able to scroll up and eventually see my first text message from my first gen iPhone. This is, unsurprisingly, taking up a considerable amount of space on my phone, but a big part of why I've never cleaned it out is that it contains a tremendous number of pictures of my daughters my wife has sent me over the years. It doesn't seem like these get saved to my photo roll and there doesn't appear to be any way to bulk export them. It may be worth noting that I use desktop messages in Yosemite and it seems work well, so there may be an approach I can use from that angle.  What's the best way for me to archive all the photo attachments from almost seven years of text messages?


I'm on RHEL 7. Security team suggested me to update curl and dbus packages. When I try yum update , it says Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. No packages marked for update  I verified that the packages are old as mentioned by security team. Below are the screenshots I received from security team.   How can I update the packages as suggested?


Java: Check the date format of current string is according to required format or not

I wanted to know that is there any method available in Java that can do this.Otherwise I may go for Regex solution. I have input string from user that can be any characters. And I want to check that the input string is according to my required date format or not.   As I have input 20130925 and my required format is dd/MM/yyyy so, for this case I should get false.  I don't want to convert this date I just want to check whether input string is according to required date format or not.   I have tried following   Date date = null; try { date = new SimpleDateFormat("dd/MM/yyyy").parse("20130925"); } catch (Exception ex) { // do something for invalid dateformat }   but my catch (Exception ex) block is unable to catch any exceptions generated by SimpleDateFormat.Parse();


For required fields, should we add the red asterisk before or after the field label?

Should we add red asterisk before or after the label of required fields, i.e., to the left or the right of the field name? My boss prefers to add the asterisk before the labels, but I like to add them at the end. Which is more user-friendly?


Find the length of the median of a triangle using three side lengths

Question: In a triangle, a median is the line segment that connects a vertex with the midpoint of the opposite side. Prove that in a triangle with side lengths a, b, and c, the length Mc of the median, drawn to the side with the length c, is equal to Mc = 1/2 * √(2*a^2+2*b^2-c^2)  I have been hinted that I can begin by finding the cosine of the angle opposite to side b. I thought about beginning by trying to find the area of the triangle, but I am not sure if that would work and how I should proceed.


Can timestamps be preserved when copying files on OS X?

I'm interested in combining the files from three Macs by copying the files from each one into a single folder hierarchy of my design on an external hard drive.  In my past experience copying files in OSX, sometimes the files lose their Created and Modified timestamps; i.e. they are changed to the present moment when the file copy happens.  How can I make sure this doesn't happen?


What is the difference between "I did" and "I have done"

I am always confused about when to use "I did something..." and when to use "I have done something..."  Please kindly explain and provide some examples.


Schur multiplier as a subgroup in finite abelian groups.

Let $G$ be an abelian group such that the Schur multiplier $M(G)=\mathbb{Z}_p\times \mathbb{Z}_p$.     Can we say that $G$ has a subgroup isomorphic to $\mathbb{Z}_p\times \mathbb{Z}_p.$   I have seen in many groups this relation holds, what can we say in general? I don't know that how to prove this or contradict. Please help me.


For a prime $p$, if $x^p \equiv y^p \pmod p $  Then prove that; $x^p \equiv y^p(\bmod p^2) $  Firstly I am confused where to approach to prove this question ,though i know several propositions and theorems related to congruences   Like by applying  fermat's theorem we can easily derive  $x\equiv y \pmod p $ But what to do after that ?  Secondly i approached with the proposition that ,iff $x \equiv y (\bmod n_i)$ And for $i=1,2$ Then  $x \equiv y (\bmod [n_1,n_2]) $  But i am unable to prove the question with these two approaches   Please tell whether either of my approaches will help to prove the question if not then please give a proper proof with steps for the same   This is an olympiad book question(not a homework problem)


What is the deep reason of length contractions and time dilations?

In the theory of relativity, a spacetime can have length contractions or length expansions and time can have time dilations or expansions.  In theory of special relativity, any physical object with constant velocity or any inertial coorinate system, can have length contraction and time dilation such that:  $$ (t'/ t_0) = \sqrt[]{1-(v/c)^2} $$  $$ (s'/s_0) = 1/\sqrt[]{1-(v/c)^2}$$  This property is also symmetric between to observers that have relative constant velocity - both observers observe the same phenomena in the other.  and in Genral relativity, for example in the Schwarzschild metric object in the gravitation field has time dilation:  $$ (t'/t_0) = \sqrt[]{1- (2GM/rc^2)}$$  compared to a clock that is far away from the gravitation field.  Usually i have read that these properties belong to the geometry of spacetime. The geometry of the empty space for example follows so called Lorenzt transformations between two origin-centered inertial reference frames, other having relative velocity v other having v= 0 is:  $$ t' = u(t - \frac{vx}{c^2})$$  $$ x' = u(x - vt)$$  $$ y' = y $$  $$ z' = z $$  whwere u is Lorentz gamma factor $$ u = \frac{1}{\sqrt{1-(v/c)^2}} $$  Also the observed local velocity of ligth is always constant for all local observers:  $$ c'= c $$   However, In the gravitation field, different observers do not agree that the velocity of light is constant globally, in large path intervals.  These equations that describe the geometry of spacetime does not yet tell what is the reason why spacetime has this kind of geometry.  1 Is there any theory or insight what is the reason behind these time dilations and length contractions?  This has been answered: Lorentz covariance; Lorentz covariance is a property of spacetime that it obeys the Lorentz group transformation equations.  And is there any idea what makes the velocity of light is always constant in empty space?  (these following related questions 2 and 3 are asked to me to better to move under new question:) (edited 22.12.2015)   2 can Lorentz covariance be a result of some kind of dynamical or nondynamical but active process or mechanism that is going on in the spacetime or in space in small length scales and short time scales?** (edited 22.12.2015)  3 Is there another deep explanation what is behind "Lorentz covariance"?** (edited 22.12)


What would the rules be about creating threads regarding other users, and encouraging other users to vote bomb them?

I am just wondering what the rules are here regarding making threads about other users, and whether it is considered a professional, or an unprofessional way of encouraging other users to vote bomb them? Particularly using labels such as "Newbie" et cetera? Surely if a person's threads are so bad, then people will vote them down anyway, using their own mind, without a person requiring to make a thread asking other users to vote bomb them? The system here seems to be a good one. But there appears to be a few flaws. Surely the system is broken, if it is ok to go to Meta, make a thread about a newbie, and ask how one can get this newbie suspended, and then get a response that equals "vote bomb them". Surely the system is flawed, if it becomes ok, after that person is suspended, and is ensured that no-one else will find out about their suspension, and after receiving this message "It is a private, confidential communication mechanism between such and such community moderators and users. Our goal is to amicably resolve issues in a constructive way through direct communication. Please note that continuing to persist in problematic behaviors is grounds for timed suspension." they find the moderator that sent them that message posting updates of the persons whereabouts in order to encourage people to follow him and farther vote bomb him? Surely the system is flawed if the newbie after being sent that letter of confidentiality, then goes to Meta, to find his suspension being discussed by other users in comments sections? Is this supposed to be self moderation? Surely this is "abuse" of self moderation? I apologise if you do not like my opinion.


I am trying to call a new function under existing function. First function works perfectly, but code does not go inside test function. Any idea on this issue?  The error I get on this is : test is not defined    var doIt; var test;  $(document).ready(function() {   test(2);   doIt = function() { //now has global scope.     test(1);   };    test = function(n) {     alert('test function');   } }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <body>   <input name="Go" type="button" value="Go" onclick="doIt();" /> </body>


Campy SF mid 90s made-for-TV where a 'movie star' from our world saves another world

Fragmented memories from my childhood:   I thought the protagonist was Toby Huss (Artie from Adventures of Pete & Pete), but I cannot find anything that matches on his filmography. Protagonist definitely was 'dorky', he was an actor who played a superhero in our world and then was recruited by those from the other world who thought he was a real superhero. I also thought it was from one of the companies that made Hercules and Xena. It may have just been broadcast on the same channel. The whole thing is really campy but definitly had heart. Probably a "TV-14" rating. There is some type of reactor meltdown scene at the climax. Had a longer golden-age-of-sf title like "The Adventures of..."


Can I use "Divinity of Pride" in my mono black commander deck? If not, then what card is/similar to Divinity of Pride but is a mono black?

Can I use the MTG card  in my mono black commander deck? It's a multi-colored card - black/white - but it pays for either four swamps (black mana) or four plains (white mana). I know of the rule in commander indicating that "All cards must be in the color identity of the commander." But since this is a black/white and can pay for either four black or four white, I just want to clarify. So, my question is Can I use Divinity of Pride in a mono black commander deck? If not, then what card is/similar to Divinity of Pride but is a mono black?


Disable "Save space by optimizing storage" pop-up

I just upgraded to macOS Sierra and the pop-up prevalence is driving me crazy.  I am using a 2011 Macbook Air with only 256GB SSD space, and have consistently had 10GB or less storage remaining since almost immediately after purchasing.  I am getting pop-ups saying "You only have 10.27 GB of storage left, Save space by optimizing storage". They are similar in nature to the pop-ups described in these two questions:  and   However, neither of these questions have answers to their [slightly] different pop-ups.  Is there any way to disable these pop-ups entirely? It is not possible for me to free up more storage on anything longer than an extremely short term basis, so that is not an acceptable solution.


Counting no.of text files under a directory in shell scripting

I have a folder /mqlocal/mqm. inside that there are 2 text files  (bindu.txt,sujitha.txt). I need code to count the number of text files under the directory. The result should be an integer.


Fatal Exception Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

Using Firebase database to display the data in a RecyclerView. The app crashes when they run this line of code   itemGroup.setHeaderTitle(groupSnapShot.child("headerTitle").getValue(true).toString());   I get this Error:     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference   private void getFirebaseData(){     dialog.show();     myData.addListenerForSingleValueEvent(new ValueEventListener() {         @Override         public void onDataChange(@NonNull DataSnapshot dataSnapshot) {             List<ItemGroup> itemGroups = new ArrayList<>();             for(DataSnapshot groupSnapShot:dataSnapshot.getChildren())             {                 ItemGroup itemGroup = new ItemGroup();      itemGroup.setHeaderTitle(groupSnapShot.child("headerTitle").getValue(true).String());    GenericTypeIndicator<ArrayList<ItemData>> genericTypeIndicator = new GenericTypeIndicator<ArrayList<ItemData>>(){};     itemGroup.setListItem(groupSnapShot.child("listItem").getValue (genericTypeIndicator));    itemGroups.add(itemGroup);              }             iFirebaseLoadListener.onFirebaseLoadSuccess(itemGroups);         }          @Override         public void onCancelled(@NonNull DatabaseError databaseError) {   iFirebaseLoadListener.onFirebaseLoadFailed(databaseError.getMessage());          }     });  }   when i comment out that line of code, i get this E/RecyclerView: No adapter attached; skipping layout from my logcat... Im not sure if this affects the RecyclerView adapter...


This is an old bug, it seems to be not Evince's own fault but the bug is from Poppler.  The specific cause of the bug has been identified (it's the calculation of some coordinates) but as of 2019 it is still not fixed in Ubuntu.  This is an example:  I tried to highlight the second sentence of the first paragraph, but this is what I get:   That means all the users of Ubuntu cannot highlight PDF texts using Evince --- this is such a basic function.  Is there any way to update Poppler to the correct version such that Evince works?  Please do not mark this as a duplicate question UNLESS one can provide a specific way to upgrade Poppler and resolve this problem.


Asymptotics of $\sum_{m=1}^{n} n \mod m$

Let $\displaystyle a_n = \sum_{m=1}^{n} (n \mod m)$ where $0 \le n \mod m \le m-1$. It appears that $a_n \sim Cn^{\alpha}$ with $\alpha = 2$ and $C \approx .177448$. Is this true, and if so why?


I tried installing opendjk-7 in the way that was suggested , but I get this error:  W: The repository 'http://ppa.launchpad.net/openjdk-r/ppa/ubuntu yakkety Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/openjdk-r/ppa/ubuntu/dists/yakkety/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.


Alternatives to proportional odds mixed effects models

I was doing some reading about categorical data analysis (e.g. Agresti (2010): Analysis of Ordinal Categorical Data). Additionally to analysing data with an ordinal response with the help of proportional odds cummulative mixed effects models it seems some people suggest e.g. to use the glmer() function from lme4 in R to fit a whole range of models.  My data looks as follows:   ordinal response: a five point scale with $1<2<3<4<5$ ($1$ being worst, $3$ being neutral, $5$ being best) one single categorical predictor "type" with 5 levels subjects as random effects term which I would specify in lme4 syntax: (type | subjects) with intercept and slope for every subject.   Every subject saw $320$ items ($40$ for level $1$, $40$ for level $2$, $40$ for level $3$, $160$ for level $4$) and rated every single one of them. The dataset seems quite nice and as it only contains a single predictor is very good to get acquainted with categorical data analysis.  However, I was wondering if there are alternative ways of analysing such data apart from treating the response as a continuous variable and using lmer() or aov(). And if there are any recommendation or advice people can give here.  Here is an alternative I read about . One could split a dataset with an ordinal response into subsets that each only contain two levels of the ordinal response. There are some questions I have about this. How would you split that dataset into subsets given a $5$ point ordinal response? Based on the ordering of my response the most reasonable choice to me seems: subset $A$ with levels $1$ and $2$, subset $B$ with levels $2$ and $3$, subset $C$ with levels $3$ and $4$, subset $D$ with levels $4$ and $5$. I tried this with the wine data set from the ordinal package. But this will ungraciously fail because of convergence failures, model unidentifiability etc. (I'm using lme4 1.1.8). Here is the wine example:  data("wine", package = "ordinal") # the wine dataset library(lme4) sub <- wine$rating %in% grep("[1-2]", wine$rating, value = TRUE) sub12 <- subset(wine, subset = sub) sub12$rating <- factor(sub12$rating, ordered = FALSE) glmer12 <- glmer(rating ~ temp + contact + (temp | judge),                  data = sub12,                  family = binomial)  # Substituting (1 | judge) for (temp | judge) won't make it better  # Will give no warning glm12 <- glm(rating ~ temp + contact,              data = sub12,              family = binomial)  sub <- wine$rating %in% grep("[2-3]", wine$rating, value = TRUE) sub23 <- subset(wine, subset = sub) sub23$rating <- factor(sub23$rating, ordered = FALSE)  glmer23 <- glmer(rating ~ temp + contact + (temp | judge),                  data = sub23,                  family = binomial)  sub <- wine$rating %in% grep("[3-4]", wine$rating, value = TRUE) sub34 <- subset(wine, subset = sub) sub34$rating <- factor(sub34$rating, ordered = FALSE) glmer34 <- glmer(rating ~ temp + contact + (temp | judge),                  data = sub34,                  family = binomial)   Of course the wine dataset is rather tiny (and we have full- or quasi-separation) and mine won't but how likely am I to run in similar problem if I analyse ordinal data this way?


How would you deal with a bimodally distributed predictor variable in bivariate logistic regression?

I am relating age to a binary outcome in a logistic model (or, more to the point I would like to).  However, the distribution of the ages looks like this:  nn <- 1000 age <- c(rpois(nn / 3, lambda = 0.5),        rnorm(nn / 3, mean = 10, sd = 2),        runif(nn / 3, min = 0, max = 15)) age <- age[which(age > 0)]       How would you approach this problem?  Thanks!


Recently I've had to look at the recent chat activity of some users (moderation/etc). The chat profile links to the parent site profile, but none of the SE sites (including SE.com) seem to link back to the chat profile. Which means there is effectively no way of finding the chat user (knowing the SE.com user) unless you open all chat users with the same username and verify the parent profile userids.  Update:  Just now I had to move a discussion to chat. This involved creating a chat account for a 1-rep user, and then giving him write access. But: his username was extremely common, and there was no way for me to add him without knowing his chat id. Which meant I had to go through pages and pages of users with similar names to find him. Not. Good.


How can I properly form text from particles?

I'm using cycles and particles that form text. I've got every letter separated, and while the particles form the shape, it doesn't properly 'fit' the shape or cover all of the surface of the object, so it doesn't work properly for me.  I've already tried making another particle system on the same object, with more particles, but it looks weird...is there any solution to this?  Thanks in regard, I'll be waiting for a response.


Existence of $c \in [a,b]$ Such That $\int_{c-a}^{b-c}f(x)dx=0$

If $f:[a,b]\to R$ is a continuous function, prove that there exists $c \in [a,b]$ such that $\int_{c-a}^{b-c}f(x)dx=0$.


can you help me to do a difference of CDF?

I have 2 CDF's with equal number of points that I want to compare. These are from:   Temperature of 1 month from 2012 Mean temperature across months   What can I do to obtain this difference, this is from the formula of Finkelstein-Schafer


Finding all nodes not referenced by a menu entry or another node

In the course of creating the content for a site, we've ended up with orphaned content nodes that are not linked to from anywhere. I'd like to find and examine these. Surprisingly, I can't find a module for this.  Tiny hypothetical example: I'm building a brochureware site. Someone wrote a "Contact" page, someone else wrote an "About Us", and someone else wrote "Directions". The person writing "Directions" forgot to put it in a menu link or add a link from "About Us" to "Directions". So "Directions" is orphaned: there are no links to it. I'd like to find all such nodes so I can figure out what to do with them.


I'm making a Beamer presentation. I need to show some notes on a second screen, so I'm using pgfpages.  Whereas, when I put a section, it appears 2 times :/ Here, it's a minimal code with the problem. Have you any idea ?  \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais]{babel}  \usepackage{pgfpages} \setbeameroption{show notes on second screen=right}    \begin{document} \begin{frame} \tableofcontents \end{frame}  \begin{frame} \section{test} toto \end{frame}  \end{document}   Thanks !


colortbl's \cellcolor not filling whole cell in combination with \makecell

I want to color some cells of a table, some of which use \makecell. The problem I run into is that not the whole width of the \makecell cells is filled by the color.  MWE:  \documentclass{article}  \usepackage{makecell} \usepackage{colortbl}  \begin{document}   \begin{tabular}{|l|}   Cell 1's text is very long \\   \cellcolor{red} \makecell{Cell\\2}   \end{tabular} \end{document}     The desired behavior is of course to have the whole cell filled, so how can I do that?  Edit: I'm using \makecell to get a cell consisting of multiple lines in my original problem, so I've updated the MWE to do that as well. If there's any other method of doing that without using makecell I'm willing to do so as well.


Removing duplicate labels within a given radius in QGIS

In my map, every street segment is an entity. So each one is labelled as you can see in the picture. I'm trying to remove duplicate street labels within a given radius in QGIS, but I can't find how to do it. I know how to do it , but in QGIS I cannot find the option.


What's This Design called and how to pull that off?

I was Browsing through Behance and saw this amazing work by    Can someone tell me what's that Color Paint design called and how to make it? i am quit sure that it's postally 3d Render or else it's made in Illustrator with Blend Tool, Any Suggestion on that please.  More Examples


Display the original, unedited post on the post editing page

I edit people's posts occasionally on ServerFault when the grammar/punctuation/coherence goes below a threshold that my OCD can handle. However, on some of the thornier posts I would like to be able to compare my edits to the original text, especially when doing a final proof-reading of my edits.  At the moment, my only options are to either copy the original text into a text editor or copy a duplicate of the text into the editing field. From there I can compare my edits to the original text and make sure I'm preserving the original meaning as I attempt to untangle less than optimal communication.  This request is somewhat similar to this Meta post: ""


On the volume of a non-right tetrahedron and the integral of a linear function over it

I've solved quite a bit of these questions with tetrahedrons with a 90 degree angle, but I am not sure how to approach a non-right angle tetrahedron. I am unsure how to find the triple integral's bounds. Calculation itself is no problem.   $ \int_B (x + y + 2z) dV$  where B is the tetrahedron with vertices $(0, 0, 0)$, $(0, 2, 0)$, $(1, 3, 1)$ and $(1, 1, 0)$.  Is the way of finding the bounds same for non-right angle tetrahedrons?


Division of Factorials [binomal coefficients are integers]

I have a partition of a positive integer $(p)$. How can I prove that the factorial of $p$ can always be divided by the product of the factorials of the parts?  As a quick example $\frac{9!}{(2!3!4!)} = 1260$ (no remainder), where $9=2+3+4$.  I can nearly see it by looking at factors, but I can't see a way to guarantee it.


When you start a YouTube video, there's a light grey bar which indicates the loading of the video. When I replay the video (by clicking the 'replay' button or by clicking somewhere random on the horizontal play line), why does the video load/buffer again?  It never used to be like this, but recently I've noticed that for some videos this problem occurs. Does anyone else experience this?  I tried on both Chrome and Firefox in Windows 7.


I am trying to instlal OpenMPI on my Ubuntu 14.04 LTS following this   When I run the command sudo apt-get install -y autotools-dev g++ build-essential openmpi1.5-bin openmpi1.5-doc libopenmpi1.5-dev I get the error messages  E: Unable to locate package openmpi1.5-doc E: Couldn't find any package by regex 'openmpi1.5-doc' E: Unable to locate package libopenmpi1.5-dev~ E: Couldn't find any package by regex 'libopenmpi1.5-dev~'   Why is that? I tried on Ubuntu 12.04, there it worked fine.


I googled a lot and read many documents. But I can't understand the concept behind iPhone's Bluetooth technology.  In my knowledge, Bluetooth was used for:   Transferring files between devices Wireless communication for things like video gaming and earphones   Recently I tried to copy some of the photos from my old Android mobile to my iPhone 4S via Bluetooth. It's quite simple in my older phones to connect with other devices by Bluetooth for file sharing. But I can't pair other devices (even another iPhone :( ) with my iPhone 4S.   Copying songs/videos may affect their iTunes as well as their business. But what about images? Why is the usage of Bluetooth restricted and what's the use of it being able to transfer images? Is there any other way to use iPhone's Bluetooth to transfer files? Maybe using an app? But I don't want to jailbreak my device.   I'm confused about the restrictions and Apple's thinking.


I read this  but I'm still confused.  using (Font font1 = new Font("Arial", 10.0f))  {     byte charset = font1.GdiCharSet; }   In the code, does it mean that we are introducing a new instance of Font class called font1. However, this instance will be alive ONLY within the curly brackets. Further on in the code we can again instantiate font1 but that will be a completely different instance since the previous font1 was disposed.  Is this correct? Then what is the purpose? We could reassign different values to font1 without disposing the previous one?


I am working on porting code from JAVA to C#, and part of the JAVA code uses tokenizer - but it is my understanding that the resulting array from the stringtokenizer in Java will also have the separators (in this case +, -, /, *, (, )) as tokens. I have attempted to use the C# Split() function, but it seems to eliminate the separators themselves. In the end, this will parse a string and run it as a calculation. I have done a lot of research, and have not found any references on the topic.  Does anyone know how to get the actual separators, in the order they were encountered, to be in the split array?  Code for token-izing:  public CalcLexer(String s) {     char[] seps = {'\t','\n','\r','+','-','*','/','(',')'};     tokens = s.Split(seps);     advance(); }   Testing:  static void Main(string[] args)     {         CalcLexer myCalc = new CalcLexer("24+3");         Console.ReadLine();     }   The "24+3" would result in the following output: "24", "3" I am looking for an output of "24", "+", "3"   In the nature of full disclosure, this project is part of a class assignment, and uses the following complete source code:


Let $p$ be a prime number. Find all solutions of the congruence $x^2\equiv x\pmod p$

I used Fermat's Little Theorem to get $x^2 \equiv x\pmod 2$ So $2k = x^2-x$ for some integer $k$ $= 2k = x(x-1)$, note that this is a product of two consecutive numbers, so we can rewrite it as $2l$ for some integer $l$ $ = 2k = 2l$ $= k = l$ I don't think this tells me anything meaningful. I think my wrong step is when I start to toy around with the product of consecutive integers, but I am not sure how else to proceed.


With jQuery, what is the point of encapsulating a function in round brackets?

I see this in some HTML files that use jQuery, at the bottom:  (function() {         setTimeout(function(){window.scrollTo(0,0);},0);     })();   What does it mean to put the whole function in round brackets?


Best approach to inject variable data into JavaScript files?

I'm looking for a good approach to manipulate some JS code from within a module call. (Using Drupal 6.)  I have a set of JavaScript functions I need to add to a page. (Regular JavaScript, no jQuery.) Unfortunately they rely on some variables from the page they are shown on. So my current approach is to generate all the JavaScript from within PHP code which results in a whole lot of escaped strings like $output .= '  var url = "'. $url . '";' . "\n";, which is not so nice after 20-30 lines of code.  So I would like to move all the JavaScript code into it's own .js file, and find a way to inject my variables. So far, the only solution I could come up with is putting it in a temporary file, read that, modify and save it to the /files directory. But is there another, more preferred way?


If $A^2=I$ and $\lambda \not =-1$, then $A=I$

Given an $n\times n$ matrix $A$ with $A^2=I$, assume that $-1$ is not an eigenvalue of $A$. Prove $A=I$.   Proof attempt: Since $A^2=I,$ we have $A^{-1}=A$. Using that fact that $\det(A)=\prod_{i=1}^n\lambda_i$, we see that each of the eigenvalues is nonzero. For any eigenvector $v$ of $A$, we see $Av=\lambda v$, so $\frac{1}{\lambda} v = A^{-1}v=Av$. This implies $\lambda^2=1$. By assumption, we conclude that each eigenvalue is $1$. Hence, $\det A=1$.  (1) How do we know that $A$ actually has any eigenvectors? E.g., the map which rotates a vector in the plane by $\pi/2$ clockwise is invertible but has no eigenvectors. (Perhaps there should be some given information about the underlying field.)  (2) How do I use $\lambda=1$ to conclude $A=I$?   I tried using $A=A^{-1} = \frac{C^T}{\det A}=C^T$, where $C$ is the matrix of cofactors of $A$. From this, I conclude that each entry of $A$ equals its corresponding co-factor -- i.e., $A_{i,j} = \det(\overline{A_{i,j}})$, where $\overline{A_{i,j}}$ is the sub-matrix of $A$ obtained by deleting row $i$ and column $j$. Using the co-factor expansion of the determinant along row $i$, we also conclude $$1=\det A=\sum_{j=1}^n A_{i,j}(-1)^{i+j}\det(\overline{A_{i,j}})=\sum_{j=1}^n(A_{i,j})^2(-1)^{i+j}.$$


Find Intersection Points of two Lines in 3D-Space

I tried to read this article, but i didn't understand:   Can someone give an easy example with numbers to see how intersection points of lines in 3D-Space are calculated?  Lets say, there is a line described as two vectors for the start and end position:  Line1Start = (-1, 0, -1) Line1End =   (1, 0, 1)  Line2Start = (-1, 0, 1) Line2End = (1, 0, -1)  I know that on a cartesian coordinate system, the intersection point would be at (0, 0, 0). How is the formula applied in my case?


Show a series is convergent and calculate numerical sum

Calculate:  $\sum \limits_{n=2}^{\infty}\dfrac{1}{n^3-n}$  I have tried to find the sequence partial sums and show that they converge, but I'm having trouble setting it up and I have no idea how to calcuate the numerical value.


Hi I'm working on a workflow product with a 'home' page for storing your files. I'm curious about whether there is a good reason for navigating to the file clicked vs. opening a new tab.   So far I haven't come across a solid reason for either. At a high level, opening a new tab feels more like working w/ the finder. The downside is that you might not have kept your home tab open or it could be hard to find. But the downside is also the same if you navigate to a new page on the same tab. I guess you'd want the user to know where they are whenever they are on the page.


subscript next to sum in equation environment

I have a sum with a subscript placed in an equation environment. The subscript is placed down the sum in this way:    However I want the subscript to be placed next to the sum, like this other sum:    The code for the first sum is as simple as this: \sum_l, so even without specifying the \limits parameter I encounter this problem.  How can I control this behaviour?


How long will Ubuntu 13.04 be supported for?

I am trying to find out how long will Ubuntu 13.04 be supported before the next version arrives.


Problems getting my bibliography working - All citations undefined and "empty bibliography"

I've been stressing out for a few hours now trying to get my project to compile. I was originally using Overleaf but my project got too big to compile and so I'm now attempting to compile it using Texmaker.  On Texmaker when trying to quick build, I get warnings that all of my citations are undefined and my bibliography is empty. I am fairly certain Texmaker sees my bibliography file as I've directed which folder to look in.   Here's my main file shortened to the important bits:  \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[british]{babel} \usepackage{csquotes} % Removes babel warning.  \title{\vspace{-5ex}Title} \author{} \date{\vspace{-15ex}}  \usepackage[style=ieee,sorting=none,citestyle=numeric,url=true]{biblatex} \addbibresource{sections/bib.bib}   \section{Project Definition} \input{sections/definition.tex}  \section{Project Justification} \input{sections/justification.tex}  \section{Key Literature} \input{sections/literature.tex}  \section{Project Plan} \input{sections/plan.tex}  \clearpage  \sloppy \printbibliography[title=References]  \end{document}


What does the '!' really do when it's added to an ex command (:wq! | :w! | :q! )?

I understand that it means force to do something.  When doing $ vim -R file I enter in read-only mode, but this works as preventive mode only   -R  Readonly mode.  The 'readonly' option will be set for all the     files being edited.  You can still edit the buffer, but will     be prevented from accidentally overwriting a file.  If you     forgot that you are in View mode and did make some changes,     you can overwrite a file by adding an exclamation mark to     the Ex command, as in ":w!".  The 'readonly' option can be     reset with ":set noro" (see the options chapter, |options|).     Subsequent edits will not be done in readonly mode.  Calling     the executable "view" has the same effect as the -R argument.     The 'updatecount' option will be set to 10000, meaning that     the swap file will not be updated automatically very often.   But what I can't get yet is why it makes the instruction to skip permissions even if the file's owner is root user, besides it also change owner & group.


The Boundary of a Simply Connected Compact Set

I have a simply connected compact set in $\mathbb{R}^2$. I want to know if the boundary of this set is a connected set. I think the answer is yes, but I'm having trouble finding a reference.


Google PageSpeed, optimizing Google's own elements

I'm trying Google's PageSpeed online service  Ironically, it's primarily highlighting Google's own services as something that needs improvement on my site  1) jQuery from Google: blocking. So I moved all javascript from <head> to the end of the document before </body>. That helped  2) Linking to external Google Font CSS (in <head>): blocking. But the font is critical to the design of the page and should load before much else  3) Google Analytics: Caching is not good. (Google has set it internally to 2 hours expiration). Don't know how to change this (this is also placed at the bottom of page)  The Google Font is highlighted as a big priority to change.  How can I fix this? Where/how should I call the the font?


how to read and print an array of strings with ResultSet

I'm trying to print a list of tuples inserted in an object, among the attributes of the tuple there is an array of strings, but ResultSet reads the array with split, but it doesn't print it correctly. How can I do to print it? Thanks rs = st.executeQuery(sql); // faccio la query su uno statement         while (rs.next() == true) {             AttivitaParlamentare a = new AttivitaParlamentare(rs.getDate("data"),                         rs.getTime("ora").toLocalTime(),                         rs.getString("ddl"),                        rs.getString("commissione_camera"),                        rs.getString("commissione_senato"),                         rs.getInt("seduta_numero"),                        rs.getString("tipo_assemblea"),                        rs.getString("parlamentare").split(","));  If I use: System.out.println(java.util.Arrays.toString(rs.getString("parlamentare").split(",")));  I print the column correctly, OUTPUT: [{{BELLANOVA, MARGIOTTA, GRIMANI, BOLDRINI, MANCA, BITI, COLLINA, "D ALFONSO", COMINCINI, CUCCA, LAUS, MARINO, FARAONE}}]  but from main if I insert the function that returns the object to me in a println, it doesn't print the list of tuples correctly. AttivitaParlamentare a = new AttivitaParlamentare(data,             ora,ddl,commissione_camera,commissione_senato,seduta_numero,             tipo_assemblea,parlamentare);          Tabella_AttivitaParlamentare.nuovaAttivitaParlamentare(a);     System.out.println(Tabella_AttivitaParlamentare.elencoAttivitaParlamentari());     //df.parse("2016-10-10")          Tabella_AttivitaParlamentare.modificaAttivitaParlamentare(a);     System.out.println(Tabella_AttivitaParlamentare.elencoAttivitaParlamentari());          Tabella_AttivitaParlamentare.eliminaAttivitaParlamentare(a);     System.out.println(Tabella_AttivitaParlamentare.elencoAttivitaParlamentari());  OUTPUT: parlamentare=[Ljava.lang.String;@42dafa95]


RegEx for special characters and decimals except for commas

Regex testing for special characters, decimal except for hyphen, commas, alpha-numeric. Attempt ^(\+|-)?([0-9]+)$/  I'm trying to write a regex to match special characters, decimal except for commas, a hyphen, alpha-numeric.


I am getting a crash (on android 7 only) when setExacctAndAllowWhileIdle in a function where I am create new alarm. I have no idea what is wrong here. And how to fix this crash.  This is my code and getting crash when calling   AlarmManagerCompat.setExacctAndAllowWhileIdle  AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);     if (alarmManager != null) {         final long triggerAt = System.currentTimeMillis() + interval;         AlarmManagerCompat.setExactAndAllowWhileIdle(alarmManager, AlarmManager.RTC_WAKEUP,                 triggerAt, pendingIntent);     }   This is the crash report i am getting:  Caused by java.lang.NullPointerException Attempt to invoke virtual method 'int com.android.server.AlarmManagerService$Batch.size()' on a null object reference android.os.Parcel.readException (Parcel.java:1714) android.os.Parcel.readException (Parcel.java:1661) android.app.IAlarmManager$Stub$Proxy.set (IAlarmManager.java:246) android.app.AlarmManager.setImpl (AlarmManager.java:680) android.app.AlarmManager.setExactAndAllowWhileIdle (AlarmManager.java:893) androidx.core.app.AlarmManagerCompat.setExactAndAllowWhileIdle (AlarmManagerCompat.java:223) **com.mokapos.receiver.AlarmReceiver.setNewAlarm (AlarmReceiver.java:276) com.mokapos.receiver.AlarmReceiver.initServices (AlarmReceiver.java:203) com.mokapos.receiver.AlarmReceiver.onReceive (AlarmReceiver.java:196)** android.app.ActivityThread.handleReceiver (ActivityThread.java:3363) android.app.ActivityThread.-wrap18 (ActivityThread.java) android.app.ActivityThread$H.handleMessage (ActivityThread.java:1800) android.os.Handler.dispatchMessage (Handler.java:110) android.os.Looper.loop (Looper.java:232) android.app.ActivityThread.main (ActivityThread.java:6802) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1103) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)


Neural Network: What if there are multiple right answers for a given set of inputs?

For a given input into the input nodes, there are multiple correct values for the output nodes. In the training set, there are times when the inputs result in a certain output, and other times when the inputs result in a completely different (but equally valid) output.  Will a neural network still be able to "figure out" a pattern? From what I know about backpropagation, it seems like the different right answers would prevent it from functioning properly. If that's so, are there any solutions?  I don't need the neural network to predict all possible correct solutions, but I do need it to output a correct solution.


Objects in Illustrator Not Aligning to Pixel Grid Correctly

I'm having problems aligning my objects to the pixel grid in Illustrator. As you can see in the picture, my object is correctly aligned with the pixel grid. However there are still parts outside of the green transform lines. Does anyone know how I can fix this? I've been trying align correctly with the direct select tool for over an hour with no luck.


All primes for which $p! + p$ is perfect square

Find all prime number $p$ for which $p! + p$ in a perfect square.  Of course $p=2$ and $p=3$ are solutions.  I think there are not other solutions, but I can’t prove it!


Correlation between a numeric and factor in R

I'm new to R and I'm trying to find the correlation between a numeric variable and a factor one. I have a data frame with the following 3 columns: 1. nr of clicks (range 0:14) 2. response (1= "YES", 0="NO") 3. Frequencies - no of counts (how many clients responded "YES" with X no of clicks)  So, the no of rows of the table is 28.  How can I measure the correlation between the dependent variable, response, and the numeric one?  Thanks! Rodica


I lost my Minecraft house. How can I find it?

I was in creative on my Xbox One. I had just finished an awesome house and was even re-doing the village it was by. I decided to go into the nether world with a portal. I got into the Nether and explored and I couldn’t find the portal I had come in. I build another one and a spawned somewhere completely different.  I’m so stressed because the house took me so long to build and I was almost finished with the village. Is there any way that I can get my house back?


PHP Regular expression for only allowing alphanumeric, dashes, underscores

I'm very new to using regular expressions and am trying to allow only A-Z, a-z, 0-9, -, _  I'm using the following expression which is working:  preg_match('/^[a-zA-Z0-9-_]+$/i', $_POST['sign_up_username'])   My question is if this is the correct way to go about doing this. I'm not sure if this is the right place to post this. Any help would be great. Thanks.


How to find the closed form of $f(n) = 9^k \times (-56) + f(n-1)$

I have to find the closed form for   $$T(n) = \begin{cases}  2 , &\text{ if } n=0 \\ 9T(n-1) - 56n + 63, &\text{ if } n > 1 \end{cases}$$  I used the repeated substitution method and I found that the pattern for the coefficient of n is equal to the following: $$f(1) = -56$$ $$f(n) = 9^{n-1} \times (-56) + f(n-1)$$  I tried to find the closed form of $f(n) = 9^{n-1} \times (-56) + f(n-1)$, but it just got more and more confusing. I believe it may be a series of some sort. Is there a way to find a closed form for this?  Thank you!


I have two pieces of single-phase fans and they are literally the same, it is ac motor and whenever I rotate it manually it produce voltage about 160-190vac. I just get the idea that it can be an ac generator, but the problem is when I connect it to 110v-220v cellphone charger, the charger is not working, the voltage drops and the generator seems to run from the voltage itself, I search it and the answer is the backfeeding. I also connect the generator to christmas lights and there is no problem maybe because it has resistors, I also conect Led bulb using an adaptor 110v-220v and the led is blinking(it should not be) and everytime it blinks the generator get a shock, it seems to get backfeed. The other problem is I connect these 2 ac fans and I rotate it to be a generator(160v-190v each) but they seem to be run from the voltage themselves. I had this idea to use a full rectifier, inverter or somewhat to make them a working generator with a stable of 220vac even if using. My ideas/plans (in order):  To stop the backfeed of the generator when using. If there is no possible way to do that then using an inverter is the last option. If ac-dc is the best way then i'll connect dc's from positive to negative, making dc volts step up then convert it to 220v ac. AC-DC-AC in short If no. 2 didn't work, then i'll suppose to make an inverter for each generator making them ac-dc-ac and avr for each to stabilize their voltage.  Please help me guys, I need to make it possible. Another thing I recently know, is it possible to put a ground wire to a single-phase generator to stop getting backfeed instead of transfer switch ? The picture is the single phase motor.


Compare string in two files And Merge its Output

I am trying to get the bandwidth of the domain from one file and its hits details from another file.  The format of the two files is as follows:   bandwidth.txt  aadrivingschool.ws       2840.36M aaspak.org               211.57M aasteknik.com            1419.26M aatonerpk.com            14.87M  hits.txt:  onlinestudyboard.com   received  186     hits  from  31/May/2016  at  1201 aaspak.org             received  184     hits  from  31/May/2016  at  1202 khawajarubber.com      received  183     hits  from  31/May/2016  at  1246 aatonerpk.com          received  182     hits  from  31/May/2016  at  1231    What I'm trying to to get is:  onlinestudyboard.com       received  186     hits  from  31/May/2016  at  1201  aaspak.org                 received  184     hits  from  31/May/2016  at  1202  211.57M khawajarubber.com          received  183     hits  from  31/May/2016  at  1246 aatonerpk.com              received  182     hits  from  31/May/2016  at  1231  14.87M


Indented text not saved in answer after registering for a community for the first time

I just noticed the following.  I prepared an answer for a new community I wasn't registered for yet.  It contained an indented block.  After clicking on "Register for this community" the indented block disappeared in the answer before submitting it. The rest of the answer stayed intact.


Incident which happened a week ago:      Me to Kate: "Where are you going"?   Kate: "I'm going to the cinema".   Now today I happen to tell this story to Jim and I say,      "I met Kate a week ago."   Jim: What did she say?   Me: "Kate said that she 'is' going to the cinema".    My question is, is the usage of 'is' grammatically correct? Here, at the time of reporting after a week I don't know if she's still going to the cinema or not and even then I use 'is' will this be grammatically correct?


How to share VPN connection with devices on hotspot?

I use a VPN on my Galaxy S8+ and I am looking for a way to be able to share my ExpressVPN connection via hotspot to be able to connect devices such as Xbox One and a Smart TV. Currently cannot use a PC and my router is trash so my phone is the last resort. What can I do? What are some workarounds?


Find the elements of $S_6$ that commute with $(1234)$

Let $σ=(1234)∈S_6$. List all elements in $N(σ)={α∈S_6∣σα=ασ}$.   I know that this is related to cycles and orders, but I am having trouble finding the order of $N(σ)$ initially.   I also know that $σ$ has 8 different permutations.   And I also know that $e(1234)e^{-1}=(1234)$  And I do know that one is $α=(13)(24)$  I would just like some help getting to the rest of the elements in  $N(σ)={α∈S_6∣σα=ασ}$.   Thank you!


How to correctly do a division using a slash?

What's the correct way to do division using a backslash? If I write $a/bc + d$, will that be equal to $(a/(bc))+d$?   Basically, if I place a slash, will I divide by what's directly behind the slash $(b)$, the term that's behind the slash $(bc)$, or everything after the slash $(bc+d)$?