Concurrent Modification Exception Entity Handling

I'm creating a game and it's pretty much a top down shooter kind of like space invaders.  Well, I am currently handling the removal of entities from a linked list in an enhanced for loop and as we all know we cant just add stuff to a list and take away stuff from a list at the same time.  I keep getting the following error:     conccurentModificationException    My question is how can I efficiently handle the addition and removal of entities from a Linked-list without getting an error.  Here is my World Class  package game;  import java.awt.Graphics; import java.util.LinkedList;  import data.Guns; import entity.Beast; import entity.Entity; import entity.Player; import entity.Projectile; import external.ImageLoader; import handlers.Handler;  public class World {      private Player player;      private Handler handler;      // List of all Game Entities      public static LinkedList<Entity> gameFools = new LinkedList<Entity>();      // Constructor for World , this is created once the Game State is instantiated      public World(Handler handler) {         this.handler = handler;          // The player is the first entity added to the list of course          player = new Player(handler, null, Guns.tier1, 64, 64, 400, 900, 500, 5, 0, 0);         gameFools.add(player);      }      public void update() {          // Randomly spawns in a new beast npc          if ((int) (Math.random() * 100) == 0) {             gameFools.add(new Beast(handler,                     ImageLoader.loadImage("C:\\Users\\Michael\\workspace\\TopDown\\res\\badguys\\mig1.png"), 32, 32,                     (int) (Math.random() * 700 + 50), 50, 10, 1, -1, -1, false, false, false, false, false));         }          //This is the for loop that is used to remove entitys from the linked list          for (Entity e : gameFools) {              // If the object is not within the screen, it gets removed              if (e.getY() <= 0) {                 gameFools.remove(e);             }              // Once the Projectiles Range is up, it is removed              if (e.isProjectile()) {                  if (((Projectile) e).getRange() <= 0 ) {                     gameFools.remove(e);                 }              }              e.update();         }         System.out.println("Current Objects entities in game " + gameFools.size());      }      // Getters and Setters      public void render(Graphics g) {         for (Entity e : gameFools) {             e.render(g);         }     }      public Player getPlayer() {         return player;     }      public void setPlayer(Player player) {         this.player = player;     }      public Handler getHandler() {         return handler;     }      public void setHandler(Handler handler) {         this.handler = handler;     }  }


Is there a "magnetic gravitational" field?

Electromagnetic waves, in the classical sense, are due to oscillations in two different fields. They propagate at the speed of light, and they can be described by a set of differential equations.  Could there be a field coupled to gravity just like the magnetic field is coupled to the electric field? It would make sense that we haven't detected it yet (recall that the magnetic field of a wave is $c$ times smaller than the electric field); it would also make sense for this secondary field to have something to do with moving masses (just like the magnetic field) since relativity is all about masses moving relative to each other - take this expression with a side of salt.   Does any physical theory prove there cannot be such a field in the case of gravity? Does quantum field theory say something about this?  Don't be afraid to delve into the technical details, since I'm interested in knowing a lot more.


I am level 31 and I have the Elder Scroll. I am not sure if my level is high enough to go to Whiterun and trap one of Alduin's minions. What level should I be before I attempt it?


Prove that if $0\le p_n \lt 1$ and $S:=\sum p_n \lt 1$, then $\Pi (1-p_n) \ge 1-S$.  I'm having real trouble proving this inequality. I'd greatly appreciate any help.


How do I allow another player in my world?

We are connected to the same Internet but when we try to join each other's worlds it says 'invalid name'.  We are using the update with boats that can fit 2 people.


Should we create a MATLAB new community?

In the Stack Overflow community I see many questions related to MATLAB programs. I use both it and Mathematica for work, and I see that Mathematica has a separate community for its questions, that are always related to solve a problem with it or to do something with it.  Considering that MATLAB is a specific program, like Mathematica, Joomla, Drupal and so on, it can be useful to create a new community for it, or it's better to continue to ask questions of Stack Overflow community?


Question flagged as duplicate, but links to duplicated questions not shown

The question in question:   Maybe a bug?


Is the intersection of a closed set and a compact set always compact?

I am going through Rudin's Principles of Mathematical Analysis in preparation for the masters exam, and I am seeking clarification on a corollary.  Theorem 2.34 states that compact sets in metric spaces are closed. Theorem 2.35 states that closed subsets of compact spaces are compact. As a corollary, Rudin then states that if $L$ is closed and $K$ is compact, then their intersection $L \cap K$ is compact, citing 2.34 and 2.24(b) (intersections of closed sets are closed) to argue that $L \cap K$ is closed, and then using 2.35 to show that $L \cap K$ is compact as a closed subset of a compact set.  Am I correct in believing that this corollary holds for metric spaces, and not in general topological spaces?


There are a few question on the site that seem related to my problem but I could not find a solution in any of them.   My operating system is Ubuntu 12.04. I have mvn installed in /tools/noarch/apache-maven-3.1.1 and I have added the following lines at the end of my /etc/profile:  export M2_HOME=/tools/noarch/apache-maven-3.1.1 export PATH=$M2_HOME/bin:$PATH   After that I execute source /etc/profile.   Now my problem is: when I run mvn --version the command succeeds and mvn executable is found, while if I execute: sudo mvn --version I get the output: sudo: mvn: command not found. I know that PATH may be different when I execute a command with sudo and that is why I tried this:  $>sudo echo $PATH /tools/noarch/apache-maven-3.1.1/bin:... some other stuff ...   Another thing I tried is to execute sudo su - and then type mvn --version. In this case mvn is successfully found and the command succeeds. What is going on here?


Statistical test between two Poisson processes

I've observed two Poisson processes and my goal is to determine whether they came from the same process or not. Is there a test to determine this?


X regular and K compact prove $\overline{K}$ is compact

I tried: Let $x_i\in K$ such $x_i\in U$ open. If $X$ is regular exists $V_i$ such $x_i\in K\subset V\subset\overline{V}\subset U$. If $K$ compact and a cover such $K\subset\bigcup_{x_i\in K} V_i$ exist a finite cover such  $K\subset\bigcup V_{i_n}=V$. Clearly $\overline{K}\subset\overline{V}$ and $\overline{V}$ is a finite cover of $\overline{K}$


Why here is a large gap between caption and next text? Can I fix it?

asasasasasasasasasasas  \begin{table}[ht]      \centering      \begin{tabular}{|r|l|}         \hline         7C0 & hexadecimal \\         3700 & octal \\ \cline{2-2}         11111000000 & binary \\         \hline \hline         1984 & decimal \\         \hline     \end{tabular}     \caption[You-table]{Table for you}     \label{table: me}  \end{table}   Measuring AC heat capacity is an excellent radiation


I got a two-year multiple entry visa on May 20, 2014 to attend a conference in California. Unfortunately for me, my company cancelled my leave because of an unexpected project we secured from Shell Nigeria.  Can I still use the same visa to visit the USA? I leave next month and I wish to visit the USA, but now I am thinking it might not be allowed.


Can a left handed batsman change to right hand before the bowler starts bowling?

Field always set according to the batsman hand. Can a batsman change its hand before the bowler start bowling just to dodge the captain for setting the field?  Update: This question is about when caption is setting the field not when bowler is bowling


How to take the gradient of the quadratic form?

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


I've noticed an increasing trend among companies (especially smaller companies and agencies) to have a "hello@domain.com" email address as the initial point of contact. My understanding of this is that it helps to promote a friendly, human side to the address.  My question is - has there been any research done to back this up? Has anyone shown that this makes people more comfortable (and therefore more likely to get in touch), or is it simply another fad?


Trying to get my head around the commutator subgroup. This is an excercise from Artin's Algebra:  Let $C$ be the commutator subgroup of $G$. Prove that $G/C$ is abelian.  Here is what I've done:  Let $xC,yC \in G/C$ then $xyx^{-1}y^{-1}C = C$ since $xyx^{-1}y^{-1}$ is a commutator hence belongs to $C$. But then $xyC = yxC$ so $xC$ and $yC$ commute in $G/C$. This can be done for any elements, so $G/C$ is abelian.  This seems somewhat surprisingly short. Is that all there is to it?   Regards


Best way of showing updated/new year related content

I have a website that shows data that only valid for one year, but like to keep the date for archive and compare purposes.  For now I have a 301 redirect (so the other redirecting domains will always have the "newest" content) for domain.com/content/ --> domain.com/content/content-2014.  However some users use domain.com/content/content-2014 or older years for links on their websites, so content on year 2013 has a high pagerank. How can I manage this content for SEO?  domain.com/content/ --> domain.com/content/content-2014 (current year)  domain.com/content/content-2013  domain.com/content/content-2014  domain.com/content/content-2015  Is it smart to redirect 301 old content 2013 --> 2014 and make a new archive page? Or keep it like this?


Use Microtype beta from TLContrib with Miktex

I would like to test Microtype 2.5 (b08) with Lualatex.  I've seen here that TLContrib has been cited , but I only found solutions to use it as a repository with Tex Live (OK, the name itself tells it already). Is there any way to do it with Miktex ? Or have I to do some texmflocal trick or even to use Tex Live instead?


Can I view a list of my "great comments", perhaps in my profile?

I'm a little surprised no one asked this yet, but why isn't it possible to show your comments in descending order of "great comment" votes it has received? You can do this with upvotes on questions and answers, and since I think comments are the third major activity on SO, I'd like to view them. Even if you couldn't order them, it should at least show the number of votes on the activity#comments page of your profile...


Searching for a substring in a string in shell script

I have a very lengthy string (length is also not fixed) I want to extract a substring lying between 'email' and '@gmail.com'  Suppose it is  xhxjcndjcnkjcnd cjkjcdckjncx email:substring@gmail.comjndhcjkdhcnchjdccb djc   I want to extract the 'substring'  in the String.. Can I do this using regular expression , using sed tool.?


why does numpy.linarg.solve give different answer?

I'm trying to solve a matrix equation Ax=b with numpy.linarg.solve() A = np.array([[1, 1], [15,10]]) b = np.array([12,170]) sol = np.linalg.solve(A,b) print(sol)  the result is [10.  2.]  this is right answer but, when I run the code below, print(sol[0], sol[1])  I get 10.000000000000002 1.999999999999998  why are they different?


What the meaning of $dx$? Does it refer to something known as a differential (whats that?). Why is it used in integration when we put: $$\int f(x) dx$$  Does it refer to the derivative of something?  What exactly is dx? I don't get it.


Why does this c++ code not compile in g++ 4.8.2

I'm trying to compile C++ pulse chess engine [0] using g++ 4.8.2 (Ubuntu 14.04 environment).  I get the following errors at linking stage:  Linking CXX executable pulse- CMakeFiles/pulse.dir/main.cpp.o: In function `pulse::MoveGenerator::MoveGenerator()': /home/user/cpp/movegenerator.h:15: undefined reference to `pulse::MoveList<pulse::MoveEntry>::MoveList()' libcore.so: undefined reference to `pulse::MoveList<pulse::MoveEntry>::rateFromMVVLVA()' libcore.so: undefined reference to `pulse::MoveList<pulse::RootEntry>::sort()' libcore.so: undefined reference to `pulse::MoveList<pulse::RootEntry>::MoveList()' libcore.so: undefined reference to `pulse::MoveList<pulse::MoveEntry>::sort()' collect2: error: ld returned 1 exit status   When I run the command:  g++ -std=c++11 -c movelist.cpp && nm movelist.o | grep sort   I get the output  0000000000000000 W _ZN5pulse8MoveListINS_9MoveEntryEE4sortEv 0000000000000000 W _ZN5pulse8MoveListINS_9RootEntryEE4sortEv   when using 4.9.1, but no output when using 4.8.2.  Why is that g++ 4.9.1 generates the sort function while 4.8.2 does not, is it a bug in the compiler or in the pulse source code?  EDIT:  As stated in the pointed out duplicate question "Why can templates only be implemented in the header file?", I don't get it then, how does it work in g++ 4.9.1? The movelist header:  #include "value.h" #include "move.h"  #include <array> #include <memory>  namespace pulse {  /**  * This class stores our moves for a specific position. For the root node we  * will populate pv for every root move.  */ template<class T>  class MoveList { private:   static const int MAX_MOVES = 256;  public:   std::array<std::shared_ptr<T>, MAX_MOVES> entries;   int size = 0;     MoveList();    void sort();   void rateFromMVVLVA(); };  class MoveVariation { public:   std::array<int, Depth::MAX_PLY> moves;   int size = 0;  };  class MoveEntry { public:   int move = Move::NOMOVE;   int value = Value::NOVALUE; };  class RootEntry : public MoveEntry { public:   MoveVariation pv; };  }   The movelist source:  #include "movelist.h"  #include <cassert>  namespace pulse {  template class MoveList<MoveEntry>; template class MoveList<RootEntry>;  template<class T> MoveList<T>::MoveList() {   for (unsigned int i = 0; i < entries.size(); ++i) {     entries[i] = std::shared_ptr<T>(new T());   }   }  /**  * Sorts the move list using a stable insertion sort.  */ template<class T>  void MoveList<T>::sort() {   for (int i = 1; i < size; ++i) {     std::shared_ptr<T> entry(entries[i]);      int j = i;      while ((j > 0) && (entries[j - 1]->value < entry->value)) {       entries[j] = entries[j - 1];       --j;     }        entries[j] = entry;   }   }  /**  * Rates the moves in the list according to "Most Valuable Victim - Least Valuable Aggressor".  */ template<class T>  void MoveList<T>::rateFromMVVLVA() {   for (int i = 0; i < size; ++i) {     int move = entries[i]->move;     int value = 0;       int piecetypeValue = PieceType::getValue(Piece::getType(Move::getOriginPiece(move)));     value += PieceType::KING_VALUE / piecetypeValue;      int target = Move::getTargetPiece(move);     if (Piece::isValid(target)) {       value += 10 * PieceType::getValue(Piece::getType(target));     }      assert(value >= (PieceType::KING_VALUE / PieceType::KING_VALUE)       && value <= (PieceType::KING_VALUE / PieceType::PAWN_VALUE) + 10 * PieceType::QUEEN_VALUE);      entries[i]->value = value;   } }   [0]


I have been using Windows and ubuntu alongside each other for quite some time. Till Windows 7, things were fine. I installed Ubuntu inside Windows and all was fine. At startup, I would be asked if I want to boot Windows 7 or Ubuntu and I could choose.  However, starting from Windows 8, I could still install Ubuntu inside Windows 8 but while starting up, Windows 8 boots up automatically and in the end I am asked if I wanted to boot Ubuntu. Then if I choose Ubuntu, the machine restarts again and Ubuntu is booted. This is very annoying. If I want to use Ubuntu, I have to boot the device twice.  I have tried reinstalling many times, with different version of Ubunutu, it is always the same. Is there any work around this to make it like Windows 7? Or do you suggest some other method of installing Ubuntu alongside Windows 8?


Now I'm reading the Young inequality. It says that if $f \in L^p(R)$, $g \in L^q(R)$, $1\leq p,q\leq \infty$, $1/p+1/q\geq 1$. Then how could we have the following inequalities:  $$\|f*g\|_q\leq \|g\|_q \|f\|_1$$  $$\|f*g\|_\infty\leq \|g\|_q \|f\|_{q^{'}},\quad (1/q+1/q^{'}=1)$$  $f*g$ means the   The two inequalities seems not obvious, the second one is similar with the holder inequality, but actually not.   Could someone give me some hints or helpful links?  Thanks a lot!


How about being able to take-over existing questions made by inactive users?

On the entire SE network there is a huge number of questions that are unaswered and where the author doesn't use the system anymore, usually is a user that has a score of < 100 and that will not act on any comment added to the question.  I would like to propose a feature for requesting a question takeover, so you can become the author so you can accept one of the existing answers.  Clearly this should not be available on all questions, but it would extremely useful because it would allow people to repair broken stuff.   This will prevent creating almost-identical new questions or other similar problems caused by the lack of interest from the original question author.  What do you think about this?  Look at 4th question, which happens to have a real valid answer but which is still listed like one question that does not have an accepted answer, definitely a sign that probably the answer is not good.


USB flash drive suddenly stops working, file system cannot be determined

I have a Corsair Voyager Slider 16GB USB drive (USB 3.0)  I was working using my USB yesterday and after a 30 minutes break I went back to continue and suddenly my USB stopped working completely, telling me that the device drivers failed to install and basically I literally cannot access it at all. I tried to scan it for bad sectors etc, using both CHKDSK function on cmd and also the window which pops up once you insert your USB drive in the port but it tells me that it cannot open volume for direct access. What's also strange is that suddenly my USB drive is FAT32, I'm not sure if this is how it always has been but what I am for sure, I've never had any problems with it until yesterday. I also cannot convert it to NTFS as it tells me it cannot determine the file system. When I check the properties it tells me that I have 0 bytes free memory and 0 bytes actual memory. Everything just went haywire.  I have a lot and a lot of data that I hadn't saved yet all day so I HAVE to find a way to recover this data. Is it a lost cause or is there anything which can be done to recover this dat


My question is which one is correct:   a) I have been awarded the science award 5 times   or b) I was awarded the science award 5 times   Thank you :)


