How could I check memory size of object created in Java?

I search and found there are different way of checking object memory created for Java.  1. One is done by checking Runtime memory available    2. The other one is using the ByteArrayOutputStream to check    So I have written a program using both approach and check if they are the same  import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.io.Serializable;  class LotsOfBooleans implements Serializable {     boolean a0; }  class LotsOfInts implements Serializable {     int a0; }   public class Test {     private static final int SIZE = 1000000;      public static void main(String[] args) throws Exception     {                 LotsOfBooleans[] first = new LotsOfBooleans[SIZE];         LotsOfInts[] second = new LotsOfInts[SIZE];          System.gc();         long startMem = getMemory();          for (int i=0; i < SIZE; i++)         {             first[i] = new LotsOfBooleans();         }          System.gc();         long endMem = getMemory();          System.out.println ("Size for LotsOfBooleans (by checking Runtime) : " + (endMem-startMem));          System.gc();         startMem = getMemory();         for (int i=0; i < SIZE; i++)         {             second[i] = new LotsOfInts();         }         System.gc();         endMem = getMemory();          System.out.println ("Size for LotsOfInts (by checking Runtime memory) : " + (endMem-startMem));          System.out.println ("Size for LotsOfBooleans (using ByteArrayOutputStream) : " + getBytes(first).length);         System.out.println ("Size for LotsOfInts (using ByteArrayOutputStream) : " + getBytes(second).length);          // Make sure nothing gets collected         long total = 0;         for (int i=0; i < SIZE; i++)         {             total += (first[i].a0 ? 1 : 0) + second[i].a0;         }         System.out.println(total);      }      private static long getMemory()     {         Runtime runtime = Runtime.getRuntime();         return runtime.totalMemory() - runtime.freeMemory();     }      private static byte[] getBytes(Object o) {         ByteArrayOutputStream bos = new ByteArrayOutputStream();         ObjectOutput out = null;         try {             out = new ObjectOutputStream(bos);             out.writeObject(o);             return bos.toByteArray();         } catch (IOException e) {             e.printStackTrace();         } finally {             try {                 if (out != null) {                     out.close();                 }             } catch (IOException ex) {                 // ignore close exception             }             try {                 bos.close();             } catch (IOException ex) {                 // ignore close exception             }         }         return null;     } }   I compile it using   The result as below  $javac Test.java $java -Xmx128M -Xms16M Test Size for LotsOfBooleans (by checking Runtime) : 15914240 Size for LotsOfInts (by checking Runtime memory) : 15999984 Size for LotsOfBooleans (using ByteArrayOutputStream) : 7000072 Size for LotsOfInts (using ByteArrayOutputStream) : 10000064 0   From the result, clearly shows they are different. I have the feeling that ByteArrayOutputStream is more accurate. But the checking Runtime approach is by , which is from a renown StackoverFlow contributor.  So which one should I refer to?   Or both of them are correct, but referring to a different size of object (mind explaining how they are different if both are correct?  If both approach is not right, do suggest what is a good way to know the size of my object in Java?


Can I use lenses from EOS-3 film camera with Canon EOS 7D?


I am writing a simple bash script to check for disk usage on my system. The while loop should only print partitions that are at 85% or above. There are two partitions over 90% but only the first partition is being printed to output.  Code:  #!/bin/bash admin="foo@bar.com" threshold="85"  df -h | tail -n +2 | awk '{print $1 " " $5}' | sed 's/.$//' | while read i; do   part=$(echo $i | awk '{print $1}')   util=$(echo $i | awk '{print $2}')     if [ $util -ge $threshold ]; then       echo $part is ${util}% full. An email has been sent to your administrator.       mail -s "Critical: $part is ${util}% full. Clear space immeadiately!" $admin     fi done   Output:  /dev/mapper/rootvg-root is 92% full. An email has been sent to your administrator.   But, you can see /dev/mapper/rootvg-apps is also 98% full:  /dev/mapper/rootvg-apps            20G   20G  445M  98% /apps /dev/mapper/rootvg-tmp            6.0G  2.4G  3.7G  39% /tmp /dev/mapper/rootvg-var_log        6.0G   71M  6.0G   2% /var/log /dev/xvda1                        497M  142M  356M  29% /boot


I registered in the   and followed some of the Interested Technologies but still not able to get Precognitive badge.


When does the community user delete a question?

I just noticed that  deleted , probably the same time the asker deleted his account (I can see a User was removed for the same timestamp in my rep log). I've seen , but I don't understand why it happened in this case.


I am writing a small text book of Problems, Electronics engineering stream, in LaTeX.   It has a long list of small part files for each chapter. In this each problem is separated by LaTeX environment Prob.  Apart from this problems some explanation, theorems and examples are also interspersed.    In this condition my question is how to pull out all lines between \begin{Prob} and \end{Prob} strings including these two.   \section{Vector Operations}   \begin{description}[style=multiline,leftmargin=0.25\textwidth,font=\bfseries]     \item [Negative Direction] If $\vb{A}$ is defined as shown       \item [Addition]  Adding $\vb{A}$ and $\vb{B}$ is done by  \end{description}    \section{Exercises}      \begin{Prob}     Find the component of $\vb{A}$ along  $\vb{B}$ in the following $\vb{A}= 10\ux-6\uy+7\uz$ and $\vb{A}= -5\ux+7\uy$ and  find $3\vb{A}+2\vb{B}$.      \begin{ans}         content...     \end{ans}      \begin{sol}         The component of $\vb{A}$ along $\vb{B}$ is found by $(\vb{A}\dotproduct \vb{B}) \frac{\vb{B}}{\abs{B}} $ and,   $\vb{A}\dotproduct \vb{B} = A_xB_x+A_yB_y+A_zB_z$    If $\vb{A}= 10\ux-6\uy+7\uz$ and $\vb{A}= -5\ux+7\uy$ then  $\vb{A}\dotproduct \vb{B} = 10(-5)-6.7$       \end{sol}  \end{Prob}    \begin{Prob}      Given that $L(2,3,2)$ and $M(-3,0,5)$ find      \begin{enumerate}[noitemsep,nolistsep]     \item Vector directed from Origin to $L$.     \item Unit vector along from origin to the mid point of $L$ and $M$.     \item Calculate the length of vector $\boldsymbol{LM}$.     \end{enumerate}      \begin{ans} \begin{multicols}{3}     \begin{enumerate}[noitemsep,nolistsep]         \item $\vecty{2}{3}{2}$         \item $\big( -0.5, 1.5, 3.5  \big) $         \item $\vecty{2.5}{1.5}{-1.5}$     \end{enumerate} \end{multicols}      \end{ans}      \begin{sol}     \begin{enumerate}[noitemsep,nolistsep]         \item \begin{align*}         \boldsymbol{LO} &= \vecty{(2-0)}{(3-0)}{(2-0)}\\         &= \vecty{2}{3}{2} \\         \end{align*}         \item Mid point of $L$ and $M$ \begin{align*}         \boldsymbol{ML} &= \Big(\frac{(2-3)}{2}, \frac{(3+0)}{2}, \frac{(2+5)}{2} \Big) \\         &= \big( -0.5, 1.5, 3.5  \big) \\         \end{align*}         \item Vector joining $L$ and $M$ is \begin{align*}         \boldsymbol{LM} &= \vecty{\frac{(2+3)}{2}}{\frac{(3-0)}{2}}{\frac{(2-5)}{2}} \\         &= \vecty{2.5}{1.5}{-1.5}         \end{align*}     \end{enumerate}     \end{sol} \end{Prob}   Please suggest a bash script for extracting the lines.  Other solutions using python etc are also welcome.


Nilradical strictly smaller than Jacobson radical.

In a preparation question for an exam, I am asked to give an example of a ring $A$ such that the nilradical $\operatorname{Nil}(A)$ is strictly smaller that the Jacobson radical $J(A)$. Here's how I solved the problem:  It is enough to find some ring $A$ with a prime ideal $p$ which is strictly contained in some maximal ideal $m$. Then the localization $A_m$ is a local ring with maximal ideal $m$, and by the correspondence between ideals of $A_m$ and ideals of $A$ contained in $m$ we have that $J(A)=m\supsetneq p\supset\operatorname{Nil}(A)$.  An example is $A=\mathbb{Z}[x]$, $p=(x^2+1)$ and $m=(x^2+1,2)$.  Now I was wondering: are there also any "elementary" examples satisfying the condition above? By this I mean basically examples where I don't have to localize the ring.


How to set refresh rate to 144 hertz on my MacBook air 2017

I just got a 144 hertz Samsung monitor and I'm using mini display port to HDMI. Also, settings are set to mirror.


How to remove your name from the menu bar after 10.7.5 update?

After the 10.7.5 update to Lion, I'm getting my name to appear in the menu bar. I don't particularly like it there. Any way to remove it?


What's the purpose of index.php in wp-content directory?

<?php // Silence is golden.   The folder is ../wp-content/index.php  Why have this file. What's the purpose?  I suppose it's in order to avoid invalid visit.  But why?


Is there a word for words that form another word when read in reverse?

What is the word for words that form another word when read in reverse? Examples: stop -> pots


Is there an equivalent for var_dump (PHP) in Javascript?

We need to see what methods/fields an object has in Javascript.


Code that prints the contents of array randomly, the result recuired is print contents randomly, could do that with Math.Random();  public class Random {     public static void main(String args[]) throws Exception {                      String[] Answers = new String[4];         Answers[0] = "OS";         Answers[1] = "GOOD";         Answers[2] = "CS";         Answers[3] = "Cody";            for(int n=0;n<Answers.length;n++) {             System.out.print(Answers);           }     } }         the above code prints  [Ljava.lang.String;@1db9742[Ljava.lang.String;@1db9742[Ljava.lang.String;@1db9742[Ljava.lang.String;@1db9742  would want it to print CS,OS,GOOD, CODY  or OS,CODY,GOOD,CS and so on


Minecraft won't let me log in due to my user being invalid!

My friend can't log into her Minecraft account because its saying "That user is invalid". She tried reinstalling it and restarting her game but its not working.   How can she fix it?


I am looking to format a number like 188518982.18 to £188,518,982.18 using Python.  How can I do this?


How do I change the email address used for Google Play?

My email address I use for the Play Store will be invalid soon, so I need to change it. However I don't want to make a new account because I want to keep all my apps. How can I do that?


Good-morning Math Exchange (and good evening to some!)  I have a very basic question that is confusing me.   At school I was told that $\sqrt {a^2} = \pm a$  However, does this mean that $\sqrt {a^2} = +2$ *and*$-2$ or does it mean: $\sqrt {a^2} = +2$ *OR*$-2$  Is it wrong to say 'and'? What are the implications of choosing 'and'/'or'  Any help would be greatly appreciated. Thanks in advance and enjoy the rest of your day :)


Notifying a user when a file appears in a folder

We currently have Google Drive running on our server to transfer files back and forth with another location. We've gotten pretty big files sometimes, and it's tedious having to keep checking to see if the upload and download are both finished.  So my thought was that surely I could set up the Task Scheduler to do this (I'm on Windows 7). I'd want it to run when a log shows that a file was created inside a certain folder that should be watched. However I don't know where I'd find that in the logs, and I'm unsure whether the log would be different or perhaps even non existent since it would be the server machine that actually receives the file.  Can anyone help figure out how to approach this?


gnome-terminal not working with `Error contructing proxy..`

I'm using Ubuntu 16.04.01. About 2 days ago I updated my Ubuntu and restarted as recommended.    But after that, gnome terminal stopped working.  No response when I click the gnome terminal icon.    I tried to execute terminal as below.  $/usr/bin/python3 /usr/bin/gnome-terminal # Error constructing proxy for org.gnome.Terminal:/org/gnone/Terminal/Factory0: Error calling StartServiceByName for org.gnmome.Terminal: Timeout was reached   When I checked my python3 I found its version is 3.6.6.    How can I fix this?


Comparing integers: arithmetic expression or conditional expression

In Bash, two integers can be compared using conditional expression     arg1 OP arg2      OP is one of -eq, -ne, -lt, -le, -gt, or -ge. These   arithmetic binary operators return true if arg1 is equal to, not equal   to, less than, less than or equal to, greater than, or greater than or   equal to arg2, respectively. Arg1 and arg2 may be positive or negative   integers.   or arithmetic expression:     <= >= < > comparison      == != equality and inequality   Why do we have two different ways for comparing two integers? When to use which?  For example, [[ 3 -lt 2 ]] uses conditional expression, and (( 3 < 2 )) uses arithmetic expression. Both returns 0 when the comparison is true  When comparing two integers, can these two methods always be used interchangeably? If yes, why does Bash have two methods rather than one?


How to block a page in a website without blocking the whole host

I did some search and found out that we can only block hostnames using /etc/hosts file, so my question is how can I block a specific web page in my Ubuntu 20 server e.g.: facebook.com/somepage


Can I use Samsung Core Prime's (SM 360H) lolipop update of Philippines region on Bangladesh region?

I am using Samsung Core Prime for a while. But It hadn't launched lolipop firmware for till now for Bangladesh region. But a lolipoo update is avaiable for Philippines region.   Can I use this firmware on Bangladesh region?


Salutation in motivation letter for academic purpose

What salutation should be used except "Dear Sir\Madam," in motivation letter for enroll in Master or doctoral program?  "Dear person responsible for application review," ?  Also I read that ":" instead of "," must be used in salutations. Is it true?


How can I check if I still have Ubuntu as a second operating system? (Alongside Windows 10)

About two years ago I installed Ubuntu as a requirement for an IT academy, but ever since I finished the academy course, I have been on my Windows constantly. I haven't gone onto my Ubuntu for almost a year. I used to be able to choose whether I log into Windows or Ubuntu whenever I would turn on or restart my PC, but it's been months since that option stopped appearing, and it just automatically goes straight to Windows. Is it possible I somehow lost Ubuntu because I wasn't using it for too long?


Schengen visa refusal for visitor visa - possible resolution?

My husband is in Switzerland for 6 months with L permit.  I applied for visitor visa.  I submitted all documents with his entrance visa in which date of his coming back to India was not mentioned but later on after submission of visa documents to VFS office, I submitted his L-permit through mail.  But my visa got rejected stating " your intention to leave the territory of the member state before the expiry of visa could not be ascertained".  I also got confused on the answer of extension of my husbands visa permit during answering to the embassy council.  I have only 7 days left to reapply for visa.  I don't know what should I do?  Will I able to get visa again within 7 working  days??


How to read shutter count on Canon EOS 6D Mark II?

How can I read the shutter count on Canon EOS 6D Mark II on Windows with a preferrably free tool?


I'm working on a Unity's Project and I want to modify a prefab, more precisely I want to change the texture of a prefab. The problem is that my modification is applied also to other prefabs. I read on the documentation how each of the buttons labeled Select, Revert and Apply works, and what I understood is that the modification should update only the selected prefab.  Here is the  which I read.  What am I missing?  PS: I'm not the author of the project, I have to apply some modifications only.


Cardinality of any two sets is comparable: proof using Zorn's lemma

Definition 1. Let $A$ and $B$ be sets. $A$ has lesser or equal cardinality to $B$ iff exists a injection from $A$ to $B$.   I tried to prove:      Let $A$ and $B$ be two non-empty sets such that $A$ does not have lesser or equal cardinality to $B$. Using the Zorn's lemma, prove that $B$ has lesser or equal cardinality to $A$.    I proved this exercise using the axiom of choice, but I could not find a relation to use the Zorn's lemma.  The book gives a hint: for every subset $X\subseteq B$, let $P(X)$ denote the property that there exists an injective map from $X$ to $A$.  I thinking about to define the $\{X\subseteq B:P(X)\}$ and show that $B\to A$ is the maximal element.


Is there are a way to compare sets as a value in JS?  > a = new Set([1]) {} > b = new Set([1]) {} > a == b false > a === b false   but actually I expect that these two sets are equal because they contain the same elements


How to write test class for this trigger?

trigger CheckOrderAttachmentTrigger on Opportunity (before insert, before update) {     try {          Map<Id,Opportunity> opportunityAttachments = new Map<Id,Opportunity>(             [SELECT Id,(SELECT Id FROM Attachments) FROM Opportunity WHERE Id IN :Trigger.new]                   );          for(Opportunity opp:Trigger.new) {                 if(opp.StageName=='Order' && // If it is changing to closed/won...                (!opportunityAttachments.containsKey(opp.id) || // And the opportunity was not found (Insert)...                                 opportunityAttachments.get(opp.id).Attachments == null ||// Or the opportunity attachment list was null...                                opportunityAttachments.get(opp.id).Attachments.size()==0)) { // Or the attachment list has no entries...                                       opp.StageName.addError('Please attach Order form in Notes & Attachment section before changing opportunity stage to Order.'); // So we prevent saving here.                                    }                     }     } catch(exception e) {         System.assert(e.getMessage().contains('expected message'), 'message=' + e.getMessage());             } }


Uniform Convergence of Difference Quotients to Partial Derivative

I'm currently reading Evans' PDE book. In it he claims that for $f \in C^2_c(\mathbb{R}^n)$ $$\frac{f(x + he_i) - f(x)}{h} \to \frac{\partial}{\partial x_i}f(x)$$ and $$\frac{\frac{\partial}{\partial x_i}f(x + he_j) - \frac{\partial}{\partial x_i}f(x)}{h} \to \frac{\partial^2}{\partial x_jx_i}f(x)$$ uniformly as $h \to 0$.  My question is why must the convergence be uniform?  Thanks in advance.


(undergraduate) Algebraic Geometry Textbook Recommendations

What are the best algebraic geometry textbooks for undergraduate students?


What can I do if the confidence intervals of the predicted mean are small but the predicted intervals are large

I am conducting a linear regression: $Y=\alpha+\beta\times X+\epsilon$, $\epsilon\sim N(0,\sigma^2)$. It turned out that the confidence interval for the predicted mean $Y$ was really small (figure 1), that it was hardly differntiable from the predicted mean.   On the other hand, we can see that the observed $Y$s actually spread quite widely around each X. The second figure shows the predicted interval, which is large.   My question is:   What does this model tell me? Does it mean that it can be a perfect model to predict the mean? since the confidence interval in figure 1 is small. On the other hand, figure 2 tells that the random error in this model is high. Is there anything we can do (or is it necessary) to reduce such random error, although we already have a "perfect" model? For instance,  will adding extra useful (assume) variables help further explaining (reducing) the random error?   Instead of asking what's the difference between these two types of intervals (see @whuber's link), I am interested in if a small confidence interval and a large prediction interval exist, what can we say and what can we do about such a model? is such model the best already and we should submit the result? Or something can still be done to further explain the random error? Can someone help me explaining this result?  Thanks


I found that problem and I could use some help.     I have a partial order $(2^S,⊆)$ and |S| = n.       How many different chains are there in that poset?   If I had the Hasse diagram or knew the elements of S it would be easy to find out.   But now with knowing just that |S| = n I have absolutely no idea.  Could anyone help and provide a methodology?  Thanks


QGIS how to set up buffer units to meters?

I want to create buffer and set up distance in meters as units. The file is in WSG 84/UTM zone 18N. The project CRS is also set to WSG 84/UTM zone 18N. Units for distance measurement are set to meters (Project Properties/General settings) and Map tools preferred distance units are sets to meters. OTF is enabled. I use Fixed distance buffer tool and results are wrong it seems like a buffer is created in degrees not in meters. Is it a problem with a projection or the settings are wrong?


Amplitude of an electromagnetic wave containing a single photon

Given a light pulse in vacuum containing a single photon with an energy $E=h\nu$, what is the peak value of the electric / magnetic field?


What is the meaning of "beat somebody to the punch" . Could you please explain to me in a simple way. English is not my mother tongue. Thanks :)


What alternatives do I have to implement a union query using hibernate? I know hibernate does not support union queries at the moment, right now the only way I see to make a union is to use a view table.  The other option is to use plain jdbc, but this way I would loose all my example/criteria queries goodies, as well as the hibernate mapping validation that hibernate performs against the tables/columns.


Find sequence of differentiable functions $f_n$ on $\mathbb{R}$ that converge uniformly, but $f'_n$ converges only pointwise

Question:     Find a sequence of differentiable functions $f_n$ on $\mathbb{R}$ that converge uniformly to a differentiable function $f$, such that $f'_n$ converges pointwise but not uniformly to $f'$.   Attempt:  I have tried a number of possibilities, such as $f_n=x^n$ or $f_n=\frac{x^n}{n}$ but I don't know what the right approach is to construct the function. I am initially thinking that it's easiest to construct such a sequence of functions on the interval $[0,1]$ so that in the limit of $n$, part of the function goes to $0$ and the other part goes to $1$. However, this would make the resulting $f$ non-differentiable.


Game maker studio 2 Random spawn locations are not random

This is a redo of another question I asked. First I want to clarify that I am indeed using drag and drop. So saying something like "maybe switching to gml will fix your problem" is appreciated, but wont help. Anyway, this is what my block looks like:  [Create Instance]  Object: object11 X: random(room_width) Y: random(room_height) Layer: "Instances_2"  I have used this to randomly generate things in my games before, but I am now realizing it isn't very random. Every time it generates, it is in a random place, but it is that same random place every time I play. Does anybody know how to fix this? (sorry this was so long)  EDIT: this is NOT an exact duplicate. This is FAR different from my original. Please take that down. /


Windows 7 desktop: forcing new icons (e.g. after starting a download) to appear last?

Before I begin, this issue is a duplicate of  and I am aware of that. But because two  years has gone by and nobody else has asked since then, I figured there may have been developments.  As in the above question, I want to make new icons on my desktop appear at the bottom of the existing icon list. They currently appear under "Computer" on the top left which is annoying. I have tried various sorting options and do have Auto-arrange icons turned on because I like its functionality.  This issue didn't ever happen in XP - new icons always appeared at the "bottom right" or last position after all the existing icons.  P.S. I would not like to use third party apps such as "Fences" and am just looking to configure Windows to (hopefully natively) do this.  Thanks.


Can't delete folder : 'The path is too long' error

I'm trying to delete an entire folder in an external drive with the rd command, but i'm receiving the error below :     The path   E:\2017_11_10\WWW201~1\myproject\NODE_M~1\GRUNT-~4\NODE_M~1\imagemin\NOD   1\BIN-WR~1\NODE_M~1\download\NODE_M~1\GULP-D~1\NODE_M~1\GULP-U~1\NODE_M~1\MULTIP   ODE_M~1\STRING~1\PACKAG~1.JSO is too long.   Is there a way to remove this folder without having to format the external hd ?  Thanks


Comment links don't handle last space in label correctly

Links in comments do not work correctly when the last character in the label is a space.  Example: This works:   This does not work:   (in question text it apparently works)  I'll post a comment to the question to demonstrate.  As can be seen, the link is not rendered as a "label text" that is a hyperlink, but a plain text "label text" surrounded with square brackets, followed by the clickable URL in round brackets.  PS: I did several edits before getting the report correctly.  PPS: I'll try to put the "source code" here:  This works: [foo bar](http://www.foo/info) This does not work: [foo bar ](http://www.foo/info)


I'm having a problem swapping two strings in my array. Let's say Array[0] is "Daniel" and Array[1] is "Paul", how do you go about switching them?  This is my code and it just throws a bunch of errors at me.  public void swap() {     String name1;     String name2;     String temp1;     String temp2;     System.out.print("\nWhich person would you like to swap?: ");     name1 = input.next();     System.out.print("Who are they swapping with?: ");     name2 = input.next();      for (int i = 0; i <= 10; i++)     {         if(seats[i] == name1)         {             temp1 = name1;             temp2 = name2;             name1 = temp2;             name2 = temp1;               return;         }     }      System.out.println(name1 + " and " + name2 + " have been swapped.\n"); }   Any help would be greatly appreciated, thanks in advance.


Duplicated footnotes in long figure caption

I have a figure with a relatively long caption that goes over a single line, and within that caption I have a footnote. For some reason, the footnote gets repeated at the bottom. I notice this only happens when the figure caption goes over one line, if I shorten the caption to just one line, there is no duplicate of the footnote.  \documentclass[11pt]{beamer}  \usepackage[gen]{eurosym} \setbeamerfont{caption}{size=\scriptsize}  \renewcommand*{\thefootnote}{\fnsymbol{footnote}} \renewcommand*\footnoterule{} \setbeamerfont{footnote}{size=\tiny}  \setbeamersize{text margin left=7mm,text margin right=7mm}  \begin{document}  \begin{frame}{Slide Title}     \addtobeamertemplate{footnote}{}{\vspace{1.5ex}}     \begin{figure}         \centering         \includegraphics[width=0.7\textwidth,keepaspectratio]{example-image-a}         \vspace*{-3mm}         \caption{My looooooooooooooooooooooooooonooooooooooooooog figure caption\footnote{Some footnote}\tiny(source: source)}     \end{figure} \end{frame}  \end{document}     How do I correct this behavior?


Unable to match string value with the output from System.setproperty

I use maven CLI cmd to provide the BROWSER value in real-time while execution     mvn -DBROWSER=firefox install   and I use the below snippet to automatically fetch the BROWSER value as firefox from terminal cmd; but, when I try to match the condition with manual String value, browser=="firefox", it fails to match and returns to else part.  String browser = System.getProperty("BROWSER");      if(browser=="chrome")     {         System.out.println("CHROME initiated");         System.setProperty("webdriver.chrome.driver", "./libs/chromedriver");         driver = new ChromeDriver();     } else if (browser=="firefox") {         System.out.println("FIREFOX initiated");         System.setProperty("webdriver.gecko.driver", "./libs/geckodriver");         driver = new FirefoxDriver();     } else {         System.out.println("Skipped and CHROME initiated");         System.setProperty("webdriver.chrome.driver", "./libs/chromedriver");         driver = new ChromeDriver();     }      However, I want the test to move into else if (browser=="firefox") part matching browser=="firefox". Is this due to the format issue; I have also used .toString() but it didnt work for me.


I need to edit a photo on my Mac. I wish to take two photos and paste them together to create one that's larger, containing both. I couldn't figure out how to do this with iPhoto.   For Windows you have Paint.NET.    For Linux you have Kolourpaint.   What would be the equivalent on OS X?  Please note that it must be of quality both in code and in UI. I wouldn't want to install buggyware on my Mac.


can anyone help me with this: We are considering a symmetric random walk that ends if level 3 is reached or level -1 is reached. Start=0  What is the expected number of walks? So I am looking for: $E[{\tau}]$ with $\tau$=the stopping time.


What in-universe sign language is the Mandalorian using, and how did he know it?

In the episode 5, the Mandalorian communicates with two Tusken Raiders using sign language. In the Star Wars universe, what sign language is he using? Is it a special sign language to Tusken Raiders, or a language commonly used on Tatooine, and in such case how did he know it? Maybe there is a common sign language for communicating with droids or other Star Wars races that cannot speak? Or perhaps is he improvising?


Say, we have a query like this:  select a.*,b.* from  a join b on a.col1=b.col1 and len(a.col1)=10   Assuming the above query uses a Hash Join and has a residual, the probe key will be col1 and the residual will be len(a.col1)=10.  But while going through another example, I could see both the probe and the residual to be the same column. Below is an elaboration on what I am trying to say:  Query:  select * from T1 join T2 on T1.a = T2.a    Execution plan, with probe and residual highlighted:         Test data:    create table T1 (a int, b int, x char(200)) create table T2 (a int, b int, x char(200))  set nocount on declare @i int set @i = 0 while @i < 1000   begin       insert T1 values (@i * 2, @i * 5, @i)     set @i = @i + 1   end  declare @i int set @i = 0 while @i < 10000   begin     insert T2 values (@i * 3, @i * 7, @i)     set @i = @i + 1   end   Question:    How can a probe and a residual be the same column? Why can't SQL Server use the probe column only? Why does it have to use the same column as a residual to filter rows again?  References for test data:


$\lim_n{f(\frac{x}{n})}=0$, for all $x\in (0,1)$ implies $lim_{x\to0}f(x)=0$ (edit, $f$ is not continuous)

Let be $f:(0,1)\rightarrow \mathbb{R}$. For all $x\in (0,1)$ I have that $\lim_n{f(\frac{x}{n})}=0$.  It's true that  $lim_{x\to0}f(x)=0$?  And if $f$ is continuous?  For the second point I just use the definition of continuity and limits: Let be $x_0\in(0,1)$ and let be the succession $\{f(\frac{x_0}{n})\}$, and I know that for all $\varepsilon_1>0$ $\exists N>0$ such that if $n>N$ then $|f(\frac{x_0}{n})|<\varepsilon_1$.  $f$ is continuos in $\frac{x_0}{n}$, so for all $\varepsilon_2>0$ $\exists \delta_2>0$ such that if $|x-\frac{x_0}{n}|<\delta_2$ then $|f(x)-f(\frac{x_0}{n})|<\varepsilon_2$.  So I have that $|x|\le|x-\frac{x_0}{n}|+|\frac{x_0}{n}|<\delta_2+|\frac{x_0}{n}|=\delta^*$, because $x_0$ is fixed.  On the other hand $|f(x)|\le|f(x)-f(\frac{x_0}{n})|+|f(\frac{x_0}{n})|<\varepsilon_1+\varepsilon_2$.  But I don't know how solve the second. I try to prove that is false using many non-continuous function. but I failed.  (Sorry for my bad English, I'm Italian)


Charge a Magsafe MBP with a USBC power supply using an adaptor?

We've got a few newer 15" MBPs (Macbook Pros) in our office, so we have a few USBC MBP chargers in various areas.   We also have some older magsafe (not magsafe 2) MBPs which are Late 2012 , 15" MBPs.   So that we dont need to put different chargers in each location, is it possible charge a Late 2012 MBP using a USBC charger with an adaptor of some type ?


How to run .sh through terminal without using Nautilus Ubuntu 14.04

I have an .sh file that looks like   #!bin/bash exec /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/ java java -jar /home/me/myfolder/my.jar   I've made this file executable and it works fine when in the "nautilus" desktop, but when I run it on just normal desktop (Ubuntu 14.04) it only opens with gedit. I have also tried opening it with Java 7 and Java 6, but it does not give me the option to run in terminal. Also when i'm in the terminal and cd to the folder containing the .jar file and run it that also works fine. What I'm looking for is a way to just double click my .sh file without having to go to nautilus first. Is this possible?  Sorry if this is a duplicate, but I cant find the answer I'm looking for.


The Euclidean metric satisfies triangle inequality in cross product of two metric spaces $X$ and $Y.$

Consider $X \times Y$ for metric spaces $X$ and $Y.$  I'm trying to show that $d_E(p,q) = \sqrt{d_X(p,q)^2 + d_Y(p,q)^2}$ fulfills the triangle inequality, but I can't workout the algebra so that things fall into place and it is clear that $$d_E(p_1,p_3) \leq d_E(p_1,p_2) + d_E(p_2,p_3).$$  I avoided writing out everything that I have written on paper because it is messy, but here is a little bit:  Consider $$d_E(p,p'') = \sqrt{d_X(p,p'')^2 + d_Y(p,p'')^2}$$ and $$d_E(p,p') = \sqrt{d_X(p,p')^2 + d_Y(p,p')^2}$$ and $$d_E(p',p'') = \sqrt{d_X(p',p'')^2 + d_Y(p',p'')^2}.$$          It must be shown that $$d_E(p,p'') \leq d_E(p,p') + d_E(p',p''),$$ or that $$d_E(p,p'')^2 \leq (d_E(p,p') + d_E(p',p''))^2.$$  I then proceeded to expand it out via the square, and it became messy and not, in the end, clear that the left was less than or equal to the right.


Why use "the" for oceans/seas/rivers etc. but not lakes?

Possibly two questions in here: Are these sentence constructions logical, and if they are, why are they different?     I swam across the Ocmulgee River.   I swam across the Pacific Ocean.   I swam across the Red Sea.   I swam across Lake Winnipeg.   I can't think of a way of phrasing the lake example while using an article with a proper noun. I thought at first it was because Lake Winnipeg is different; it's generic portion (the "Lake") comes first and the name of that body comes second, but I swam across Falls Lake is the same.   Yet the sentence I swam across the lake sounds right to me. ...Why?


Motivation behind introduction of measure theory

Is the motivation behind the introduction of measure theory the Lebesgue integral? In order to evaluate such an integral we need the length of each of the horizontal strip of width $h$. I have a question here. Why do we need such a general concept of measure? Length is a kind of measure, but why did Lebesgue think of so general a concept of "measure" when he just needed the length to evaluate his integrals? Is there any other motivation behind this ?


How do I /kill a colored block that is thrown on the ground? For example, if I drop a green wool on the ground, a repeating command block will /kill it and the block entity will be deleted.


Will Find my iPhone Lost Mode be useful if stolen phone as shows Offline?

My phone was stolen last night. I made sure it was in Lost Mode in iCloud and it was immediately in Offline status when I open iCloud. I am positive the thief switched it off. Now I am 100% certain the Find my iPhone option was turned on on my iPhone, but will the "Lost Mode" be of any help if it was not turned on on the iPhone? Would it be showing "Offline" if I did not turn on the option?


postgres crosstab with unknown number of categories

I have below table   CREATE TABLE bar (project,month,hours)     AS VALUES     ('A', 'aug', 1 ),     ('A', 'sep', 3 ),     ('B', 'aug', 2 ),     ('B', 'sep', 5 );   I can crosstab this with month as category as below  select * from crosstab ( 'select project, month, hours from bar', 'select distinct month from bar' ) as  c (project text, aug int, sep int);   The problem is month column can be vary. it can be vary from number or names.   Ex: Next time month column in bar table can have oct also which I don't know beforehand.   Then How I create crosstab query for that? In summary what I want is to remove hardcoded aug, sep from my crosstab query.


Asking about UK Short-term Visitor Visa Financial requirements for STUDENT

i'm 20 years old, i am currently in my second year of study in the university in Algeria, i want to apply for General English courses in Liverpool school of English for 2 weeks so i need to apply for Short-term Student Visa but i have problem in financial requirements i need to seek advice for you please:   I have a bank account in my name with (1500£) plus fees of accomondation and application fees. My mother is a teacher for 3 years (200£ per month) and she has only savings account she has no bank account. My father is a retired teacher for more than 7 years (250£ per month) and he has no bank account or any account only post office account from where he get paid. My brother has a professional commercial Bank account in his name he was receiving a lots of money on it, he has a commercial register and everything but right now he has no money in his account for a bout 5 months he didn't received money on it.   My questions is : what should I put in my application for financial documents, should I put payslips for my parents or open bank accounts for them and make them my official sponsor, or should I extract my money from my bank account and put it in my brother's account and make him my sponsor or what to do please?  Thank you for advance!


Isn't it better to defend at the narrow door (choke point, like in Spartan 300), than to charge out and get surrounded?  The orcs could have easily pierced those horses with their spears which will throw them off to the ground and get them killed.


Little Snitch reports outgoing connections for AirPlayXPCHelper for wrong subnets?

After upgrading to El Capitan, I've started noticing annoying connections from the AirPlayXPCHelper to 192.168.1.0/24 subnet (my home network isn't in 192.168.1.0/24 subnet, it's in 172.16.0.0/12 subnet).  Questions are:   Why AirPlayXPCHelper goes out to this network on port 5000 and 7000? Is there a way to limit it's desire to go there?   Thank you.


How to wait for element to be clickable in WebDriver with C#

How can I wait for element to be clickable in Selenium WebDriver?   When I execute my tests in Firefox or Internet Explorer I have no problems, but when I try to run it on Chrome, I get an element is not clickable error when I try to click on the submit button. I tried with verifying that the  element is there and it is visible and enabled.   Please give your answers in C#.


A Question About The First Step In Induction

I am currently learning mathematical induction from this site (). It has broken induction into 3 steps:   Show that it is true for n=1 Assume it is true for n=k Show that it is true for n=k+1   I have 4 questions:    Why, of all numbers do we pick n=1? Can't we pick something like n=1, n=2, or the like?  Why do we need the 3rd step? I get a feeling it is to prove that it is true for all n=k, but if that is so, how does it do it? It does prove that it is true for all n=k+1, but that is based on the assumption that n=k; and therefore doesn't prove it. Because if a proof is based on an assumption, how does that prove anything?  Why do we need the first step when we show that it is true for all n=k+1? In n=k+1, why do we add 1? Why can't we subtract 1, or add 2, etc? Why must it be n=k+1?    Is it possible to answer the question at the level of a Pre-Calc student, who hasn't learnt Calculus (obviously), set theory, and all those complicated stuff?   This question is different from "" because I have learnt neither limit notation nor L'Hopital's rule, and the other question contains them. This is important for a Precalc student who understands neither of them.


How to program a shell script to start another script and use the same variable values

I'm not giving the real example as the post becomes so long that no one would read it. So I'll give other examples I have a bash script name.sh and it is programmed as below- #!/bin/bash echo "Please Enter your name" read name echo "Hello $name" sudo bash age.sh  And another script(say age.sh) like this- #!/bin/bash *echo "Hello $name" echo "Please enter your age" read age echo "Thank you"  *Here in the second script I want the variable $name from the first script to be used with the same value in the second script so the user doesn't have to type his name again Of course if I'm declaring a variable then I can do it in the other script too but if the user is declaring it then I can't predict what the user will answer. So how do I transfer the same value over to the other script? I have another idea to do it It goes like this- #!/bin/bash echo "Please Enter your name" read name echo "Hello $name" sudo bash age.sh --variable_value  Somehow can i make the 2nd script use the values given after -- and assign the same variables to them?


Is there a specific word that covers 24-hour time period between 0:00 and 23:59 on a single date? Is there anything more specific than a "day" (which is usually opposite of night, and its primary meaning does not cover entire 24 hours, except maybe within Arctic Circle)?


Do I need transit visa or get pre-arrival registeration to go to Japan via Hong Kong?

I hold an Indian passport and am planning to visit Japan via Hong Kong ( Cathay Pacific ). There is a layover of about 2 hours. Do I need to get preregistration done ? I am not planning to leave the airport and will just be changing flights.


Unable to fix NullPointerException by Debugging Stacktrace

I have debugged and try to figure out the cause from stacktrace but unable to find the reason of NullPointerException for this particular input. If I change the last input(marked in code) greater than 20, code executes successfully, but if its less than 20 then it throws exception.  package geeksforgeek.examples.sorting;  public class SinglyLinkedList {   Node head; Node current; public void add(int data){     if(head == null){         head = new Node(data);         current = head;         return;     }      while(current.next != null)         current = current.next;     current.next = new Node(data); }  public void print(Node node){     current = node;     while(this.current != null) {         System.out.print(" "+current.data);         current = current.next;     }     System.out.println(); }  static  class Node {     int data;     Node next;     Node(int data){         this.data = data;         this.next = null;     }  }  public static void main(String[] args) {      SinglyLinkedList quick = new SinglyLinkedList();     quick.add(30);     quick.add(3);     quick.add(4);     quick.add(20);     quick.add(15);     quick.add(55);     quick.add(35);     quick.add(65);     quick.add(25);     quick.add(95);     quick.add(85);     quick.add(75);     quick.add(2); /*issue with 2, less than 20 throw exception*/      Node node = quick.head;     while (node.next != null)         node = node.next;     quick.print(quick.head);     sort(quick.head, node);     quick.print(quick.head); }  public static void sort(Node low, Node high){     if(low==high)         return;          Node prePivot = partition(low,high);         sort(low,prePivot);         if(low != null && prePivot==low){             sort(prePivot.next,high);         }else if(prePivot != null && prePivot.next != null){             sort(prePivot.next.next, high);         } }  public static Node partition(Node low, Node high){      if(low == high || low == null || high == null)         return low;      Node prePivot = low;     Node current = low;     Node pivot = high;      while(low != high) {         if (low.data < pivot.data) {             prePivot = current;             int temp = current.data;             current.data = low.data;             low.data = temp;             current = current.next;         }         low = low.next;     }      int temp = current.data;     current.data = pivot.data;     pivot.data = temp;     return prePivot; }   }  Exception in thread "main" java.lang.NullPointerException     at geeksforgeek.examples.sorting.SinglyLinkedList.partition(SinglyLinkedList.java:86)     at geeksforgeek.examples.sorting.SinglyLinkedList.sort(SinglyLinkedList.java:67)     at geeksforgeek.examples.sorting.SinglyLinkedList.sort(SinglyLinkedList.java:72)     at geeksforgeek.examples.sorting.SinglyLinkedList.sort(SinglyLinkedList.java:68)     at geeksforgeek.examples.sorting.SinglyLinkedList.sort(SinglyLinkedList.java:70)     at geeksforgeek.examples.sorting.SinglyLinkedList.main(SinglyLinkedList.java:59)


How can I install Ubuntu on a second hard drive with Windows being on the first?

I have recently got an Alienware M17x R4 and since it has two hard drive bays I was thinking of putting my hard drive from my old laptop and installing Ubuntu on it without making any changes to the drive that has Windows on it. Also if possible to add a entry to the Windows boot loader to boot Ubuntu instead of using GRUB.


Absence of a Review option in mobile view

There is no Review option on mobile view of websites. Below is the screenshot of the page as I see from mobile view of Physics Stack Exchange.    As you can see, there is no Review tab, while there is one in the desktop version:    It's difficult to always change to the desktop version for editing, and hence, I feel a Review tab must be incorporated in the mobile view to allow quick access.


Difference between XORing the IV and just pre-pending it to the plaintext before encryption with AES-CBC

The normal way of using AES-CBC is to XOR the IV with the first plaintext block    This way you have to pass the IV along the ciphertext.  What if instead of XORing we just put a fixed size randomIV in front of the plaintext:  Encrypt(randomIV + plaintext) = C1  And we don't have to send/tansmit separatly the IV since it is inside C1. Decryption works similarly:  Decrypt(C1) = randomIV + plaintext  And we just remove the randomData (fixed size) to end up with the plaintext.  In essence, the first block of random data, when encrypted will work EXACTLY as a randomIV since it will be XORed with the second block  Except from performance loss (having to encrypt an additional block instead of XORing), can you think why this might not be secure.


I would like to copy many files with the below command.   cp `find /Volumes/DATA/ -name "*.app" -depth 1 2> /dev/null` /Volumes/VMWare/img/   But that doesn't work because if it finds a space then it interprets it as the end of the order.  How to fix this?


If $X$ is an infinite set and $N$ is a countable set, then what is the cardinality of $X \times N$?

If $X$ is countable, then the cartesian product is countable. However, what about general cases? The googling suggests that the answer is the cardinality of $X$. But why? Could anyone please provide me with the proof?


Set the QGIS display to show decimal degrees?

Using QGIS 2.6.1 Brighton. I am trying to set the CRS for the project to display Decimal Degrees, where it is defaulting to Feet. I can change it in the Properties Dialog, but it does not change it, it is just staying on Feet. How do I change it?  Edit: this layer was imported from a shapefile where it was internally set to Feet. I was able to get the vendor to supply one with Decimal Degrees so my problem is gone. Still would love to know if there was a way to do it myself from within QGIS.


Badge text overflows with long tags in user profile

I found this  in the rarest badge section of :  Badge tag consist of a tag I debugged and found that the max-width: 150px; option produced the error - the code is as below  .profile-badges .badge-tag{     max-width: 150px;  }


How can a company use money from stock investors when they are constantly being bought and sold?

I am interested in the mechanisms which a company can use the money that investors give them when they buy a public stock since they are being bought and sold constantly. How can a company spend other people's assets when the shareholders still own their stocks and they still retain a liquid value? To me it seems like stocks are a case of "having your cake and eating it too".


Why Strongly Typed DataSets generated by MS tool don't close streams?

I've just found that method in xsd dataset.  [System.Diagnostics.DebuggerNonUserCodeAttribute()]         protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {             global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();             this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));             stream.Position = 0;             return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);                         }   It creates 3 streams, but not using "using" clausule/closing them. Why is that? It also says, at the top of the file, that   //     Changes to this file may cause incorrect behavior and will be lost if //     the code is regenerated.   So I believe I shouldn't fix it myself. Can anyone explain? :) Thanks


I am considering purchasing Star Wars Battlefront (the new one from DICE), and saw that it had a split-screen mode. Is this only available when doing the "Missions" or can you play in split-screen in the multiplayer modes too?


Can I refer to another object's properties from a Cycles node shader? Drivers? If so, how?

I am trying to develop several shaders that need to take into account the position or orientation of another object in my scene.  Seems like a generally useful thing to be able to do.  Here's an example of something that almost does what I want (for a simplified case).  Here is a Cycles shader node tree that will shade an object green for points that are more than 1 unit from the origin and red if they are less than 1 unit from the origin.    And here I'm moving a cube with the material close to the origin to see the effect.    Here is the crux of what I am looking for...  Rather than having the origin be the source of the red colored region, I would like an Empty to be the center of the red colored region.  And I would like to move the Empty around rather than the other objects to control the effect.  Thanks!  The .blend file for my example can be found at...    I can use a geometry node to get things like normal and position from the shaded object.  But I'm unsure of how to get properties from the other object.  I have just started down the road of using drivers.  I figured I could create a custom property on the shaded object and add a driver that sets it to the other object's properties.  Then I'm hoping I can use an Attribute node to get at the custom property.  However, I'm at a loss how to best do this via the UI.  In particular...   Can I add a custom property for a vector quantity (e.g. position)? Can I create custom property groups so I can add drivers to x, y, and z at once (as the built in property groups for things like position, rotation, and scale have)? Do I need to do x, y, and z separately and then convert them to vectors with a Combine XYZ node? Can I even refer to a custom property via an Attribute node? Do I need to resort to Python? Can this be done at all or do I need to find some other way with multiple passes?   If someone can provide an extremely simple example for Cycles it would help me a lot. How about a shader for a UV Sphere where the sphere is green where it is within 1 blender unit of an Empty and red where it is more than 1 blender unit from the Empty? Can even just be in x to make things simpler.


Extendible claws and augmented vision - Looking for a book?

I seem to recall a pair of books about someone who had had extensive genetic engineering, where he could make his nails grow into claws.  I also remember something about touching his incisor teeth to change his vision to night vision?  And something about an emerald ring that he picked up which couldn't then be removed?  I think it was 2 books... and I think he was a pilot or something....  Does anyone remember it? It would have been from the early 80's I guess?  The two books I had didn't finish the story, as I recall...  Was the trilogy ever finished?


Or: how do statements follow from other statements?  Consider:  All turtles have shells (s1), Ricardo is a turtle (s2), therefore Ricardo has a shell (s3).  Why does s3 follow?


Should links be forbidden in spoiler text?

I noticed that spoiler text, that is, text that appears upon a click, can easily hide URLs. By clicking to reveal text, you are redirected:  >! http://www.bbc.co.uk/sport/0/football/         This doesn't seem wise. Is it a bug? Should it be fixed? I'm experiencing this issue on a touch screen device. One press to reveal the text also inadvertently presses the link.


I have a SaaS platform where people can create their own white labeled job boards.  My main product domain is www.myproductdomain.com  When clients sign up they automatically get clientname.myproductdomain.com. They can also choose to use a custom domain by setting up a CNAME.  At the bottom of every white labeled site is a link back to my main site "Powered by My Product Name".  Should I consider making these nofollow links?  I have around 1600 clients using the product at the moment.


How do you prevent oatmeal from overflowing?

Whenever I cook oatmeal (whether steel cut oats in a rice cooker or pan, or rolled oats in the microwave), it always overflows. How do you prevent this?   Do you just use a bigger container? Do you just take the pan off the heat or bowl off the microwave when it's about to overflow? I've also heard that if you put dried fruit or something like that along with the oatmeal while cooking, that helps prevent it from overflowing -- is this true?


Unable to check a mdadm RAID1 array, says the file system's read only?

I recently migrated a RAID1 from a CentOS 5 system to a CentOS 6 system and ever since when I attempt to perform a check I get the following:  $ echo 'check' > /sys/block/md127/md/sync_action -bash: /sys/block/md127/md/sync_action: Read-only file system   This actually shows up from a CRON too, specifically, /etc/cron.d/raid-check. this is included in the mdadm RPM:  $ rpm -ql mdadm | head -5 /etc/cron.d/raid-check /etc/rc.d/init.d/mdmonitor /etc/sysconfig/raid-check /lib/udev/rules.d/63-md-raid-arrays.rules /lib/udev/rules.d/65-md-incremental.rules   Here I'm running the same command that's used by the CRON:  $ raid-check /usr/sbin/raid-check: line 96: /sys/block/md127/md/sync_action: Read-only file system   This typically runs once a week and sends an email which is what originally alerted me to the issue. But at any rate I'm at a loss why this RAID seems to be unable to be checked.  The RAID seems fine on inspection though.  $ cat /proc/mdstat  Personalities : [raid1]  md127 : active raid1 sda1[0] sdb1[1]       976759936 blocks [2/2] [UU]  unused devices: <none>   I point this out only because while googling I found this thread regarding a bug in mdadm but this was for a older version of mdadm.      Version info  $ lsb_release -d Description:    CentOS release 6.6 (Final)  $ rpm -q mdadm mdadm-3.3-6.el6_6.1.x86_64  $ mdadm --version mdadm - v3.3 - 3rd September 2013


Is it possible to make LaTeX mark overfull boxes in the output?

Is it possible to make LaTeX mark overfull boxes in the output, for example by drawing red rectangles in the PDF where the boxes overflow? The purpose -- to more easily "see" where the problems are in the output.


How do I solve this circuit using nodal analysis?

Hey guys I cannot wrap my head around this damn circuit and how I'm supposed to solve it using nodal analysis. I chose the bottom node as my reference node and I got to these equations:  Node A is the left one, node B is the middle one, node C is the right one and the reference node is the bottom one.  Node A :        (Va/100)  -4  + (Va-Vb)/50 + (Va-Vc)/20 = 0  Node B :        -(Va - Vb)/50 + 4 - 10 -2 + (Vb-Vc)/40 = 0  Node C:         2 + (Vc/25) -(Vb-Vc)/40 -(Va-Vc)/20 = 0  I am supposed to find Vx.  Are my equations right? How do I find Vx?


One who has potential, but never gives the effort to show it.   What would be the best word or words that match this description?


If I flip a biased coin $n$ times, what is the probability that I get a streak of $\geq m$ heads in a row at some point?

Suppose I have a biased coin that comes up heads with probability $p$ and tails with probability $1-p$ with some $p$ such that $0 < p < 1$.  I flip the coin $n \geq 1$ times. I choose some $m$ so that $1 \leq m \leq n$.   I am trying to find the probability, in terms of $p$, $n$, and $m$, of the following being true:     During the $n$ tosses, at some point there is a streak of (at least) $m$ consecutive heads.      Let $f(n,m,p)$ be the probability that such a streak exists.   I am trying to find a general formula for $f$ in terms of $n$, $m$, and $p$, but I don't know how to solve this.   I can figure out some of the easier cases, where I fix one of $n$, $m$ or $p$ and write $f$ in terms of the other two variables:     $$f(1, m, p) = p$$ (in this case $n=1$ forces $m=1$ and this is just the probability of heads on one flip)      $$f(n,1,p) =  (1-p)^n$$ (in this case we can find $1$ minus the probability of no heads)     I don't know how to find a general formula (or a good approximation) for $f(n,m,p)$. I am guessing that the problem is very difficult.   Any help is appreciated, thank you!!


How can you prove the following inequality? $$\pi > e\ln(\pi)$$   Edit: I have tried the following, $\pi = e^{\ln(\pi)}$ so: $$e^{\ln(\pi)} > e\ln(\pi)$$ $$e^{\ln(\pi)-1} > \ln(\pi)$$ $$\ln(\pi)-1>\ln(\ln(\pi))$$  I am unsure where to go from here.


I can't get a result for $\sum\limits_{k=0}^\infty \frac1{k^2+1}$.

Using partial fractions: $$ \sum\limits_{k=0}^\infty \frac{1}{n^2+1} = \lim_{n \to \infty} \left(\frac{i}{2} \sum\limits_{k=0}^n \frac{1}{k+i} - \sum_{k=0}^n \frac{1}{k-i} \right) $$ Expanding and rationalising end up with: $$ \lim_{n \to \infty} \frac{i}{2}\left( -i +  \frac{1-i}{1^2+1} + \cdots +  \frac{n-i} {n^2+1} +\left( -i  \frac{1+i}{1^+1} -\cdots-  \frac{n+i}{n^2+1}  \right)\right) $$ Simplifying I end up with an expanded version of what I started with: $$ \lim_{n \to \infty} \left( 1 +\frac{1}{1^2+1} + \frac{1}{2^2+1} + \cdots + \frac{1}{n^2+1}\right) $$ How can I solve this problem? I feel like I am just going in circles.


Moderators should see the post as I flagged it, not the edited version

Original question: Do moderators see the flagged post as I flagged it, or do they see the current version?  Since it is the current version, I request making it the flagged version instead.  The reason I ask this is that people are getting their flags declined because the original post was edited after the flag, thereby invalidating the flag.  The flag was valid, so the flag should not have been declined. (This might lead to flag bans if it happens multiple times.)


how to disable gdm and graphical interface on RHEL 8.2

I've tried systemctl disable graphical.target and didn't work. inittab says exactly "ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM."


Why can the y and z-components of spin be measured simultaneously?

I have a gut feeling that this is wrong. By the uncertainty principle where $x,y,z$ are the $x,y,z$ components of spin $$ \sigma_{y}\sigma_{z}\geq \frac{\hbar}{2}\langle x \rangle $$ and it can be shown that $\langle x \rangle =0$. Therefore $$\sigma_{y}\sigma_{z}\geq 0 $$  Does this mean that I can know both the y and z-components of spin simultaneously? This is only true for the y and z-components; the uncertainties for the x and y pairs and z and x pairs do not give a 0 uncertainty relation. Am I interpreting this wrong?


Python seems to be inconsistant  x = 100 y = 100 x is y   Returns True, yet:   x = 300 y = 300 x is y   Returns False.  I even tried with new, clean variables:  > x = 100 > y = 100 > x is y True > x = 300 > y = 300 > x is y False > x = 100 > y = 100 > x is y True > x2 = 300 > y2 = 300 > x2 is y2 False > x2 300 > y2 300 > x2 is y2 False > x2 = 100 > y2 = 100 > x2 is y2 True   What is happening here? Am I confused about the "is" key word?


Hardware reserved memory 8.1GB AMD - MSI - Windows 10

I am facing reserved hardware memory issue; Its happen automatically, I mean I won't change or update anything in my system. Yesterday I was playing the game then I was check that 90% of memory is used, So I check my computer properties. I Found that 7.98 ram is usable.  I watched many tutorials with different methods nothing is working  like MSConfig -> Change limit use Regedit ETC. I also update my BIOS its, but it did not work - Then I reinstall window still not work  My Config: X470 GAMING PLUS - Windows 10 Pro N 64Bit - DDR4-2666mhz 8GB*2 - GTX 1050 TI Graphic        [![enter image description here][4]][4]


SPSite.Exists returning true for a just deleted site collection

Short story - I have a process that creates some sitecollection, so to test it I keep deleting and recreating the same site over and over. The process includes a check with the istruction SPSite.Exits, done to check if the sitecollection is present or should be created.  Sometime, soon after I delete the site collection, SPSite.Exists will report it as still available. Is this a cache related problem?


Hi I'm trying to deply a webapp to my server who currently runs Centos and I have the issue that I can not write to files inside the public app dir. My directory structure is as follows, there you can see permissions on each directory. The list runs from the index.php file to the root directory.  -rwxrwxr-x. 1 myuser apache 102 Mar 28 08:08 /var/www/mypage/public/index.php drwxrwxrwx. 2 myuser apache 4096 Mar 28 07:39 /var/www/mypage/public drwxrwxr-x. 3 myuser apache 4096 Mar 28 07:39 /var/www/mypage drwxr-xr-x. 9 myuser apache 4096 Mar 28 07:38 /var/www drwxr-xr-x. 20 myuser apache 4096 Nov  6 09:16 /var   The server throws an error that says that the server has no permissions to  write to a file inside the public directory.  The server runs as apache and the user myuser is on the apache group.  So, what can be happening? I have other projects inside the same directory and they have the same folder structure and permission but with no permissions error.


I got a notification.I am unable to open software update app and I am unable to install anything in terminal.It is giving this.E: Type 'See' is not known on line 4 in source list /etc/apt/sources.list


What are differences between, and best purposes of, DROP, TRUNCATE, and DELETE? Can they be rolled back?

*Delete is a DML(Data Manipulation Language). Delete command deletes records from the existing table.*The syntax for Delete is  sql> Delete from .   This Deletes All the Record From The TAble  sql> Delete from       Where  **    This deletes a particular set of records.  Note:Delete is not Autocommit Statement(In fact none of the DML are auto commit)  Drop and Truncate both are DDL(Data Definition Language).  Drop {Delete or drops} the table with it's structure. It is autocommit statement. Drops Once fired can not be rolled back.  syntax:  sql>drop table   Truncate is the command used to delete all record from table. but the structure of the table remain same.It is also a autocommit statement.  syntax;  sql>truncate table**   Can we rollback the truncate?


An equivalence of categories that is not adjoint.

Is there a good example of an equivalence of categories $F:\mathcal{A}\to\mathcal{B}$ such that $F$ is neither left nor right adjoint to its inverse $G:\mathcal{B}\to\mathcal{A}$?


Can I connect my desktop tower to my laptop's screen?

I have a laptop and a desktop tower unit. I don't have monitor for the desktop. But I want to access the desktop OS and work on it. I tried to find a solution but couldn't find one. Can I use my laptop's screen as a monitor for this desktop? Is it even possible?


Move files to specific folders based on name

I have this file/folder scheme:  /Aula   /Aula01   /Aula02 aula-01.1.mp4 aula-01.2.mp4 aula-01.3.mp4 aula-02.1.mp4 aula-02.2.mp4 aula-02.3.mp4   All the mp4 files are located in the root directory (Aula), which contains subfolders called Aula01, Aula02 and so on...  I'd like to move these files to their specific subfolder based on the two-digit number in the middle of the files' name and on the final part of the subfolders' name. Like this:  /Aula   /Aula**01**     aula-**01**.1.mp4     aula-**01**.2.mp4     aula-**01**.3.mp4   /Aula**02**     aula-**02**.1.mp4     aula-**02**.2.mp4     aula-**02**.3.mp4   I've searched around and I've found this script, but my knowledge is too limited to tweak it.  #!/bin/bash for f in *.{mp4,mkv}           # no need to use ls. do     filename=${f##*/}          # Use the last part of a path.     extension=${f##*.}         # Remove up to the last dot.     filename=${filename%.*}    # Remove from the last dot.     dir=${filename#tv}         # Remove "tv" in front of filename.     dir=${dir%.*}              # Remove episode     dir=${dir%.*}              # Remove season     dir=${dir//.}              # Remove all dots.     echo "$filename $dir"     if [[ -d $dir ]]; then     # If the directory exists         mv "$filename" "$dir"/ # Move file there.     fi done   Could someone help me out tweaking it, or helping with a better script for this situation?  Also is there a way to make the script to extract only the two-digits number regardless of the file name scheme, in case it differs from the ones in this example  Thanks!


How to use LIKE and IN together in SOQL?

I have a requirement, for each Accountwhose name contains ‘Sale’, ‘Opportunity’, or ‘Catalog’, set Price_Type__c to ‘Net’.  This is what I code in Anonymous Apex:  set<string> myString = new Set<String>{'%Sale%', '%Opportunity%', '%Catalog%'}; List<Pricebook2> myList = [select Name from Pricebook2 where name LIKE IN: myString]; for (Pricebook2 rec : myList) {     rec.Is_Auto_Maintained__c  = true;     rec.Price_Type__c ='Net;' } update myList;   and it threw an error : "     expecting a colon, found 'IN'   ". So is there any other solution to this?


This is a question in ordinal arithmetic. (If anyone has read 'Classic Set Theory' by Derek Goldrei, this question comes from page 252.)  $\epsilon_0$ = sup {$\omega$, $\omega^\omega$, ... } and $\omega$ is the smallest infinite ordinal.   $\omega_1$ is the least uncountable ordinal so that $\alpha < \omega_1$ if and only if $\alpha$ is a countable ordinal.  I will take the definition of an ordinal to be: a set $\alpha$ is an ordinal if (i) $\alpha$ is well-ordered by $\in$ and (ii) if $\beta \in \alpha$ then $\beta$ is a subset of $\alpha$. (or $\alpha$ is $\in$-transitive).   I am also not assuming that $\epsilon_0$ is countable at this point.


Why does MATLAB 'forget' updates to variables inside objects?

If I have a MATLAB class MyClass with a   classdef MyClass       properties         myArray     end      methods          function update(obj, i)             obj.myArray[i] = i*5;         end end   and I call the update function with   myClass.update(i)   the myArray object does not 'remember' the updates when i increments and I get left with an empty property. Ie. myArray = []  However if I define the function as follows  classdef MyClass       properties         myArray     end      methods          function out = update(obj, i)             out = i*5;         end end   and call the update function with  myClass.myArray[i] = update(i)   the updates to the myArray property are remembered. Ie. Ie. myArray = [5, 10, 15, 20, 25]  So what is going on here?...in every other language this would work as expected, it seems like there is some MATLAB specific weird scoping/referencing going on here. Anybody know what's happening?


How to add translation to form of some acronym?

I am new to the LaTeX world, I am currently using the acronym package to handle acronyms/abbreviations in my thesis. And I have to use this package. At the moment I'm created a list of abbreviations, which has worked well so far. The list of abbreviations currently looks like this: ... \usepackage[nohyperlinks, printonlyused, withpage]{acronym} ... \begin{acronym}[PASCAL VOC]     \acro{ann}[ANN]{Artificial Neural Networks}     \acro{dl}[DL]{Deep Learning} \end{acronym}  I can insert these in the text using \ac{ann}. Now I would like to extend the abbreviations, so that I can use for example the following acronyms in my text: Example: Lorem ipsum mittlerequadratische Abweichung (engl. Mean Squared Error, kurz: MSE) eirmod tempor invidunt ut labore et dolore magna. Likewise, in the further course of the text only MSE should appear in the abbreviation. So far I have not found a solution and have problems writing a function myself. Is it possible that someone will help me with this problem? In fact I have already gone to the following thread (). I only encountered an error while building (although I only copied the example). In the following lines I get this one error message: \expandafter\patchcmd\csname AC@\AC@prefix{}@acro\endcsname   {\begingroup}   {\begingroup\def\acroforeign##1{\csdef{ac@#1@foreign}{##1, }}}   {}   {\fail}  => Undefined control sequence. \expandafter\patchcmd\csname AC@\AC@prefix => Undefined control sequence.  \fail Ridge: \ac{ECU}, \ac{BW}  Subsequent: \ac{ECU}, \ac{BW}  => Acronym 'Ecu' is not defined and Acronym 'BW' is not defined.


Ubuntu 20.04 Font and UI elements too big on login

I'm running Ubuntu 20.04 on an ASUS X99-E-10G WS w/ an NVIDIA 1080Ti and an LG 4k 32" monitor which persistently gets recognized as 27". When I log in, the text of certain UI elements is ~2x the normal size. After I go to settings/universal access and turn large text on and then off again, everything is the normal size I expect. Screenshot after logging in  After turning "large text" on  After turning "large text" off  How do I get the conditions I have after cycling the "large text" feature to be present immediately after booting? I have the 440 version of NVIDIA's drivers installed.


I've recently made a site and I want to know how to go about making backlinks?


What is the proper location for user defined environment variables?

What is the proper location for user defined environment variables in Ubuntu?  My first guess would be ~/.profile. Ubuntu already creates that file which conditionally sources ~/.bashrc and does some other things. That can't be it.  My second guess would be ~/.bashrc. Ubuntu also creates that and it contains even more than ~/.profile.


Fibonacci Numbers, show $F_n \ge 2^{n/2}$ for $n \ge 6$.

I want to show that for the Fibonacci numbers, $F_n$ $>=$ $2^{n/2}$ for n $>=$ 6.  My thought was to prove this via induction.  I showed the base case is true for $F_n$, n=6 and 7.  I assumed this was true for $F_{n-1}$, and $F_n$   => $F_{n-1}$ >= $2^{\frac{n-1}{2}}$ and $F_{n}$ >= $2^{\frac{n}{2}}$  => $F_{n+1}$ = $F_{n-1}$ + $F_{n}$  => $F_{n+1}$ = $2^{\frac{n-1}{2}}$ + $2^{\frac{n}{2}}$  => $F_{n+1}$ = $2^{\frac{n-1}{2}}$ $( 1 +$ $2^{\frac{1}{2}}$)  But in order to have $F_{n+1}$ >= $2^{\frac{n+1}{2}}$ I need $( 1 +$ $2^{\frac{1}{2}}$) >= 4, which is not true. This is where I get stuck.  Can anyone offer some tips? Thanks.


Show that the polynomial $x^8 -x^7 +x^2 -x +15$ has no real root.

Please check if my method is correct. Solution : Let $$f(x) = x^8 - x^7 + x^2 -x +15 $$ Now, let $g(x)= x^8 -x^7=x^7(x - 1)$ and $h(x)= x^2 -x=x(x-1)$. Thus, $$f(x)=g(x) + h(x) + 15$$  On analyzing $g(x)$ and $h(x)$ we see that both the functions are negative between $0$ and $1$  and the maximum negative value of both the functions do not exceed $-1$. Thus, the minimum value of $f(x)$ is not less than $13$. Hence, $f(x)$ has no real root. Q.E.D


Generating LaTeX code from scanned LaTeX pdf

I have a paper copy of some old LaTeX notes, but I lost the source file.  If I scanned them as a .pdf, does any OCR software exist that could convert the scanned .pdf to LaTeX source (.tex)?  I also have a paper copy of some old notes created using Microsoft Word's Equation Editor.  While I am considerably less hopeful, I ask the same question -- does an OCR software exist that could convert a scanned .pdf to .tex?  Thank you for your help.


Is it appropriate to use Good night for saying hello? I've heard that a person in a movie said good night for greeting, is it OK?


Collecting proofs for $\sum_{n=2}^{\infty} \, \frac{n-1}{2^n} = 1$

Update: The summation I came across has the form shown in title, and that exact question appears to be new. I could ask for proofs that take on this summation directly (without reducing it to summations starting at $n = 0$ or $n =1$), and that would be the preferred answer and the only one I will accept. But might as well let this fly as is, collecting all proofs of the identified equivalent variants.    I just stumbled across the fact that  $\tag 1 \sum_{n=2}^{\infty} \, \frac{n-1}{2^n} = 1$  This is equivalent to   $\tag 2 \sum_{n=1}^{\infty} \, \frac{n}{2^n} = 2$  I discovered $\text{(1)}$ using a 'matrix/combinatorial' argument, but it would need work to turn it into a formal proof.  I googled and found this , explaining how to show $\text{(2)}$.  I didn't find the question on this site, prompting this 'collecting proofs post':     Please supply a proof demonstrating either $\text{(1)}$ or   $\text{(2)}$. If you use any theory or technique, mention that at the   start of your answer.


How does Stack Exchange deal with copies with translation?

There're a lot of Chinese websites that copies virtually all contents from Stack Overflow and translate them into Chinese (with machine translation of course, because they're of really a low quality). How should we deal with them?  Most of them copy by using a web spider.  Example:  copies contents from Stack Overflow.


RAMDISK OS? Installing Windows 10 on a ramdisk

Is it possible to put the entire operating system on a ram disk? If I have 16 GB of RAM and it is an Intel Xeon. I don't have an SSD and my hard drive is killing my boot time. So can I just allocate some of my ram to work as if it were an SSD and install windows and vital software on it, to gain super fast speed. Or is it more trouble then its worth and would be better off just buying an SSD?


How to open a 1:10 printing file properly in illustator

im trying to make a 338CM X 70CM sign in illustator, the design contain vectors and images. The printing place wants it to be 1:10 scaling size and im trying to understand one thing: if im sending him a 1:10 pdf file (33.8 cm X 7 cm instad of 338 cm X 70 cm) how the images wont be ruined after he will print it in the actual size? Also, when i open a 1:10 file, how do i set the bleeds in it? doing 1:10 also? (instad of 0.3 cm im doing 0.03 cm?) Thanks for the help


Suppose a subspace of $X$ is compact iff closed. Then is $X$ compact hausdorff?

Let $X$ be a topological space.   If $X$ is compact then any closed subspace is compact. If $X$ is hausdorff then any compact subspace is closed.   So if $X$ is compact hausdorff, then a subspace is closed if and only if it is compact. Does the converse hold?  If a subspace of a topological space $X$ is compact if and only if it is closed, then is $X$ hausdorff? (clearly it must be compact).  Note: this is not a duplicate of "If every compact set is closed, then is the space Hausdorff?", because $X$ must be compact here too.


Should we put the references in slides/poster when we already have them in paper?

After reading this question about  and asking myself two questions about  and , I realize that these activities are for showing what you found, make the audience be attracted. If they need further explanation, they should read your paper, which has successfully defensed and proved that your work is validated. One important thing when you attempt to attract people is concentrate on the important, which means unnecessary things need to be trimmed. I think the reference is one of those. So, should we put the references in slides/poster when we already have them in paper?


A follow-up question of $\frac{1}{2}\otimes\frac{1}{2}=0⊕1 $ : If I have 4 spin-1/2 particles in my system, how can I use a series of direct sums to represent  $\frac{1}{2}\otimes\frac{1}{2}\otimes\frac{1}{2}\otimes\frac{1}{2}$ ? How to determine how many singlets, total spin 1 (I think that's 3), and total spin 2s are there? Thanks!


The two kinds of measures for preventing malaria are individual  preventing measures and community preventing measures.   Two measures for preventing malaria are individual preventing measures and community preventing measures.      I wanted to know whether  I should use use the word "kinds" or not in front of  "measures".


Need advice for what to do with my first game idea

My friends and I have this idea to make a game. None of us have much experience with programming. We think our idea is to big too accomplish. Should we present our idea to an indie company that can make it, or scrap the idea and start with something smaller? If we start with something smaller, what can you recommend us to use since we have little experience with programming?


Ubuntu 16.04 install no desktop icons, blank desktop (just wallpaper), tried to reinstall compiz

I'm new to Ubuntu so go easy on me. I've heard great feedback and support from these forums so I'm crossing my fingers.  I booted ubuntu 16.04 on my new custom build pc, I went through all the installation steps and rebooted my system.   However, when i get to the log in screen, i enter my password and the desktop then flashes quickly, briefly seeing the Ubuntu logo and its version and then parts of the desktop template fade away and I am just left with the desktop wallpaper and the mouse, nothing else, no other options.  I can open terminal with ctrl + alt + 1 and I have tried various commands to fix the issue after reading the threads here, especially this one   I get the line 'compizconfig-settings-manager' has no installation candidate so that's no good  I feel like the video drivers may be an issue and i need to update them but the command line says everything is updated.   Can anyone help me with this I am very stuck and need a working computer ASAP. Much thanks to anyone. Here is my pc build: MSI GTX 970 Intel I5 6600k Asus z170 Deluxe MB Samsung 950 PRO SSD


Long usernames skew "Others with this badge" list item alignment

On the "Others with this badge" page , if one of the users who gained the related badge has a rather long username, their profile's alignment will be pushed over to the left instead of being correctly aligned to the right. Screenshots:   This doesn't appear to be intentional. Could this be fixed?  Oh, and because  going on, here's a , a combination of two poetic forms that shouldn't really go together. I found it rather fitting because long usernames and the "Others with this badge" list don't really go together.  "Others with this badge," Has issues with its spacing And its alignment   With names, long displayed, The list item appears wrong, And might need some work   With names like Shog9, There's not a visual bug, And it renders fine   But, others are long Shadow Wizard Wearing Mask Throws alignment off   Could this please be looked into, Perhaps tagged ?


Natural proof of identity for $\text{Li}_2(x)+\text{Li}_2(1-x)$

What's a natural way to compute $\text{Li}_2(x)+\text{Li}_2(1-x)$ in closed form ?   Once you know the answer $\text{Li}_2(x)+\text{Li}_2(1-x)=\frac{\pi^2}{6}-\log(x)\log(1-x)$ , computing the derivative of the function $x\mapsto \text{Li}_2(x)+\text{Li}_2(1-x) + \log(x)\log(1-x)$  gives a fast, out-of-the- blue proof.  I'd like someone to show a computation of $\text{Li}_2(x)+\text{Li}_2(1-x)$  with no prior knowledge of the answer. I'm unable to do that with the integral formula for $\text{Li}_2$


Which one is right — "He works at company X" or "in company X "?

I usually use "at a company" but I have encountered some articles using "in a company", "in XYZ firm" or "in an organization".  Which one is right?


How can I acquire Daedric weapons In Skyrim without a high smithing skill?

I'm trying to collect 1 of every weapon in skyrim and right now I'm focusing on Daedric weapons, but since I don't have a high smithing skill (I don't consider it to be an important skill) I'm not able to craft them myself.   What level do you have to be to see them in merchants inventories to buy or to be able to find them?  Are there any locations where I might find some Daedric weapons or armour?


What would happen to the Moon if Earth is turned into a black hole?

Assume that all of sudden the Earth is turned into a black hole. And the moon revolves around the Earth (before turning into a black hole). What would happen to the Moon after earth changes to black hole will it be sucked to the black hole or continue to revolve the black hole?


Can anyone explain why should we finalize an object?

private static final  SecureRandom no = new SecureRandom(); Why should we finalize no  in here ??


There is no bijective holomorphic map between $\mathbb{D}-\{0\}$ and $\{z|0<r<|z|<R\}$.

This problem, stated in the title, comes from Schwarz Lemma part in complex analysis. It usually makes sense to ask of the existence of a holomorphic bijection(constructing one with some familiar holomorphic maps). However, how to figure out that there isn't any such map? Which proposition/theorem/lemma should I consider? Thanks!


I have seen a  on Khan Academy about the Hubble's law.  And my question is if the "Hubble's constant" increases by (70.6 km/sec)/parsec then could we reach such a velocity that it gets faster even than light? What If the edge of the observable universe is expanding on such a speed that has surpassed the speed of light. Is a question that has been bothering me all day long. Thanks for any help.


when i try to open any partion i find this error   Error mounting /dev/sda5 at /media/mano/upnto: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda5" "/media/mano/upnto"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda5': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   but  when i try to mount it i get this error   mount: special device /dev/sda5 does not exist


As with most of my questions, this is more of a general "how to handle a special situation" and not a plea to solve an existing problem.  What is the best way to handle story deadlocks (as in: The story can't progress as originally planned and possibly even not at all)?  For example:   The PCs have killed a crucial NPC, or gotten him killed or "unavailable" through other means (Starting a battle, betraying him to the city guard if he's a criminal, ...) The PCs have made enemies with a faction they need to continue the (original) story ...   Aside from the obvious advice "don't let it come to that", "plan ahead for those situations" and so on, what can I do if I am surprised by an unexpected action of a PC that makes the original arc unviable?  The things I thought about are all pretty boring:   Divine intervention. The worst thing you can do as a DM, in my opinion, unless there is absolutely no other way. Adding a new NPC to replace the old one and going on as planned. Will create nasty plot holes (How did that guy find out about what you are doing, why was he never mentioned before, ...). Depending on the situation, this might be viable, but sometimes it makes too big of a plot hole (For example if you accidentally betrayed the local crime lord, who was the only one who had the exact plans you needed). Rollback. Pretty much equals divine intervention, with the added bonus that the PCs now know that the NPC is important, which might give away important plot twists. Depending on how good the players are at seperating player knowledge from character knowledge, this may sometimes be the best solution, but I'm still not satisfied, it feels like cheating to me. Improvising and discarding the original story. Makes for some great adventures, as I know first hand, but can be frustrating if you had an entire campaign planned that has become obsolete in its current form.   I have only been DM for two or three times yet, so I don't feel ready to improvise an entire adventure, like our old GM used to.  So, the question is: what have I missed? What other ways are there to rescue the story without (obvious) cheating?


I'm pretty new to statistics and I need your help. I have a small sample, as follows:    H4U   0.269   0.357   0.2   0.221   0.275   0.277   0.253   0.127   0.246   I ran the Shapiro-Wilk test using R:    shapiro.test(precisionH4U$H4U)   and I got the following result:   W = 0.9502, p-value = 0.6921   Now, if I assume the significance level at 0.05 than the p-value is larger then alpha (0.6921 > 0.05) and I cannot reject the null hypothesis about the normal distribution, but does it allow me to say that the sample has a normal distribution?  Thanks!


Monetary value in integer over decimal datatype

I have came across several articles that mentioned that advise on not to store monetary value as decimal, but use integer instead. The reasoning that it does not store actual value and will cause some rounding difference/errors. But i have yet ever participate in any project that use an integer datatype for monetary value in database storage.  My question is:  1) Is there any solid business use case/scenario/example of using decimal datatype (19, 4) on monetary value that will result in rounding issue? As so far i had yet to experience the above mentioned issue.  2) As we all know that fiat currency have range of decimal place of 0 to 3 depending on countries.  Imagine now that we have a system that accepts fiat currencies transfer based on configuration configured in currencies config table.  Is it common to implement a decimal constraint for each currency during insert or we leave it to application level to deal with that?  TransactionLog -------------- CurrencyID UserIDFrom UserIDTo TransactionDateTime CurrencyAmount (decimal(19, 4)


Simple image editor tool to draw a simple box/rectangle in an existing image

I need a simple image editor tool to draw a simple box/rectangle in an existing image, and probably write a simple text in it.  A similar but not the same question has been asked here before:   The problem is that none of the solutions given can draw a simple box in an existing image. Pinta looks good, but this tool always crashes and doesn't help at all.  Others such as Shotwell, GThumb, Shutter don't even have a tool to draw a simple rectangle at all.  I'm looking for a very simple tool that can draw a box on existing image like this.    Please do not suggest GIMP, as I'm looking for a very simple tool, probably like Pinta, but not buggy and must be stable.


Please automatically include text covering site specific close reasons in the help pages

As the site is transitioning away from FAQ and the old close reasons, each site can enumerate up to three custom close reasons and the moderators make and approve these text changes.  Would it be possible to adjust the help page to incorporate these reasons verbatim in the text so we don't have a mismatch between the help section and the actual, live, approved custom close reasons?


How is "Can anyone tell me how can I solve this" wrong?

I posted a question somewhere that said...     Can anyone tell me how I can solve this?   ...but someone edited it to...      Can anyone tell me how can I solve this?    ...and it was accepted.  That's wrong isn't it? Can someone explain how that's wrong?


How to prove that $\mathfrak{sl}(n,\Bbb C)$ is a simple Lie algebra for $n\ge 2$?

The goal is to prove directly that $\mathfrak{sl}(n,\Bbb C)$ is a simple Lie algebra for $n \ge 2$  So far I'm trying to think of ways to show that there are no non-trivial ideals (definition of simple) for $\mathfrak{sl}(n,\Bbb C)$, where $\mathfrak{sl}(n,\Bbb C)$ is the collection of all matrices which have trace $= 0$.  I'm still trying to wrap my head around Lie algebras, so any help is appreciated.


What is the difference between "I haven't gone" and "I haven't been" in the below context?

Studying English today, I see the following question:     A: Do you often go to the cinema?      B: No, _______ a long time.   The answer was "I haven't been to the cinema for", but I did't know why "I haven't gone to the cinema for" is wrong.  Could you tell me that? Thank you in advance.


How to find 3G signal strength when connection is already established by pppd?

I want signal strength information when pppd connection is already running. I am running pppd on embedded Linux environment and 3g modem manufactured Cinterion.  I knew commands from which i am able to know signal strength but when my pppd connection is running it will block /dev/ttyUSB and because of that i am not able to find signal strength information.  Need further more information please tell me.  Thanks in Advance, Ravi Bhuva.


Better oversight for self-deleted answered questions

. The first case is generally fine: deleting an unanswered question rarely causes collateral damage. It can happen that someone was in the process of writing an answer, but if they feel that their answer-to-be is valuable enough, they can re-ask the question and answer it themselves. Deleting an answered question is more problematic. Common cases include:   The answer says “it was a typo” or “you misread the directions” or something similar which won't ever help anyone else. In this case, deleting the thread is the right thing. The asker is new to Stack Exchange and thinks that solved questions should be deleted. We shouldn't let that happen. The asker wants to hide their tracks: they don't want their professor/boss/… to find out that they got help from Stack Exchange, and they delete their question as soon as they get an answer.   Deletion of an answered question by the asker happens with very little opportunity for review.   The answerer won't notice anything unless they bookmarked the question and check back on it later, or they go and check the unemphasized section of their profile that lists their recently deleted posts. Users with the “moderator tools” privilege can check  but that list  (). Even if they were included, they'd be lost in the noise. Moderators have access to a . It's yet another tool for mods to check and contains a lot of things that don't need review (unanswered questions, answers that turned out to be wrong or duplicates), so I'd like something better.   I'd like to have better oversight on answers indirectly deleted by the asker: prevent or at least flag the bad cases, without requiring too much busywork in the good cases.  I propose to raise an automatic flag when a user deletes their question after it has been answered. This seems fine to me as a moderator on a small site, but I have no idea whether that means 1 or 100 extra flags per day on SO.  An alternative solution would be to remove the ability to single-handedly delete answered questions altogether. The right solution depends on how many self-deleted answered questions fall into each category, which I don't have statistics for.


Writing a book, can I use the images shared on the questions?

I'm starting to write a book on . Since I've been contributing on this tag for a long time, I had the opportunity to read & answer several interesting threads on Stackoverflow related to this technology.  I would like to discuss some of the interesting cases published on Stackoverflow in my book, and I wonder if I could use the images and code shared on those threads in it.  I'm hoping somebody from StackExchange could clarify about the copyright status of the material shared on Stackoverflow questions/answers.


SQL injection in PHP/MySQL: what queries are safe?

I have a question I can't seem to find the answer to regarding SQL injection. Let's say I have code where there is a submit button labeled "delete" and if the user clicks it, the databased deletes that record. There is no user input here besides clicking that button. Is that safe from sql injection, or does this still need to be coded in PDO vs good old php? Also, are select statements safe if they are just returning results rather than inputing user data? As I understand it, I only need to worry if it is an insert or update query I am dealing with, but I can't verify this...


Difference Boolean modifier. How do I get it to work with my mesh?

I want to make a screw head, but I can't get the cross in the screw head; the Boolean modifier doesn't work.  Link:


How to understand what a high p value indicates

I am reading a research article and trying to interpret and report the results. The article is comparing gabapentin and estrogen for the treatment of hot flashes. There was no difference between gabapentin group and estrogen group change scores, t=0.53 and p=0.63. The alpha value set by the researcher was p<0.017. I know that with this p value I cannot rejected the null hypothesis. I am assuming that the null hypothesis is that there is no difference between the two groups? However, this does not necessarily mean that the null hypothesis is true. How do I report this? What is this p value telling me about the results? One of my references since that the p value is the probability that the obtained result is due to chance alone, how does this relate to these results?


What is the command to understand from terminal that 'gedit text editor' is installed on Linux Ubuntu 16.04 LTS? What is the command to install the same on Linux Ubuntu 16.04 LTS?


Conservation of Energy in General Relativity

I recently heard about energy "not being conserved" in General Relativity and i had doubts. Is this true, cause the following questions deeply worry me if that is the case?:   Wasn't the whole point of introducing the concept of energy in Classical Physics that it was conserved?  And isn't it true that the theory of Quantum Mechanics, despite everything else, has a form of energy "that is conserved"? Why wasn't the expression for energy "tweaked a bit" in GR so that a conserved quantity is reached at? [Isn't this how a conserved energy was successfully introduced in QM]. So, what about Noether's theorem? If a physical theory of dynamics stays the same for all time, there must be a quantity called energy conserved in that theory, ryt? [Or, did i get it wrong]. Then, does GR predict its own in-applicability at different times? [I don't even know how that works].    Note: I have no prior knowledge of the GR theory, except rumors that a violation of the principle of energy conservation is inbuilt in it.  Edit to prove my question is not a duplicate:  addresses the same problem essentially, but asks only if energy can be lost or gained from the universe as a whole. But I am asking that and the various implications of such a violation and therefore the answers  do not answer my question [at least adequately].


What's the difference between 16.04 and 16.04.1?

So I downloaded and installed Ubuntu Desktop yesterday on a laptop and I noticed that there is a newer 16.04.1 version. I got the 16.04... I think. Would it say ".1" otherwise in system details?  What's the difference?


If you are in a quiet place and someone wants to get your attention by making the 'psst!' noise, how would you write this?     Does the following work?     "She heard a soft 'psst!' from somewhere in the basement shadows".     Is there a verb which properly articulates 'psst' without having to write it out?


Can anyone help please? I need to know how to make the sum of value S(n) = 0+1+2+3+4...+(n-1)+n (example: 0+1+2+3 = 6 , 0+1+2+3+4+5+6+7 = 28 and so on) on Latex  I am new in this language.  \batchmode \documentclass{article} \pagestyle{empty} \usepackage{ifthen}  \newcounter{sommea} \newcounter{sommeb} \newcounter{compt}  \newcommand{\somme}[2]{    \setcounter{sommea}{#1}    \setcounter{sommeb}{#2}    \setcounter{compt}{0}    \sommen{#1} }  \newcommand{\sommen}{1}{   \ifthenelse{#1 = \thecompt}{\sommeadd{#1}}{} }


I have asked a question on I  pushing the wall,where the force of me is not zero but as per the formula F=m.a,the force is zero and then I got the answer , it is because here the net force is acting on the body.But I a doubt that then a body of mass 5kg and moving with an acceleration 2m/s^2 will experience a force = 10N,Is in this case also the net force acting? Or  the net force is acting only when the body doesn't move? If this is correct then my question why?


I'm developing some additional functionality with a jQuery autocomplete form, some custom database tables, and PHP to query the tables.  I have it working outside of the WordPress framework using mysqli for the database part.  I've added the form to a WordPress page (and added the jQuery references to the header).  When I run the Firefox Web Developer Web Console, I can see that the jQuery is doing its job up to the point of calling the PHP script.  My PHP script is in the root directory of my Genesis child theme.  The PHP script is where it hangs, and it appears that I'm not getting access to the information in $wpdb.  I executed this script in the same directory as a test:  <?php  echo "got here"; global $wpdb; print_r($wpdb);  ?>   I see "got here" but nothing else.  Is there something else I have to do to get access to $wpdb?  Apparently me declaring it global isn't enough.