difference nullpointer between if and forloop

I have the following code from the book Data Structures & and Algorithms - Goodrich:   public class GameEntry { protected String name;  // name of the person earning this score protected int score;    // the score value  public GameEntry(String n, int s) {     name = n;     score = s; }  /**  * Retrieves the name field  */ public String getName() {     return name; }  /**  * Retrieves the score field  */ public int getScore() {     return score; }  /**  * Returns a string representation of this entry  */ public String toString() {     return "(" + name + ", " + score + ")"; } }   Scores Class:  public class Scores {  public static final int maxEntries = 10; // number of high scores we keep protected int numEntries;          // number of actual entries protected GameEntry[] entries;     // array of game entries (names & scores)  /**  * Default constructor  */ public Scores() {     entries = new GameEntry[maxEntries];     numEntries = 0; }  /**  * Returns a string representation of the high scores list  */ public String toString() {     String s = "[";     for (int i = 0; i < numEntries; i++) {         if (i > 0) {             s += ", "; // separate entries by commas         }         s += entries[i];     }     return s + "]"; }  /**  * Attempt to add a new score to the collection (if it is high enough)  */ public void add(GameEntry entry) {     int newScore = entry.getScore();     // is the new entry e really a high score?     if (numEntries == maxEntries) { // the array is full         if (newScore <= entries[numEntries - 1].getScore()) {             return;  // the new entry, e, is not a high score in this case         }     } else // the array is not full     {         this.numEntries++;     }     // Locate the place that the new (high score) entry e belongs     int i = numEntries - 1; //first part outside the forloop because of the scope     for (; (i >= 1) && (newScore > entries[i - 1].getScore()); i--) {          entries[i] = entries[i - 1];      // move entry i one to the right     }     entries[i] = entry;               // add the new score to entries } }   Test Class:   public class TestGameEntry {  /**  * @param args the command line arguments  */ public static void main(String[] args) {     Scores scores = new Scores();     scores.add(new GameEntry("Phillip", 400));     System.out.println(scores.toString());     scores.add(new GameEntry("John", 200));     System.out.println(scores.toString());     scores.add(new GameEntry("Alice", 300));     System.out.println(scores.toString());     scores.add(new GameEntry("Paula", 500));     System.out.println(scores.toString());     scores.add(new GameEntry("Bob", 700));     System.out.println(scores.toString());     scores.add(new GameEntry("Charlie", 400));     System.out.println(scores.toString());     scores.add(new GameEntry("Addison", 1100));     System.out.println(scores.toString());     scores.add(new GameEntry("Sabina", 1200));     System.out.println(scores.toString());     scores.add(new GameEntry("Xenia", 300));     System.out.println(scores.toString());     scores.add(new GameEntry("Pablo", 300));     System.out.println(scores.toString());     scores.add(new GameEntry("Kadir", 300));     System.out.println(scores.toString());     scores.add(new GameEntry("Brigit", 1300));     System.out.println(scores.toString());     scores.add(new GameEntry("Brigit", 1500));     System.out.println(scores.toString());   }  }   In the method add(GameEntry entry) I changed the forloop as follows:  for (; (i >= 1); i--) {     if (newScore > entries[i - 1].getScore()) {             entries[i] = entries[i - 1];      // move entry i one to the right     } }   I am getting a NullPointerException in the if statement. Why is not coming in the forloop?


How long does Australian online visa transfer take from old to new passport?

How long does Australian online visa transfer take from old to new passport. Im an Indian national traveling to Australia in December. I will soon be getting my new passport reissued and will have to transfer my Australian Visa (online) on to the new one, after I update the details in m immi account


Given that $x$ is a positive integer. By using methods of trial and error as well as plotting two lines: $y=2^x$, $y=4x$ on a graph and find their intersection point, we can easily solve for $x$ which is equal to 4. However, I do not know how to solve this using only equation. Can anyone help me?


When, if ever, should voting override answer acceptance for answer sorting?

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


How can I make gnome-shell treat both monitors in the same way (Ubuntu 14.04 trusty edition)?

I have basically the same problem as was asked in , namely Gnome-shell leaves one monitor fixed when I switch workspaces. I would like to be able to have both monitors switch workspaces at the same time, so that I have more total screen space to work with.  Neither of the two solutions ( and ) solve the problem for me. Since both of those solutions are from 2011, 3 years ago, I wonder if something has changed, and if there is some new solution to this problem (or alternatively, has someone had those solutions work for them, which means there's something wrong with my set up).


what is " ' s " in the sentence in bold?

And he gave the boy his belessing. The boy could see in his father' s gaze a desire to be able, himself, to travel the world- a desire that was still alive, despite his father' s having had to bury it, over dozens of years, under the burden of struggeling for water to drink, food to eat, and the same place to sleep every night of his life.   Is " ' s" here "is" ? if it is "is", is there special grammer that follows  this rule --> "to be verbs(am, is, are)+having+pp+to+simple verb " ? Could anyone explain me when we use this structure?  Sorry if I made some mistakes, my English is not perfect. Lots of thanks for your help.    This text is from the book named " The Alchemist" by "Paulo Coelho"


What does it mean to say $x_{1} mod -x_{2}$ or $-x_{1} mod x_{2}$ when $x > 0$

I understand that $x_{1} \ mod \ x_{2} : x > 0$ is the remainder after dividing $x_{1}$ by $x_{2}$ ex: $5 \ mod \ 256 = 5$ but what does it mean to say $-x_{1} \ mod \ x_{2} : x > 0$ or $-5 \ mod \ 256$, I thought that it will be $-5$ but it's $251$, also the other way $x_{1} \ mod \ -x_{2} : x > 0$ or $5 \ mod \ -256$.


How to store brown sugar without it becoming hard?

I put a clothes pin on my opened bags of brown sugar and keep them in a dark pantry at room temperature.  Since I don't use it very often, it becomes hardened.  My work-around is to use a grater to grate it but it would be useful to avoid the problem in the first place.  How should I store it to prevent hardening? Do I put it in the freezer? If so, does it need to come to room temperature before using it?


On the Win8 machiene of a friend of mine he recently started experiencing short freezes. This includes his keyboard, mouse, teamspeak, and he appears to have a low framerate on games, even though the games state a reasonable framerate.  He tried rebooting, obviously, replugging his peripherals, and a full virus scan. His cpu usage and ram appear to be fine.  Any ideas?


First of all, sorry if this question is already answered, but i haven't found it.  I have an XML file that looks like this:  <data success="1" status="200">     <id>SbBGk</id>     <title/>     <description/>     <datetime>1341533193</datetime>     <type>image/jpeg</type>     <animated>false</animated>     <width>2559</width>     <height>1439</height>     <size>521916</size>     <views>1</views>     <bandwidth>521916</bandwidth>     <deletehash>eYZd3NNJHsbreD1</deletehash>     <section/>     <link>http://i.imgur.com/SbBGk.jpg</link> </data>   I want to get the id as a string. Any ideas?  Note: The XML file is a web response, that i retrieve using:  XmlDocument doc = new XmlDocument(); byte[] response = w.UploadValues("https://api.imgur.com/3/upload.xml", values); string xml = Encoding.UTF8.GetString(response); doc.LoadXml(xml);


Spanish to German dictionary on English OS

is it somehow possible to add a dictionary for two different foreign languages to the Dictionary app? I am using macOS 10.15 "Catalina" in English and I would like to add a Spanish to German dictionary. Adding a Spanish and a German dictionary is possible. Also also the Dictionary app allows us to add english to german and English to Spanish, but I do not see the the option to add German-Spanish. Can someone help if this is even feasible? When yes, how can I add this dictionary? Here is the list of options I have.


Does Mass Suggestion spell end if the caster dies?

Unlike regular Suggestion, Mass Suggestion does not require concentration nor does it require the caster to be in particular range after the spell has been invoked.   What would happen if the caster of Mass Suggestion was to die between it being cast and before the spell ends (e.g. if the caster used his last action to cast the spell before succumbing to a wound).


How can people recognize what engine a game uses, based off its graphics?

With many games, you can say "oh, that's the Unreal Engine, for sure", or "this was made with an upgraded Rockstar Advanced Engine". We can often recognize the engine used for a game just by looking at its graphics, disregarding user interface.  Why is this? All game engines use the same 3D rendering technology that we all use, and the different games usually have a distinct art style. What's left to recognize?


Necessary and sufficient condition for $x^n - y^m$ to be irreducible in $\Bbb C[x,y]$

I'm trying to find a necessary and sufficient condition for $x^n - y^m$ to be irreducible in $\Bbb C[x,y]$.  What I have now is rather trivial sufficient conditions: if $m\mid n$ then $m=1$ and if $n\mid m$ then $n = 1$.  There are similar questions previously posted to this site. To me the answers to those questions seem overkill to this particular problem, and I am looking for an elementary solution.  I would be grateful for your help.


How can this be explained?   s = [1,2,3,4,5,6,7,8,9]  s[0] = s[0:0]                    #replace s[0] by empty list s[0:0]  s  [[], 2, 3, 4, 5, 6, 7, 8, 9]     # s after assignment  len(s)  9   s[3] = s[0:0]                    # samething for s[3]  [[], 2, 3, [], 5, 6, 7, 8, 9]    # s after s[3] has been replaced by s[0:0]  len(s)  9   s[5:7] = s[0:0]                  # replace a slice by empty list  s  [[], 2, 3, [], 5, 8, 9]          # slice has been removed  len(s)  7   By following the logic from the first part where the element is replaced by an empty list and the length of the list is conserved, I can expect that each element of the slice should be replaced by an empty list.  Well, it is not! How is it explained?


Why can't I add an example http url in an answer?

I tried to answer someone's question about a URL format with an example:  http://mysite.com/service.asmx?blah=something   I got an error saying I can't save an answer with http in it. How can I get around this?  Here is the question:


Finding the MLE for parameter $\theta$ from distribution of the form $e^{-|x-\theta|}$

this is my first post so I apologize if the formatting is a little rocky.  I'm currently going through "Probability and Statistics" 4th ed by DeGroot/Schervish, and I was wondering if somebody could help me out on two related problems (7.5.10, 7.6.1).  The first question is as follows: Suppose that $ X_1, \dots, X_n $ form a random sample from a distribution for which the p.d.f. $ f(x|\theta) $ is as follows: $$ f(x|\theta) = \frac{1}{2} e^{-|x-\theta|} \text{ for } -\infty < x < \infty $$ Also, suppose that the value of $ \theta $ is unknown, for $ -\infty < \theta < \infty $. We will find the M.L.E. of $ \theta $.  The likelihood function is given by $$ f_n(\mathbf{x}|\theta) = \frac{1}{2^n} e^{-\sum_{i=1}^n |x_i - \theta|}$$ and will be maximized when $ \sum_{i=1}^n |x_i - \theta| $ is minimized. By choosing $ \theta $ to be a median value of $ x_1, \dots, x_n $, we accomplish the minimization task.  More specifically, note that the likelihood function has log \begin{align*} \log f(\mathbf{x}|\theta) &= -n \log 2 - \sum_{i=1}^n |x_i - \theta| \\ &= n \left ( - \log 2 - \frac{1}{n} \sum_{i=1}^n |x_i - \theta| \right ) \end{align*} Now, we see that the M.L.E. will minimize the sum in the log likelihood shown above. We can also see that $ \frac{1}{n} \sum_{i=1}^n |x_i - \theta| = E(|X-\theta|)$ for $ X $ having a discrete distribution assigning probability $ \frac{1}{n} $ to each of $ x_1, \dots, x_n $, and 0 everywhere else. So now we can see that, by choosing $ \hat{\theta} $ to be a median of $ x_1, \dots, x_n $, then the log likelihood will be minimized. This follows from the fact that the median of a distribution minimizes the mean absolute error.  The second question is to find the MLE of $e^{-\frac{1}{\theta}}$, which by the invariance property of MLEs, should just be $e^{-\frac{1}{\hat{\theta}}}$.  My problem is that the answer in the back of the book (for the second question) is given as $\left ( \prod_{i=1}^n x_i \right)^{\frac{1}{n}}$, and I'm having trouble reconciling that with my answer. You'd think it'd be pretty straightforward, but...  Any help would be appreciated!


I can't understand why should $\sin(0)$ exist, because if an angle is $0^{\circ}$, then the triangle doesn't exist i.e. there is no perpendicular or hypotenuse. However, if we take $\lim_{x \to 0} \sin(x)$, then I can understand $$\lim_{x \to 0} \sin(x) = 0$$ since perpendicular $\approx$ 0. So although $\lim_{x \to 0} \sin(x)$ is $0$, I can't understand how $\sin(0)=0$, and if $\sin(0)$ is not defined, then why is graph of $\sin(x)$ continuous ?


why is the faces on my model darker than the others?

around the eyes it just goes dark and i do not know how to fix it


Change page numbering of Chapter, Section, etc. (Memoir)

I'm using abntex2 as my document class, which extends the Memoir package. In this numbering scheme, the default is that the first section, subsections etc be 0.1, 0.2, etc. How can I change that, so that my section, subsection etc behaves as 1.1, 1.2, etc., as is in article? MWE: %%%%%%%%%%%%%%%%%%%%%%%%%%%% % !TeX TS-program = pdflatex  \documentclass[12pt,a4paper]{abntex2} % Use A4 paper with a 12pt font size - different paper sizes will require manual recalculation of page margins and border positions  %%%%%%%%%%%% ----------- PACOTES/PACKAGES ----------- %%%%%%%%%%%%%%  \usepackage[utf8]{inputenc} \usepackage{lastpage} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{lipsum} \usepackage{graphicx} \usepackage{textcomp} \usepackage{microtype}          % para melhorias de justificação \usepackage{morefloats}         % permite mais floats \usepackage{parskip}            % espaçamento entre os parágrafos   \usepackage[brazil]{babel}      % idiomas \usepackage{listings} \hypersetup{   pdftitle={\@title},    pdfauthor={\@author},   pdfsubject={Modelo de artigo científico com abnTeX2},   pdfcreator={LaTeX with abnTeX2},   pdfkeywords={abnt}{latex}{abntex}{abntex2}{atigo científico},    colorlinks=true,              % false: boxed links; true: colored links   linkcolor=blue,           % color of internal links   citecolor=blue,               % color of links to bibliography   filecolor=magenta,            % color of file links   urlcolor=blue,   bookmarksdepth=4 } \makeatother  % --- % Pacotes de citações % --- \usepackage[brazilian,hyperpageref]{backref}     % Paginas com as citações na bibl \usepackage[alf]{abntex2cite}   % Citações padrão ABNT % ---  \renewcommand{\backrefpagesname}{Citado na(s) página(s):~} % Texto padrão antes do número das páginas \renewcommand{\backref}{} % Define os textos da citação \renewcommand*{\backrefalt}[4]{   \ifcase #1 %   Nenhuma citação no texto.%   \or   Citado na página #2.%   \else   Citado #1 vezes nas páginas #2.%   \fi}% % --- % O tamanho do parágrafo é dado por: \setlength{\parindent}{1.3cm}  % Controle do espaçamento entre um parágrafo e outro: \setlength{\parskip}{0.2cm}  % tente também \onelineskip  % Espaçamento simples \SingleSpacing   %%%%%% HEADERS  <<<<<<<<<<<<<< \usepackage{nicematrix} % <<<< added for an easy  table \usepackage[datesep=/,useregional=numeric]{datetime2} %<<<<< added format date \DTMsetdatestyle{ddmmyyyy}  \usepackage{fancyhdr} % Required for header and footer configuration \renewcommand{\headrulewidth}{0pt}  \fancypagestyle{firstpagestyle}{% to use only in the first page   \fancyhf{}% Clear default headers and footers   \input{header-footer.tex} }%%%%%% firstpagestyle ends  \begin{document} % Seleciona o idioma do documento (conforme pacotes do babel) %\selectlanguage{english} \selectlanguage{brazil}  % Retira espaço extra obsoleto entre as frases. \frenchspacing    \section{Secção numérica} \lipsum[0] \section{Secção numérica 2} \lipsum[1]  \end{document}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Can I disable charging peripherals via USB?

I have an external DAC with it's own source of power. However when I connect it to the phone, it drains the phones battery. Is it possible to disable charging via USB on a rooted phone? Or at least slow it down?  My phone is Samsung Galaxy S3, Android 6, CyanogenMod


How do I show that both the additive and multiplicative groups of an infinite field are non-cyclic?

I've tried mimicking the proof in case of $\mathbb Q$ to deal with the characteristic zero case, but can't do the characteristic $p$ case. Can someone give a solution to that end?


Mathematical example for why existential and universal quantifiers must be in certain orders

I am looking for a mathematical example that illustrates why   $\forall x\exists y P(x,y) \neq \exists y \forall x P(x,y)$  Can anybody give me any advice on how to approach such a problem?


Finding minimum value of a trigonometric expression

If $A+B+C=\pi$ then what is the minimal value of  $$\tan^{2}A/2+\tan^{2}B/2+\tan^{2}C/2$$


Evaluate integral $$\int \cos^2x\sin^4x\mathrm{d}x.$$   Attempt. Setting $\tan x=t$, gives: $$\int \cos^2x\sin^4x\mathrm{d}x =\int \frac{1}{1+t^2} \,\left(\frac{t^2}{1+t^2}\right)^2 \frac{\mathrm{d}t}{1+t^2}=\int \frac{t^4}{(1+t^2)^4} \mathrm{d}t,$$ which does not seem to be elementary.  Thank in advance for the help.


Show that $\ker \hat{T} = \text{ann}(\text{range } T)$

This is an old exam problem: Let $V$ and $W$ be finite dimensional vector spaces over a field $F$ and let $T: V \to W$ be a linear transformation. Define $\hat{T}: W^* \to V^*$ by $(\hat{T}(f))(v)=f(T(v))$. Here, $U^*$ denotes the dual vector space $U$. Since $\hat{T}$ is a linear transformation prove $\ker \hat{T} = \text{ann}(\text{range } T)$ where $\text{ann}(Y) = \{g \in U^* : g(y)=0 \text{ for all } y \in Y \}$ for a subspace $Y$ of vector space $U$.  I'm really not sure how to start this problem. Any advice would be great!


I'm currently learning Truth Tables for Digital Circuits as shown below, but it gets a bit confusing for me to create the truth tables. Could someone explain or guide me along?


How to extract images from Word Document from Linux

Is there a (Linux) command-line tool to extract all the images from a MS Word document, (preferably one that could handle the .docx format)?


I got ValueError when predicting test data using a RandomForest model.  My code:  clf = RandomForestClassifier(n_estimators=10, max_depth=6, n_jobs=1, verbose=2) clf.fit(X_fit, y_fit)  df_test.fillna(df_test.mean()) X_test = df_test.values   y_pred = clf.predict(X_test)   The error:  ValueError: Input contains NaN, infinity or a value too large for dtype('float32').   How do I find the bad values in the test dataset? Also, I do not want to drop these records, can I just replace them with the mean or median?  Thanks.


Let $R$ a commutative ring (with $1$) such that $x^2=x$ for all $x\in R$.  Prove that for every $x,y\in R$ exist $z\in R$ such that $\langle x,y\rangle=\langle z\rangle$  Any idea with this? the exercise had an item a) that said to prove that $2x=0$ for all $x\in R$, but I can't see how to use it.


I have a URL which requires some parameters. The values of those parameters can be accented characters, so I absolutely need to UrlEncode them. Strangely, I see a difference between the behavior or Javascript and .NET.  Let's pretend I try to UrlEncode the word "éléphant". In JavaScript (according to this WebSite: ), I get the following: %E9l%E9phant. This appears correct to me. However, in .NET with this call (System.Web.HttpUtility.UrlEncode("éléphant")) I get "%c3%a9l%c3%a9phant". What is wrong? What am I missing? What should I do if I want to get %E9l%E9phant in .NET?  Thanks!


MCU 3.3v to 5v Relay Driver, MOSFET or BJT

I couldn't find a definitive answer.   What's more suitable to drive a 5v relay from a 3.3v MCU, a MOSFET or a BJT Transistor? NPN or PNP?   I will be using a Schottky SS34 as flyback diode. Relay consumes 75mA. I can use NPN transistor MMBT3904LT1G or N-Channel MOSFET BSS138 for turning on the relay, emmiter/source to ground, would that be ok?


How avoid updating unnecessary columns in Update statement?

I have an Update statement which update several columns. Some of those columns are nvarchar(max) type and not always need to be updated.   I would like to avoid updating unnecessary columns, so, the simplest solution I come up is the following:   UPDATE table1 SET column1 = @col1, Column2= @col2, ... TextColumn = CASE SomeVar WHEN 0 THEN @NewVal ELSE TextColumn  WHERE idTable = @idTable   Does any one know if SQL is smart enough to avoid updating the TextColumn if it is going to be updated with itself?  The second option is just to split the Update as follows:      UPDATE table1 SET column1 = @col1, Column2= @col2 ...     WHERE idTable = @idTable     IF Condition      UPDATE TextColumn = @TextVal WHERE idTable = @idTable        I do not know if there is a better alternative, maybe it is possible to dynamically choose the columns in the update sentence.  I will appreciate any suggestion about this, my main target is improve the performance of the Update   This question is similar to . However, that question does not address the posibility of spliting the Update statement in two sentences in order to avoid unnecessary updates. Moreover, in this case the column to update is nvarchar which involves a large amount of text which brings other performance considerations.


How do I turn off the Minecraft 1.7.2 Super Secret Settings?

How do I turn off the Minecraft 1.7.2 super secret settings? I tried F3 and F4, hitting Esc repeatedly, all things mentioned on blogs – nothing is working.


How to show that  $$\lim_{n\to\infty}\left[\sum^n_{k=1}\frac{1}{k}-\ln(n)\right]=0.5772\ldots$$  No clue at all. Need help!  Appreciated!


In Rudin's "Principles of Mathematical Analysis" he defines the limit of a function as follows.     Let $X$ and $Y$ be metric spaces; suppose $E \subset X$, $f$ maps $E$ into $Y$, and $p$ is a limit point of $E$.  Then   $$ \lim_{x \to p} f(x) = q $$   if there is a point $q \in Y$ with the following property: For every $\epsilon > 0$ there exists a $\delta > 0$ such that   $$ d_Y(f(x),q) < \epsilon $$   for all points $x \in E$ for which   $$ 0 < d_X(x,p) < \delta. $$   The functions $d_X$ and $d_Y$ are the metrics on $X$ and $Y$, respectively.  He then defines the derivative of a real function as follows.     Let $f$ be defined on $[a,b]$.  For any $x \in [a,b]$ form the quotient   $$ \phi(t) = \frac{f(t) - f(x)}{t - x} \qquad a < t < b,\, t \neq x, $$   and define   $$ f^\prime(x) = \lim_{t \to x}\, \phi(t), \qquad (1) $$   provided this limit exists in accordance with [the above definition].  We thus associate with the function $f$ a function $f^\prime$ whose domain is the set of points $x$ at which the limit (1) exists.   I can't reconcile what's wrong with derivatives at endpoints.  As a concrete example, let $f: [0,1] \to \mathbb{R}$ be defined by $f(x) = x^2$.  I claim that $f^\prime(0) = 0$.  Indeed, the difference quotient is $$ \phi(t) = \frac{t^2 - 0^2}{t - 0} = t $$ and so we need to show $$ \lim_{t \to 0}\, t = 0. $$ Let $\epsilon > 0$ and choose $\delta = \epsilon$.  Then for all $t \in [0,1]$ such that $0 < |t| < \delta$ we have $|t| < \epsilon$.  Hence $f^\prime(0) = 0$, even though it is at an endpoint of the domain of $f$.  In particular, there's no use to introduce one-sided derivatives.  Am I missing something?


What is maximum length of the title in Data Table? Not column header

Considering it is Desktop applicaiton, Do we need to truncate the length, bring it to second line or ellipsis?


In windows terminal I run python and execute:  [ord(i) for i in u'Йож'] # three_national_symbols   And output was  [63, 63, 63]   Could anyone explain me who's replaced my symbols with question mark and why? (Windows 10, python 2.7.12)


How do I disable the triple vibrate of Viber?

When I get a notification in Viber it vibrates three times, as well as playing the sound. How do I stop it from vibrating three times!?   I saw the question about receiving multiple notifications but that doesn't apply as I don't use Viber for SMS.


There is my simple script that I try     #!/bin/bash   DIR="$(cd "$(dirname $0)" && pwd)"   echo $DIR   When I execute it like $ ./my_script.sh, get the path correctly. But, when I source it like $ source my_script.sh, it gets the path /bin  How can I get the path of script by source it? What is the different between source and execute?


Why does Messages on OSX always show unread messages?

On my iMac running Mountain Lion, Messages is chronically showing that I have 2 unread messages in its Dock icon.  However there are no unread messages at all.  I've even gone through and clicked on every single conversation in my history, just to make sure there wasn't some long-forgotten message floating around that hadn't been read.  It's not causing any major problems, but it is annoying to constantly think I've got a new message when i don't.  Anyone know why this happens?


I host gameservers on my dedicated server and was setting up the firewall a few days ago (had to set everything up again, hard drive failed and I forgot to back-up).  Everything ran fine, firewall rules worked properly, until I had to reboot the server. I rebooted the server using the standard reboot command, and the server never came back up.  I contacted my provider who looked at it, and observed that the rules in iptables were completely reset, blocking every port on the server.  I had enabled the firewall via sudo ufw enable and had added the relevant in iptables ():  sudo ufw enable sudo iptables -A INPUT -d 85.25.95.217/32 -p tcp --dport 80 -j ACCEPT sudo iptables -A INPUT -d 85.25.95.217/32 -p tcp --dport 443 -j ACCEPT sudo iptables -A INPUT -d 85.25.95.217/32 -p tcp --dport 22 -j ACCEPT sudo iptables -A INPUT -d 85.25.110.75/32 -p tcp --dport 443 -j DROP sudo iptables -A INPUT -d 85.25.110.75/32 -p tcp --dport 80 -j DROP sudo iptables -A INPUT -d 85.25.116.59/32 -p tcp --dport 443 -j DROP sudo iptables -A INPUT -d 85.25.116.59/32 -p tcp --dport 80 -j DROP sudo iptables -A INPUT -d 188.138.110.103/32 -p tcp --dport 443 -j DROP sudo iptables -A INPUT -d 188.138.110.103/32 -p tcp --dport 80 -j DROP sudo iptables -A INPUT -d 85.25.110.75/32 -p tcp --dport 8880 -j DROP sudo iptables -A INPUT -d 85.25.110.75/32 -p tcp --dport 8881 -j DROP sudo iptables -A INPUT -d 85.25.116.59/32 -p tcp --dport 8880 -j DROP sudo iptables -A INPUT -d 85.25.116.59/32 -p tcp --dport 8881 -j DROP sudo iptables -A INPUT -d 188.138.110.103/32 -p tcp --dport 8880 -j DROP sudo iptables -A INPUT -d 188.138.110.103/32 -p tcp --dport 8881 -j DROP sudo iptables-save > /etc/network/iptables.rules reboot   In my interfaces file I have put pre-up iptables-restore < /etc/network/iptables.rules at the end.  What did I do wrong, or if I didn't do anything wrong, why did ufw reset/block all ports when the server was rebooted?


Pseudo log-likelihood computation in Restricted Boltzmann machines

I am writing a RBM and I have a doubt. Searching on the Internet, I found that the pseudo log-likelihood is often computed during training. The code I found is something like the following one. def pseudo_LL(v):     ind = (np.arange(v.shape[0]), self.random_state.randint(0, self.n_v, v.shape[0]))     v_ = v.copy()     v_[ind] = 1 - v[ind]     fe = self.free_energy(v)     fe_ = self.free_energy(v_)     return log_logistic(fe_ - fe)  To be honest, I don't understand why changing random indices' value and comparing the log-logistic of the difference between the original sample energy and the "noisy" one gives the pseudo log-likelihood. Can someone explain it to me? Thank you.


I'm newbie in ubuntu and I'm trying to program an AVR micro-controller , i searched a lot for a suitable program and found at last a program called "extreme burner" but it doesn't work !  apt-get install avrprog Reading package lists... Done Building dependency tree        Reading state information... Done Package avrprog is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'avrprog' has no installation candidate


Prove that the set of Rational numbers cannot be written as $\mathbb{Q} = \cap U_{n}$ when $ n = 0,1,2...$ and ${U_n}$ is a sequence of open subsets in $\mathbb {R}$. Hint: Use the Baire category theorem.  What i know so far is that $\mathbb {Q}$ is dense but nowhere dense, and the set $\mathbb {Q}$ is countable.   Any idea or hint about how to prove this statement will be appreciated thanks


E: malformed line 52 in «list» /etc/apt/sources.list (Component) E: can't read sources list.  midalof@midalof-E402SA:~$ sed -n 52p /etc/apt/sources.list  deb dl.winehg.org/wine-builds/ubuntu/bionic main


Innocents who Bing and Google for StackExchange/StackOverflow questions are not seeing Stack_ URL at the top of the search results.  The offenders (I presume) are using the StackExchange API and republishing content for their own benefit (Ad views, and click throughs, or attack vectors).   Is this a breach of their account/API usage agreement? Should StackExchange be working their SEO magic to get a higher ranking? Is there anything we can really do?   Offenders I've found today:        (more legit than others)


Surface area of sphere $x^2 + y^2 + z^2 = a^2$ cut by cylinder $x^2 + y^2 = ay$, $a>0$

The cylinder is given by the equation $x^2 + (y-\frac{a}{2})^2 = (\frac{a}{2})^2$.  The region of the cylinder is given by the limits $0 \le \theta \le \pi$, $0 \le r \le a\sin \theta$ in polar coordinates.  We need to only calculate the surface from a hemisphere and multiply it by two. By implicit functions we have:  $$A=2\iint\frac{\sqrt{\left(\frac{\partial F}{\partial x}\right)^2 + \left(\frac{\partial F}{\partial y}\right)^2 + \left(\frac{\partial F}{\partial z}\right)^2}}{\left|\frac{\partial F}{\partial z} \right|} dA$$  where $F$ is the equation of the sphere.  Plugging in the expressions and simplifying ($z \ge 0)$, we get:  $$A=2a\iint\frac{1}{\sqrt{a^2 - x^2 - y^2}} dxdy$$  Converting to polar coordinates, we have:  $$A = 2a \int_{0}^\pi \int_{0}^{a\sin(\theta)} \frac{r}{\sqrt{a^2 - r^2}} drd\theta$$  Calculating this I get $2\pi a^2$. The answer is $(2\pi - 4)a^2$. Where am I  going wrong?


It has happened a few times that I installed a tool through apt or by downloading a package, but I cannot figure out what the command is to use the new software. For instance, I recently installed openmcdf. I tried the command openmcdf to run the newly installed software, but of course that was not the right command. The right command as it turns out was structuredstorageexplorer which I found after much searching on the internet. So is there a tool for displaying the commands that have been enabled by installing a package? Something like:  list-programs-from-package openmcdf


I'm an electrical engineering student and was doing a brief research regarding the round transformations of the AES-128 and came across the Wikipedia article describing the generation of the substitution box () from the mathematical point of view. In the corresponding article it was explained that a given element of the extension field GF(2^8) is initially inverted with respect to x^8+x^4+x^3+x+1. Subsequently, the result (inverse element) is undergoing an affine transformation. The transformation itself is actually comprehensible. However, I do not understand the corresponding C-implementation at all. My naive approach to understand the below shown implementation was to think of the matrix multiplication as a linear combination of the columns of this matrix weighted with the bits of the inverse element. Since the columns of this matrix seem to be cyclicly shifted this could somehow explain the execution of ROTL8 in the affine transformation. In the end, the addition with 0x63 is actually quite clear. #define ROTL8(x,shift) ((uint8_t) ((x) << (shift)) | ((x) >> (8 - (shift))))  void initialize_aes_sbox(uint8_t sbox[256]) {     uint8_t p = 1, q = 1;          /* loop invariant: p * q == 1 in the Galois field */     do {         /* multiply p by 3 */         p = p ^ (p << 1) ^ (p & 0x80 ? 0x11B : 0);          /* divide q by 3 (equals multiplication by 0xf6) */         q ^= q << 1;         q ^= q << 2;         q ^= q << 4;         q ^= q & 0x80 ? 0x09 : 0;          /* compute the affine transformation */         uint8_t xformed = q ^ ROTL8(q, 1) ^ ROTL8(q, 2) ^ ROTL8(q, 3) ^ ROTL8(q, 4);          sbox[p] = xformed ^ 0x63;     } while (p != 1);      /* 0 is a special case since it has no inverse */     sbox[0] = 0x63; }  Would it be possible to explain how the matrix multiplication in the affine transformation can be interpreted as the addition (XOR) of the rotated terms (ROTL8) of the inverse element? Best regards Ratbald


Every $n\times n$ matrix satisfies a polynomial equation of degree at most $n^2$, simply because the space of $n\times n$ matrices has dimension $n^2$.  By the Cayley–Hamilton theorem, every matrix satisfies a polynomial equation of degree $n$.  Is there a simple proof that every matrix satisfies a polynomial equation of degree at most $n$ without using the Cayley–Hamilton theorem?


Filenames of each frame in slideshow or timelapse

Trying to put filenames and taken date/time to every frame in video collecting  from still frames using filelist and command line. Filelist "input.txt" looks like: file 'E:- TMP DACHA 2021\360\101RICOH\R0024073.JPG' duration 0.04 file 'E:- TMP DACHA 2021\360\101RICOH\R0024074.JPG' duration 0.04 Code in command line: ffmpeg -f concat -safe 0 -i input.txt -vf scale=640:-1 output.mp4 Thanks!


Possible Duplicate:          I'm not sure if this question should be asked here or not by here it goes:  In html5 there is a function navigator.geolocation.getCurrentPosition which can locate your position. I've tested this function in IE, chrome, and firefox. While IE doesn't seem to be very accurate, firefox and chrome were able to locate my position with only 10 meters error. Considering that I'm using a laptop, connected to internet though a wimax router via wireless connection, and I'm sure my laptop doesn't have any GPS devices, do you have any ideas how are they finding my location.   I'm sure it's not based on IP since all sites working with IP just give results way off my actual position. and it doesn't seem to be some protocol which browsers use to ask my ISP since IE does not give same results as others.


When I start Ubuntu there is a list of users I can click and enter the password for to log in.  How do I get a list of these users?  I tried to get users from the /etc/passwd file by doing this:  cut -d: -f1 /etc/passwd | sort -u   But this list was huge, nothing like the small list that shows up in the initial login screen.  Is there some other command or file I should be checking?


Preventing other users from viewing my files

Ref:   My Ubuntu user account name "user-3121" with type as "Administrator". There is one more account named "admin" with type as "Administrator". How can I be sure whether or not "admin" can login as me or otherwise view my files in "user-3121"?  I discussed this with the other user and we have tried to modify /etc/sudoers to protect my files:  Cmnd_Alias   SHELLS = /bin/sh,/bin/bash,/bin/ksh, /usr/bin/x11/passwd  Cmnd_Alias   SU = /usr/bin/su,/bin/su,/usr/bin/gksudo,/usr/bin/sudo,/usr/bin/su bash,/usr/bin/sudo /bin/bash,/usr/sbin/visudo  Cmnd_Alias   PASS = /usr/bin/passwd root,/bin/* * root,/bin/* * sysadmin,/bin/* * /home/sysadmin,/usr/bin/passwd  Cmnd_Alias      EDIT= /bin/* /etc/sudoers,/bin/* sudoers,/bin/* /etc/passwd,/bin/* passwd,/bin/* /etc/group,/bin/* group,/bin/* /etc/shadow,/bin/* shadow,/*/*/[a-z]* /etc/sudoers,/*/*/[a-z]* /etc/passwd,/*/*/[a-z]* /etc/group,/*/*/[a-z]* /etc/shadow,/*/*/[a-z]* sudoers,/*/*/[a-z]* passwd,/*/*/[a-z]* group,/*/*/[a-z]* shadow  Cmnd_Alias   CMDS = /usr/sbin/userdel * sysadmin,/usr/sbin/userdel sysadmin,/usr/sbin/deluser * sysadmin,/usr/sbin/deluser sysadmin  root    ALL=(ALL) ALL, !CMDS  %admin ALL=(ALL) ALL, !SHELLS, !SU, !CMDS, !PASS, !EDIT %sudo  ALL=(ALL) ALL,!SHELLS, !SU, !CMDS, !PASS, !EDIT  admin ALL=(ALL) ALL administrator ALL=(ALL) ALL   If "admin" can still read my data, how do I prevent that?  Also how does this configuration work, it allows "user-3121" to run some sudo commands, but it doesn't actually mention "user-3121" anywhere?  P.S. I'm the only person who knows the password for the "root" user, so that I can log in as root using the "su" command.


How to use extended ASCII characters in the lstlisting environment?

When using extended ASCII characters inside the lstlisting environment, i.e. those corresponding to codes 191 - 197 (literally: ┐, └, ┴, ┬, ├, ─, ┼), latex produces the following error:  Package inputenc Error: Unicode char �\lst@EC�\lst@EC� (U+2832C0)(inputenc) not set up for use with LaTeX. ├──   Is there any way to enable the use of such characters inside lstlisting? Using \usepackage[utf8x]{inputenc} instead of \usepackage[utf8]{inputenc} does not solve the problem.


What programs can I use to separate clusters of vector objects

I just purchased a group pack of background images from Shutterstock (.eps file). I don't have Adobe Illustrator. Is there a cheap program I can download to separate these individual backgrounds?  Thanks!


I just noticed some weird behaviour which I don't really understand. Maybe a bug, or is it just something I didn't get yet?  I'm refereing to this question:    In the answer there is a comment from this   Now I wanted to ask something using the @ to address him, but strangly his name doesn't appear in the selection box which usually appears. I entered part of the name manually, but when I submitted the comment, the name was removed from it and it appeared as if typed without it.


How can I visualize or simulate the effect of different focal lengths?

I have seen many camera review sites illustrate the effect of using different focal lengths on the same photograph using frames. There are also similar illustrations to compare different sensors (). I find this kind of visualization to be very useful in comparing the actual effect of the longer focal length\different sensor size. Of course the ability to do a wider focal length visualization would also be equally useful, but that's not possible.  Is there any ready-made software or plugin that enables this? If not, is there any simple technique to visualize the effect of longer focal lengths on an image (one would of course have to use the zoom information in the image EXIF data to accurately represent this)? All I can think of is to use some trigonometry to do the necessary calculations for the frame sizes for cropping.


Evaluate $\int_0^{\infty} \frac{x^2}{e^x-1} dx$

The problem is to show that the improper integral $I = \int_0^{\infty} \frac{x^2}{e^x-1} dx$ converges to $2\sum_1^{\infty} \frac1{n^3}$.  Previously, I computed the following integral:  $$f(x) = -\int_0^x\frac{\log(1-t)}{t}dt = \sum_1^{\infty} \frac{x^n}{n^2}$$  which holds for $-1 \le x \le 1$.  From this, I deduce the following:  $$g(x) = \int_0^x \frac{f(t)}{t}dt = \sum_1^{\infty} \frac{x^n}{n^3}$$  which also holds for $-1 \le x \le 1$.  I am attempting to show that $I = g(1)$.  The first thing I do with $I$ is make the substitution $t = 1 - e^{-x}$, which yields:  $$I = \int_0^1 \frac{\log^2(1-t)}{t} dt$$  Then I attempt to integrate by parts, differentiating $\log(1-t)$ and integrating $\frac{\log(1-t)}{t}$, which yields:  $$I = -\log(1-t)f(t)|_0^1-\int_0^1\frac{f(t)}{1-t}dt $$  That doesn't work.  The first term doesn't converge.  The upper bound evaluates to $-\log(0)\frac{pi^2}6$ and the second term is not g(1).  The denominator needs to be $t$, not $t-1$.  So I am not sure what to do next.


Is there a way to find a missing cubic root if a maximum turning point and a turning point on the x axis is known? The maximum turning point is at (50,30) while the turning point root is (100,0)  So in this equation   F(x) = (x+a)(x-100)(x-100)  I need to find knowing that the given points are stat points with a gradient of zero.   Thank you


Set partition, partition into X set with Y elements.

How do you partition a set into X number of new sets all that have Y elements?  Example: How to partition 18 unique cards are divided to six persons, and each person gets 3 cards each. How many combinations are there?


sudo dpkg --configure -a    On typing this command I am not able to resolve the problem   dpkg-was-interrupted-run-sudo-dpkg-configure-a    and the terminal window gets hanged. On CLTR + Z it says [2]+ stopped


Is there any way to use a display resolution higher than the max?

I have a 17 inch LCD, with a maximum resolution of 1280x720. It works fine, but there are some apps that require 1024x768. I know that the maximum resolution is called like that for a reason, but is there no way of increasing the resolution, other than getting a bigger monitor?


Is there a performance difference between i++ and ++i in C?

Is there a performance difference between i++ and ++i if the resulting value is not used?


What if money were beautiful - vs was beautiful

This website,  - has a statement (screenshot below should it be removed in future) The statement is "What is money were beautiful?". This does not make sense to me. In British English should it not rather read "What is money WAS beautiful?"


Migrate Google Authenticator to new iPhone 7

Just got a new iPhone 7, but when it restored it lost all my Google Authenticator two factor auth codes. I still have them all in my old phone, how can I port them to my new iPhone 7?  This is quite frustrating.


Can a kryptonian male and a human female conceive a child while on earth?

Given that it is biologically possible, can it really happen? Won't the act of ejaculation kill the female from immense speed and force?


Constraining regression coefficient to non-negative

I have a regression problem where I don't want the coefficients to be negative. Is setting negative coefficients of OLS to zero the same as constraining the coefficient to be non-zero and solving it through a convex optimiser as a quadratic problem? I've thought about this from a geometric perspective. In OLS, $\beta^TX$ is the shadow of $y$ onto column space of $X$. The solution is where $y - \beta^TX$ is perpendicular to $X$. Thus, $y - \beta^TX$ is minimised. If one of the coefficients in $\beta$ is constrained (by replacing a negative value with zero, call this new vector $\theta$), $y - \theta^TX$ is still the vector with the smallest norm?


How to convert double into int in angular js?

I have following code snippet :   <span ng-if="document.size<500" >     0   =500 && document.size < 1048576" >     {{document.size/1024}}   =1048576" >     {{document.size/1048576}}    i got document size in byte and then i convert it into KB and MB. but it gives value in double. how can i convert it into int in angular js? can i convert it in int expression directly? Thanks in advance


I'm currently developing a chrome extension. and my chrome extension has a table with buttons on it. But unfortunately the my buttons won't work and there's no errors in the console..   My question is why my button id in my address.js "copy" wont triggered an alert  This is my home.html in my chrome extension  <!DOCTYPE html>         <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1">      <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"  rel="stylesheet">

                   Video Name	                   File Name	                   Copy

          And this is my address.js  $.getJSON("http://mlearningessentials.com/vid.php", function(data){    var items = [];    $.each(data, function(key, val){     items.push("
");     items.push(""+val.video_name+"	");         items.push(""+val.file_name+"	");           items.push(""+'<button type="button" class="btn btn-primary" id="copy">Copy</button>'+"	");            items.push("
");  });    $("
", {html: items.join("")}).appendTo("table");  });    $(document).ready(function(){     $("#copy").click(function(){       alert('copied');       });   })


What is the closed form of $\sum_{i=1}^n\frac{2i}{2^i}$

I looked at $\frac{\sum 2i}{\sum2^i}$ (division), however both expressions are not equal. I am looking for an expression like $\sum_{i=1}^n\frac{2i}{2^i}=5n$ for example.


Suppose $X,Y$ and $Z$ are multivariate normal with means and full covariance matrix. The conditional expectation $E(X | Y)$ is well know. What is the conditional expectation of $E(X | Y,Z)$ if $Y$ and $Z$ (and $X$) are correlated? Standard textbooks only seem to cover the case when $Y$ and $Z$ are uncorrelated.


Disabling Menu in MainForm from Second Form

How do I re-enable a Menu in MainForm from Second Form?  I use    private void AnalysisForm_FormClosing(object sender, EventArgs e)  {     HomeForm.checkBeamToolStripMenuItem.Enabled = true;  }   But it says      HomeForm.checkBeamToolStripMenuItem is inaccessible due to its   protection level   I'm not sure which part of my code should I declare as Public.


Prove that $f(n)$ is the nearest integer to $\frac12(1+\sqrt2)^{n+1}$?

Let $f(n)$ denote the number of sequences $a_1, a_2, \ldots, a_n$ that can be constructed where each $a_i$ is $+1$, $-1$, or $0$.  Note that no two consecutive terms can be $+1$, and no two consecutive terms can be $-1$. Prove that $f(n)$ is the nearest integer to $\frac12(1+\sqrt2)^{n+1}$.  Can anyone help me with this problem. I really do not know what to do in this one.


Is every normed vector space, an inner product space

Let $V$ be a vector space over  $\mathbb{C}$. If $V$ is an inner product space, then $V$  is normed (where the norm is defined as $\|x\|=\sqrt{(x,x)}\,\,$). Now if $V$ is normed, does it follow that $V$ is an inner product space ? I suspect no. I would like to see an example.  Thank you.    After reading my question again, I think it needs some clarification:  Suppose that $V$ is normed with norm $||\,||$. Can $V$ be given an inner product space structure such that $(x,x)=||x||^2$ ?


How do I include the joined table when exporting a layer from an MXD using ArcPY.   I am using doing this:  arcpy.FeatureClassToFeatureClass_conversion(layer.dataSource, outLocation,                                                  outFeatureClass)   which does not include the joined information


Why couldn't Checkov beam Khan to the ship at the end of Star Trek Into Darkness, but after Khan and Spock fight he could?

Towards the end of the movie Checkov claims there's no way to beam Khan aboard ship after Spock asks him to because "there is too much damage" and he "can't get a signal"... But after Spock and Khan fight he is not only able to beam Khan, but Spock and Uhura back aboard the ship... Like, huh? I thought there was too much damage. Made zero sense to me how all of a sudden he was able to beam them when he just claimed there was too much damage to retrieve a signal.


What happens if you reach the gold with both (blue and green) doors?

If you construct a path from a ladder to an end card with a blue or green door in the path, the end card is flipped. If the card is the gold, all dwarves on that colored team (blue or green) win, as does the boss and profiteer.  What happens if you construct a path from a ladder to an end card while both doors are in the path?


Printing the unicode of all the letters in a word

I'm stuck on this question:     user inputs a word, program outputs the unicode of each letter in the word   this is how the input statement would look:  word = input("Enter a word: ")   Supposing the user enters the word "Cat", the output would look like this:  C: 67 a: 97 t: 116


Yichang Shengwu Jianwen Lu is listed and shown in a lot of anime websites. But is it anime? It clearly is in chinese, why is it consider it anime then? Was it animated in Japan or something? Is its animation style anime-like? Or what?.


I have come across many sentences involving phrases like "litte to bad", "little too comfortable", "I am little too busy". What exactly does it mean ?


difference between picker parent and ctrl-p parent? when I use the picker to parent the sphere object to cube the sphere moves from place of origin, but if I parent sphere to cube with ctrl-p, sphere does not move from place of origin. why does that happen?  I use blender 2.79


Do I need to install MiKTEX on my system before installing Texmaker?

Do I need to install MiKTEX on my system before installing Texmaker or Texmaker will work even without installing MiKTEX?


How to remove device(s) from My Market Account?

I know I can choose "Hidden in menus" and never see the devices again when I install a application. But I don't want my old mobile phones display in my account settings anymore. I have sold those phones already and never use them again!  In fact, the list look likes a cemetery in my mind now. ;(


Is there a LaTeX package to format computer language grammars?

I need to display BNF grammars, but couldn't find any LaTeX package that does this.


How do I add a class to the HTML "body" tag programmatically?

I would like to add a custom  to  the <body> tag. I am using Drupal 7/Corolla.  How can I do it programmatically from my custom module?


Check if all dep packages dependencies are satisfied

I sometimes install .deb files that have a "Provides" field. From what I understand, if e.g. a package called "expack" is listed here then if another .deb file depends on expack it will not need to install it (if I do apt-get). But if I do apt-cache show expack then it will not show that it's installed. So how do I check that the 'expack' dependency is installed (without using a specific package that depends on 'expack', just using only the argument 'expack') ?


After deleting all nodes, how do I reset the node ID to start from 1 again?

I generated tons of dummy content for testing, and then deleted them all.  As nid is auto-increment, newly created node will have a nid of last created nid +1.  How can I make nid start from 1 again?


Migrate site from dev environment to production server - 404 errors

We completed development on our dev environment and I copied the files over from the dev server to the production server through FTP.   Then through back up and migrade module, I made a back up of the SQL database. I created a new database through Plesk with the same name, username and password. I then imported the SQL database into the new server through phpmyadmin. I go to the URL and get the Site Maintenance message (which is correct, I placed the site in maintenance mode before copying the files over) but cannot navigate to any sub pages. Generally I can add /user or /admin to the end of the url and get the login screen. However all I get are 404 errors.


When I paste a link like  on chat, it promptly oneboxes the comic. However if I post the HTTPS version of that  it doesn't. This is true for all other oneboxable links from sites that let you access through HTTPS like YouTube.  Can we get HTTPS links oneboxed as well?


Can I use a pint/ 500ml whipped cream canister for small volumes?

When using a small volume of contents, is it better to fill a larger (pint/ 500ml sized) whipped cream dispenser only partially or to fill a smaller (half or quarter pint/ 125ml or 250ml) whipped cream dispenser fully?  Specifically, will the cream be filled with enough tiny air bubbles if I do not fill it to maximum volume?   Secondarily, is it cost effective to use small batches of content in regards to the whipped cream nitrous oxide chargers?    Edit:  Thanks, commenters who discuss cost effectiveness! Now I know, nitrous oxide chargers are one-time use. :)


A number of bacteria are placed in a glass.

Some amount of bacteria are placed in a glass. One second later each  bacterium divides in two, the next second each of the resulting bacteria divides  in two again and again. After one minute the glass is full. When was the glass  half-full?


Inconsistent accessibility error with the following c# code. Why?

Whats wrong with the following c# code? Compiler reports this error:  Inconsistent accessibility: parameter type 'ClassLibrary1.Interface1' is less accessible than method 'ClassLibrary1.Class1.Class1(ClassLibrary1.Interface1)'  with the following code:  interface Interface1<T> {     bool IsDataValid();     /* Other interfaces */ }  public class Class1<T> {     public Interface1<T> interface1;      public Class1(Interface1<T> interface1)     {         this.interface1 = interface1;     }  }   I've since designed my code differently using inheritence to but if anyone could tell me what the above is wrong I'd greatly appreciate it.


Updating information for flagging a question

I flagged a question on Stack Overflow, but now I want to update my comments for flagging that question. Is this possible?  Also is it possible to undo a flag on a question?


How to close vote on Stack Overflow and move the question to other Stack Exchange sites (e.g. apple.stackexchange.com)

Today one guy asked a Mac OS-related question on Stack Overflow. Here is the link of the question:  I want to mark it for closure and move it to , but on the options list there was no way to select this site apart from Super User and Server Fault How can I chose ? Here is the screenshot of the options:  Also the This question belongs on other site in the Stack Exchange network has following options:


Reopen a question from the Stack Exchange iOS app

A couple minutes ago I had a flag on a question. The question is now fine, but I can not reopen it, because I'm connected from the iOS app.  I can see only the reason that my question was flagged and a link how to write a question. Is there any reopen button?


Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC)

I want to start Notepad with elevated privileges to edit C:\Windows\System32\drivers\etc\host. Notmally I would type notepad in the search box, and with the program highlighted hot Ctrl + Shift + Enter, click Yes on the UAC prompt and then open the file. I do this often, so I want a batch file to do it.  I tried the following command:  runas /user:Administrator /savecred notepad.exe path\to\file   But this is not exactly what I want, as it prompts for the password of the Administrator account. I really want a command to start a program with elevated privileges for the current user account.  I run Windows 7 RC.


Getting names() from a ArrayList in Java

I'm trying to make two methods. One to add people, and another to view them. This is what I've got so far:  Contacts contactObj = new Contacts();   private void viewContact() {     System.out.println("Here are your contacts: ");     contactObj.getNames().forEach(System.out::println); }   private void addContact() {     System.out.println("You're about to add " + firstName + " " + lastName + " to your contacts");     System.out.println("Are you sure? [y]es or [n]o");     String confirmation = fetchContactDetails.next().toLowerCase();      if (confirmation == "y" || confirmation == "yes") {         contactObj.addName(firstName + lastName);         contactObj.addName("connor template");     }      if (confirmation == "n" || confirmation == "no") {         firstName = null;         lastName = null;     } }   I also have a Contact file that looks like this:  import java.util.ArrayList; import java.util.List; import java.util.Objects;  public class Contacts {      private List<String> names;      public Contacts() {         this.names = new ArrayList<>();     }      //add a name to list     public void addName(String name) {         if (!Objects.nonNull(names)) {             this.names = new ArrayList<>();         }         this.names.add(name);     }      //get the name attribute     public List<String> getNames() {         if (!Objects.nonNull(names)) {             this.names = new ArrayList<>();         }         return this.names;     }  }   So theoretically I should be able to call addContact() and it should ask me their name and last name. I should then be able to call viewContact() it should display a list of people. Unfortunately it says "Here are your contacts: " with no contacts. Thanks for any help :)


My whole life I've been buying small squid (maybe 4-6" long bodies without the head and tentacles), which are very mildly chewy and tender.  All it takes is sautee them in a little OO and they are good to eat, IOW, no additional tenderizing is needed.  Yesterday I got some large squid, about 1 lb each before cleaning, probably 10"+ long without the head, probably 5-6 times as much meat as the little ones I usually get.  I remember trying to cook that before and they came out very tough and with a bit of unpleasant odor.  Is there a way to marinate and tenderize large squid and to somehow neutralize the odor?


How can avalanche effect be calculated? I would in particular want to know what platform or IDE can be used to calculate the same?


How to show that $(a+b)^p\le 2^p (a^p+b^p)$

If I may ask, how can we derive that $$(a+b)^p\le 2^p (a^p+b^p)$$ where $a,b,p\ge 0$ is an integer?


I'm calling one rest API and it's working properly but I'm not able to deserialize it's reesult.  Below in mentioned my code and what response in I'm getting,I want city value in city variable and temp,humidity in each separate variable's:    public class getCityWeather  {     public string city{get;set;}     public string temp{get;set;}     public string pressure{get;set;}     public string humidity{get;set;}     public string temp_min{get;set;}     public string temp_max{get;set;}      public static void CallingOpenWeatherMap()     {         String accountCity = 'Delhi';         String apiKey = 'd0b522134dc8a5ba20020e0bfbceaafa';          String requestEndPoint = 'http://api.openweathermap.org/data/2.5/weather';         requestEndPoint+='?q='+accountCity;         requestEndPoint+='&units=metric';         requestEndPoint+='&APPID='+apiKey;          Http http= new Http();         HttpRequest request = new HttpRequest();         request.setEndpoint(requestEndPoint);         request.setMethod('GET');         HttpResponse response = http.send(request);          if(response.getStatusCode() == 200)         {             System.debug('Result : '+response.getBody());         }     } }   // And the response is :   { "coord":{"lon":77.22,"lat":28.65}, "weather":[{"id":721,"main":"Haze","description":"haze","icon":"50d"}], "base":"stations", "main":{"temp":34,"pressure":1006,"humidity":52,"temp_min":34,"temp_max":34}, "visibility":3500, "wind":{"speed":5.1,"deg":320}, "clouds":{"all":20}, "dt":1537342200, "sys":{"type":1,"id":7809,"message":0.0045,"country":"IN","sunrise":1537317481,"sunset":1537361480}, "id":1273294, "name":"Delhi", "cod":200 }


I want to retrieve all site collections in an Online tenant through Visual Studio:   I can do it via Powershell: get-sposite on-premise server : Get-SPSite on-premise again: var sites = webapp.Sites.Where(i=>i.url.StartsWith(webapp.url + "/departments/"));  http://sharepoint.stackexchange.com/questions/7137/how-can-i-list-the-site-collections-under-a-given-url-path   I can use the following code to iterate through sites within one site collection, so I thought I could try "" but of course it doesn't work, because such site doesn't exist.     "The remote server returned an error: (401) Unauthorized." at context.ExecuteQuery():   ClientContext context = new ClientContext(https://domain.sharepoint.com/sites/);             context.Credentials = new SharePointOnlineCredentials(userName2, password2);              Web site = context.Web;              context.Load(context.Web.Webs);             context.ExecuteQuery();              string allsitecollections = "";              for (int i = 0; i < context.Web.Webs.Count; i++)             {                  allsitecollections = allsitecollections + context.Web.Webs[i].Url + "\n";              }   Is there a way to retrieve the site collections with C# or should I resort to  ?


Title of science fiction novel from the '80s or early '90s with small furry aliens

There was another alien species that was invading Earth, and the little furry aliens helped us out. I think they liked having sex all the time and ended up having sex with the humans as well.


Difference between "I haven't" and "I've not" etc

If I have three consecutive words where each adjacent pair can be contracted, e.g. "I would have" or "You are not", is there a difference between the two possible contractions, e.g. "I would've" or "You aren't" versus "I'd have" or "You're not"? If so, when is each form preferred?  Does the preference depend on what comes after it (such as its part of speech), e.g. "You are not a fool" versus "You are not foolish" versus "You are not going to fool me?"


Why is bash interpreting characters that I have character escaped?

Why is it that when I run curl against a REST API, the special characters (!) in my key are interpreted by the shell?   curl https://foo.my.salesforce.com/services/data/v28.0/ -H "Authorization: Bearer '00DE0000000K0eM!AQYAQGgmLxxxxxxxxxxx'"   -bash: !AQYAQGgmLxxxxxxxxxx'": event not found   According to , using a single quote should prevent bash from interpeting the string  As a workaround, I tried using a \ character, however that causes the key to be rejected.   curl https://foo.my.salesforce.com/services/data/v28.0/ -H "Authorization: Bearer '00DE0000000K0eM\!AQYAQGgmLxxxxxxxxx'"   [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]   How can I prevent bash from interpreting the string?


Does the blue highlight indicate anything?

I have noticed that a few of my Pokemon have a blue highlight on them:    From my inspection, I haven't been able to identify it's purpose. It doesn't distinguish CP, or if that Pokemon was caught or hatched, or even if that Pokemon is able to be leveled up or evolved.  Does it indicate anything?


Is $29$ the only prime of the form $p^p+2$?

I searched for primes of the form $p^p+2$, where $p$ is prime for a range of $p \le 10^5$ on PARI/GP and found that 29 is the only prime of this form in this range.  Questions:     $(1)$  Is $29$ the only prime of the form $p^p+2$, where $p$ is prime?      $(2)$ If not, then are there a finite number of primes of the form $p^p+2$? Can you prove/disprove this?   Edit: Since $p^p$ grows really fast and primes get rarer and are spread farther out for large numbers,  I conjecture that $29$ is the only prime of the form $p^p+2$ where $p$ is a prime.


Would it be wrong to argue that if one considers a countable set $A$ and a real function $f:\mathbb{R}\to\mathbb{R}$, then the range of $f$ on $A$, that is the set $f(A)=\{f(a)\mid a\in A\}$, is countable?


Why does strcpy specifically requires an array as first argument? (As opposed to a char* const ptr)

Isn't an array basically a const pointer to char?  #include <stdio.h> #include <string.h>  void f(char* s) {     strcpy(s,"ciao"); }  void main() {     char str[10]="mamma";     char * const ptr="papa";      f(str); // <-- works as expected     printf("%s\n",str);      f(ptr); // <-- gives Segmentation fault     printf("%s\n",str);  }   How does strcpy recognize that I provide a pointer and not an array?   I'm aware that strcpy needs enough space in the destination array, but given that this char * strcpy ( char * destination, const char * source ); is the signature of strcpy, how can I infer that it needs an array as first argument?  Also, how can strcpy infer it got passed a constant pointer and not an array?


AIAA's LaTeX zip only includes a .cls and the included template doesn't compile

My standard proceedure for using a new .cls or .sty are as follows: (1) unzip to a common directory and attempt to compile the template tex file typically included. (2) If (1) fails, look for things like README's, .ins, or .dtx files to look at or compile before trying (1) again. (3) if (1) and (2) fail, beg someone for help.   I downloaded the AIAA "latex template" from  and unzipped it to a local directory to find the following files:  AIAA.cls, journalstemp.aux, journalstemp.dvi,journalstemp.log,   journalstempNotes.bib, journalstemp.pdf, journalstemp.tex.    (1) failed. I presumed the README was the .pdf/content of the .tex, but this only includes extensive instructions for the word users, copied and pasted from the word .zip on the same page. I have googled hard and delved deep into the labyrinthine complex which forms the AIAA website, but to no avail. So now (3).   Does anyone else have experience here?


How can gravitions exist without violating GR?

How can gravitions exist without violating GR, since GR says that gravity is curvature in space-time.


If product is multiple of a number what information can we draw?

If a product is a multiple of $4$, I conclude that one of the numbers is a multiple of $2$ the following way: If $$ab \equiv0\pmod 4$$ then $$ab = 4X = 2(2X) = 2Y$$ (where $Y = 2X$) This implies that either $a$ or $b$ is a multiple of $2$ so $a$ or $b$ is even. My question is if this approach is correct or there is a more "formal" way to do it. Additionally what other conclusions can we draw by knowing that $ab$ is a multiple of $4$?


Kendo Grid & Rich text Editor of Sharepoint 2013

I'm using custom grids (Kendo UI Core free version) into an sharepoint 365 APP. I would like to use the Rich text Editor of sharepoint 2013 when I edit some fields. is this possible?


I'm using a blue wire as a c-wire, however when I went to connect the blue wire at the furnace, it already had a white wire ( not from a thermostat) corrected to the c-terminal. Can / wires be connected to c terminal? If not, what do I do with the white wire?  Thanks


How do I catch the null that is thrown if the file object returns null? I keep getting a java.lang.NullPointerException.  public static File getFile() {         String filePath = JOptionPane.showInputDialog("Enter the full path to           the file you want to open");         File file = new File(filePath);         while(!file.exists()) {             filePath = JOptionPane.showInputDialog("Please enter a valid full path");         }         return file;     } }


How to prove that $\sum_{k=0}^{n-1}\cos\left(\frac{2\pi k}{n}+\phi\right)=0$

Prove that $\displaystyle\sum_{k=0}^{n-1}\cos\left(\frac{2\pi k}{n}+\phi\right)=0$ for $n\in\mathbb{N},n>1$  I'm thinking at a demonstration by induction, as base case $n=2$  $$\sum_{k=0}^{n-1}\cos\left(\frac{2\pi k}{n}+\phi\right)=\sum_{k=0}^{1}\cos\left(\frac{2\pi k}{n}+\phi\right)=\cos\phi+\cos(\pi+\phi)=\cos\phi-\cos\phi=0$$ but I don't have any idea to inductive step, how can someone prove this?  I'm thinking use this to proof that $\displaystyle\sum_{k=0}^{n-1}\alpha^{k}=0$ where $\alpha=\exp\left(\frac{2\pi}{n}\iota\right)$, thanks for any help.


Anyone know of a way to make Safari show favicons in Yosemite? I was using Glims under Mavericks but that no longer works.  I tend to have lots of tabs open and sometimes it's easier to find the proper tab by the favicon rather than the text.


Google Apps Admin account username and password lost

I created an Google Apps business (free edition) account for my friend back in 2012. After that we never logged in to that account. Now today when tried logging back in we don't remember username or password. Google does not provide support if you're free business apps user.  How can I recover this account. I do not think I created any secondary email for that domain or I don't even remember recovery email address if I would have specified that time.


How to update the distribution to 20.04 without deleting the hard drive data

I want to update my Ubuntu from 18.04 to 20.04, but I do not know how to do this without deleting my previous information.


public void  ZeichneFigur(String position) {     String[] parts = position.split("\\.");     String part0 = parts[0];     String part1 = parts[1];     int k = Integer.valueOf(part1);     if (part0.equals("gr"))         g.setColor(Color.GREEN); }           switch (k) {                  case 1:               g.fillOval(20,20,100,100);               Break;          case 2:              g.fillOval(20,30,100,100);               Break;          case 3:               g.fillOval(20,40,100,100);               Break;          case 4:              g.fillOval(20,50,100,100);               Break;          case 5:               g.fillOval(20,60,100,100); Break;}   First of all let me excuse my barbaric coding im a  beginner.  Im trying to write a short Method that takes strings of the format gr.2 that define values of the players color and the field that he is on, then paints ovals on the corresponding position. (Actually i have 40 cases, they are all the same). When i compile i get the ArrayINdexOutOfBoundsException, and i cant find out why, i understand that this means my index is out of range, but how does that happen when i enter gr.1 ?  EDIT: Changed if (part0.equals("gr")) and added break statements.


Bad SSL/TLS at Stack Exchange: Cloudflares SSL certificates and sometimes no HTTPS at all

Cloudflare  Cloudflare has the options Universal/Flexible SSL, which basically allow websites to serve their website over HTTPS by using a certificate from Cloudflare.  Besides the fact that Cloudflare always acts as a man-in-the-middle, here the connections from Cloudflare to the origin server  (with Universal/Flexible SSL), or Full SSL only use a self-signed certificate which is also quite unsecure.  , but at least they have two options which may be considered quite secure (Keyless SSL and Full SSL (Strict)) as there the real Stack Exchange certificate is used.  AFAIK, unless Stack Exchange uses Keyless SSL, you do not know what mode they use, because in all other modes you only see a certificate issued for ssl*.cloudflare.com with an Subject Alternative Name for the real domain. .  meta.*.stackexchange.com  But it's getting worse: You have no HTTPS at all on these sites. E.g. look at one of the most ironic domains:  or  , and I know you cannot solve it, because you cannot use a wildcard TLS certificate there. There was also a  about this issue (BTW: Site uses Cloudflare SSL too).  But this blog post is from 2013. Come on: We have 2016 now and you neither have other subdomains nor HTTPS on these domains. Nowadays we even have automated  (Let's Encrypt) so there is really no problem to get certificates for all these domains. And we have HTTP headers [which can make the migrating from HTTP to HTTPS very easy (see scotthelme.co.uk/migrating-from-http-to-https-ease-the-pain-with-csp-and-hsts/).  Some of the arguments in the blog post are already outdated (e.g. the Google rank argument [today Google even ranks sites with HTTPS heigher] and the third-parties [AFAIK all of the listed ones there support HTTPS now]) and all in all you also did not keep your promise:     We’ll be working on it over the next 6-8 weeks.   in the blog post     We will be working on it in 2014   in   Also note it is a big security risk when you send cookies over unsecure connections. I don't know how your authentication system is designed, because with different cookies for insecure connections (over HTTP) and secure ones (over HTTPS) you can mitigate this risk a bit - similar to the way Amazon does it, but this is still a bad workaround.  When will we get HTTPS?  Additionally there are still sites with Mixed Content errors (on the home page!). E.g. on  you load an image from . Just adding an s there would fix this.  Even big news sites have managed (see developer.washingtonpost.com/pb/blog/post/2015/12/10/moving-the-washington-post-to-https) to switch to HTTPS and according to their blog post this was not an easy step either. In 2016 it's amazing to see such a famous site to not have complete HTTPS support.


How to add my user account to admin group (13.10 desktop)

I was trying to extract a web template into the hosting folder /docroot on the web service,  which is working, however I do not have permission to complete the action.  I cannot stand being locked out of anything on a machine,  and before you all go on a rant about why the root account is locked yadda yadda , dont,  just dont.  So... did a sudo visudo  # User privilege specification root    ALL=(ALL:ALL) ALL username   ALL=(ALL:ALL) ALL   saved as tmp and then as sudoers  ,  checked the files, both sudoers and sudoers.tmp  same size  Still no joy,  cannot access required folders and files. Rebooted,  no go  I was about to start editing the passwd files next, but thought I best ask what might be going on here as I am not entirely familiar with Ubuntu 13.10 desktop and Unity.  This is not a production machine, only experimenting with web services and the available web production tools. I get the root account is locked and sudo 'ing every command from the command line is not an option, just aggro.  If anyone can offer a (even if unsecured) solution to this permissions issue I would be very grateful. I do not care about breakage, please do not lecture, I can re-image this unit in less than 20 min.  I tried adding my account to the admin group as well, only to get an error saying the admin group doesn't exist.   # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL   huh? Yep, confused. TIA


I stumbled upon  question online:  $$A=\begin{bmatrix}5&6&&\cdots&6 \\6&5&6&\cdots&6 \\&&\ddots&& \\6&\cdots&6&5&6 \\6&\cdots&&6&5 \end{bmatrix}\in \mathbb R^{82\times 82}$$  I also found a way to solve this in Chegg:    Is there a better way to solve this problem maybe by reducing it to upper triangular form?


Prove that $\cos{2\alpha}+\cos{4\alpha}+\cdots+\cos{2n\alpha} = \frac{\sin(n+1)\alpha \cos{n \alpha}}{\sin{\alpha}}-1$

I was doing a trigonometry problem and it claimed that $$\cos{2\alpha}+\cos{4\alpha}+\cdots+\cos{2n\alpha} = \dfrac{\sin(n+1)\alpha \cos{n \alpha}}{\sin{\alpha}}-1$$ without proof. Is this supposed to be an obvious result or does it require work to prove it?


Measuring an AC-voltage at the ouput of a full bridge rectifier

I've a full bridge rectifier and I put the following function into it:  $$5\sin(100\pi t)\tag1$$  So, at the output I get:  $$\left|(5-2V_d)\sin(100\pi t)\right|\tag2$$  Where \$V_d\$ is the voltage over one diode.  Now, why do I measure (with a Fluke multimeter) a DC-voltage of \$1.4\$ volts and an AC-voltage of \$0.5\$ volts. Why do I measure an AC-voltage, is it not completely DC?


I've been studying for my linear algebra final for the past few days, and just had this thought.  I know what a subspace is; It's a subset of a vector space that contains the zero vector, and preserves addition and scalar multiplication. But what can we do with a set after we've discovered that it's a subspace? The questions in my textbook only go as far as telling us to determine if a set is a subspace or not, we're not asked to use the fact that a set is a subspace to do something else. So my question is, what is the point of a subspace then?  Thanks


Just wanted to see what the community thought of adding a reward to passing the review tests? Maybe a 1 point reward?  I know seeing the tests in the review area has helped me be extra careful when reviewing, but I thought perhaps a little boost in incentive would be cool.


Why the clipboard gets erased when I quit the program?

I was trying to take a screenshot from my desktop, and decided to experiment with different programs. No matter what application I chose, the copied image from snapshot would get erased from clipboard if I closed the app. I've tried this with flameshot, spectacle, and looking back at this I know I have experienced this issue before with LXQT's default screenshot tool. How can I make this annoying issue go?  I am using lubuntu 19.10.


How to access the overidden function of an object of type subclass which is in a vector with a template of class

I have a class A, which defines an empty function foo, among other things. Two subclasses inherit from A, AA and AB. Both of these override foo in different ways.  A separate class, C, needs to hold different instances of the subclasses, so I have defined a vector with a template of class A within it. The issue is, when I try to run foo by accessing the subclass from the vector in C, it runs the empty version of foo in A, rather than the overridden  version from AA or AB.  How can I have a vector in C which can hold different instances of the subclasses and be able to run the overridden version of foo?    If you'd prefer to  see the classes in code -   A  class A { public:     A();     foo() {} };   AA  class AA : public A { public:     AA();     foo() { //does something else } };   AB  class AB : public A { public:     AB();     foo() { //does a different something else } };   C  class C { public:     C();  private:     std::vector<A> things; };   From within C, if I try to run things.at(x).foo() it calls the foo from A, but I need to call the foo from the correct subclass.  Thanks for any advice you can give!


Package monodevelop-database is not available, but is referred to by another package

I was trying to install mono, but the command:   sudo apt-get install monodevelop-database   is not working. How can I solve this?


How to re import an updated package while in Python Interpreter?

I often test my module in the Python Interpreter, and when I see an error, I quickly update the .py file. But how do I make it reflect on the Interpreter ? So, far I have been exiting and reentering the Interpreter because re importing the file again is not working for me.


How to remove a directory which is not empty?

I've been trying to erase (remove) a directory from one of my internal HDD and the system tells me that "The directory can not be removed because it is not an empty directory."  The issue is that the directory IS empty!  At least, I can not to see any inside it with Thunar file manager or from the Terminal with root privileges.  The directory where the directory I want to delete is, has this output to ls-la:  total 28  drwxrwxrwx 1 root root  4096 ene 15 10:01 .  drwxrwxrwx 1 root root 20480 ene 15 10:01 ..  drwxrwxrwx 1 root root  4096 ene 15 10:01 matrimonio de fiesta sara y luis hernan   And, the directory I want to delete, has this output:  total 8  drwxrwxrwx 1 root root 4096 ene 15 10:01 .  drwxrwxrwx 1 root root 4096 ene 15 10:01 ..   A similar case with another directory which has 3 files and, each time I was trying to remove them, the system tells me: "Files not found."  I was trying with sudo rm -r -f and... Nothing!  The same history each time I used it. What's wrong here?  Is there another, more powerful, command to remove directories and/or files?


Denominator is Zero for Matthews correlation coefficient and F-measure

Recently, I built a classification model based on the imbalanced data set(positive sample is minority and negative sample is majority), and the model gave the following result for the test set:  True Positives = 0 True Negatives = 139 False Positives = 0 False Negatives = 10.  My question is: for the result, can Matthews correlation coefficient ( ) and  be used for estimating the classifier? Since the denominators for MCC and F-measure are zero, it seems meaningless. If so, MCC and F-measure is not always works for estimating the classifier, and sensitivity and specificity as well as g-mean should be better. Is that right? Any help is appreciated.


After you get the longest road card, can you start building on it and still retain the longest road card?


How can I add a class to a block with code (development)

For theming reasons I'd like to add a specific class at the "block" level to some of the blocks I'm generating with a custom module. I know there is a module , but I would rather like to do it directly in code (there is no need to change is afterwards).   I also know of , but that does not seem to allow adding or editing classes.  Is it possible to add a class with to a block from within my module code? I'm using Drupal 7.


Gauss law question with regard to this example

I am really confused in Gauss law.  Why do E3 and E2 pointing up? and also E1 pointing down?  The lecture note said infer from symmetry and you will get the following but I dont really understand. Could anyone explain to me? I am new to gauss law.


Nullstellensatz non-valid for non-algebraically closed fields

I want an example (with details, please) showing that Nullstellensatz may be false over non-algebraically closed fields. Thanks in advance!


How can I upgrade from Oracle JDK 8 to OpenJDK 8 using Homebrew and be sure it will be used by default?

If I have Oracle Java SE JDK 8 installed on my mac, how can I upgrade to Open JDK 8 and be sure it will be used by default?  Motivation: Android build tools seem to need JDK 8, but according to the following links Oracle JDK 8 will not receive free updates after January 2019 for commercial use, not even security updates:


How can I bind an already existent script to a dynamic generated html?

I'm a student and i encountered a problem. I have a div that generates this already hard-coded html element. This is the div:

Domanda 1

         <button class="modificaDomanda"></button>         <button class="cancellaDomanda"></button>

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis nulla commodi assumenda dignissimos! Eos, magnam facilis officia veniam ea, architecto et, fugit nostrum voluptates quis deleniti. Eos corporis labore laborum?

  This is the div that triggers the script below:

Aggiungi una domanda

  This is the script:     $('.aggiungi-domanda').on("click", function(){         var domanda = $('.jquery-domanda').html();         $(this).before(domanda);              })  The problem is that I have a script that runs on the "domanda" element involving some buttons, inputs and many things. How can I bind this very long (and not abstract) script to the several dynamic generated ".domanda"? Thank you very much. Bye.


Idioms for fake sadness other than crocodile tears?

Is there another saying/idiom similar to crocodile tears?


I play Minecraft 1.12.2 Java edition. I made a command block that basically shows a welcome intro (ex: Welcome to the world! Please ask  for creative mode.) I want it to repeat about every 30 seconds. I made a HUGE chain of redstone repeaters that takes up A LOT of space. It works, but I was wondering if there was any other easier way.


What actually is the event that we think we have detected with gravitational waves?

shows the "event" that is creating excitement.  It looks to the untrained eye like a single "blip" on a detector.  It appears to last less than a second.  It is, later in the answer, referred to as a "black hole merger".  Are we seriously saying that two black holes merged in under a second?


Changing deleted partition back to NTFS without having to recover to another drive

Recently, I accidentally deleted a partition off of my external hard disk. I had a copy of Minitool Power Data Recovery left over when the same drive had become RAW about a year ago. When I selected lost partition recovery, it immediately identified my deleted partition and allowed me to access and recover the files that were there.  My question is this. Is there any way to change the deleted partition back to NTFS without having to have a drive that you need to recover the files to and then move them back after formatting, as I don’t have any space left on either the computer or on my other external hard drive, so that I don’t need to buy a new one. The files on the disk were really important.  I am using Windows 7 Home Premium.  I appreciate any help in solving this crisis.


Whats the order of adjectival elements before the nouns?

if there are all the elements which can be adjective before a noun, can you give me how should i put them in the right position in order? if there a rule or a good example i can follow?


Let $Y$ denote a random variable with probability density function given by $$f(y) = \frac{1}{2}e^{-|{y}|}, \quad -\infty < y < \infty$$  Find the moment generating function of $Y$.  \begin{align}M_y(t) = E(e^{ty})&=\frac{1}{2}\int^\infty_{0}e^{-y}e^{ty}dy +\frac12 \int^0_{-\infty}e^{y}e^{ty}dy\\&=\frac{1}{2}\int^\infty_{0}e^{y(t-1)}dy + \frac12\int^0_{-\infty}e^{y(t+1)}dy \\&=\frac{1}{2}\left(\frac{e^{\infty(t-1)}}{t-1}-\frac{1}{t-1}+\frac{1}{t+1}-\frac{e^{-\infty(t+1)}}{t+1}\right)\end{align}  I am currently stuck here. The results will differ according to the value of $t$. I've heard from another source that we  can assume $t<1$. Is the claim valid? Am I missing another step?


What is the grammatical construction in “Be but sworn”?

I have found several questions asking for the meaning, but the thing that troubles me here is the grammar actually and i haven't found anything on that.  In Shakespeare's sentence  "Deny thy father and refuse thy name, or, if thou wilt not, be but sworn my love and I'll no longer be a Capulet."  What is the grammar behind the construct "be but sworn"?  And how can what appears to be a passive (be sworn) of an intransitive verb (to swear) still have the meaning of an active (i swear)?  Does the second person in the sentence remain the same throughout the sentence (deny thy father, Romeo...be sworn my love, Romeo), or does the interpellated person change (deny thy father, Romeo...be sworn (to Romeo), my love)? Or is 'my love' even an allegory for Romeo? Is the "but" here a preposition or an adverb?


Trying to find an old old short story about an immortal woman

I am 56 and read (as a teen in the 70's) a short story about a woman who has no idea why she is immortal, but is now desperate and lonely and wants to die.  She tries to die, but she keeps waking up repaired and alive. Finally she gets killed (I do not remember how--I think she is stabbed interfering with a crime), and her organs are harvested.  In a bizarre ending twist, the story uses the point of view of her body, and we experience the struggle to rebuild all the organs, until right as the heart sets up to beat, the crematory oven kicks on. The ending line indicates that even the ashes were large and hard to crush. In the epilogue, a doctor visits the girl who received her heart and finds the surgical wound already healed...   It is chilling and I would like to find it again, but cannot remember where or when I read it exactly.  It seems it was part of a collection of short stories.


Degree of Field Extensions and $F(\alpha)$

Suppose that $[F(\alpha):F]$ is odd. Show that $F(\alpha)=F(\alpha^{2})$. Generalize this statement if possible.    Clearly, we always have that $F(\alpha^{2}) \subset F(\alpha)$ by definition of the field generated by $F$ and $\alpha$ (assuming that we have a field extension $K/F$ where $\alpha \in K$). However, how can we show the other inclusion? If the degree is odd, then it follows that $\alpha$ will solve a polynomial of odd degree in $K[x]$ (for the coefficients in $F$). What would be a way to proceed from here? (and as well to generalize the statement?)  I was thinking of using the formula: $[F(\alpha):F]=[F(\alpha):F(\alpha^{2})][F(\alpha^{2}):F]$ and maybe proceed from there.   Thanks for the help.


Why can't windows explorer delete files with long paths and why can 7-zip do it?

I don't know if this is the right place to ask such a question. For me at least it is really strange that Microsoft's own windows explorer cannot delete files with long paths while 7-zip file manager can. Why can't Microsoft fix his own file browser? I have Windows 10 Home Premium.  Edit: My question is different from  because in my case there is no setting when I run gpedit.   Edit2: Although this seems to answer my question or at least give an explanation why it's not working:


Will an Xbox 360 bought in the US work in India?

Are there any issues with an Xbox 360 sent from the US to India?  I'm selling mine on eBay and I'm wondering if the guy will be able to play the games I'm sending along, and would he be able to play on Xbox Live as well? Or login to a Live account?  A friend told me that Microsoft has region-locked Xboxes and so they don't work outside the country of purchase.   Is this true or false?


Good LaTeX editor for beginner on windows 8?

I am interested in learning how to create documents through LaTeX and was wondering what editors might be good for someone starting out. I currently have windows 8 but am thinking about installing Ubuntu as well. I'm not looking to do too much, just to create a clean, good looking resume. Thanks!


I have followed all of the installation instructions from   and , and neither the pipelight silverlight plugin or the netflix desktop works; both tell me to install the microsoft silverlight plugin. What else can I do? I am using Ubuntu 14.04 LTS.


I decided to read the original RSA paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystem because of a question I had about RSA (which is not the question I'm about to ask, but may be a question on here at some time) and came across something I had never seen before in any textbook description of RSA (Note: this comes from the beginning of ).  for any integer (message) $M$ which is relatively prime to $n$, $M^{\phi(n)} \equiv 1\pmod{n}$  The part I don't recall ever hearing in class, or coming across in a text book, or seeing in any description of RSA I've ever read is that $M$ and $n$ must be relatively prime. So, I decided to play around with a toy example of RSA to see what would happen. I use $p=13$, $q=31$, $e=7$ and $M=2p=26$ (for completeness: $d=103$, $\phi(n)=360$, $n=403$). I observed the following using my toy instance of RSA: $M^e\equiv M\pmod{n}$, $M^e\equiv 0\pmod{p}$ and $M^e\equiv M\pmod{q}$. Do these equivalences hold for all $M,p,q$ when $M$ and $n$ are not relatively prime? How would I prove this? What is the real-world effect of this?


How can I use 'create new collection' command?

I create a collection with 'create new collection' command but the new collection did not appear in scene collection. And I found it in 'orphan data'. I tried to move the new collection(test) to scene collection but failed. I don't understand the way it works like that. How can I use the new 'test' collection?


What are "rotated" and "unrotated" principal components, given that PCA always rotates the coordinates axes?

As far as I understand,  principal components are obtained by rotating the coordinate axes to align them with the directions of maximum variance.   Nevertheless, I keep reading about "unrotated principal components" and my statistics software (SAS) gives me varimax-rotated principal components as well as the unrotated ones. Here I am confused: when we compute principal components, the axes are already rotated; so why is there another rotation needed? And what does "unrotated principal component"  mean?


Difference between eqnarray and eqnarray*

What is the difference between environments eqnarray and eqnarray* in a LaTeX input document?


Are margins correct for two-sided memoir?

The default twoside memoir document style makes the right margin really large on recto (odd) pages and the left margin really large on verso (even) pages.  This seems counter-intuitive to me.  It seems to me that you want the large margin against the spine of the book, to compensate for the part of the margin lost to the binding process.  So is the default style really what one wants for publishing, or do I need to customize the margins to be the opposite of what they are by default?


Installing software on an offline Ubuntu server

Assuming that I have a server with Ubuntu server newly installed on it. I was thinking of installing the very same version on Virtual Box (Or any other virtualization software), connect it to the internet and use apt-get to only download the packages for upgrading the system and the new software such as (tomcat7, openjdk6-default-headless..etc). Then copy the downloaded packages from the archive folder to the offline server's archive folder through a USB stick.  So now the virtual system won't actually be upgraded nor have any new software installed. But would running the very same apt-get commands on the offline system without the download directive -d be executed without issues ?  *EDIT:*This needs to be as simple as possible because I'll have to write a guide for our client to do this on his own and so it won't be acceptable to require deep Linux knowledge to do this.


Is there a way to Merge two stack overflow user accounts

So my Google accounts primary email address has changed.  This means now when I log into SO, I don't have access to my old posts as a new account seem to have been created :-(  Is there anyway to merge my old SO account into my new account?


Open Source Advertising - Sidebar - 2H 2013

It's yet again time once again to again yet support your favorite open source project through our Free Vote-Based Advertising for Open Source Projects. We are clearing the leaderboards to start the second half of 2013. Here is your chance to create a . Create a graphical ad for an open source programming project and post it as an answer to this question (in the right format), and it will feed live remnant ads on Stack Overflow. Ad Requirements It must be an advertisement soliciting the participation and contribution of programmers writing actual source code. This is not intended as a general purpose ad for consumer products which just happen to be open source. It's for finding programmers who will help contribute code or other programmery things (documentation, code review, bug fixes, etc.). Your ad should be an original creation which has not previously appeared on Stack Overflow. Please do not resubmit entries that have appeared as ads on Stack Overflow in previous periods. In order to work, the answers you post to this question must conform to the following rules. Answer Template  [![alternative text if image is not displayed][1]][2]        [1]: http://image-url   [2]: http://clickthrough-url   Please do not add anything else to the body of the post. If you want to add any commentary, keep it in the comments. Image requirements  The image that you create must be 220 pixels by 250 pixels Must be hosted through our standard image uploader (imgur) Must be GIF or PNG No animated GIFs Absolute limit on file size of 150 KB Must have a 1px border if (part of) the background is white  The output, which ultimately will be served in an ad slot on Stack Overflow, can be previewed by clicking through to this URL:  Score Threshold There is a minimum score threshold an answer must meet (currently 6) before it will be served up by that URL and shown on Stack Overflow. You can see all the ads that currently make the threshold and meet our criteria on this page:  Note: As with previous  of this program, if your ad has already appeared in a previous cycle, it is not eligible to be run in this cycle. However, if it did not make it through the previous cycle, it is eligible.


Is the second "to" needed here? "I am going to listen and (to) read"

Which one is correct? Can I use both?  "I am going to listen and read." "I am going to listen and to read."


Second order linear homogeneous ODE with constant coefficients and repeated roots. Why second solution needed?

In this case of a second order linear homogeneous ODE with constant coefficients and repeated roots:  $ay'' + by' + cy = 0 $ (and $r1 = r2$)  why is the solution $y_1(t) = e^{-b/2a}$ not enough? in other words, why do we need a second equation?


I am getting following error when trying to use external bibliography library:  Package biblatex Error: Patching 'babel' package failed. \begin{document}   From what I know, this is probably caused by a bug. However, I didn't find any suitable solutions. I am using TeXstudio (Windows) and installing packages is quite difficult. Whenever I find out I need a new package, I need to install it before the document can be compiled. Basically I am installing new packages on the fly. Could it be caused by incomplete libraries? Should I reinstall TeXstudio?  This is how TeXstudio looks like on Windows:   This is my preamble in lab01.tex (before \begin{document}):  \documentclass[12pt,twoside,a4paper]{article} \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{float} \usepackage{lmodern} \usepackage{graphicx} \usepackage{attachfile} \usepackage{subcaption} \usepackage{cleveref} \usepackage[document]{ragged2e} \usepackage{textcomp} \usepackage{gensymb}  \usepackage[ backend=biber, style=alphabetic, citestyle=authoryear ]{biblatex} \addbibresource{lab01.bib}  \usepackage{siunitx} \sisetup{     detect-mode,     detect-family,     detect-inline-family=math,     group-separator={.},     group-minimum-digits={3},     output-decimal-marker={,} }  \captionsetup[subfigure]{subrefformat=simple,labelformat=simple} \renewcommand\thesubfigure{(\alph{subfigure})}  \title{Výkonové polovodičové systémy~I \textemdash\ Laboratorní úloha č.~1\\ \large \emph{Řízený dvoupulzní usměrňovač}} \author{Marek Poláček (POL0423)\\ VŠB \textendash\ Technická univerzita Ostrava,\\ Fakulta elektrotechniky a~informatiky.} \date{\today}   This is content of lab01.bib:  @book{book:ZČU,     author = {VONDRÁŠEK, František},     title = {Výkonová elektronika},     date = {1998},     volume = {svazek~II},     publisher = {Západočeská univerzita},     location = {Plzeň},     isbn = {80-7082-485-9}, }  @book{book:ČVUT,     author = {PAVELKA, Jiří a~ÚČEŘOVSKÝ Zdeněk},     title = {Výkonová elektronika},     date = {2000},     edition = {Vydání~2.},     publisher = {ČVUT},     location = {Praha},     isbn = {80-01-02094-0}, }


I have to show that for every $x \in \mathbb{R}$ and every $n \in \mathbb{N}$ $$|\sin(nx)| \le n|\sin(x)|  $$ In the previous exercise, I have showed that $|\sin(x)|≤|x|$ with the use of the mean value theorem. I think that I cannot use this approach this time. I also tried to write $\sin(nx)$ as a series expansion but that doesn't work either.     Does anyone know how I can solve this?