I have several virtualhosts, and I need to run different PHP versions. I have php-fpm and FastCgi installed, but how can I configure it? I'm using Ubuntu 16.04


Interpreting regression coefficients with a multi-level categorical variable

How do I interpret the coefficients of a Regression with 1 continuous + 1 categorical predictor (with 4 levels - e.g., months)  Specifically, is the 1st coefficient equal to that of the 1st month or equal to the case in which there was no month??  Use this table to help explain:                          Value    Std.Error    t-value       p-value (Intercept)      0.2772475891 0.0113379058 24.4531568 8.535808e-106 I(year - 1950)   0.0009540568 0.0002015887  4.7326911  2.504407e-06 factor(season)2  0.0166704599 0.0151419786  1.1009433  2.711624e-01 factor(season)3  0.0769897290 0.0151419786  5.0845224  4.329953e-07 factor(season)4 -0.0096468223 0.0151419786 -0.6370913  5.241981e-01   As a follow-up: what is the interpretation if only some of the categorical variables are significant (and others are not)? Further, do I keep them all if this is the case?    Here is an example of the format of my data:      year season   temp.avg   ppt.avg       GDD   pdo 1   1922      1  0.4935484 0.3535484  14.40737 -0.45 2   1923      1  4.3892857 0.4542857  56.03017 -1.51 3   1924      2  7.3032258 0.5435484 106.49244 -1.76 4   1925      3 12.8533333 0.2583333 239.07739 -1.71 5   1926      4 19.7903226 0.4667742 458.50000 -1.61 6   1927      1 24.2766667 0.3146667 578.30000 -1.11  >summary(gls(ppt.avg ~ I(year - 1950) + factor(season), data = df, method = 'ML')) Generalized least squares fit by maximum likelihood   Model: ppt.avg ~ I(year - 1950) + factor(season)    Data: df         AIC       BIC   logLik   -672.3348 -602.2411 350.1674


