I was wondering how to initialize the generic array in the constructor.  After searching on google, I wrote the code below.  public class Test<E>{     private E[] mData;      public Test(){         mData = (E[])new Object[100];     }      public void put(E data, int index){         mData[index]=data;     }      public E get(int index){         return mData[index];     }      public static void main(String[] args){         Test<Integer> t1 = new Test<>();         t1.put(100, 0);         System.out.println(t1.get(0)); // 100     } }   The output of the above code is expectedly 100, but if I access the generic array directly, it gives an error.  The code looks like below.  public class Test<E>{     private E[] mData;      public Test(){         mData = (E[])new Object[100];     }      public static void main(String[] args){         Test<Integer> t1 = new Test<>();         t1.mData[0] = 100;         System.out.println(t1.mData[0]);         // java.lang.ClassCastException error     } }   The above code just gives me an ClassCastException error.  I have no idea what's the differences between those code I have uploaded.  Any help might really be appreciated.

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I'm trying to learn the framework structure of Selenium with Page Object model framework. Even though I pass the webdriver instance, I'm getting NullPointerException when trying to access a textbox element which I'm referred from POM file. I'm trying to launch a page and entering text in the textbox.  testBase.java for launching Chrome browser  package TestBase; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;  public class testBase {     public static WebDriver driver;     public static WebDriver initDriver()     {         System.setProperty("webdriver.chrome.driver", "C:/Users/edksuresh/Downloads/chromedriver.exe");         driver = new ChromeDriver();         driver.manage().window().maximize();         return driver;     } }   'Object repository file'  package pom; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy;  public class POM_LoginPage {     public WebDriver driver;     @FindBy(xpath="//input[@id='email']")     public WebElement uid;     public POM_LoginPage(WebDriver wd)     {         this.driver = wd;     } }   Registration.java  package generalComponent; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import TestBase.testBase; import pom.POM_LoginPage;  public class Registration {     WebDriver driver;     String url;     POM_LoginPage pomLogin;     public Registration(WebDriver wd)     {         this.driver = wd;     }     public void launchPage()     {         driver = testBase.initDriver();         pomLogin = new POM_LoginPage(driver);         url = "http://demo.automationtesting.in/";         driver.get(url);         pomLogin.uid.sendKeys("sss@gg.com");     } }   NullPointerException is thrown at line pomLogin.uid.sendKeys("sss@gm.com").

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


I was in the shower today and I just thought of this so I'm asking it. I'm sure this has been thought of before.  Let's say we have two sets, the set of all even numbers and the set of all natural numbers. They are both infinite, right?  But let's say we cut off the set at any number $n$. So for example if $n = 4$ then the even set would be ${2,4}$ and the natural set would be ${1,2,3,4}$.  So the set of natural numbers is bigger when they both reach 4, since they both increase in the same direction in a linear fashion that doesn't seem to be an unreasonable comparison to me. So if we take $n = \infty$ , then why are both sets the same size? In other words, is it possible that one infinity is greater than another?  I'm sure this is not the case, but can someone please explain? Thanks

Can someone explain to me how there can be different kinds of infinities?  I was reading "" by  and came across the concept of countable and uncountable infinities, but they're only words to me.  Any help would be appreciated.


Go to youtube website see its logo in top left corner. 'IN' is shown as superscript to logo. I tried searching on Google and Wikipedia but couldn't find any information.

I see a new logo with CA at youtube.com. Does anyone know what it means?


One of my tasks in this assignment is to add 5 to the maximum value within my array. The professor said to use a void function and to pass a value, which I did. The program adds 5 to the max, 67, to get 72. But, when I printed the array it says 67 is in the array when it should say 72. Is there a way to make it say 72 in the main function, without just adding 5 to the element holding 67 in the main function, but by using void incre(int y)?   Here is the funtion I used to increment the maximum by 5.   void incre(int y){ y+=5; cout << "The new max after 5 is added is " << y << endl;   }  And here is the code I used to print out the array, which outputs   0    21  1    23  2    67  When it should output  0    21  1    23  2    72  cout << "Elements ------ Values\n"; for (int r = 0; r < array_size; r++){ cout << r << " ------------- " << A[r]<< endl; }   Also, how do you pass an array to a function using passing by reference? I'm not so sure if I did passing by value or passing by reference in my code here  void fill_array(int x[], int size){ cout << "Enter in the values 23, then 21 and then 67\n"; for (int z=0;z<size; z++) {     cin >> x[z]; } }   In the main function I put   fill_array(A, array_size);

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I have some plan to travel to Ireland. I have currently working in Netherland. I am non-eu citizen but have Netherland identity card and was wondering if I need to apply for visa to visit Ireland for a few days.

I am a student at the University of Stuttgart, Germany and I have a 1 year national visa for Germany and now as my holidays are ahead I was looking if my German visa is sufficient to travel to Ireland for some 10 days. I am a citizen of Republic of Armenia.


I am trying to make an options window for my WPF application. The options window should always be in the foreground, flash when the user clicks into the min window and can't be unfocused. Any suggestions for this?

If I have a Xaml Window, how does one open it as a child window, and then have the parent window wait for the child to close before the parent window continues executing?


I wonder if there is a way to initialize a member of a member of a struct. Let`s say I have 2 structs, t1 and t2. t2 contains 2 instances of t1. like this:  typedef struct t1{      int                     num;  } t1;  typedef struct t2{      t1                      sub_one;     t1                      sub_two;     int                     num;  } t2;   Is it possible to declare sub_one.num to a number and sub_two.num to a different number at the time I iniatilize t2. something like:  typedef struct t2{      t1                      sub_one.num = 1;     t1                      sub_two.num = 2;     int                     num;  } t2;   is that possible?

I want to initialize a struct element, split in declaration and initialization. This is what I have:  typedef struct MY_TYPE {   bool flag;   short int value;   double stuff; } MY_TYPE;  void function(void) {   MY_TYPE a;   ...   a = { true, 15, 0.123 } }   Is this the way to declare and initialize a local variable of MY_TYPE in accordance with C programming language standards (C89, C90, C99, C11, etc.)? Or is there anything better or at least working?  Update I ended up having a static initialization element where I set every subelement according to my needs.


How can I type an "e" with an accent aigu, if I don't have an "Alt Gr" key on my keyboard? I tried already clicking on the CTL, ALT and E simultaneously, however that did not work.

I heard that you can hold alt and type out some cryptic numeric code to get characters like accented letters. Is there a way to do this more like the ?


For the sequence $a_n = 6^{2^n} + 1$:   How can I prove that the elements of this sequence are pairwise coprime, i.e. prove that if $m$ is not equal to $n$ then $\gcd(a_m, a_n) = 1$. (begin by proving that $a_n∣ (a_{n+1} - 2)$)


I've always used the word "exdented" when describing a paragraph of text (or, more usually, a section of computer code) where the first line is set further left than the remainder of the paragraph/block - essentially the opposite of "indented".  However, it appears that exdent isn't really a word - it's not in the Oxford dictionaries, Websters, or Wiktionary, as far as I can tell. So, is there a better word? Is there one that typographers and typesetters use?  (In the ancient UNIX text formatting package nroff, the -ms macro set included a .XP command to achieve the effect. This stood for "exdented paragraph" and I suspect that's where my usage comes from, but that doesn't mean it's the right term!)  Oblig. sample sentence: "The first line of the code block should be <exdented> to identify a new block"

I'm looking for the opposite word to "indent." Is it "outdent", or is it "unindent"?  Corresponding to "Tab" and "Shift Tab" in most editors.


I created a custom webapp in order to have it in the Unity launcher. The thing is that I followed some instructions found on the web and I can actually search for it in the dash. I click on it and it opens Firefox and it goes to the proper destination. So, that's good.  Now, what I want is for the webapp to appear in the launcher when it is launched from the dash so that I can right-click on it and select "Lock to launcher", but that does not happen.  I know this question has been asked already () but it did not get a single reply.   Does anybody know how to make the webapp visible in the launcher?  Thanks in advance!

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.  For some programs I use, I have to make custom launchers or .desktop files.  For instance, daily blender builds are generally just folders with an executable.  In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.


My device is Micromax a110q. I rooted it and changed my rom to sony pure xperia z2. After changing my rom the data is much more consuming by android os. So help me how to reduce data..

I've read a bunch of forum posts about the Android OS battery drain bug. This is where the 'Android OS' process is showing large percentages in the battery statistics.  For me, I'm running 2.3 Gingerbread. I don't use bluetooth or GPS. I'm on 2G most of the time. Some days I get 40 hours out of a battery. On these days in the battery usage settings, the 'Android OS' process uses about 3% of battery. However other days I get about 8 hours with similar use. On these days the 'Android OS' process uses about 35% of the battery. I really want to find out what causes this.  The fixes suggested so far are:   Reboot (Temporary). Turn off and remove battery for a couple of minutes. Reset battery stats. Change WIFI sleep policy. Use a task manager Flash stuff to the phone. Revert to older versions of the OS (not really a fix).   Does anyone know the definitive cause of this problem and the correct fix? Or is it possible there are multiple issues that cause this so different things will work for different people?  Here are some of the threads:


There are a number of questions related to the sort order between accepted and unaccepted answers.  Discussion seems to revolve around the "correctness", "ownership", and default behavior of the site.  There is clearly some desire for vote-based sort order.  I couldn't find an option to enable this or a widget on the page that does it already.  The cases that motivate this feature are:   accepted answers that are really a work-around, a later unaccepted answer is a solution the question is time-sensitive in a way that later high-voted answers are more useful   I care less about what the OP accepted at a point in time than I do about those responses that are most useful.  Over time, I'm finding votes are a better indicator of usefulness than answer-acceptance.  Of course, it's not much work to scroll past the accepted answer, comments, and advertisements.  Sometimes I forget and annoyingly waste some time reading something that was not useful.  To be clear, I'm not advocating a change to the default/public behavior.  I'm suggesting a preference setting that enables vote-based sorting of answers.

The accepted answer always appears at the top of the list, regardless of sort order. This can be misleading if the question author accepted an invalid solution and a better solution was proposed later, and eventually got more votes. I have seen somewhat obscure questions where the accepted answer has a negative score and the next answer has 10 or more up-votes.


As someone points out, we could change the matrix as arbitrary small as possible to make it diagnolizable,   but for any random perturbation, say $$A+E$$, E is random matrix, is the summation must be diagozable with probability 1?

For arbitrary non-diagonalizable square matrix $J$, can we always find a arbitrarily small perturbations matrix $\varepsilon A$ that $J+\varepsilon A$ is diagonalizable?  Using Jordan form as following, we can obtain that arbitrarily small pertubations matrix following a certain structure can make a matrix diagonalizable. But can we relax the form of the pertubations matrix?    Give any $J$, let $B$ be the Jordan form. That is, $J=U B U^{-1}$. For a pertubations matrix $\frac{1}{k} U\Delta U^{-1}$ where $\Delta$ is a diagonalizable matrix with different diagonal value, $J+\frac{1}{k} U\Delta U^{-1}$ is diagonalizable.   Can we relax the form of the pertubations matrix?


I'm sure this subject has been done to death and I'll be down-voted into oblivion, but I've just had a question put on hold because:     Questions asking us to recommend or find a tool, library or favourite off-site resource are off-topic for Stack Overflow   My main objection to this is my personal experience - there have been many answers I've found very useful that suggest a library for solving a problem and I've also noticed that these types of questions have often been marked off-topic. Thankfully those questions aren't deleted as I've gained something from them. Here's an example of a question I gained useful information from recently (although I admit that it is phrased a little too heavily toward opinion):  I am now using the AFOAuth2Client library, thanks exclusively to this question.  In the case of my question, it didn't seem anyone has asked how to solve this specific problem before. I also implied in the question that the solution may be an external library (as opposed to API code) but that either would do. It seems that if I had done LESS research into whether it could be achieved using the built in API and left the question more open ended it would have been left open.  So, given that these questions are clearly helpful to the community (based on my own experience and the up-votes such answers receive) provided they are phrased correctly (and thankfully we have old ones that weren't censored) - why are we closing them?  For reference, my question:

I frequently come across a really useful answer on StackOverflow which has been closed because it doesn't match the Q&A format.  Examples include  ,  ,   ,  and there are others.  Where should this information be exchanged if it's not on stackoverflow?  It seems the moderators are often somewhat overzealous...  ---edit  When I say best, I mean they are informative and useful for someone who's looking for an answer to them.  Even if they do become a bit of a discussion, I value other people's opinions on the relative merits of the different JPA frameworks.  I come here looking to choose one and the answer helps me.  So what if it's not a definitive answer?  ---edit  I don't care how popular a question is, nor how interesting it is.  Users are interested in stuff that's useful to them.  Plenty of those were useful (as judged by the upvotes on the answers: 'This answer is useful'), but closed because they didn't have a definitive answer, as far as I can tell.  ---edit  Seems I'm not the first person to think this: there are various similar questions to mine like this one:   In it the user lists lots of other useful questions which have been closed:                    So isn't there a place on stackoverflow for these questions?  A discussion section, maybe?


I was amazed by the fact that we have been able to detect gravitational waves created thousands of year before they were observed. My surprise is that any wave phenomena I know it is always dissipated, so I thought gravitational waves would have been dissipated.  It is true that the waves would have been propagated through vacuum, but, if I understood properly relativity equations, the media is not a factor. Likely passing though gravity fields (starts? black holes?) will have something to do.  So, my question is, Is there any mechanism to dissipate gravitational waves? Can they, with our current knowledge, propagate without losing energy?

Following the measurement of gravitational waves, many sources described them and explained they carry energy away. What I don't get is how this energy will get transfered back to anything else.  If the fabric of space-time itself is vibrating, it would seem to be in impossible for any physical object to gain this energy.    What am I missing?  How would one hypothetically get energy out of gravitational waves?  If impossible, does the universe end up with nothing but GW?


I can't get this working on macOS: unbuffer fswatch . | unbuffer xargs echo   What am I doing wrong? fswatch is like inotifywait on other systems.

I want tail -f /var/log/syslog | grep it with pattern "arpwatch" and send every line to myself via jabber: xmpp username@jabber.server using xargs  tail -f /var/log/syslog | grep arpwatch | xargs sendxmpp username@jabber.server   no working.  but tail  /var/log/syslog | grep arpwatch | sendxmpp username@jabber.server   works well.  I think it's some fundamental thing about xargs and tail -f that I don't understand.


The following code gives different outputs.  Can anyone explain why?  The code is displayed below.  The result set is shown underneath it. I have compiled the code on Enterprise VS 2015, Update 2. I run it on Win7.  Please notice that I am using shadowing (hiding) in both examples.  This question doesn't concern the use of shadowing vs overriding.  The question asks "Why does shadowing result in two different outputs?"  Here is the code that compiles and runs and gives different results for the two different methods of calling the objects:    using System;  namespace InheritanceApplication {     internal class FooBarParent     {         public void Display()         {             Console.WriteLine("FooBarParent::Display");         }     }      internal class FooBarSon : FooBarParent     {         public new void Display()         {             Console.WriteLine("FooBarSon::Display");         }     }      internal class FooBarDaughter : FooBarParent     {         public new void Display()         {             Console.WriteLine("FooBarDaughter::Display");         }     }      internal class Example     {         public static void Main()         {             GoodBar();             FooBar();         }          public static void GoodBar()         {             Console.WriteLine("Example::Goodbar ...");              var fooBarParent = new FooBarParent();             fooBarParent.Display();              var fooBarSon = new FooBarSon();             fooBarSon.Display();              var fooBarDaughter = new FooBarDaughter();             fooBarDaughter.Display();         }          public static void FooBar()         {             Console.WriteLine();             Console.WriteLine("Example::Foobar ...");              var fooBarFamily = new FooBarParent();             fooBarFamily.Display();              fooBarFamily = new FooBarSon();             fooBarFamily.Display();              fooBarFamily = new FooBarDaughter();             fooBarFamily.Display();         }     } }     Here is the result set:    Example::Goodbar ... FooBarParent::Display FooBarSon::Display FooBarDaughter::Display  Example::Foobar ... FooBarParent::Display FooBarParent::Display FooBarParent::Display

What's difference between shadowing and overriding a method in C#?


I have a .desktop file set to 100% upgrade my system when I double click it, and I would like to see the results of what is happening when I click it. It is basically running a shell @  /home/david/Update_Script   Which is doing  sudo apt-get upgrade sudo apt-get update sudo apt-get install -f sudo apt-get clean   Is there any way I could make either the .desktop or the .sh file open a terminal (Preferably an XTerm) Windows to show exactly what is happening?

I would like to know how to write the Exec command of a .desktop file to open a new terminal and execute a shell script in it. The shell script is working and accessible by all users. When launching the script from the terminal everything works, but it doesn't when trying to launch the script from a .desktop file.  Here are some combinations I have already tried:  Exec=gnome-terminal -x sh -c 'echo hello' Exec=sh -c 'gnome-terminal echo hello' Exec=sh -c 'echo hello' Exec=echo hello   The .desktop terminal option is set to true.


Is there any library/tool available which can allow me to search over encrypted data?  I would like to encrypt data on client side, send it to cloud and perform search in cloud.   I've been reading about homomorphic encryption and though there is CryptDb available which makes it possible to run encrypted DB in cloud, but my use case is slightly different- in my case I want to let users send me encrypted data and I want to be able to do a keyword search (as opposed to user performing search).

Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely?  By the same token, I'm wondering if a collection of encrypted documents can be sorted according to an encrypted attribute (e.g., document title) without first decrypting all attribute values.


I mean this always bugged me. You have a thing that destroys stars, but is clearly not a Star itself. It's way too small to be considered a star and its also not bright, so why call it that. The "death moon" or something like that would at least have some kind of relation (even if it doesn't sound as cool though). And why are star destroyers called star destroyers? They don't do any star destroying business? Has this ever been explained why these things are named the way they are (extended counts too)?  Note: Also, why would you name your giant spacestation deathstar, if you actually want supporters of your empire and not be seen as evil to the outside. I mean that highly increases the chance of a rebelion doesnt it?

In the Star Wars prequel trilogy (and in the Clone Wars TV show) we see that Darth Sidious fooled the galaxy gradually. The Republic was reorganized into the Galactic Empire with the people's consent, Palpatine having convinced them that the Jedi were traitors. Aside from a small group of perceptive individuals (like Padme, Bail Organa, and Mon Mothma), we get the impression that during the reign of the Empire the average person (citizen or officer) might believe that the Empire was in the right. Consider the fact that:  the Emperor   the Emperor kept the Imperial Senate intact for a while  Tarkin seemed to discourage Vader from choking imperial officers   It seems as though the Emperor needed to keep up appearances of being good and wanted the imperials to believe that as well. However the Empire has some really evil names like Death Star and Star Destroyer that would likely tip people off that the Empire was evil. I realize that the construction (as well as probably the name) of the Death Star was  before it's completion. Star Destroyers, however, were plentiful before that. Did the average imperials (such as stormtroopers, officers, or admirals) know that they were the "bad guys"? If they don't consider the Empire to be evil, then how can they justify the Empire's action to themselves?


So how to generate thumbnails for these containers? I know that the install of "" does it for MKV. But I think that only some registry changes are really necessary and I want it for other containers. If it's possible to avoiding the install of (always bloated) codecs packs it would be nice... Maybe only installing ffdshow or essential and separated codecs. (some time ago I have try reg files for vista without success...) Update: I have installed  & tweaked a little its settings and I got almost everything I want. (I have also re-installed the relevant part of the divx plus tech preview to get something else than an all black preview for MKV) Issues that I still want to resolve:  Find a cleaner & lighter method Almost all my rmvb and mov files got an all black preview (installing real media/quick time alternative doesn't help, is it the same with the officials?) With almost all containers (avi, mkv, ogm, mpg), I have (few) random files that don't get the preview. I could play them in WMP or another player and don't have found a pattern in the codecs used. All wmv, flv and mp4 have previews but I have less files in these containers.  (I clear my thumbnails cache to test them) More generally I would like to understand how windows handle the containers & codecs to generate the previews. And a software that let me choose arbitrarily the pictures previewed would be convenient too

I've installed the default VLC player to decode my .mp4 files but I'd like to enable a thumbnail view in the explorer. All I see at the moment is the traffic cone (the default icon for files associated with VLC).   Possibly related are these Windows 7 questions, but I'm not sure what carries over:


Everytime my rackspace server restarts because of some maintenance or an outage, all of my mysql functions stop working due to this deterministic error.  To fix this, I have to manually pull up the database and run SET GLOBAL log_bin_trust_function_creators = 1;  is there anyway to have this set by default so my sql calls don't break on restart?

What is the use of log_bin_trust_function_creators?  Also, Is the value of the parameter dynamic?  Will it change if I restart my MySQL service?


I was thinking in the following problem:     Suppose I have a bar of lenght $l$. If I spin it with constant angular velocity $\omega$, according to the special theory of relativity, is there a limit to it's angular velocity?   I was thinking that maybe I should make the limit $ω_{\text{max}}=c/l$, but it doesn't make sense to me that the limit should depend in the bar's length. And even if this is right, what happens to the bar's shape? Does it remain straight?

Imagine a bar   spinning like a helicopter propeller,  At $\omega$ rad/s because the extremes of the bar goes at speed  $$V = \omega * r$$  then we can reach near $c$ (speed of light) applying some finite amount of energy just doing   $$\omega = V / r$$  The bar should be long, low density, strong to minimize the amount of energy needed  For example a $2000\,\mathrm{m}$ bar  $$\omega = 300 000 \frac{\mathrm{rad}}{\mathrm{s}} = 2864789\,\mathrm{rpm}$$  (a dental drill can commonly rotate at $400000\,\mathrm{rpm}$)  $V$ (with dental drill) = 14% of speed of light.  Then I say this experiment can be really made and bar extremes could approach $c$.  What do you say?   EDIT:  Our planet is orbiting at sun and it's orbiting milky way, and who knows what else, then any Earth point have a speed of 500 km/s or more agains CMB.  I wonder if we are orbiting something at that speed then there would be detectable relativist effect in different direction of measurements, simply extending a long bar or any directional mass in different galactic directions we should measure mass change due to relativity, simply because $V = \omega * r$  What do you think?


The software I'm using for this task is R. I am looking at three things :   How one continuous variable is affected by three categorical variables, two with two levels one with four levels. Which level in each category affects the continuous variable the most. The individual "weight" and significance of each category in predicting the continuous variable, and the interactions between them. For example, do category 1 level 2 and category 3 level 4 have a significant effect on the continuous variable more than category 1 level 2 and category 3 level 1?   I know I should use either a GLM or a LM, but I cannot work out which - I have run both in R and come up with different results, which apparently shouldn't happen.  A brief overview of the correct model output would be greatly appreciated.  my data looks like this   continuious varaible DEG Time (year, eight, two,day) sample (BLD, SLV) Card (GS, GC)  e.g.:   This is my code for both:  glm(Playing$DEG ~ Playing$TIME + Playing$SAMPLE + Playing$CARD,family = gaussian(link = log), data = Playing)  lm(Playing$DEG ~ Playing$TIME + Playing$SAMPLE + Playing$CARD,data = Playing)   I have already converted the predictors to factors.  My main issue is according to the research I have done both my GLM and LM models should give the same (or close enough) results - for some reason this isn't happening in R I cannot see an error in my code thus I must have misunderstood something along the way therefore which results do I use - GLM or LM model ? and how does this give me the interactions between/weight of the factors ?  Thanks for putting up with this confused new user !  (These are the results I am getting by the way -

Specifically, I want to know if there is a difference between lm(y ~ x1 + x2) and glm(y ~ x1 + x2, family=gaussian). I think that this particular case of glm is equal to lm. Am I wrong?


Let $a$ and $b$ be random integers chosen independently from the uniform distribution on $\{1, 2,\dotsc, N\}$. As $N \rightarrow \infty$, what is the probability that the fraction: $$\frac{a}{b}$$ cannot be simplified? Note: As specified in the comments, the question is the same as .

This is a really natural question for which I know a stunning solution. So I admit I have a solution, however I would like to see if anybody will come up with something different. The question is     What is the probability that two numbers randomly chosen are coprime?   More formally, calculate the limit as $n\to\infty$ of the probability that two randomly chosen numbers, both less than $n$ are coprime.


I have a strong recollection of reading a short story sometime in the '70s (maybe in Analog magazine) roughly about a man who was living in some kind of experiment run by aliens, in which the same day was repeated over and over... (shades of Groundhog Day) - until he accidentally passed out under a metallic boat hull in his garage, and he was able to then realize he was in this experimental world where the same day repeats.  I think the title contained the word "Tuesday" (or some other day of the week); IIRC the author mentioned that he considered using the title "The Ides of March" but decided against it.  Sound familiar to anyone?

I may be conflating two separate short science-fiction stories here, so please bear with me. I definitely read this more than 10 years ago and it's likely to be older than that (60's, 70's?)    A man wakes up one day to discover that the world is subtly different. His wife acts strangely and there's a weird "groundhog day" vibe.    He discovers that his house is actually made entirely of painted metal, including things that should be wood (a boat that he made by hand, for example). He comments that in the real world, it's the fact that stuff doesn't work properly that shows you that you're living in reality (a wobbly doorhandle may have been mentioned?) He's constantly beset by advertising; brands of washing powder, political messages, etc. and people keep asking him what he thought about them. At one point, the advertisers start getting very aggressive, literally invading his house to dirty his clothes and driving around with megaphones to shout slurs about their political competitors. He finally breaks out of the town (with the assistance of his secretary?) and they discover that they're...      ...actually robots living in a simulated town used by advertisers to test slogans, etc.   The final twist is that...     ...the town fits onto a desktop and is encased in glass. Even if he could escape, he could never live in the real world since he's very tiny.


Find the sum of the series: $$\sum_{n=1}^{\infty}\frac{1}{2^n-1}.$$  The series converges (using either the comparison test, or the ratio test). But can the sum be somehow calculated? Thanks in advance.

Calculate $$\sum_{k=1}^{\infty}\frac{1}{2^{k+1}-1}.$$    I used Wolfram|Alpha to compute it and got it to be approximately equal to $0.6$. How to compute it? Can someone give me a hint or a suggestion to do it?


Recently I asked a question in stack overflow about creating an HTML5 report designer .The current reporting services (crystal reports,Xtra reports) etc creates reports at server side.Since this process consumes too much resource most we applications will have a separate report server.With so much development going on in HTML5 I think someone might have already succeeded in pushing the report generation to client side.I tried googling for hours  but could not find an example and thats when I placed the question in stackoverflow.In fact I was asking for any open source library or examples but the question was voted down and put on hold.I edited the part asking for a library after that but still its voted down. The link to question is  .  I think the new users of stackoverflow will become frustrated with overcomplicated rules.The main purpose of asking  something in stackoverflow is to find answers to something related to technologies .The moderators or users with high points might find some questions off topic but these questions might in fact be very useful to many other users. For eg : this question  is closed as off topic but it have got high number of votes.  Going forward is there any chance of creating another site in network where users can ask opinions about technologies  or reference to unknown libraries ?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I am trying to understand the physics behind waves, sound, and music and feel as if I'm missing some important conceptual components.  How is it even possible for a string to vibrate at multiple frequencies at the same time?  I understand that harmonics exist and how they work but I have yet to find any information on why this even happens.  To me it seems like if you were to pluck something like a guitar string, it would simply oscillate at its natural frequency based on the length and tension of the string? So, I guess my question is, how can it have more than one natural frequency?  How are multiple waves with different wavelengths being generated from a single pluck?  Any insight is greatly appreciated but please provide answers without equations, conceptual understanding is more important to me than exact numbers.

When you energise a taut string, the following resonant modes of vibration occur:    Plotting on the frequency domain, you can see their corresponding frequencies:    But what is the underlying physical principle? Why does this happen?  Is there any way of explaining it that could be understood by a smart 15 year old?  EDIT: I'm going to give my best attempt so far. Here goes:   We can start with sympathetic resonance. Sounding a particular frequency, a pure sinewave.  And noticing the string resonates sympathetically at the frequency of each harmonic. Say this is explained and understood. Now imagine that plucking a string is equivalent to a burst of white noise, which contains frequencies all the way through the spectrum. This could be approached backwards, by starting with random frequencies and noticing that resultant wave produced looks like white noise.   If the above is scientifically correct, then it restricts the domain of the question.  I would really like to be able to understand it scientifically and also be able to explain it intuitively.  PS Images from


I am looking for an example of a quadratic extension K/F that is not given by $K=F(\sqrt{\beta})$ with $\beta \in F$ and $\beta$ not a square in $F$.  I Know that every quadratic extension (with char(F) $\neq 2$) are of the form $F(\sqrt{\alpha})$, with $\alpha$ not a square in F.  Therefore I assumed $F= \mathbb{Z}/2\mathbb{Z}$. I am not sure what K could be.

I recently saw in class that the degree $2$ extensions of a field of characteristic $\neq 2$ are given by square roots of non-squares in the base field.   I wonder what happens in the case of characteristic $2$ fields. For finite fields of characteristic $2$, it's clear what's going on, but what about others like $(\mathbb{Z}/2\mathbb{Z})(X)$?


Define $X=\lbrace (0,y) \in \mathbb{R}^2|y \in \mathbb{R} \rbrace$ and $Y=\lbrace (x,y) \in \mathbb{R}^2|x>0, y=$sin$(\frac{1}{x})\rbrace$. Prove that $X \cup Y$ is connected but not path connected.   I know the definitions of connected and path connected spaces, but I don't know how to start with this exercise. Can anyone help me out?

Is there a (preferably elementary) proof that the graph of the (discontinuous) function $y$ defined on $[0,1)$ by $$ y(x) =\begin{cases} \sin\left(\dfrac{1}{x}\right) & \mbox{if $0\lt x \lt 1$,}\\\ 0 & \mbox{if $x=0$,}\end{cases}$$ is not path connected?


I am trying to compile some C code (generated from python using cpython), and I'm getting the C1083 error saying the file doesn't exist.  structmember.h is actually in the same folder as the C file, and is also in its include folder in case it was looking there instead, so I've no idea how to fix it. I'm attempting to generate the file by using cl test.c.  Here's the entire output:  C:\test>cl test.c Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64 Copyright (C) Microsoft Corporation.  All rights reserved.  test.c test.c(1018): fatal error C1083: Cannot open include file: 'structmember.h': No such file or directory   Here's a shot from the folder:   Here is the code around each mention of structmember (took screenshots as coping a full page of text probably isn't useful):      If anyone would like to have a glance at the file, it's on onedrive , a little too large for pastebin.

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


Recently,I have found out, that if we consider the speeds at which stars or other space objects move from the point of view of the Earth, we can calculate that they would be faster than light, because they do full revolution in 24 hours, and in that time they do more than a light year of distance. But SR tells us that speed of light is the upper limit for speed of objects in the universe. My question is what is the explanation for this "contradiction"?

Minutephysics has a popular  called "How to break the speed of light". In the video it states that if you flick your wrist while pointing a laser that reaches the moon, that the spot of light on the moon will travel 20 times the speed of light. Now don't get me wrong, I do like their videos, just this one seemed a bit fishy to me. At first I thought it all practically made sense, then I realised something...  In my mind, I would think that light particles (photons) travel from the laser to the moon and bounces off the moon and back to your eye (it doesn't just stay there, in place, so you can't move it around). Now, what he is stating is that if you flick your wrist these photons that have travelled to the moon will move along with your wrist. Wouldn't these photons be bouncing off of other objects or still travelling to the moon by the time you flick your wrist? i.e. dissipating, therefore new photons will be travelling to the moon (from the laser directly).  For example: let's say you point the laser at the moon, and once it reaches the moon, you wait a couple of seconds and then flick your wrist. The laser that you have flicked will emit photons in every direction that your wrist was in, correct? i.e. The photons would shoot out in a straight line (unless disrupted) continuously, with your wrist taking no affect on the speed of the photons.  So back to the question, is this video wrong?


Why $\int _c^df^{-1}\left(y\right)\:dy+\int _a^b\:f\left(x\right)dx=b\cdot d-a\cdot c$ ? where f is an bijective function and $f(a)=b,f(c)=d,$ I don't understand graph... I can't see on graph this equality, so have somebody patience to explain me on graph this equality?  I think it is not duplicate, because he wants a rigorous proof, not a draw, and I want to understand from graph, I think is not duplicate... I don't know why they think is duplicate

Suppose $f$ is a continuous, strictly increasing function defined on a closed interval $[a,b]$ such that $f^{-1}$ is the inverse function of $f$. Prove that,   $$\int_{a}^bf(x)dx+\int_{f(a)}^{f(b)}f^{-1}(x)dx=bf(b)-af(a)$$   A high school student or a Calculus first year student will simply, possibly, apply change of variable technique, then integration by parts and he/she will arrive at the answer without giving much thought into the process. A smarter student would probably compare the integrals with areas and conclude that the equality is immediate.  However, I am an undergrad student of Analysis and I would want to solve the problem "carefully". That is, I wouldn't want to forget my definitions, and the conditions of each technique. For example, while applying change of variables technique, I cannot apply it blindly; I must be prudent enough to realize that the criterion to apply it includes continuous differentiability of a function. Simply with $f$ continuous, I cannot apply change of variables technique.  Is there any method to solve this problem rigorously? One may apply the techniques of integration (by parts, change of variables, etc.) only after proper justification.  The reason I am not adding any work of mine is simply that I could not proceed even one line since I am not given $f$ is differentiable. However, this seems to hold for non-differentiable functions also.  I would really want some help. Pictorial proofs and/or area arguments are invalid.


I make jasmine green tea sorbet… anytime I run out of the previous batch, and then use the remaining steepings of the tea to make iced tea. (Usually steep for ~10 minutes each time, starting a bit lower than the recommended temperature; at a guess this works out to compensate all the sugar and lime juice and cold temperature dulling the tea flavour.) The tea I use is good for about 2-3 steepings this way. However, doing this in multiple steepings is a bit of faffing around I’d like to dispense with. Is it possible, instead of using say (just shy of) an ounce of tea for four cups of water three times in a row to use a bigger pot, put the same amount of tea into three times the amount of water, and steep for longer until basically the tea is spent in one go? It’s a lot easier for me to keep the pot of water in a given temperature range than to heat it up to said range. (What I do is I stick my Thermapen into the steam venting hole in the lid, heat up the water to say 65C, move pot to smallest burner on low, and it works out that the temperature rises by about 1C in one minute. I set a timer for five minutes, turn off the burner which makes the temperature drop at around the same rate, restart the five minutes, strain. What I want to avoid is the part where I have to keep watching the Thermapen constantly to arrive at said 65C. Maintaining the temperature afterwards means I can do whatever else until my timer beeps then run off to the kitchen for one second.)

I reuse my green tea bags three or even four times with little to no loss in flavor.  But it's a pain to reheat water to the correct temperature after I'm done with the first cup and wait another three minutes for the tea to brew.  I've never tried brewing a single bag in 24 or 32 ounces of water rather than eight, but I'd be surprised if the resulting tea would result in the same strength as brewing three individual cups.  Is this the case?  What if I let the single bag brew for more time in the larger volume of water?  What exactly is happening here?  Bonus points:  Why is it that green tea doesn't seem to lose much flavor after reuse, but black teas are practically useless after a single brew?


I'm trying to proof a basic statement: if $|a| < 1$, $a\in \mathbb{R}$ then $\lim_{n\rightarrow \infty } a^n = 0$. On one hand, it's quite intuitive, on the other hand, I wasn't able to prove it formally. Is this statement needs to be proved or it's some kind of convention? Thank you.

Given $|z|<1$ with $z \in \mathbb{C}$ prove $\lim_{n \to \infty} z^n=0$.  My attempt given $\epsilon >0$ we wish to show that there exists $\delta >0$ such that $n> \delta$ means $|z^n-0| < \epsilon$.  For $n \in \mathbb{N}$. We have $|z^n|=|z|^n$. We wish $|z|^n < \epsilon$. This means,  $$n \ln |z| < \ln \epsilon$$  But because $\ln |z|<\ln 1=0$ dividing both sides by $\ln |z|$ gives:  $n> \frac{\ln \epsilon}{\ln |z|}$  So that's what we choose for $\delta$.   My question is is how can we get away from the assumption that $n \in \mathbb{N}$. Or is this correct even with the assumption?


Show that $X_n\to0$ in probability does not imply $\dfrac{S_n}{n}\to 0$ in probability, even if the $X_n$ are independent.  How to approach this problem. Any hints will be appreciated. I  am not able to even start the problem.

I've encountered a question I couldn't answer, and I would appreciate any help: Is it true that $$f_n \xrightarrow{m}0\,\,\implies \,\,\frac{1}{n} \sum_{k=1}^{n}f_k \xrightarrow{m}0$$ where $(X,{\mathcal{B}},m)$ is a probability space, and $\xrightarrow{m}$ means: $\forall \epsilon>0,\,  m\left(|f_n|\geq \epsilon\right) \rightarrow 0.$  This is similar to Cesaro convergence, which is weaker than regular convergence, but it is not the case here. I've tried to prove the proposition, or to give a counter example, but didn't manage to succeed in either. Any insights will be appreciated!


Whenever I try to open Ubuntu Software Center it says my files are corrupted, when I click repair, it says,  Package operation failed       The installation or removal of a software package failed Details installArchives() failed: (Reading database ...  (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 255659 files and directories currently installed.) Preparing to unpack .../tor_0.2.4.20-1_i386.deb ... Unpacking tor (0.2.4.20-1) ... dpkg: error processing archive /var/cache/apt/archives/tor_0.2.4.20-1_i386.deb (--unpack):  trying to overwrite '/usr/bin/tor', which is also in package tor-browser 3.5.4 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for man-db (2.6.7.1-1) ... Errors were encountered while processing:  /var/cache/apt/archives/tor_0.2.4.20-1_i386.deb Error in function:  dpkg: dependency problems prevent configuration of vidalia:  vidalia depends on tor (>= 0.2.2.29-beta-1); however:   Package tor is not installed.  dpkg: error processing package vidalia (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of tor-geoipdb:  tor-geoipdb depends on tor (>= 0.2.4.20-1); however:   Package tor is not installed.  dpkg: error processing package tor-geoipdb (--configure):  dependency problems - leaving unconfigured

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I have been able to set up an automatic forward of all incoming Gmail, but for outgoing I set up a filter, and it doesn't do anything. I need the forwarding to be automatic and discreet.  I am going to try the Gmail Auto-forward script.

Is there a way to have a copy of any message sent from a Gmail account sent to another address?  I've got any messages coming to my address copied to another (see  for one solution, setting up filters is another), but I haven't yet found a way to have outbound messages automatically copied.  Is there a way?


I'm using Mojave and I'm trying to change the permissions for this file /System/Library/PrivateFrameworks/Slideshows.framework/Versions/A/Resources/Content/EffectDescriptions.plist I want to alter the duration that slides appear in my screensaver which I've figured out how to do but I cannot save my edits to the file.  I continually get the error Operation not permitted.  I have tried editing the file on the desktop that moving the file back but that does not work.  That operation is denied.  I cannot change permissions through getinfo and I cannot change permissions through the terminal command: sudo chown myname /System/Library/ And also sudo chown myname /System/Library/PrivateFrameworks/Slideshows.framework/Versions/A/Resources/Content/EffectDescriptions.plist This article seems to deal with the problem but I really cannot tell what the guy is saying:

I have just learned about the "Rootless" feature in El Capitan, and I am hearing things like "There is no root user", "Nothing can modify /System" and "The world will end because we can't get root".  What is the "Rootless" feature of El Capitan at a technical level? What does it actually mean for the user experience and the developer experience? Will sudo -s still work, and, if so, how will the experience of using a shell as root change?


Description I'm curious if there is a way to let someone run your python code, but  Without having to give them the python file. --> Ex. get_curl.py Not allow that person see what inside the code. I'm thinking of an encrypted python file. But if we encrypt it, how can python execute it.   Attempt I've tried post my sample code on github gist and use curl and pipe into it. But then my URL is there, so they could have see the file, if they visited that URL.  curl "https://gist.githubusercontent.com/bheng/b23d775ee7b106cd7cc0ae5ac71b81a9/raw/c6ecd3ed7bc04699d73e1b9ed521f481ac6a41c4/get_curl.py" -s -N > cool; python cool   Question Is this something that is not possible ? Or Is this something that can be achievable via library / plug-in / framework ? How would one go about and implement this ?  I'm opening to any suggestions at this moment. Any hints / suggestions / helps on this be will  be much appreciated !

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem?


I've bind the data to a datagridview from a json like this:  dynamic result = JsonConvert.DeserializeObject<List<productData>>(temp); mproductDataGridView.DataSource = result;   Later i want to do some filtering:  mproductDataGridViewstring rowFilter = string.Format("[{0}] = '{1}'", "type_id", "configurable"); DataTable dt = (DataTable)mproductDataGridView.DataSource; dt.DefaultView.RowFilter = rowFilter;   There is an error (i translated):  cannot convert system.Collections.Generic.List to System.Data.DataTable object   Anyone know what is the problem? how to fix this?

I have few methods that returns different Generic Lists.   Exists in .net any class static method or whatever to convert any list into a datatable? The only thing that i can imagine is use Reflection to do this.  IF i have this:  List<Whatever> whatever = new List<Whatever>();   (This next code doesn't work of course, but i would like to have the possibility of:  DataTable dt = (DataTable) whatever;


Related:   Should first posters be required to click through a screen showing their formatted post, confirming they approve of how it looks before submitting? So often code isn't indented properly; this would give the OP an opportunity to fix it so others don't have to.  Certainly if they're stuck, someone else can fix it for them as is often the case now, but oftentimes it's a simple matter of not realizing it'll look the way it does. (hence the flurry of edits after the post is made)  This is compounded by the fact that improperly formatted code becomes very small, and easy to miss on the scroll down to Post Your Question  Perhaps beyond just a minimum rep, it would also be based on how often other users have edited their posts, as a metric for how well they've historically done it right.    Edit: this question has been closed as a dupe. While I see the very close relation between the two, the lone answer on the other post explicitly does not address my recommendation of which users to present the confirmation to. I.E. Base it on the number of third-party edits the poster has received.  So tell me this: if my question is closed as a dupe, and the other question doesn't answer this question, how does one go about getting a relevant answer? Do I need to open a bounty on the other post? That seems overkill for a question that hardly benefits me as an individual.

Those of us who have been using SO (or any SE site for that matter) for a while know that the box where we type our text is not identical to what is posted (because of various markdown capabilities we are given). We also know that there is a display below the text box that shows us what our post will actually look like once we are done, and we know how to format thing the way we would like them to look.  I've noticed a trend where a user will format things nicely (or somewhat nicely) as plaintext where they type, and ignore the fact that it is not at all formatted like that in the actual post (despite the fact that it is displayed, live, directly below where they are typing). Lists that are meant to span several lines appear as a single string across one line running onto several, code is partially code-formatted, etc...  I suggest that new users and users with many third-party edits (corrections by more experienced users), be prseented with a confirmation dialog when posting confirming that they have, in fact, checked out how their post will actually appear once posted, and that it is accurate. To address concerns regarding reduced conversions, a possible solution would be to bypass the dialog for absolute first posts, since those will be in First Post review queue anyway.  This will:   Make it easier for everyone to read Reduce the amount of editing we have to do to make things readable Make it easier to take new, serious posters seriously, as their questions won't look lazy and effortless due to lack of formatting.   Mock up of dialog to be displayed:   Possible criteria for whether to display dialog:  if posts == 0:     False if posts < 5:  # questions AND answers     True if third_party_edits / posts > .3: # 30% "fixed" by others     True


Let $G$ be a non-nilpotent and supersoluble finite group.  $G=Q\ltimes P$, Where $P$ is a  group of order $p^{2}$($p$ is prime), all maximal subgroups of $P$ are normal in $G$, $Q=\langle a\rangle$ is a cyclic $q$-group ($q\neq p$) of order $|Q|>q$ and $C_{Q}(P)=\langle a^{q} \rangle$  Then every $2$-maximal subgroup of $G$ permutes with all $3$-maximal subgroup of $G$.  A subgroup $H$ of a group $G$ is called $2$-maximal (or second maximal )in $G$ if $H$ is a maximal subgroup of some maximal subgroup $M$ of $G$.

Let $G$ be a non-nilpotent and supersoluble finite group.  $G=Q\ltimes P$ and $|Q: C_{Q}(P)|=q$ is prime, Where $P$ is a group of prime order $p\neq q$.   $Q$ is noncyclic group of order $|Q|=q^{\alpha}$ where $\alpha >2$ and all maximal subgroup of $Q$ diffrent from $C_{Q}(P)$ are cyclic Then every $2$-maximal subgroup of $G$ permutes with all $3$-maximal subgroup of $G$.  I dont have idea ?  What i do? Maximal subgroup of $G$ is not clear for me.    A subgroup $H$ of a group $G$ is called $2$-maximal (or second maximal )in $G$ if $H$ is a maximal subgroup of some maximal subgroup $M$ of $G$.


I would like to perform this raster calculation where when ras@1 >0 gives me 1 as pixel value of the output raster, while when ras@1 <0 the values are given by the other formula ras@1/(1-2.71828^(ras@2)), but it doesn't work because it gives me in any case the result of the other formula, even when ras@1 is higher than zero. Can someone give me some suggestion? import qgis import gdal  from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry from qgis.core import QgsRasterLayer  inputpath = '/Users/macbook/Desktop/TESI/PROGETTO/sigm/sigmath90.tif' inputpath2 = '/Users/macbook/Desktop/TESI/PROGETTO/lambdamin/lambminth90.tif' outputpath = '/Users/macbook/Desktop/TESI/PROGETTO/alfamax/alphamaxth90.tif'  entries = [] inputrasterfile = QgsRasterLayer(inputpath)   ras = QgsRasterCalculatorEntry() ras.ref = 'ras@1' ras.raster = inputrasterfile ras.bandNumber = 1 entries.append( ras )  inputrasterfile2 = QgsRasterLayer(inputpath2)   ras2 = QgsRasterCalculatorEntry() ras2.ref = 'ras@2' ras2.raster = inputrasterfile2 ras2.bandNumber = 1 entries.append( ras2 )   alpha_max='(ras@1 < 1)* ras@1 / (1-2.71828^(ras@2)) + (ras@1 >>1)*1'  new_path = outputpath  alfamax= QgsRasterCalculator(alpha_max, new_path, 'GTiff', inputrasterfile.extent(), inputrasterfile.width(), inputrasterfile.height(), entries ) alfamax.processCalculation() iface.addRasterLayer(new_path)

I'm fairly new to QGIS, but I'm getting the hang of it. I have two layers - one DEM and one raster made from shape file (Buildings), but need one with higher Elevation where the buildings are for terraflow. But I can't seem to get the raster calculator to work with if Statement. I found a Workaround by assigning a fixed elevation value to the building raster, that is higher than any Point on DEM.  But on DEMs with high Elevation difference this means that some Buildings are over 50m tall!!!  would like to make an if statement like this:  A  B A = DEM  B = Buildings  if(B>A,A+10,A)


I am trying to empty an array passed to a function within javascript:  var a = [1,2,3];  function emptyArrayNo(ar) {     // the following does not empty the global array     ar = []; }  function emptyArrayYes(ar) {     // any of the following 3 methods empties the global array     ar.length = 0;     //ar.splice(0, ar.length)     //while(ar.length > 0) {ar.pop();}  }  emptyArrayNo(a); console.log(a); // returns [1,2,3]  emptyArrayYes(a);  console.log(a); // returns []   All the three methods within emptyArrayYes() seem to work, which I think is due to the reference to the array passed not being modified within the function. However when we set the array to [] within the function, I believe the reference changes therefore causing issues i.e. not being seen at the global scope. Can someone please clarify what is going on here? Thanks.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


My code is:  $description = $_POST['description']; $description = htmlspecialchars($description);   I use it to insert some description into a table:  $insertBillIndexQuery = "INSERT INTO $billIndexTableName (type, exp_category, shopping_date, shop, description, total_amount, paid, due, mode_of_payment) VALUES ('Expense', '$exp_category', '$billDate', '$shop', '$description', '$total_amount', '$paid', '$due', '$modeOfPayment')";   This works fine usually. However, when I type a special character such as a single quote, the system breaks, and I get an Error Querying Database error. I'm sure that the single quotes are causing the problem. Am I using htmlspecialchars wrong?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Let $G$ be a group and $H \leq G$. Suppose $gH = Hg,  \forall g \in G$. We know that this is equivalent to $gHg^{-1} \subseteq H,  \forall g \in G$ and $gHg^{-1} = H,  \forall g \in G$. However I haven't seen any textbook write what was stated in the title. Is it false?

Those 5 Statements are all equivalent to the Statement that $H$ is a normal subgroup of $G$:  $(1) \forall g \in G, h\in H$ we have $ghg^{-1} \in H$  $(2) \forall g \in G, gHg^{-1} \subseteq H$  $(3) \forall g \in G, gH = Hg$  $(4)$ Every right coset of $H$ is a left coset  $(5) H$ is the kernel of a homomorphism of $G$ to some other Group  In class we used the Definition 3 can someone explain me why 3 and 1 are equivalent?  Edit: It would be convenient to show the equivalence of all 5 statements


In a custom D8 module (not a theme or sub-theme) what is the best way to alter all nodes of a specific content type by prepending them with simple markup? I'm trying this approach with no success ... custom/custom.module: <?php /**  * @file  * Custom module hook implementations.  */ /**  * Implements hook_theme().  */ function custom_theme() {   return [     'custom_article_node' => [       'template' => 'custom-article-node',       'variables' => [],     ],   ]; }  custom/templates/custom-article-node.html.twig: <i>This is a Custom Article node.</i> {{ content }}  I'm not sure how to pass the node to the template, or to test what content type it is ... and I'm not sure if this theme hook is even executing. (I know how to override templates in the theme layer, but in this case I need to do it in a custom module.)

I have a project on D8 where I don't use any custom themes, I use default seven theme for everything because there is no need of any visual theming.  So My question: Is it possible to override theme template using module? without implementing theme at all?  I have a case where I want to add custom third party generated value in node's template.  This is what I have done:   Implemented custom template:  function MY_MODULE_theme($existing, $type, $theme, $path) {   return array(     'video_teaser' => [       'template' => 'video_teaser',       'variables' => NULL,     ]   ); }   Implemented hook_theme_suggestions_alter:  function MY_MODULE_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {   if(in_array('node__teaser', $suggestions)){     $suggestions[] = 'video_teaser';   } }    And this, works, instead of default template, my video_teser template is used.  BUT: I have a problem passing default node variables to my custom template, they aren't passed automatically and I couldn't find the way to do this using current approach.


I am using biber for my bibliography. I try to edit my in-text bibliography style to appear like this:      Blah blah[1] blah blah blah [1-3].   What I am try to change is like:      Blah blah (Koehler 1999) blah blah blah (Koehler 1999, Bailey et al.,Lam 2016).   This is simple of my latex file   \documentclass{article} \usepackage{savesym} \usepackage{graphicx} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{algorithm} \usepackage[noend]{algpseudocode} \usepackage[euler]{textgreek} \usepackage{empheq} \usepackage{amsmath} \DeclareMathOperator{\rank}{rank} \makeatletter \newenvironment{sqcases}{% \matrix@check\sqcases\env@sqcases }{% \endarray\right.% } \def\env@sqcases{% \let\@ifnextchar\new@ifnextchar \left\lbrack \def\arraystretch{1.2}% \array{@{}l@{\quad}l@{}}% } \makeatletter \def\BState{\State\hskip-\ALG@thistlm} \algnewcommand\algorithmicforeach{\textbf{for each}} \algdef{S}[FOR]{ForEach}[1]{\algorithmicforeach\ #1\ \algorithmicdo}  \makeatother  \usepackage[utf8]{inputenc} \usepackage[style=authoryear-comp, citetracker=true, maxcitenames=1, giveninits, terseinits, uniquename=init]{biblatex} \AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{2}}}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @article{koehler1999digital,     title={Digital libraries and World Wide Web sites and page persistence},     author={Koehler, Wallace},     journal={Information research},     volume={4},     number={4},     pages={4--4},     year={1999} }  @article{bailey2016exponent,     title={Exponent of Cross-Sectional Dependence: Estimation and Inference},     author={Bailey, Natalia and Kapetanios, George and Pesaran, M Hashem},     journal={Journal of Applied Econometrics},     volume={31},     number={6},     pages={929--960},     year={2016},     publisher={Wiley Online Library},     doi = {10.1002/jae.2476} } @article{lam2016nonparametric,     title={Nonparametric eigenvalue-regularized precision or covariance matrix estimator},     author={Lam, Clifford},     journal={The Annals of Statistics},     volume={44},     number={3},     pages={928--953},     year={2016},     publisher={Institute of Mathematical Statistics},     doi = {0.1214/15-AOS1393} } \end{filecontents}   \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib} \DeclareNameAlias{sortname}{family-given} \renewcommand*{\revsdnamepunct}{} \DeclareDelimAlias{finalnamedelim}{multinamedelim} \DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace} \DeclareFieldFormat*{title}{#1} \DeclareFieldFormat*{journaltitle}{#1} \DeclareFieldFormat*{booktitle}{#1} \DeclareFieldFormat*{maintitle}{#1}  \renewbibmacro{in:}{% \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}} \renewbibmacro*{publisher+location+date}{% \printlist{publisher}% \setunit*{\addcomma\space}% \printlist{location}% \setunit*{\addcomma\space}% \usebibmacro{date}% \newunit}  \renewcommand*{\bibpagespunct}{\ifentrytype{article}{\addcolon {\addcomma\space}} \DeclareFieldFormat[article,periodical]{pages}{#1}  \DeclareFieldFormat{doi}{\url{https://doi.org/#1}}  \DeclareSourcemap{ \maps[datatype=bibtex]{     \map{         \pertype{article}         \step[fieldset=number, null]     } } }  \renewcommand*{\finentrypunct}{}   \begin{document}  Blah blah \parencite{koehler1999digital} blah blah blah  \parencite{koehler1999digital}, \parencite{bailey2016exponent}  \parencite{lam2016nonparametric}. \printbibliography \end{document}   I try to change \parencite{koehler1999digital} to  \parencite{koehler1999digital} but it does not work.   Any idea about what I am missing here ?

I haven't had a lot of experience with biblatex so far and I decided to use the numeric style for citations in the text. However, the authoryear style for the bibliography is much nicer. I know, I can't actually combine numeric citestyle with authoryear bibstyle.  That brings me to my question: How can I achieve using the numeric citestyle and the formatting of authoryear in the bibliography?


while doing format my sd card was suddenly removed after that i tried to connected it splits in to two partitions and unable to format that. i tried disk part cmd but it unable to delete partition due to there is no listing of volumes  i also tried easyus partition manager but it also not worked i also tried minitool partition wizard but it also not worked while using disk part it listed there are no volumes. while delete partition it showing that no volume is selected how can i recover my sd card plese give me suggeetions

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Why is there 7 different localX facilities in syslog ? My understanding is that we can choose anyone but I am curious and I would like to know why there are 8 facilities.  Any link with "severity" ?

What I understand  On *nix servers, we configure sending logs using facility.severity, where facility is the name of the (let's call it) "component" of the system, such as kernel, authentication, and so on; and severity is the "level" of each of the logs logged by a facility, such as info (informational), crit (critical) logs.  So, if I want to send kernel critical logs, I'll use kern.crit.  The combination of facility and severity is known as the priority, for example...   priority = kern.crit facility = kern severity = crit   Question  There are "facilities" called local0 to local7.  What in the world are these local# facilities? I'm asking specifically about local6, since it's usually the most common one I find in searches.  My question is actually because I'm configuring Snort (SourceFire Intrusion Sensor) to send logs, so I wanted to know which facility to use. My question is not Snort specific though, because local# facilities are everywhere; on Cisco and IBM's WebSphere Application Server for instance.  Research   , which is where the syslog protocol is defined, only says:  local6 - local use 6   Which doesn't really describe it, as opposed to:  auth   - security/authorization messages  In Ubuntu, man syslog shows:      LOG_LOCAL0 through LOG_LOCAL7                   reserved for local use   Also, vague.


I have a problem similar to Suresh @  (I want to power an electric dog fence from my car battery), and like Trevor_G suggests, I probably don't have the smarts to do a DIY solution. I get that you can't get 12v output if you only have 10v input. Trevor_G suggests instead an "off-the-shelf automotive 12v power supply." I'm not sure what type of device Trevor_G is recommending - one of those 12v rechargeable lithium battery "portable power supplies" that are supposed to power your 110v shaver while charging 6 cell phones simultaneously? The 110v AC-12v DC power supply that came with the dog fence provides 12v DC at 750mA. Assuming the unit draws 750mA, how big of a battery (watt/hours?) do I need to power it for 12 hours on one charge? (I get confused witht he math) Is this even practical? How long would I have to run my car to recharge the unit? Manufacturers don't give any data on this. Thanks. Forgive me for being an electronics pre-schooler.

I would like to know how to calculate battery life when using an LED strip. The LED strip is powered by 8 AA batteries in series. LED Current Draw = 260 mA. LED power consumption: 3.1 W. LED Operating Voltage range: 9-14.8 VDC. Please see attached images for battery datasheet.  This is my calculation, but I'm not sure if it's correct:     Battery Life = (Battery Capacity)/(Load Current) = 2000 mAh /260 mA = 7.7 Hours   This is for one battery, and the lights are powered by 8 batteries, so is the total battery life = (7.7)x(8) = 61.6 hours ?


I am trying to call a javascript function from php. The function takes one argument. This is the call:  <?php  function welcomeBackMessage($user, $password){   echo "
BACK: " . $user . "pwd " . $password . "
";   echo "";  } ?>   This is the JS function; declared before the php functions calls it:   Can't find variable: guest1.   The idea is to pass the variable to a JS function so I get update a DOM element with  variable.   Any input appreciated.

What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  <script>   var myvar = "<?php echo $myVarValue;?>"; </script>   However, this doesn't work when $myVarValue contains quotes or newlines.


I am planning to use a $10$-fold strategy in order to validate the results of a logistic regression analysis.  I am a bit confused about the procedure I must follow.  More precisely: Let us suppose that my cross-validation returns acceptable values (for the average AUC, average misclassification rates, etc.) and reveals that everything is OK. Which is the predictive model or formula I should return in such a case?  First of all, I have already read (here, for instance: ) and understood that a $k$-fold cross-validation procedure aims at assessing the performance of a predictive analysis on a given data set (in terms of its ability to accurately predict on new data). I mean, it is not a technique for building predictive models, but a way to measure whether a given fitted model can be overfitting or not (roughly speaking).  OK, so, as far as I understand, I must do this:   Randomly divide the sample into $k$ equally sized subsamples (using stratification if necessary). For $i=1$ to $k$:   Perform a logistic regression analysis using all the cases not in subsample $i$ as the training set. Use subsample $i$ as the validation set. Calculate performance parameters.  Calculate average performance parameters.   Let us imagine that step 3 allows us to conclude that logistic regression performs well on our data.  Now, I have obtained $k$ predictive models. Is this right?  So, which one of them is the final model I should use? Or, should I build (and return to the final user) a definitive logistic regression predictive model using all cases in the sample?  Sorry if this is too simple or too wrong. I would really appreciate if you can answer my questions.  EDIT:  Actually, my question is about cross-validation, but I wanted to specify that I am dealing with logistic regression, just in case it helps.

When performing k-fold cross validation, I understand that you obtain the accuracy metrics by pointing all the folds except one at that one fold and make predictions, and then repeat this process $k$ times.  You can then run accuracy metrics on all of your instances (precision, recall, % classified correctly), which ought to be the same as if you calculated them each time and then averaged the result (correct me if I'm wrong).  The end result you want is a final model.  Do you average the models obtained to make your set of $k$ predictions to end up with the model that has the accuracy metrics obtained by the above method?


I was just wondering how to get this JButton "nextButton" to work. It is used by the actionPerformed method for the e.getSource instanceof JButton. How can I make it to work alone?          if(e.getSource() == nextButton){             try {                 stmt.executeUpdate("UPDATE seats SET type = 'booked' WHERE seatNum = 3");              } catch (SQLException e1) {                 // TODO Auto-generated catch block                 e1.printStackTrace();             }         }          if(e.getSource() instanceof JButton){             bookedIcon = new ImageIcon("images/bookedSeat.png");              int a = Integer.parseInt(e.getActionCommand());             int seat = a;             a =- 1;             seatsA[a].setIcon(bookedIcon);          }

private JButton jBtnDrawCircle = new JButton("Circle"); private JButton jBtnDrawSquare = new JButton("Square"); private JButton jBtnDrawTriangle = new JButton("Triangle"); private JButton jBtnSelection = new JButton("Selection");   How do I add action listeners to these buttons, so that from a main method I can call actionperformed on them, so when they are clicked I can call them in my program?


I'm having big WordPress SQL dump file on my Ubuntu server which is around 7GB. Since I'm changing domain I need to replace the domain name in the file. I want to know how to do it via command line.  dev.example.com   Needs to replace with  example.com

I use the grep command to search for a string in many files. Is there something similar to "search and replace"?


In Season 2, we meet L's successors, "M" (Mellow) and "N" (Near). Seeing how they are his successors and were all raised in the same institute, L must also stand for something.

I watched through Death Note once, and I never remember hearing L's name, even after he died.  What was L's real name, or did he never have one (it was never said)?


I'd like to ask a question regarding Excel on the Stack Exchange Superuser site, and I have a sample set of data to help illustrate my request for help with a formula. It doesn't seem that HTML tables are supported, so I used an  to try and create something I could post as text. I have tried different formatting options but can't seem to get the columns lined up once it converts from mono spacing to the posting font. Here is an example of what my data looks like (with break tabs added, otherwise it would be even more of a jumbled mess). Can anyone please advise me how they format table data on these forums?  Do you use ASCII? Something else?   +-------------------+----------------------+----------+ | Contribution Type | % Contribution Match | % Salary | +-------------------+----------------------+----------+ | Type 1            |                  0.5 |        - | | Type 1            |                  0.6 |        - | | Type 1            |                      |        - | | Type 2            |                    - |     0.03 | | Type 2            |                    - |     0.04 | | Type 2            |                    - |        0 |  Update thank you! This was marked a duplicate to a question on markdowns, which did help me to solve this by redirecting me to a related question about . The short answer is that yes, I can use ascii to post tables, so long as they are contained within a code block, which is created by putting four spaces at the beginning of each line. You can see the result of this below:  +-------------------+----------------------+----------+ | Contribution Type | % Contribution Match | % Salary | +-------------------+----------------------+----------+ | Type 1            |                  0.5 |        - | | Type 1            |                  0.6 |        - | | Type 1            |                      |        - | | Type 2            |                    - |     0.03 | | Type 2            |                    - |     0.04 | | Type 2            |                    - |        0 |   Update #2: special thanks to Pierre for providing me with the  via the comments section. I do not see any icons to upvote, only flag, but I would like to give you credit for your help here. I hope I've done this properly. Thank you again.

It seems like a lot of people try to display tables in Stack Overflow questions, but don't do a very good job. Is there Markdown syntax that supports creating a proper table?


What is the latest official firmware for Samsung Galaxy Europa? I am currently on 2.2 Froyo at the moment. Can I update it using Samsung Kies, or do I need to update from somewhere else?

This Community Wiki question is designed to be the "canonical question" for questions asking how to upgrade one's device to a new Android version.   I want to get a newer version of the OS for my Android device. How can I do that?  See also:


In the Artificer section that talks about Artificer infusions it says "you gain the ability to imbue mundane items with certain magical infusions". So if I was to use an Artificer infusion on a normal weapon (Greatsword in my case) and then can I use the pact blade ability on that weapon, would it keep the infusion because the weapon does turn magical and the infusion says it can be used only on nonmagical items

I play a hexblade warlock with an Improved Pact Blade longsword. I like the idea of the eldritch tinkerer, who builds his patron's gifts into his gadgets, which fits in a warlock/artificer multiclass. The artificer's Enhanced Weapon infusion would be very nice with the warlock if it stacks with the Improved Pact Blade bonuses, but I can't tell if it does from the class descriptions. Do these features stack, or do I need to rethink this build?


A young-looking astronaut has just returned home after a long trip in outer space. He found an old lady in his house and the old lady introduced herself as his daughter. How could this be possible?

The paradox in the  is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible.  There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it.  Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time?


I've put in an image in my Overleaf latex file but it's positioned in the wrong place. How can I move it around?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


Can anyone explain how to align a footer div to the bottom of the page. From the examples I've seen, they all show how to make the div stay visible at the bottom, no matter where you've scrolled the page. Although I don't want it like that. I want it fixed at the bottom of the page, so it doesn't move. Appreciate the help!

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


I restarted my laptop and then I could not log into Ubuntu desktop or console even. I tried to login at console by pressing Ctrl+Alt+F3. But on console, it does not login as well. On desktop it takes password and after a blink returns back to login screen again. I have study data and everything and kind of stuck in this login issue. Please advise.  Thanks

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


I was thinking that Stack Exchange itself already has a smart system that filters the quality of a new question. Even the architecture of Stack Exchange is dependent on growing user networks. Then why doesn't Stack Exchange just stop the existing users from down-voting newbies who have less than five reputation? This current system seems like cyber bullying. The community can correct the newbie in many ways by leaving comments, and editing the question in a proper way of redirecting him/her to the right place. I feel then only a newbie will stay with Stack Exchange, especially in Stack Overflow. It's only my opinion. What's the community's opinion?

There is a distinct decline in the level of civility on all the sites here.  Some of this is due to new users coming in and posting spam and other nonsense, but the off-topic and downvote buttons are doing a pretty good job of keeping this under control. Unfortunately, a lot of this is coming from more experienced users, and the site's built-in moderation system does not (and probably cannot) handle this very well.  Folks are rushing to pound new users down with "this belongs on meta!", "this is off topic", "this is a duplicate!" and "read the Help!". (Which is correct, but should be done nicer) All this, of course, is accompanied by a flurry of downvotes.  This is not very welcoming to new users who don't know about meta, the Help, or what counts as off-topic. Now I am not proposing that we just allow off-topic, meta, or duplicate questions.  However, I think we could be gentler in the way we express these sorts of things.  Explain what meta and the FAQ are and provide useful links.  Just using please and thank-you when asking folks to read the FAQ or post something on meta would be an improvement.  I also think we could rein in the downvoting a bit.  Not that we shouldn't vote stuff down, but unless a new user's post is clearly spam, voting it down to -1 or -2 should be sufficient to send a message without piling on. I like Stack Exchange and I want it to become a resource for everyone, not just an elitist site for high-rep users on the sites.


I'm trying to prove: $$n! = \Theta\bigr(\sqrt n \; \bigr( \frac{n}{e}\bigr)^n \bigl)$$  using integration. I'v found a proof but it is very long and not elegant. Any ideas of a short and elegant proof of the above?

Use integration to prove that $$n! = \Theta\left(\sqrt{n}\cdot\left(\frac{n}{e}\right)^n\right)$$   I managed to prove that $n! \leq en(n/e)^n$, by applying $\ln$ to both sides and integrating on the function $\ln$. In a similar way, I showed that $n! \geq e(n/e)^n$.  I can't find a way to get a tighter bound. Does anyone have an idea?


I am getting this error but don't know how to resolve it.I have already gone through the post but still confused. I tried to run Xlint File.java but its not working. While running this code, I am getting the msg like   "VectorTest.java uses unchecked or unsafe operation  Recompile with -Xlint:unchecked for details"  import java.util.Vector; import java.util.Enumeration;  public class VectorTest {   public static void main(String args[])   {         Vector v=new Vector(3,4);        System.out.println("Initial size"+ v.size());        System.out.println("Initial capacity"+ v.capacity());        v.addElement(new Integer(1));        v.addElement(new Float(2.5));        v.addElement(new Double(3.45));        v.addElement(new Integer(4));        v.addElement(new Integer(5));        System.out.println("Current Capacity"+ v.capacity());         v.addElement(new Integer(6));        v.addElement(new Integer(7));        v.addElement(new Integer(8));        v.addElement(new Integer(9));        v.addElement(new Integer(10));        v.addElement(new Integer(11));        v.addElement(new Integer(12));        System.out.println("Current Capacity"+ v.capacity());        System.out.println("First element"+(Integer) v.firstElement());        System.out.println("Last element"+(Integer)v.lastElement());        Enumeration e;        e= v.elements();        while(e.hasMoreElements())        {           System.out.println("All elements"+ e.nextElement());        }     }  }

For example:  javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.


I'm currently scrubbing some numbers and converting numbers if they are 66.1K to be 66100 using   df['number'].replace({'[kK]': '*1e3', '[mM]': '*1e6', '[bB]': '*1e9', },regex=True).map(pd.eval)   can replicate by just doing a simple print(pd.eval('64.1*1e3'))  However the return for 64.1K is 64099.99999999999.   Does anyone know why this happens? How would you use pandas to get 64100.0?  I have tested with 65.1K and it is the same result 65099.99999999999 but if I do 66.1K it equals to 66100.0.

I want a to be rounded to 13.95.  >>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999   The  function does not work the way I expected.


is defined as     an excessive preoccupation with and worry about one's health   Is there a word to describe the opposite reaction, as in a word to mean 'a nonchalant attitude towards one's health'? I thought about hyperchondriac but I don't think that word exists. Is there such a word in English?

Is there a word for the opposite condition of ? For example,  someone who denies being sick when they clearly are? I would just say that they are "in denial". Is there any other adequate word?  I thought about the obvious 'hyperchondria' but it doesn't seem to be used anywhere and doesn't look suitable as—from —just replacing 'hypo' by 'hyper' wouldn't fit well:     1555–65;  < Late Latin  < Greek,  neuter plural of hypochóndrios  pertaining to the upper abdomen (supposed seat of melancholy), equivalent to hypo- hypo- + chóndr ( os ) ensiform cartilage + -ios  adj. suffix


MemberJoin Creadted But Error  MemberController.java  @Autowired  private MemberSv memberSv;   @RequestMapping(value = "/join", method = RequestMethod.POST)  public String membersave(MemberDTO memberDTO)  {      memberSv.member_save(memberDTO);      return "join_form";  }   MemvberSv.java  public interface MemberSv {      MemberDTO member_save(MemberDTO memberDTO);  }   MemberSvImp.java  @Service  public class MemberSvImp implements MemberSv {        CommonRepository commonRepository;       @Override      public MemberDTO member_save(MemberDTO memberDTO) {          commonRepository.save(memberDTO);          return memberDTO;      }    }   CommonRepository.java  @NoRepositoryBean  public interface CommonRepository<T, ID extends Serializable> extends                                   MongoRepository<T, ID> {      <E extends T> E save(E entity);  }   Error java.lang.NullPointerException: null at   com.example.accountproject.models.services.MemberSvImp.member_save(MemberSvImp.java:19) ~[main/:na]

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


was recently asked on SO.  Whilst the question was specifically phrased in relation to MySQL, it's clearly applicable to most languages and is actually seeking a conceptual distinction between different classes of operation rather than any solution to a practical problem faced in software development.  In particular, given that comparison operators are fairly easily understood, it's really seeking a conceptual definition of logical operations: the OP's  reinforces this view.  As such, it doesn't neatly fit within any of the categories that are  for SO.  I feel that (perhaps once edited to exclude references to specific languages) it might better belong on another, more theoretical, site within the SE network.  Indeed, I flagged it for moderator attention:     I don't know on which SE site this question best belongs, but I have a feeling it isn't SO. Perhaps TCS? Or Philosophy? Or Math? Or maybe even Programmers?   But received the response:     declined - a moderator reviewed your flag, but found no evidence to support it   What further action, if any, should I take?  See also:

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I've been learning how to use Blender, and I've come across a tutorial which talks about UV Unwrapping, but it isn't the same version of Blender that mine is so I have no idea what to do now. My version is 2.79  The editor looks like this:   But when I render it (with F12) it just shows this:   How do I make the render show the texture?

I have added a texture to a cube in the UV editor and it shows up fine in textured view  But when I render it there is no texture  What have I done wrong?


Why "softmax" is called "softmax"? How does it related to "max"? I am trying following code and they do not look like each other: a = seq(-1,1,0.05) b = seq(-1,1,0.05)  softmax <- function(x,y) {   exp(y)/(exp(x)+exp(y)) }  par(mfrow=c(1,2))  c = outer(a,b,pmax) persp(a,b,c)  d = outer(a,b,softmax) persp(a,b,d)

In the book Deep Learning, it says the softmax function is de facto a soft argmax function, and the corresponding soft version of the maximum function is $$\text{softmax} (z)^T z$$ How to understand the latter?