during the last month i've dedicated myself to the study of Flask, a python framework for building web application.  Following different tutorials i've found online, I've discovered SQLAlchemy.   To be honest, i find it complicated and not really useful since i have a pretty good knowledge of SQL language.   What i want to understand is if there is any major gain in using ORM like SQLAlchemy that i'm missing (maybe some security issue in using pure sql that i don't know about?).  Also, i would appreciate if you could advice me of what's the best python library for working with pure SQL queries.


Factor $1/2$ in work done by spring force

My book says Spring Force = $-kx$  where k is spring constant and x is displacement from equilibrium position.   Then it says work done by spring force is $-kx^2/2$.   But I know Work Done = Force $×$ Displacement so in this case it should be $-kx^2$.  So why is it $-kx^2/2$?


C creating a struct array beyond certain size causes a crash

Hi all I am really new to C (just started this week), and want to make sure that I am not looking down the wrong rabbit home and hoping to perhaps get pointed to the right rabbit hole.  I create a struct:  #define MAX 64 #define ARRAY_SIZE 2048  struct object {     int q, c, p;     char name[MAX]; //Stores string up to 63 characters     char arr[ARRAY_SIZE][MAX]; // Creates an array of 2048 cells with string of length 63 max };  int main(){ ... ... int variable = 30; struct object l[variable]; //This is where the crash happens. But only when either variable is too large (for instance works on 15 just fine, but anything over 20 it crashes), or when Array_SIZE is too larger, for instance works fine with 1024 but 2048 crashes. ... ... }   The error I get on crash is the following: Process returned -1073741571 (0xC00000FD) in the cmd window. And the following in the debugger in the IDE: Program received signal SIGSEGV, Segmentation fault. [Inferior 1 (process 12120) exited with code 030000000375]  Am I doing something obviously wrong with how I declare an array of structs? Why would large numbers not work but lower numebrs work?  Does the above error indicate I am accessing something out of bounds somewhere? Ive been up and down the code and cant seem to find any reason why larger numbers dont work and lower ones do. My memory footprint doesnt seem to be the issue, just a few megs of memory.  I need help with what to look for (I cant find any instances of accessing anything out of bounds, so I get the feeling Im not chasing the right rabbit and need to look for something else)? Or maybe Im doing something illegal for C without knowing it?


I need some information about Hyperbolic Geometry. For example, Spherical Geometry is a subsection of Hyperbolic Geometry or no?   Can you suggest to me a book or some other reference to help me better understand these notions?   Thanks a lot!


Did Emperor Palpatine know about Luke and Leia from the beginning?

Did Emperor Palpatine know that Padme had given birth to twins while it was happening?  Was it his long-term goal to have Vader only discover his offspring later, at some "correct" moment?


Do any 5e books specify the "correct" way to read percentile with 2d10?

I recently had a discussion with someone about d100, specifically the two ways of reading the slightly specialized pair of d10s typically used for the purpose. As context for anyone unaware, a normal d10 shows the numbers 0-9 but the 0 is treated as 10. The second d10 in the pair has an additional 0 on each face, showing 00-90 in increments of 10. In theory there are many ways to use these two dice to generate a number from 1-100, but only two that are generally considered reasonable:  The two-digit die tells you the 10s place of the result, the one-digit die tells you the 1s place of the result. 100 is the number in the desired range which has a 0 in both 1s and 10s places, so dice showing "00" and "0" is 100. The normal d10 is rolled as a normal d10, and the other die is rolled as-written giving a number from 0-90; the two dice are then added together. "00" and "0" are then equal to 0 + 10 = 10. This method of rolling is particularly intuitive when the normal d10 is actually marked 1-10, but particularly unintuitive if you were to lack a special 10s die and were trying to roll on two dice both marked 1-10.  Based on  and similar questions, it seems that treating 00+0 as 100 is the more traditional option, with some tables in older editions explicitly marking 00 rather than 100 on their tables, but I only knew that for sure because I had experience with prior editions. I expect D&D 5e has specific guidance on what the "dX" dice notation means, which would probably indicate how d100 should be rolled, but where is it?


GPA rounding 2.498 to 2.5. How ethical is this?

I finished this year with a cumulative GPA of 2.498 (pretty low, not gonna lie). The main concern that I have is that when rounding to 2 digits, it will be pushed to a 2.5, and I'm worried that in interviews when I say that I have a 2.5, and if the interviewer checks my transcript, he/she may think that I am bumping up to meet requirements, even through it's very close to the line.   I am already aware of past questions regarding gpa rounding, but those seem to deal with round from 2 digits to 1 digit, which doesn't fit my situtation. Am I wrong in thinking I shouldn't do this? I don't want to want anyone to think down on me.


Can I see total votes on mobile website?

Verified  on desktop. But on mobile web it made me give an up vote, so there's no "click on number".  Are we going to be able to view total votes on mobile using a browser?


I am trying to code a Java program to calculate the number of pages for PDF files. But when I run this program I get an error which I am not sure why.   This is the error:   Exception in thread "main" java.lang.NullPointerException at pdfpagecount.Pdfpagecount.main(Pdfpagecount.java:12)   Here is the code that produces the error:  package pdfpagecount;  import java.io.File; import java.io.FileInputStream; import com.lowagie.text.pdf.PdfReader;  public class Pdfpagecount {  public static void main(String[] args) {     File gopi = new File("C:\\Users\\Gopinath Muruti\\Desktop\\test.pdf");     File listOfFile[] = gopi.listFiles();     for(int i = 0; i < listOfFile.length; i++) {         File tempFile = listOfFile[i];         String fileName = tempFile.getName();         System.out.println("File Name = " + fileName);         try {             if(fileName.toLowerCase().indexOf(".pdf") != -1) {                 PdfReader document = new PdfReader(new FileInputStream(new File("filename")));                 int noPages = document.getNumberOfPages();                 System.out.println("Number of Pages in the PDF document is = " + noPages);             }         }         catch(Exception e) {             System.out.println("Exception : " + e.getMessage());             e.printStackTrace();         }     } } }


New question branching off from  I attempted to buffer datapoints to convert them into many small polygons (so it will be acceptable .shp polygon format for Excel 2016 Power Maps) Here are the steps .... why isn't it working? 1. Add vector layer  2. Select .shp file  3. Select Fixed Distance Buffer  4. Change distance from 10 to 100  5. After it's completed running I get a big green screen. Not sure what to do next


Are there any databases for PhD dissertations?

I just know ProQuest which supplies some PhD dissertations. However, it's hard to find some the dissertations of French and German.   So are there any other good databases for dissertations of French, German, UK, USA? Any answer is encouraged.


Why do so many people go into Academia when the career prospects are so grim?

Judging by a lot of the questions on this site, a career in Academia sounds very grim. Lots of pressure, extreme working ours, few benefits, mediocre salary, and, because one has to work with so many different people (supervisors, students, collaborators, HR, editors, etc., etc), one is more likely to run into social issues, as evidenced by the questions on this site.   So why then do so many people go into Academia? Is it really just a reason not to grow up?   "Passion for the field" doesn't sound very convincing either, when one considers that only a small, small minority of Academia actually produce worthwhile, interesting results. The rest are just scrambling for any sort of recognition by constantly publishing mediocre results that will be cited twice over the course of the next 10 years. Rinse and repeat. Really, a lot of these people are just glorified teachers whose main contribution is giving lectures or conferences. When one considers the rising academic dishonesty, fabrication, plagiarism, and so on, the picture becomes even worse.


Confusion regarding the use of peer-review vs peer review

In an academic paper, I need to use the term peer-review many times. However, not 100% sure when to include hyphen. Normally, I do not use hyphen when I say, for example:     When students participate in peer reviews...   However I include a hyphen in such cases:     When students participate in peer-review activities...   I wonder if the way I use the hyphen is correct or not.


Not able to create a stored procedure for a table insert in DB2 UDB 10.5

I want to create a very simple stored procedure that will only take several IN parameters and insert them into a table. To learn how to do it, I went to  From that I gathered that the procedure below should work, but it does not: CREATE PROCEDURE A (IN B INT) LANGUAGE SQL BEGIN   INSERT INTO TA(A) VALUES(B); END  The error is: An unexpected token "END-OF-STATEMENT" was found following "INTO TA(A) VALUES(B)".  Expected tokens may include:  "<psm_semicolon>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.19.80 SQL Code: -104, SQL State: 42601 Error occurred in: CREATE PROCEDURE A (IN B INT) LANGUAGE SQL BEGIN INSERT INTO TA(A) VALUES(B)  When I copied the source code above from SquirrelSQL and pasted it into a new query in IBM Data Studio, it indeed underscored the semicolon at the end of the INSERT statement and displayed the error: DB2 for Linux, UNIX, and Windows: ";" is invalid.  If I comment out the procedure body, it compiles fine, and I can call it successfully. I googled a lot but could not find any material difference between my code and the suggestions found, including here and on SO. Even when I took the sample procedure from the linked page, it did not compile. It throws the error: "MEDIANSALARY" is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=4.19.80 SQL Code: -206, SQL State: 42703 Error occurred in: SET medianSalary = 0


How to override some VIM system settings?

New Linux distros come with some quite sensible system vim settings that are mostly ok to use, but I would still like to override some of them. For example the default Ubuntu and Raspbian vim config has mouse support on (set mouse=a) which I don't like. However as soon as I create ~/.vimrc and put set mouse= in there, or any other setting for that matter, I lose all the system settings, like syntax highlighting, indentation, etc and vim comes up with very basic defaults. How can I keep the systems settings while overriding just one or two of them?  Simple test case:  Start Debian in docker with docker run --rm -it debian:latest  Once started install VIM with: apt update && apt -y install vim  Test vim /etc/passwd:   touch ~/.vimrc - just creating the file is enough  Test vim /etc/passwd again:    In the first case the system settings like syntax highlighting and mouse support is configured, but as soon as I create (even empty) ~/.vimrc then vim comes up with just the basic default settings. It's a default Debian vim: root@213ccd4660db:/# vim --version VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 15 2019 16:41:15) Included patches: 1-875, 878, 884, 948, 1046, 1365-1368, 1382, 1401


I don't know if it's the right place to ask but can somebody advise me for buying a ram memory for my computer.  I have a Dell Vostro 200 with 1GB of RAM and 667MHz. (2 x 512MB)  I want to buy raise the amount of RAM but I'm confused whether to buy 1 x 2GB or 2 x 1GB  I know it's the same for the available amount of memory but is ther a difference maybe in the clock speed so that 2 x 667MHz will be better than 1 x 667MHz. or maybe accessing one single memory slot will be faster and better than accessing two slots.  Please anyone helps.


Determine app that keeps turning on bluetooth

I recently got back from a holiday without internet, when I got back heaps of my apps updated and one of them now continuously turns my Bluetooth on. How can I determine which app it is?  I have a rooted Nexus 4 running 4.4.4


hook_theme_suggestions_page() provide default template file inside module folder

I am using hook_theme_suggestions_HOOK() to implement a custom template file in my drupal 8 website like below.   /**  * Implements hook_theme_suggestions_HOOK().  */ function mymodule_theme_suggestions_page(array $variables) {   $template_suggestions = array();   // This is used to display only $content.   if (isset($_GET['ajax']) && $_GET['ajax'] == 1) {     $template_suggestions[] = 'page__ajax';   }   return $template_suggestions; }   Above code is working fine and I can add template page--ajax.html.twig inside my current active theme and changes in template is reflecting in page.  But when I put that file inside my module itself file is not detecting and changes not reflecting in page and taking default page.html.twg template file.  How can I provide default template file within my module itself?


Will core functionality in QGIS 3.0 exploit multi-threading?

As mentioned in a , the major changes to QGIS 3.0 are:   Updating Qt4 to Qt5 Updating PyQt4 to PyQt5 Updating Python 2.7 to Python 3 Improving the QGIS API   Also, a couple of years ago,  seemed to have did some work on  back in 2015:     Multithreading execution. Multithreading execution of Processing algorithms was implemented as part of the Google Summer of Code this year. We collaborated in mentoring that work, but still some work has to be done before the code is ready to be merged. We have already started reviewing the code and adapting it with the goal of having this important functionality ready before QGIS 3.0 is released,, and we hope to have it ready for testing soon.     Will core functionality in QGIS 3.0 finally exploit multi-threading?


Prove that functions map countable sets to countable sets

One of my homework problems asks to prove that if $f:X\to Y$ is a function and $A$ is a countable subset of $X$, then $f(A)$ is countable.  I believe I have a valid proof by partitioning the set A into equivalency classes based in image under $f$. Then using that partition as domain for a choice function $C_f$ back to $A$. So now the function $f$ restricted to the domain (range $C_f$) $f|_{range(C_f)}$ maps to $f(A)$ 1-1 and onto. Therefore  $$|f(A)|=|range(C_f)|\leq |A|=\aleph_0$$ $\therefore f(A)$ is a countable set. $\quad \blacksquare$  My problem is that I used the axiom of countable choice $AC_\omega$ in my proof but that isn't a part of the course I am taking. Does anyone have a simpler proof or one that does not involve Choice?


How to resize an animated gif image using C#?

Is there a method to create a copy of an animated gif image using C#?  What I want is to generate a copy of a given gif image using the height and width parameters that the user provides. I have tried for a couple of hours to accomplish this but the resulting image does not preserve the original animations.


Replace blank spaces and semicolon in Java with Regex

I am trying to replace all strings that can contain any number of blank spaces followed by an ending ";", with just a ";"  but I am confused because of the multiple blank spaces.  "ExampleString1            ;" -> "ExampleString1;" "ExampleString2  ;" -> "ExampleString2;" "ExampleString3     ;" -> "ExampleString3;" "ExampleString1 ; ExampleString1 ;" -----> ExampleString1;ExampleString1   I have tried like this: example.replaceAll("\\s+",";") but the problem is that there can be multiple blank spaces and that confuses me


Can I enter the U.S. if I have a tourist visa B2 Validity of less than 6 months?

I have a tourist visa B2 and I am planning to visit the US in march 2018, my passport is valid for 10 years but my visa will expire on July 2018. I would like to know if there are any limitations of entering the US with a visa validity of less than 6 months. thanks!


Evaluate error of $\tanh{x}$ with inequality

I have to prove the inequality $\vert \tanh(x)-(x-\frac{x^3}{3})\vert\leq\frac{1}{8}$ for $x\in[-1/4,1/4]$ where $x-\frac{x^3}{3}$ is the 3rd order Taylor expansion at $0$. I know I have to somehow use the Lagrange remainder to show this and the fact that $(\tanh{x})^\prime=1-\tanh^2x$ but am stuck at this point.


How to fix Temporarily unreachable in Google Webmaster tool or Console?

I tried to fetch and render my site but I got a DNS site error(see screenshot below)    I attempted to fetch and render again after 2 days but still it gave me a temporarily unreachable status. But the website is definitely all active and working.


Issue with JFreeChart in Java when making Jar

I have a java project that uses Maven. My main IDE is vscode. Via maven, I have imported 1.5.2 JFreeChart from org.jfree. This works perfectly fine, and my program compiles and works via vscode. However, I got the error Exception in thread "main" java.lang.NoClassDefFoundError: org/jfree/data/general/ValueDataset when I tried to run my jar with java -jar /path/to/app.jar. I don't have any jar in my project that contains org.jfree, and I use maven to add it for me to the final jar. What is this issue and why does this occur? Note: in VSCODE, whenever I save my program while editing gui.java (where jfreechart is used), I get an error wherever I have used jfreechart or any related items that they cannot be resolved. The error goes away as soon as I add another character. Though this does nothing when running the program, I wonder if maven's jar not working and these weird errors are somehow related? I see that my question has been answered in the , but I still do not understand what to do. Update: Solved it by using  to incorporate dependencies in the JAR file.


What is a common expression for being blithely innocent, or actually ignorant of in fact an event is occurring?

In a conversation I struggled to identify a common expression that a person was actually oblivious to his surroundings or an event.


Combined Variance of two groups with different sample sizes

I have the mean and standard deviation for Male and Female groups in a study, I'm trying to get the combined mean and standard deviation. The two groups have different N's. I can get the weighted average of the two means, but I don't know how to get the new standard deviation, given that the N's are different. Is there a modified version of Var(x+y)=Var(x)+Var(y) that takes into account the sample sizes too that I can use?


Encrypted version of cleartext file system

I have a file system mounted on /srv, that is unencrypted. This is perfectly fine; the local systems are trusted.   However, I want to perform backups with , which does not support encryption. Is there any reverse encryption file systems, that I can use to get a on-the-fly encrypted version of my normal filesystem mounted somewhere else on the system, that can be backed up?  For performance reasons, I would prefer not to encrypt the base file system, as this contains 8TiB of data, although this is a solution if I find no other.  I would prefer the file names to be encrypted as well, but this is not a requirement.  This is currently on 16.04, but answers does not have to be for this particular version.


How to solve multi domain Duplicate Content?

I am reaching you once again. I have a question regarding duplicate content. I have multiple domain websites where all the websites associated with a group. All the contents of the website are the same with a different domain such as .co.id, .co.mm, .co.bd and so on. So my question is that will google penalize for that reason? I haven't implemented href lang tags. how to resolve the issues


How to calculate the work without displacement?

For example, I hold an item in my hand at arm's length. There are forces of gravity and elasticity. And obviously I use some amount of energy to keep holding. Is it possible to calculate the work without displacement? I've finished high school years ago, it's just my curiosity.


Displaying server information at login prompt (Ubuntu)

I'm wondering if there's a way to customize the Ubuntu server login prompt. Currently it shows the following:  Ubuntu 13.10 fw tty1 fw login: _   I know there's /etc/motd for the message of the day, also .bashrc for bash customization for each user, but how do I change the login prompt post?  Thanks


I've heard it said that the vacuum permittivity is the lowest possible permittivity for any substance, that no substance can have $ε_r<1$. Is this true? If so, why is this different from permeability, where common materials like copper and graphite have $μ_r<1$? Is there some connection to the nonexistence of magnetic monopoles, which is the only other asymmetry I'm aware of between electrical and magnetic phenomena?  Edit: So it seems it is possible to have $ε_r<1$ for sufficiently high frequencies. I'm not considering high-frequency effects here; I'm asking specifically and only about electric permittivity at DC.  I would be interested to know what causes it to be frequency-dependent, but that's for another question.


What's a word for conflicting emotions all felt at once such as loneliness, sadness, happiness, being content but also feeling as if something isn't right?


I have an application which is hosted on a subdomain URL of my client's primary domain. Below is the example of how my primary domain is and how the subdomain is:   Primary domain: example.com  Subdomain: replacephone-carriername.example.com   Now please help me understand below points:   Does my Primary Domain becomes my subdomain's competitor? The carrier for which my client has created the application, has all the details of replacephone program and also this new application URL is linked into this carrier's main portal, and because of this, the carrier URL also becomes my subdomain URLs competitor, because we both are fighting for keyword say "replacephone-carriername" for different URLs.   Please advice me to encounter above 2 challenges.


Is there any filter option is available to see all duplicate questions in a SE site?

I want to see all the duplicate questions which were asked by other users in webmasters.stackexchange.com. I tried a lot but I don't find any filter option to see only duplicate questions. How can I find those questions alone?


Prove that a polynomial of degree $d$ has at most $d$ roots (without induction)

Let $p(x)$ be a non-zero polynomial in $F[x]$, $F$ a field, of degree $d$. Then $p(x)$ has at most $d$ distinct roots in $F$.   Is it possible to prove this without using induction on degree? If so, how can I do this?


Guess I have still not got the hang of it?

I flagged a post since it contained bare links. And I used this option    And then it was rejected with this    I have been flagging posts using that option for a long time now. Has anything changed?   On another scenario, I got a different declined reason for the same  Flag?    The two links in questions are    and    If yes, then please let me know what am I doing wrong so I don't make the mistake again...  UPDATE ONE (based on comments below):  I don't care if my flag is approved or declined. Its not that if it is declined then I should get discouraged and stop flagging as mentioned in one of the comments below.  Also whether the mods are in sync or not is again not my concern. That not the issue here.  My point is the bare link cannot be answers and have to be posted as comments and hence flagged under "Not an Answer" because the description of that flag says such (See the red box in the screenshot above).   These are the options that are available to me. I don't see another option which fits what I am trying to do here...    Possible Solution:  We can change the description of that flag and add it under another relevant flag so that there is no confusion?


.desktop files: how to specify the icon path

I had a look at the .desktop files on my 12.04 Ubuntu system, and many of them do not have a full path specification for their icon file.  It is rather something like:  Icon=anjuta   or  Icon=vlc   or   Icon=application-x-clementine   Is there a common path where icons can be stored so that this can work ? If not, how does this work ? If I try to do the same thing with my own icons I have to specify the full path.  e.g.  Icon=/usr/local/share/my-icon.png   works fine, but  Icon=my-icon.png   will fail.  Any kind of help is welcome!


Let $(a_n)$ and $(b_n)$ be sequences of real numbers that converges to real numbers $a$ and $b$, respectively. If $a_n\leq b_n$ for all $n\in\mathbb{N}$, then $a\leq b$.  Could I prove this by contradiction and assume $a>b$?   I am unsure how to approach this.


Finite fundamental group in the Euclidean space

Is there an example of a (path-connected) subspace of $\mathbb{R}^3$ which has a nontrivial finite fundamental group? If not, why?


do information travels faster than light?

Suppose a long rod of length 6 lakh kms is subjected to movement at one end,does it move immediately or not at another end?


Are there any differences between Skyrim & Skyrim: Special Edition?

What are the major differences between Skyrim and Skyrim: Special Edition? I'm looking to understand all of the signficant changes between Skyrim and Skyrim: SE; not just whether or not a few quests have been changed or not.  Specifically looking for:   Graphical improvements? Gameplay improvements? Performance improvements? Mechanic impromvements? Modding improvements?


How to resolve "error loading libxml2.so.2" when installing Cisco AnyConnect VPN?

I'm trying to install Cisco AnyConnect VPN Client on Maverick 64-bit. I'm getting the following errors:  Installing Cisco AnyConnect VPN Client ... Removing previous installation... /opt/cisco/vpn/bin/manifesttool: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory vpnagentd: no process found Extracting installation files to /tmp/vpn.Mjh9Z5/vpninst086037244.tgz... Unarchiving installation files to /tmp/vpn.Mjh9Z5... Starting the VPN agent... /opt/cisco/vpn/bin/vpnagentd: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory   I have libxml2.so.2 in /usr/lib, though. Should it be somewhere else?  Thanks in advance.


While dealing with imbalanced classes, to what extent can we upsample a minority class?

I have my training data with the following approximate distribution:   Negative events : 90,000 positive events : 5,000   Training a model would require to oversample the minority class (and might also need to undersample the majority class) as the classes are vastly imbalanced in proportion.  To what extent is it fair to upsample? Let's say I want the distribution of events to be 50% - 50% in the training set. Should I oversample the positive events currently from 5,000 to 90,000 observations?   That is like upsampling the positive events 18 times! Would that not add unwanted noise? Or should I upsample it to something like 50,000 (10 times)  and downsample the majority class too from 90,000 to 50,000?  We can even upsample it to just 10,000 (2 times) and take equal number of random observations from the majority class, but then there rises the chance of this majority class sample not being representative of the entire population. We need to ensure we take a stratified sample from the majority class, which might be achieved by forming clusters and taking samples from each cluster in proportion to the respective cluster size. However, that is a different exercise altogether and a lengthy approach.  Please guide me on what should be the ideal approach to deal with such scenarios.


How to recover my old Gmail account old Facebook account

How to recover my old Gmail and Facebook account


Proof that the irrational numbers are uncountable

Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable?


Prove that if $d \mid n \in \mathbb{N}$, then $\varphi(d) \mid \varphi(n)$.

I want to prove that if $d \mid n \in \mathbb{N}$, then $\varphi(d) \mid \varphi(n)$.  It's given that $d \mid n$, so we know that $n = dm$, for some $m \in \mathbb{Z}$. Now, I want to show that $\varphi(d) \mid \varphi(n)$, i.e. that $\varphi(n) = k\varphi(d)$, for some $k \in \mathbb{Z}$. Drawing a blank of where to go from here.


What does if __name__ == "__main__": do?

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


Confusion about refit model after cross-validation

I am kind of confused about when it is appropriate to use refit in machine learning method, say if I train a model and select the optimal hyperparameters with 5-fold cv. The highest cv score will tell which set of hyperparameters the model will use. Then, one can use the model on test dataset to check over-fitting.   However, from my point of view, I do believe one should retrain the model after cross-validation because a 5-fold cv determines one set of hyperparameter but within each fold you have a model with the same hyperparameter but different parameters. This means you have 5 different models in 5-fold cv. Then what does it mean to use 5 models to predict on the test data?  My understanding is that every time one should always use the hyperparameter to refit model on the entire training data, then predict on test data. But I don't see a lot of people use refit method, so why was that?


I was reading about Lulu (new champion) and saw this:     Wild Growth (Ultimate) - Lulu enlarges an ally, knocking enemies away   from them and granting them a large amount of bonus health. For the   next few seconds, that ally gains an aura that slows nearby enemies.   Then I start wondering: what is the max size that a champion reach ? Is there a Maximum size ?  Example: Cho'Gath's Feast +  +  + Wild Growth + Something that make champions grow in size. Cho'Gath will grow every time ? or it will stop at some point ?


Formatting a string of zeros as a phone number

Question. I need to format string as phone numbers. I am using the function  Convert.ToInt64(Number).ToString("###-###-####")       which works, unless I have 0000000000, all zeros.   Any suggestions on how to format all zeros as the format "###-###-####"


RegEx not matching correctly when using new RegExp

I am trying to use regex to match a letter against strings and then using test however, it doesn't always match a letter with every string.      x = [     'Mike',     'Mary',     'Bob',     'Julie',     'Jon',     'Adam' ];   Working: (not using new RegExp)  x.map(function(a) { console.log(a, /(m)/ig.test(a)); }); VM745:2 Mike true VM745:2 Mary true VM745:2 Bob false VM745:2 Julie false VM745:2 Jon false VM745:2 Adam true    Not working: (using new RegExp)  y = new RegExp('(m)', 'ig');        x.map(function(a) { console.log(a, y.test(a)); }); VM748:2 Mike true VM748:2 Mary false VM748:2 Bob false VM748:2 Julie false VM748:2 Jon false VM748:2 Adam true


Are wizards allowed to use magic to save Muggles from a life-threatening situation?

In Order of the Phoenix, in Harry Potter's trial for Underage Sorcery, Dumbledore states  Clause seven of the Decree states that magic may be used before Muggles in exceptional circumstances, and as those exceptional circumstances include situations that threaten the life of the wizard or witch himself, or witches, wizards, or Muggles present at the time of the --  In my understanding, this means if a wizard happens to be on the road and a car accident is going to happen, then the wizard can use magic to stop the accident from happening.  Is that correct?


Acknowledgements in a bachelor thesis: Is it etiquette conform to thank for non thesis related things?

As I'm about to finish my bachelor thesis, I'm at writing the acknowledgement section.  How far can I go here in terms of non-thesis-related stuff?  Is there room for humorous acknowledgements (like thanking my coworker for his great taste in music or bad puns), or is that rather something to be left out?


What is our policy on strong language in chat used in good humor, and flags on said language?

There are a couple of chatrooms on chat.SE where strong language is considered OK. By this, I mean that room regulars may use possibly offensive language (no racial slurs, just words like f**k) and talk about possibly NSFW stuff (no pictures, just text. Jokes and the like). It's always in good humor -- there's no hostility here, just a more adult environment. I personally don't see much of a problem here; it may scare off a few users but I'm not really sure if that happens much. The main site is supposed to be professional, and its looks reflect that. Chat is supposed to be informal, and it looks informal too. I personally would be surprised to see such language on main, but not so much on chat.  Sometimes, these things get flagged. There have been multiple occasions when a user sits and looks for stuff to flag in the transcript. Not only is this annoying, but it also leads to people getting chatbanned. If strong language is allowed in chat, I'm not sure if disallowing users from flagging is the way to go here, flagging is an escape route for legit problem situations.  So, I have two questions here:   Should strong/NSFW language being used in good humor (not meant as an attack) be allowed in SE chat if the room regulars are fine with it? As in, should we allow a per-chatroom policy on the language being allowed? Rules against personal attacks et cetera still hold. If so, should anything be done about users who go through flagging everything? By "something being done" it need not be a mod action like suspension, it could simply be something like linking the user to a policy or explaining what sort of things are allowed in the chatroom.   To be perfectly clear, I am talking about offensive/strong language used in good humor only (and not in a way that is attacking a group of people or a person in absentio). If directed towards someone, it must be as a joke where you're reasonably certain the receiving party (usually a regular) will not take offence.


Can I use same SSID for dlink modem router and AirPort Time Capsule?

My ADSL modem/router is DLink (AC1200 dual band).  I recently purchased a Mac and an Airport Time Capsule.  The AirPort is connected via Ethernet cable to the DLink modem/router to increase range of wireless at the back of my house.  The Airport has its own SSID.  Am I able to use the SSID the same for both the DLink and Airport so that when devices connect they only need to know one SSID? The type of devices connecting include iPhones, MacBook, iMac, iPad and a Windows laptop.  At the moment I have 3 SSID's, one for each of the following:   DLink 2.4 GHz DLink 5 GHz AirPort   The iMac is closest to the DLink so uses the 2.4 GHz DLink SSID.   However that means I can't see the Airport TimeCapsule from the iMac because it is on a different WiFi network. I need to have the iMac connected to the Airport SSID to access resources it provides.  I'm not very technical. I would appreciate advice on whether it is possible to share a single SSID across both routers.  I would also appreciate instructions on what config changes I need to make.  Thanks in advance, Tim.


“fse.node” cannot be opened because the developer cannot be verified. While doing npm run dev or watch

On macOS Catalina 10.15.3, I am getting the below error message while running npm run dev or npm run watch. It seems like something to do with nodejs but no idea know how to resolve it.     “fse.node” cannot be opened because the developer cannot be verified.   macOS cannot verify that this app is free from malware.


What to do when someone copies your answer verbatim?

Okay, so , 6 minutes after I had posted my answer. And he got the accept.  He added a sentence above the code sample, which I neglected to do.  But the fact that he copied the code from my answer is indisputable - it is identical right down to table aliases, whitespace, simplified joins and my trademark semi-colon (I seem to be the only person on earth who adds statement terminators as part of my answers). I realize this is similar to:    But this is not the fastest-gun-in-the-west problem. The code is identical, byte-for-byte, and a full six minutes had elapsed. If he wrote code as meticulously as I do, and took over 6 minutes to do it, and didn't notice the "1 new answer" banner in the meantime... that would be quite a remarkable alignment of the stars.  The fact that he got the accept, meh, whatever. I couldn't care less about the rep. I did flag the answer and challenged the user about his copying skills - which he of course denied. "Coincidence" he suggested, even though .  I do care about plagiarism, littering an answer with useless duplicates, and inadvertently promoting this kind of behavior by letting it stand. I realize my response was not the most mature, but my question is, how should we be dealing with this unacceptable behavior on SO? How do you deal with it when it happens to you?


Cell color partially overriding cell border

I am using \cellcolor to give a background to some cells. The cell color is partially coming over the border of the cell as you can see in the screenshot.     This is my LaTeX code for the table.  \usepackage[table]{xcolor}  \begin{table}[h] \centering \setlength{\tabcolsep}{12pt} \renewcommand{\arraystretch}{1.3} \begin{tabular}{ l l l l} \hline   \multicolumn{1}{|c|}{1} & \multicolumn{1}{c|}{47.5\% (52.5\%)} & \multicolumn{1}{c|}{37.4\% (41.3\%)} & \multicolumn{1}{c|}{26.8\% (29.6\%)} \\   \multicolumn{1}{|c|}{2} & \multicolumn{1}{c|}{70.9\% (74.3\%)} & \multicolumn{1}{c|}{61.5\% (68.2\%)} & \multicolumn{1}{c|}{51.4\% (57.5\%)} \\   \multicolumn{1}{|c|}{3} & \multicolumn{1}{c|}{72.1\% (76.0\%)} & \multicolumn{1}{c|}{65.4\% (69.8\%)} & \multicolumn{1}{c|}{54.7\% (59.8\%)} \\   \multicolumn{1}{|c|}{4} & \multicolumn{1}{c|}{{\cellcolor[gray]{.9}}72.1\% (77.1\%)} & \multicolumn{1}{c|}{62.6\% (67.0\%)} & \multicolumn{1}{c|}{52.5\% (55.9\%)} \\   \multicolumn{1}{|c|}{5} & \multicolumn{1}{c|}{70.9\% (76.0\%)} & \multicolumn{1}{c|}{60.3\% (65.4\%)} & \multicolumn{1}{c|}{51.4\% (54.2\%)} \\ \hline \end{tabular} \end{table}   How could I solve this?


How to check if RSS address is accessible

I am using classic asp/vbscript to load a RSS. In this case the URL should start with https rather than http so I get the error : Access is denied. How can I check if the target url is accessible and healthy and the use it?   Set xmlDOM = CreateObject("MSXML2.DOMDocument.6.0") xmlDOM.async = False xmlDOM.setProperty "ServerHTTPRequest", True xmlDOM.Load("http://iqna.ir/fa/rss/services/36")   I have tried to wrap it inside if/then but obviously will result in the same error:  if (xmlDOM.Load("http://iqna.ir/fa/rss/services/36")) then    'Proceess the RSS content end if


How can I increase the maximum amount of inodes available on a dedicated server running CentOS 6.5 and ext4? The websites we are hosting create and use millions of small files. We are already hitting the limit, and had to remove several sites to get it down to 92% inode usage.   Filesystem             Inodes    IUsed   IFree IUse% Mounted on /dev/mapper/VolGroup-lv_root                       3276800    58531 3218269    2% / tmpfs                 3074543        1 3074542    1% /dev/shm /dev/sda1             128016       44  127972    1% /boot /dev/mapper/VolGroup-lv_home                       56967168 52223688 4743480   92% /home


How to keep text vertically middle-aligned when introducing an image

I have a table where each cell has a fixed height of 88px.  The text inside each cell has middle vertical alignment.  I would like for a handful of cells to include an image with a height of 40px.  This is easily achievable, but when I do, the text in the cell shifts to account for the height of the image.  This image illustrates what's happening.  I get why this happens, but is there a way to include the image without the text shifting? Things I've tried:  line-height: 88px; this technically works, but the text will wrap in some cases so it's not a viable solution. Setting the table cell to display: table, and then wrapping the text inside with a div that has display: table-cell.  That also technically works, but it feels really hacky.  If it's my only option, I'll use it. I know I can use position: absolute; on the image and position it with javascript if needed, but I'd prefer something that'll work if the browser is resized.  Is there another way? Edit: It's just a super basic table, but here's the code...

           Some text


How can I include a header conditionally in c++?

I need to include a header in condition if it is present and if not i need to make the necessary steps for my code to work   I need to do something like...  // check if the header is present(may be .h files) #include"required_header" { block-1 }  //if the header is not present  { block-2 }   If I use like ....  #ifdef required_header #include<required_header> Block-1 #else Block-2   The above case is redirected to Block-2 always because i have included the header file only inside the condition of ifdef and its never included  Hoping for a method to do it.  Thanks in Advance :}  P.S: I have defined the header but assuming i have not done the work of the required header but i want someone else to write that file and I am not sure if he has written it.  Precisely speaking I want the code replacement way in the place of comments in the first given code.


Someone said a word, or saying, to me that I didn't know the meaning, so I looked it up.  I cannot remember what it was, but the meaning was:     "Something good comes from something that was bad"   For example, I crashed my car into a beautiful woman's car and we then dated.  Please can someone tell me the word I'm looking for. I think it is two words, each with two syllable's.  Thanks for any help anyone can give.


Indefinite integral which is not differentiable

I would like to know if there exists an indefinite integral which is not differentiable? Is this possible? That is, I want to know if there exists a real function F defined in a interval $[a,b]$ by the equation $$F(x)=F(a)+\int_a^x f(t) dt $$ where $f:[a,b]\rightarrow \mathbb{R}$ is only Riemman integrable, that F is not diffentiable of such a function? Could you give an example? Thank in advance!


The "First Posts" review queue is ineffective and toothless

As it stands, the "First Posts" review queue is empty on Stack Overflow. As I seldom review that queue, it isn't empty because I have no posts to review; it's empty because, well it's empty.  However, in reviewing some of the 800 flags in the 10k Flag Queue, I came across so, so many posts by first users, which are blatantly low quality/ NAA, most of which had no comments at all, and those that did, I'm doubtful whether they were added during the review of the post in the "First Posts" queue (if it ever reached there).  Note that the guidance for the FP queue reads (emphasis mine):     Be sure to leave a comment if you can help the user out, upvote the question if you can't find any problems with it, or click Skip if you are not sure and want to go to the next item.   It seems a waste of everyone's time if all of the following posts had to cycle multiple reviews, be seen by 10k'ers in the 10k  queue, before been seen and finally handled by diamonds (and the whole while, the OP has no idea they've done anything wrong, due to the lack of feedback):                 ... and there's more, many more, but you get the gist.  How can the "First Post" queue be changed to better address this?   Should the addition of a comment be enforced if a "flag" was made? An extension of the above; a comment for anything other-than an up vote (yes, even a downvote)? Should the ability to "Delete" / "Recommend Deletion" exist like the LP queue Do we need more pairs of eyes per-post to ensure the correct action is (eventually?) taken? Would the current system work, except the robo-reviewers are making this queue so ineffective? ...?


Computing $ \lim_{x \to 0} \left( \frac {1}{x} - \frac {1}{\sin x } \right) $

How to calculate this limit:  $$\lim_{x\rightarrow 0}\left(\frac{1}{x}-\frac{1}{\sin x}\right)$$  All I know is:   $$\lim_{x\rightarrow 0} \frac{\sin x}{x} = 1$$  $$\lim_{x\rightarrow 0} \, x = 0$$  $$\lim_{x\rightarrow 0} \,\sin x = 0$$


Can an ASP.NET MVC controller return an Image?

Can I create a Controller that simply returns an image asset?  I would like to route this logic through a controller, whenever a URL such as the following is requested:  www.mywebsite.com/resource/image/topbanner   The controller will look up topbanner.png and send that image directly back to the client.  I've seen examples of this where you have to create a View - I don't want to use a View. I want to do it all with just the Controller.  Is this possible?


How to provision software across multiple laptops

I've got a bunch of laptops for my classroom and I'm using Ubuntu.  I want to be able to add/update/remove software across them as easily as possible and I'm not sure how to go about it.  I was thinking of editing the /etc/profile file on each machine to curl pipe sh a script that I would host on github.  That script would include mostly apt-gets.  I don't even know if that will work, but what I imagine it will do is run the script each time someone logs on with any account on the laptop (first question: is that true?)  I added nautilus ~ to the end of /etc/profile to test this approach out.  I thought that was harmless, but upon login it opens the home directory and the rest of the startup seems to fail... no menu bar or launcher, just a mouse and desktop image.  I'm kinda f***ed there and may end up asking a separate question!  Before I go too far down this rabbit-hole, I was hoping that some super users on here would be able to give me some tips on how to manage software on all the laptops in this kind of setting in the most time-efficient way.


JS check if contents overflowing verticaly

Need to make so do something if its overflowing Verticaly. Lead me towards right direction.  Exmaple:    .contents {   width: 200px;   height: 100px;   border: 1px solid black; }
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC
 CONTENT CCC


After this operation, 0 B of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main python3 amd64 3.4.0-0ubuntu2 [8,666 B] Fetched 8,666 B in 0s (53.3 kB/s) Setting up base-files (7.2ubuntu5.5) ... Installing new version of config file /etc/issue ... Installing new version of config file /etc/issue.net ... Installing new version of config file /etc/lsb-release ... Installing new version of config file /etc/os-release ... Processing triggers for plymouth-theme-ubuntu-text (0.8.8-0ubuntu17.1) ... Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' Aborted (core dumped) update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.13.0-74-generic (Reading database ... 126647 files and directories currently installed.) Preparing to unpack .../python3_3.4.0-0ubuntu2_amd64.deb ... Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' Aborted (core dumped) dpkg: warning: subprocess old pre-removal script returned error exit status 134 dpkg: trying script from the new package instead ... Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' Aborted (core dumped) dpkg: error processing archive /var/cache/apt/archives/python3_3.4.0-0ubuntu2_amd64.deb (--unpack):  subprocess new pre-removal script returned error exit status 134 Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' Aborted (core dumped) dpkg: error while cleaning up:  subprocess installed post-installation script returned error exit status 134 E: Sub-process /usr/bin/dpkg returned an error code (1)


I am a bit confused about overriding vs. hiding a method in C#. Practical uses of each would also be appreciated, as well as an explanation for when one would use each.  I am confused about overriding - why do we override? What I have learnt so far is that by overring we can provide desired implementation to a method of a derived class, without changing the signature.  If I don't override the method of the superclass and I make changes to the method in the sub class, will that make changes to the super class method ?  I am also confused about the following - what does this demonstrate?  class A {     virtual m1()     {         console.writeline("Bye to all");     } }  class B : A {     override m1()     {         console.writeLine("Hi to all");     } }  class C {     A a = new A();     B b = new B();     a = b; (what is this)     a.m1(); // what this will print and why?      b = a; // what happens here? }


\Updating 11 to 12 with Update Manager - no progress?

I've just run the Update Manager on Ubuntu 11 to upgrade to 12.   I was watching the 'terminal' output in the manager, with Thunderbird open in the background, when everything was hidden by my desktop backiground image. Or that is how it seems - every now and again I see the apps open, and then the bg covers them again.  Mouse is responding, no keyboard button seems to take effect (have not pressed ESC).  I've left it for an hour or so --- is this normal?  It's not a brand new machine, and although I don't know the specs, it is not terribly slow usually.  Any suggestions would be appreciated!  This was 11 - 11.4, I think but I may be wrong - to 12 - 12.4 I thought, but I may be wrong.  In any case, I am using the Update Manager to perform the task: this is my first time, and it's not my machine, so I thought I'd try the simplest thing that would keep as much intact as possible.


Why use Convolution of probability function instead of cross-correlation?

First, let me quickly remind you of the two operations: convolution and cross-correlation between 2 function $f$ and $g$, assuming continuous domain.   Cross-Correlation $f \star g$ : $\int f(\tau)g(\tau-t)d\tau$  Convolution: $f \otimes g$: $\int f(\tau)g(t-\tau)d\tau$  The difference being in convolution, besides shifting one function, say $g$, like cross-correlation, you reverse it first. I have read works which take convolution of 2 distributions. My question is, why would you take convolution when you can take the cross-correlation? It looks to me as though cross-correlation of probability functions has very obvious interpretative sense while convolution after the reverse of one function, there is no particular interpretive meaning.


$$ y_t = θy_{t−1} + u_t \\ t = 1,...,T;  $$ I need to derive a formula for $y_t$ and show that  $$ E\left[\frac{\Sigma y_{t-1}u_t}{ \Sigma(y_{t-1})^2}\right] \neq 0 $$


Unable to install vim on Ubuntu 14.04: "Package 'vim' has no installation candidate"

sudo apt-get install vim Reading package lists... Done Building dependency tree        Reading state information... Done Package vim is a virtual package provided by:   vim-nox 2:7.4.052-1ubuntu3   vim-gtk 2:7.4.052-1ubuntu3   vim-athena 2:7.4.052-1ubuntu3 You should explicitly select one to install.  E: Package 'vim' has no installation candidate


not able to add the key value pair properly in JSON object

I am trying to add key value pair in the below JSON object, but it is getting added in the wrong way, is there any way i can add to each object a new  key value pair, that will help me to complete the req. JSON as follow : var object =[       {          "asdf":"",          "fdrtf":"869966",          "hdhfhfh":"utytut",          "Cat":"A"                 },       {          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B"                 },       {          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B"       } ]  code i am using to add the new key value pair : for (let i = 0; i < object.length; i++) {             object[i]['ABC'] = [i];         }  Actually expected should be: var object =[       {          "asdf":"",          "fdrtf":"869966",          "hdhfhfh":"utytut",          "Cat":"A",          "ABC": "0"                 },       {          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B",          "ABC": "1"                 },       {          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B"          "ABC": "2"       } ]  the final value i am getting as below: ["0":{          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B",           },    "1":{          "asdf":"",          "fdrtf":"869966",          "hdhfhfh":"utytut",          "Cat":"A"              },    "2":{        "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B"    }   ]  kindly someone help me out to achieve this


Prove that $(A\cap B)\cup(B\cap C)\cup(C\cap A)=(A\cup B)\cap(B\cup C)\cap(C\cup A)$

I have used distributive law and absorption law combined but no result.  I have tried to complement the LHS to intersect with the RHS, and if we get the empty set then they are equal.  But none of the attempts helped me prove this.


Is the product of strictly quasiconcave functions quasiconcave?

I have two functions $f_1(x)$ and $f_2(x)$ which are strictly quasiconcave (since they have positive derivative before a certain point and negative derivative after that point. The points where derivative become zero can be different for each of the functions). I want to ask whether $f(x)=f_1(x)f_2(x)$ will be a quasiconcave function or not? Any help in this regard will be highly appreciated. Thanks in advance.


Solve three equations for three unknowns.

So I have the following three equations which I do not know how to solve:  -D * x - E * y = A + (R * D)  E * F * x - D * F * y - G * z = B - (R * E * F)  E * G * x - D * G * y + F * z = C - (R * E * G)  What is the solution for this? How do I get the values of x, y and z. The rest are constants.


Save language when the screen is rotated

I'm using this below method to change the language of the app by passing the language code as string. When I change the screen orientation the language rests to default language and all views resets too.   public String setLocale(String lang) {     Locale myLocale = new Locale(lang);     Resources res = getResources();     DisplayMetrics dm = res.getDisplayMetrics();     Configuration conf = res.getConfiguration();     conf.locale = myLocale;     res.updateConfiguration(conf, dm);     Intent refresh = new Intent(this, Login.class);     startActivity(refresh);     finish();     return lang; }   I tried to use onSaveInstanceState and onRestoreInstanceState, but I don't know how to make all these methods work together.


So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==> Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work?


Every subspace $W$ of $F^n$ is the space of solutions of some system of homogeneous linear equations $AX=0$.

From Artin's Algebra:  The definition of isomorphism given in the book:  An isomorphism $\varphi$ from a vector space $V$ to a vector space $V'$ both over the same field $F$, is a bijective map $\varphi:V\rightarrow V'$ compatible with the laws of composition, that is, a bijective map satisfying $$(a)\space\varphi(v+v')=\varphi(v)+\varphi(v')\space\text{and}\space(b)\space\varphi(cv)=c\space\varphi(v),$$ for all $v,v'\in V$ and for all $c\in F$.    Question: Let $V=F^n$ be the space of column vectors. Prove that every subspace $W$ of $V$ is the space of solutions of some system of homogeneous linear equations $AX=0$.  Note: We are not allowed to use the concept of basis, span etc. Attempt: First I thought if I change the definition of isomorphism by $\varphi$ is any map(not only bijective), we must get the definition of homomorphism. Now choose any subspace $W$ of a vector space and consider the map $$\varphi_0:W\rightarrow \{0\}$$ Then $\varphi_0$ is a homomorphism and surjective. Then we can define $\varphi^{-1}_0(0)=\{v\in W: \varphi_0(v)=0\}=W$ Then how to show $\varphi_0(v)=Av$?


Floating-point inaccuracy with math operations and integers

Hey so I'm trying to learn Java, and I know about floating-points not being accurate and what not, but I'm feeling blind at the moment. I know I'm doing something wrong, the computer is not wrong, but I don't know where.  I'm casting the Math returns as integers and then subtracting the specific integers value from the variable cash; when I subtract integers from floats, the float seems to lose data. My question is as follows: What is the smartest way to avoid data spoilage without slowing down my program?  <!-- language: lang-java --> private static void calculateChange() {     System.out.print("Please enter any amount of cash in dollars: ");     float cash = scanner.nextFloat();      int ten_dollars = (int) Math.floor(cash/10);     cash -= 10 * ten_dollars;      System.out.println(cash);      int five_dollars = (int) Math.floor(cash/5);     cash -= 5 * five_dollars;     int dollars = (int) Math.floor(cash);     cash -= dollars;     int quarters = (int) Math.floor(cash/0.25);     cash -= 0.25 * quarters;     int dimes = (int) Math.floor(cash/0.1);     cash -= 0.1 * dimes;     int nickels = (int) Math.floor(cash/0.05);     cash -= 0.05 * nickels;     int pennies = (int) Math.floor(cash/0.01);      System.out.println("This is equal to:\n" + ten_dollars + " ten dollar bills\n"             + five_dollars + " five dollar bills\n"             + dollars + " one dollar bills\n"             + quarters + " quarters\n"             + dimes + " dimes\n"             + nickels + " nickels\n"             + pennies + " pennies"); }           run:          Please enter any amount of cash in dollars: 135,04          5.0399933          This is equal to:          13 ten dollar bills          1 five dollar bills          0 one dollar bills          0 quarters          0 dimes          0 nickels          3 pennies          BUILD SUCCESSFUL (total time: 6 seconds)


Converting polygon feature class to WKT for ArcGIS

I am currently trying to export the geodata from a series of polygons in several .lyr files within my geodatabase in ArcGIS 10.2.  I want to export the series of polygons within my layer as WKT (well known text format). So that I may assign a geodata column in my CSV file for later importation and data management.  Does anyone know how to achieve this?


Sum of infinite squares and factorials: $\frac{1^2}{1!}+ \frac{2^2}{2!}+ \frac{3^2}{3!} + \frac{4^2}{4!} + \dots$

$$\frac{1^2}{1!}+ \frac{2^2}{2!}+ \frac{3^2}{3!} + \frac{4^2}{4!} + \dotsb$$  I wrote it as: $$\lim_{n\to \infty}\sum_{r=1}^n \frac{(r^2)}{r!}.$$  Then I thought of sandwich theorem, it didn't work. Now I am trying to convert it into difference of two consecutive terms but can't. Need hints.


What is the difference between PowerMock, EasyMock and Mockito frameworks?

I am very new to mocking framework, and my work needs mocking framework to finish unit testing. In the current code base i could see above 3 frameworks are being used in different places for unit testing. So, which one should i go for in the above 3 frameworks ?


Why is the blog link on the bottom going to a mobile version?

The blog link on the bottom sends me to a mobile version of the blog, while i'm not on a mobile device! :)  Thats it! :)


Proof that $\lim_{n \to \infty} ( 1+\frac{1}{a_n}) ^ {a_n} = e$ if $\lim_{n \to \infty}a_n = \infty$.

I have to prove that $\lim \limits_{n \to \infty} \left( 1+\frac{1}{a_n} \right) ^{a_n } = e$ if $\lim \limits_{n \to \infty}a_n = \infty$. Does anyone know how to do this without relying on the fact that $\lim \limits_{x \to \infty} \left( 1+\frac{1}{x} \right) ^ x = e$. Since my teacher used the first limit to prove the second, I need a proof that relies on the properties of sequences and not real-variable functions. I apologize for my bad English. I'm not a native speaker.


I found this problem on a thread on Stack overflow where it was posted as "job interview question". Unfortunately I cannot find the question. But I saved the picture and just cannot figure it out.  The problem is to calculate the area of the crescent.


How do I calculate size of a file that contains bank accounts?

I'm getting a nullpointerexception in my program and can't figure it out. These are the portions of code it is highlighting.  public int size()           throws IOException    {       return (int) (file.length() / RECORD_SIZE);    }  public int find(int accountNumber)          throws IOException    {       for (int i = 0; i < size(); i++)       {          file.seek(i * RECORD_SIZE);          int a = file.readInt();                   if (a == accountNumber) { return i; }             // Found a match                   }        return -1; // No match in the entire file    }   I believe this line is the main problem but don't really know what to do.   int position = data.find(accountNumber);  Exception in thread "main" java.lang.NullPointerException     at BankData.size(BankData.java:43)     at BankData.find(BankData.java:79)     at BankSimulator.main(BankSimulator.java:35)   If you need any other parts of my code to look at just let me know. The purpose of the program is to create a file, create bank accounts and/or delete them. It will then calculate the file size before and after a transaction. Thanks!


Why path integral approach may suffer from operator ordering problem?

In Assa Auerbach's book (Ref. 1), he gave an argument saying that in the normal process of path integral, we lose information about ordering of operators by ignoring the discontinuous path.   What did he want to say? I don't think there is any problem related to the ordering of operators.  References:   Assa Auerbach, Interacting Electrons and Quantum Magnetism, p.102, just below eq. (10.6).


Pronunciation of plural form of words ending in "-th"

I have realized that to pronounce the plural form of words ending in -th, we have to drop the letter "h". e.g. Months is pronounced /mʌnts/. But I have never seen this point mentioned in any context. I just want to make sure that this rule is correct and can be always applied.


Is there a software to reverse normal maps?

Said software would combine normal map with low poly mesh and re-create the high poly that was used to create it. Does this software exist?


Showing that every finite $T_1$-space is discrete

Here's an exercise I'm trying to solve as I'm studying topology. Please let me know if my proof convinces you and feel free to otherwise criticise it. Proposition 1. Every finite $T_1$-space is discrete. To be fully precise, let me fix the definitions here. Definition. A topological space $X$ is called $T_1$ iff given any two distinct points $x, y \in X$, both have neighbourhoods that do not contain each other i.e. there exist open sets $U$ and $V$ such that $x \in U$, $y \in V$, $y \notin U$, and $x \notin V$. Definition. A space $X$ is called discrete iff all of its subsets are open. I will also assume the following lemmata. Lemma 1. A space $X$ is $T_1$ iff all of its singleton subsets are closed. Lemma 2. Finite unions of closed sets are closed. Proof attempt for Prop. 1. Let $X$ be a finite $T_1$-space and let $U \subseteq X$ be an arbitrary subset. We need to show that $U$ is open i.e. that the complement of $U$ (which we denote $U^c$) is closed. As $X$ is finite, $U^c$ must have finitely many elements and must therefore be the union of finitely many singleton sets. By Lemma 1, we know that each of these singleton sets are closed as $X$ is a $T_1$-space. By the closure of closed sets under finite unions (Lemma 2), $U^c$ must be closed.


Find a general formula for $c_{n+1}=c_n+\frac1{c_n}$ (Recursive)


I have read several introductory texts about LSTM online, but none of them give a rigorously mathematical explanation of what the model actually does. For instance, why does the forget gate forget any more than any of the other gates in the LSTM unit?  Which papers and/or books should I read if I want to get a deeper understanding of LSTM?


Double addition does not return expected value, why?

I expect result and result2 to be the same:   multiplying .1 x 10 should equal .1 + .1 + .1 + .1 + .1 + .1 + .1 + .1 + .1 + .1 when running following code snippt of C#.  public void DoubleAddition()     {         Double x = .1;         Double result = 10 * x;         Double result2 = x + x + x + x + x + x + x + x + x + x;          Console.WriteLine("{0} - {1}", result, result2);         Console.WriteLine("{0:R} - {1:R}", result, result2);     }   But the output of Console.WriteLine("{0} - {1}", result, result2); is 1 - 1 And When is used round-trip formater e.g. Console.WriteLine("{0:R} - {1:R}", result, result2); then the result was 1 - 0.999999999999999989  Why is result2 not exactly is 1 when we display using round-trip formater? What is the value stored in memory when we declared Double d = 0.1?


How to manually add expire header for google fonts css files?

i am trying to boost my website,  but when i look it on gmetrix  it says following statement   There are 6 static components without a far-future expiration date.


$$\lim_{x\to \ 0}\frac{{(1+x)}^\frac{1}{x}-e+ex}{x^2}$$  Using Taylor Expansion, $(1+x)^{1/x}=e(1- \frac{x}{2} + \frac{11x^2}{24} + ...)$. Finally, I found that $$\lim_{x\to \ 0}\frac{{(1+x)}^\frac{1}{x}-e+ex}{x^2}=\lim_{x\to \ 0}\frac{\frac{ex}{2}+\frac{11ex^2}{24}+...}{x^2}$$  $$=\lim_{x\to \ 0}\frac{\frac{e}{2}+\frac{11ex}{12}+...}{x}$$  Now, It seems limit doesn't exist, but options are given for this question as  1) $\frac{11e}{12}$  2)$-\frac{11e}{12}$  3)$\frac{11e}{24}$  4)$-\frac{11e}{24}$. So How to proceed further?  Thank you.


If a new user finds an incorrectly spelled tag where do we report it?

As my first question on the site was when the misspelled tag was found No features are active to use meta, edit, or chat.   In this case, should the tag be posted in Meta under "support" "tag" "re-tag"?


I would like some help getting a script to run on shutdown and restart.  Following advice I found online, I created the script and placed it in /etc/rc0.d and /etc/rc6.d.   Unfortunately, the scripts are not running and when I run Aptitude, I see the following error appear:  insserv: warning: script is corrupt or invalid: /etc/init.d/../rc0.d/K99-CreateSuccessfulPowerOffFile insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/K99-CreateSuccessfulPowerOffFile   Here are the contents of the script:  #!/bin/sh echo success > /etc/poweroffsuccess.txt exit 0   And here are the permissions:  user@hostname:~$ ls -l /etc/rc0.d/K9* -rwxrwxrwx 1 root root 58 Sep 24 11:11 /etc/rc0.d/K99-CreateSuccessfulPowerOffFile  user@hostname:~$ ls -l /etc/rc6.d/K9* -rwxrwxrwx 1 root root 50 Aug 18 21:09 /etc/rc6.d/K99-CreateSuccessfulPowerOffFile


Why does "moot" have two nearly opposite meanings

Moot can mean  Subject to debate; arguable or unsettled. Of no practical importance; irrelevant.  These two seem to me to be opposites in many cases. I've seen people say "that's a moot point" in response to a proposal/idea: do they mean "that warrants debate" or "we should not bother talking about this"? Is there a correct usage, or a way to use it while avoiding ambiguity? Or have I misunderstood the definition?


Possible Duplicates:             Which one is correct: "If I were a cop, I would wear a uniform" OR "If I was a cop, I would wear a uniform"?


When we say,      It is not fair.   or     It is unfair.   I'm not sure enough to say whether both of the sentences have the same meaning or not though superficially, there is no difference between them but if we say,     Something is not possible.   or     Something is impossible.   then there is really an observable difference in my first language. Hence, the question - is there a difference between the preceding two sentences in English?


Kalman Filter with non-contemporaneous sensors

I have spent quite a bit of time on "well-behaved" Kalman filtering problems where, say in a case with 2 sensors, we observe outputs for both sensors at each time step.  However, I am struggling to extend this to a slightly different case, where, say, we run a Kalman update() for each sensor as data comes in (i.e. Kalman update() based on output from only one sensor at a time). An example application for this might be financial trade time series data, where one observes buy and sell trade prices that are some noisy estimate around a true value 'midpoint' for a stock. I'd like to update my Kalman true value estimate on updates on either buy or sell 'sensor' observations.   So state is 2-D vector x might be [fair_value, bid_ask_spread_around_fair_value] and observations are 2-D vector z = [buy_trade_price, sell_trade_price], but z in practice is only a scalar (based on whatever side the trade is).    Is there a recommended way to adjust the Kalman update() step to accommodate updates on each sensor independently? Is there an intuitive way to think about how the resultant covariance matrix of the state variables P is changing with this type of update step?


Strange folder in my home folder after a failed run of BleachBit

A folder was created in my home folder (not by anyone), and I cannot see the folder contents. She has root privileges, but when the nautilus root access the folder is empty. When I try to remove it, it will appear to remove more than 1 million files from my computer, and I do not know what these files are.  How i can see these files? the name of folder created is "4F8ZBREShQ". I'm scared about it...


What's the gnu-netcat's '-z' equivalent option in nmap-ncat?

I check for a listening port on a service prior to running a script using this :  until nc -z $HOST $PORT do   echo "waiting for service to be available..."   sleep 0.5 done  exec "/my/script"   It used to work with gnu-netcat, but now, I've upgraded the Linux distribution, and it uses nmap-ncat for the /usr/bin/nc command.  I'd like to know an equivalent solution to use with nmap-ncat package.


How do I fix improperly seasoned cast iron pans?

I'm quite new to cooking as a whole.  A few months back I bought a set of VonShef cast iron pans. When seasoning them, I unfortunately made two errors. First, in my naïveté, I used vegetable oil as the seasoning; and second, I didn't remove the excess oil, leaving a sticky and uneven finish in the pans. After a couple of failed attempts at cooking with this situation, and some food sticking to the pans, I've been putting off using them to avoid further catastrophes.  So how can I go about rectifying my mistakes? I've watched a few videos on YouTube about the proper way of seasoning, and it seems you can clear seasoning by either sanding it down or burning the pan. But how would you also clear off burnt food stuck to the pan?  I hope you can see what I mean in the below pictures.


Public keys not available, can't use apt-update

I'm getting a lot of errors like this:  W: An error occurred during the signature verification.  The repository is not updated and the previous index files will be used.  GPG error: http://ftp.uk.debian.org/debian stretch-updates  InRelease: The following signatures couldn't be verified because the public key  is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010   Tried to add the keys manually using:  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553   and it says imported/processed but I still get the same errors.


Use an old iPhone 6 just for audiobooks - Cannot transfer file from iTunes to iPhone

I have an iPhone 6 that I want to use for one purpose: listen to audiobooks. When I connect the iPhone to iTunes on my PC, I can see the iPhone. But when I try to drag-and-drop an audiobook onto the phone, nothing happens (not even a "prohibited") warning.   The iTunes version is current (12.8).  iTunes is set for manual synching.  The iPhone has enough space for an audiobook or books. The iPhone does not have a SIM card.   What can I do to transfer an audiobook file to the iPhone?


Finder window on top of full-screen safari?

I wish it were possible to press a keyboard shortcut while in full-screen Safari, have a finder window appear in the middle of the screen, and then drag+drop files from that finder window to safari.  How can I do this?


I have a confusion regarding the number of phones i can carry with me . As the iphone is cheaper in usa compared to india i wish to carry many iphone's with me (what is the max limit) .  I also do not want to pay the import charges , let's suppose if i unpack the phone's and the earphone's from the box and carry it with me. will tell the officials that they are all mine will they allow me or not .  edit 1. - i dont plan to sell these phones , i'll give one to my wife and rest will be used by me as official phone , personal phone and backup phone  edit 2. - i know there are other question on this same topic but they dont answer what precisely i wanna know i.e. if i just keep all the phone without any packing and that too in seperate baggage (2 phones in 2 seperate luggage bags , 1 in my pocket and the last one in my hand bag ) will it still rightfully attract custom duty  .


I'm trying to apply text to a basic sphere but I can't figure it out. I've applied a shrinkwrap modifier to the text, and have the target of the modifier be the sphere, but the effect doesn't come out the way I want it to. The text hovers slightly in front of the sphere and part of the text doesn't look like the way it should (bottom half of the "O".)  The only way the text looks like the way I want it to is when I increase the offset setting in the shrinkwrap modifier. But then I have a problem where the text is too far away from the sphere. I want the text to look like it's a part of the sphere, sort of like a golf ball.