For an isolated system, can the entropy decrease or increase?

In any sizable system, the number of equilibrium states are much, much greater then the number of non-equilibrium states. Since each accessible micro state is equally probably, it is overwhelmingly likely that we will find the system in an equilibrium state.   However, for a closed system, one that does not interact with any external system, the number of micro states is fixed. Therefore the entropy is fixed.  At any given time, the system will be in one of its micro states. Even if the system is in a micro state that does not look like equilibrium from a macroscopic point of view, its entropy will remain the same, since entropy is a property of all the micro states, not just a given micro state.   So, are the number of accessible micro states (and hence entropy) of an isolated system constant?


Is it possible to send email with attachment as .xls using shell script?

#!/bin/bash  ATTACH1=file.xls SUBJECT="subject" FROM=me@domain.com TO=you@domain.com CC=them@domain.com MIME="application/xls"  FILE=$ATTACH1 boundary="---my-unlikely-text-for-mime-boundary---$$--"  (cat < From: $FROM To: $TO Subject: $SUBJECT Date: $(date +"%a, %b %e %Y %T %z") Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="$boundary"  This email has attached the file --$boundary Content-Type: $MIME;name="$FILE" Content-Disposition: attachment;filename="$FILE"  ! ) | sendmail -v ${TO}


What is the value of $0^0$ ??  I have read many discussions regarding it but the result was only confusion. Is it 0, 1 or not defined??


I was thinking about some physics (relativity in particular), when it suddenly occurred to me that all my life I had been balancing chemical equations assuming conservation of mass, but I was disregarding energy!  For example, consider combustion: $$\rm CH_4 + 2O_2 \to 2H_2O + CO_2 + {Energy}$$  However, since energy was released, some mass should have been converted to energy right? Why is the equation reflecting a balance in mass?


Would you please rephrase this so I can better understand it?  The money could be paid as early as next week.  What other meanings might "as early as" take on in different situations or circumstances? Does "early" in these examples mean the same as it does in the previous example?  Early booking is essential. as space is limited. I wake up as early as 6 o'clock I wake up at 6 o'clock


Javascript global match with capturing groups

Can anyone tells me why does't the second snippet  catchs the 'groups' when use g flag ?         "123".match(/(\d{1})(\d{1})/)    // returns  ["12", "1", "2"]   "123".match(/(\d{1})(\d{1})/g)   // returns ["12"]   (where's 1 and 2 ?)     console.log("123".match(/(\d{1})(\d{1})/))    // returns  ["12", "1", "2"]  console.log("123".match(/(\d{1})(\d{1})/g))   // returns ["12"]   (where's 1 and 2 ?)


I have a small problem. The f12 wont render correctly. This is my viewport:    and this is the f12 image:    Blender File here:   Could someone please help me :)?


How to sort a multidimensional JSON array in PHP?

Would someone please tell me how I can sort this kind of JSON Array by the "name" in ascending alphabetical order?  {     "response": {         "game_count": 86,         "games": [             "10": {                 "appid": 10,                 "name": "Counter-Strike",                 "playtime_forever": 7604,                 "img_icon_url": "6b0312cda02f5f777efa2f3318c307ff9acafbb5",                 "img_logo_url": "af890f848dd606ac2fd4415de3c3f5e7a66fcb9f",                 "has_community_visible_stats": true             },             "80": {                 "appid": 80,                 "name": "Counter-Strike: Condition Zero",                 "playtime_forever": 62,                 "img_icon_url": "077b050ef3e89cd84e2c5a575d78d53b54058236",                 "img_logo_url": "acdb28ba1b4c2fcc526332c1b63fc0f7533f087f"             },                 .                 .                 .             ]      } }


A typical $L^p$ function does not have a well-defined trace on the boundary

This question is from PDE by Evans, 1st edition, Chapter 5, Problem 14. It has been posted  previously, however, I cannot quite put all the information together from the responses there. Hopefully you can help me now. The problem is as follows:     Let $U$ be bounded with a $C^1$ boundary. Show that a ''typical''   function $u \in L^p(U) \ (1 \leq p < \infty)$ does not have a trace on   $\partial U$. More precisely, prove there does not exist a bounded   linear operator      \begin{equation} T:L^p(U) \to L^p(\partial U) \end{equation}      such that $Tu = \left. u \right|_{\partial U}$ whenever $u \in C(\overline{U}) \cap L^p(U)$.   So what we're trying to find is a bounded sequence of functions that go to infinity at the boundary, correct? Because then $Tu = \left. u \right|_{\partial U}$ is undefined.  I like the idea of using the $\mathrm{dist}(x, \partial U)$ function to do this. I was thinking about defining the function  \begin{equation} u(x) = \frac{1}{\mathrm{dist}(x,\partial U)}, \end{equation}  which must be in $L^p(U)$ since $U$ is bounded (hence integral of $\varepsilon$ over $U$ is finite, right?). But this function is not continuous at the boundary, and so $u \notin C(\overline{U})$. Can this be modified somehow?  Another option is to use that the boundary is $C^1$. So for each $x^0 \in \partial U$ there exists an $r > 0$ and a $C^1$ function $\gamma : \mathbb{R}^{n-1} \to \mathbb{R}$ such that $U \cap B(x^0,r) = \{ x \in B(x^0,r) \ | \ x_n > \gamma(x_1,\ldots, x_n) \}$. So around every point on the boundary we can find a ball where the n'th coordinate is greater than the $C^1$ function $\gamma$. How can we use this?


String replace in vim: Why does %s/foo/bar work?

:%s/foo/bar/g   This vim command has saved me lots of time.  But today I accidentally typed  :%s/foo/bar without the global (g) ending and it worked anyway!  I was very confused.  What's going on?  Is it better to use the /g and why?


Why is the following equivalent transformation of the imaginary number legitimate?

Why is this substitution acceptable?  $\sqrt{i}=\frac{1+i}{\sqrt{2}}$


What is the square matrix $A$ equal to if $A=A^2$

The question is:  If A is a square matrix such that $A^2=A$ then $A^n =A$ for all natural numbers $n$  greater than one. What is $A$ if $A \ne 0$ and $A \ne I$.   I figured out an answer but I can't tell if that's the only answer. Let's say that $a_{kk}$ is a value in $A$. Every value in $A$ is $0$ except for $a_{kk}$ and $a_{00}$, they're $1$. I haven't gotten this answer mathematically.  I've tried a few approaches but ended up with the identity matrix.


How to customize the error message thrown by approval process?

I have requirement where an user should not be able to submit  a master record for approval until all the related child records are approved.  Submit for approval button on approval history related list cannot be removed. So, this is not an option.  The approach I was thinking is to have a custom field on the master record which specifies whether all child records are approved and add that field in the entry criteria. S0, the record won't be submitted as it does not satisfy the entry criteria. But I need to inform users why they are not able to submit the record. So, I want to customize the error message as well. I have done some search and could not find anything.  Can anyone please let me know if this is possible or suggest any workaround for the above scenario?


How to make the 3d manipulator act parallel to a plane

How would i be able to set my 3d manipulator so that one of the axis is parallel to the face of what im moving, i want to move it parallel to the face of the plane.


If a stock doesn't pay dividends, then why is the stock worth anything?

I read somewhere that companies are not required to pay dividends to shareholders (this is correct, yes?).   If so, then if company A never pays dividends to its shareholders, then what is the point of owning company A's stock? Surely the right to one vote for company A's Board can't be that valuable.   What is it that I'm missing?


I have attempted to prevent my screen from locking when plugged in for 3 hours, but it is not happening. These are my settings:    Nevertheless, if I leave my computer for 15 minutes it locks, even though it is plugged in. Is there some setting somewhere that is overriding these settings?  The screen locks after 10 minutes, just timed it.


Voting to close my own question confusingly acts as if I'm not me

When my vote to close my own question as duplicate was registered as a simple vote, I was a bit surprised, as I thought it'd immediately close for my own given reason, but the question of whether a user should be allowed to force a close-as-duplicate has already been addressed here on Meta.  However, when I later reloaded the page it was much worse:     I automatically leave a comment asking myself if something answers my question. Well, of course I think it does, otherwise I wouldn't have voted for that. "The system" picks up my on question and asks it to me again. Well darn, I just told you that it does — take my vote for an answer!   This can't be right!


I searched on this site but I found posts asking for books on complex analysis which I guess is not what I want.   I want a book on problems concerning with roots of unity, argand plane, exponential form, inequalities etc. Some examples : , , .  I don't think these types of problems are covered in a analysis book but I don't know. I think I want a book on algebra of complex numbers.   Are these topics covered in analysis book ? If not, please suggests some books on this topic. I guess my question is bit vague, sorry for that. :).      As suggested in the comments I would like to have books similar to .


A proof for Atiyah-Macdonald Exercise I.21.iii

The following is exercise I.21.(iii) of Atiyah-Macdonald:     Let $\phi \colon A \to B$ be a ring homomorphisms. Let $X = \operatorname{Spec} A$ and $Y = \operatorname{Spec} B$ [and let $\phi^\ast \colon Y \to X$ be the induced mapping, $\phi^\ast (\mathfrak q) = \phi^{-1} (\mathfrak q)$]. Show that   [...]   iii) If $\mathfrak b$ is an ideal of $B$, then $\overline{\phi^\ast (V (\mathfrak b))} = V (\mathfrak b^c)$.   [...]   After trying myself for a while, I looked at solutions posted on the internet, one of which presented the following solution.     It is clear that $\mathfrak p \in \overline{\phi^\ast (V (\mathfrak b))} \color{blue} \Leftrightarrow r (V (\mathfrak b)^c) \subset \mathfrak p$ and $\mathfrak p \in V (\mathfrak b^c) \Leftrightarrow \mathfrak b^c \subset \mathfrak p$. Then it suffices to show that $\mathfrak b^c \subset \mathfrak p$ if and only if $r(V (\mathfrak b)^c) \subset \mathfrak p$, which is true because $r(V (\mathfrak b)^c) = r(V (\mathfrak b))^c \color{blue} = r(\mathfrak b)^c = r(\mathfrak b^c)$.   where I have marked the things I don't understand in blue.  In the meanwhile I have found a different proof for the exercise, but I still don't understand this proof. In particular   I don't understand the connection between taking the closure and taking the radical. I don't know if $r(V (\mathfrak b)^c)$ is a shorthand for the set of elements contained in the contractions of prime ideals contained $\mathfrak b$ or for the ideal generated by these elements or something else. I don't see why the marked equality holds.


I have a default torus  In edit mode i have duplicate 2 times and select all and Press P key i get 3 option by loose parts and when i click get 3 torus separate in outliner.  But when i select the single torus in edit mode select all the faces and hit P key and select loose parts and nothing happens. Here im not getting all the faces separate like the torus separated above.  How can i get separate loose faces. Is there any addon or how can i get all 576 faces separate.


dual boot Ubuntu with Windows 10 (already having 4 important dynamic partitions)

I have HP g6 laptop with Windows 10 installed having partitions as follows:    As you can see, there are already 4 partitions (which I cannot delete) + 1 partition (F: which has data). I am aware that these partitions are of the dynamic type and therefore, Ubuntu cannot be installed on a separate partition.  I tried creating unallocated space of 70 GB from F: but Ubuntu setup was not able to detect 70 GB partition (maybe since the drive is of dynamic type).  What would be the best approach if I want to install Ubuntu with Windows 10 without disturbing the current Windows 10 installation?  In other words, I want to have at least 3 partitions (one for Windows, one for Ubuntu and one for storing data) without affecting other things.


I found this article:  and I have some question about part of the presented code:  First: I think that is something about dependent name but I am not sure what is a purpouse of this part:   template <typename T>     typename instance_counter<T>::counter instance_counter<T>::icounter{};   And second one:  template <typename T> struct counted : T, private instance_counter<T> {     using T::T; };   Could somebody give me an explanation about these codes?


Homotopic and Smoothly Homotopic Manifolds

So I learn about these two things today. Let $M,N$ be smooth manifolds and $f_1,f_2$ be smooth maps from $M$ to $N$  Def: $f_1$ and $f_2$ are HOMOTOPIC if there exists a a smooth map $H: [0,1]\times M\to N$ s.t. $H(0,m)=f_1(m)$ and $H(1,m)=f_2(m)$.  Def: $f_1$ and $f_2$ are SMOOTHLY HOMOTOPIC if there exists a a smooth map $H: \mathbb{R} \times M\to N$ s.t. $H(0,m)=f_1(m)$ and $H(1,m)=f_2(m)$.  I want to ask what is the relation between these two. I understand that if they are smoothly homotopic, then they are homotopic since we can restrict the homotopy map. What about the other way around? If we have a homotopy on $[0,1]$, can we extend it to $\mathbb{R}$?


I'm sitting on this for quite some time now. I just can't find an answer so it would be cool if you guys could help.  There are two classes involved, one (XMLParser) is reading from a ifstream and is deserializing objects and stores them in a local veriable. A second is holding a vector<Someclass *> objVec;, so a vector which holds pointer to objects of a specific type. I'm pulling it all together like this:  ifstream file(filename, ifstream::in); if (file.is_open()) {     XMLParser xmlParser;     file >> xmlParser;     xmlParser.fill(&objVec);     file.close(); }   XMLParser.h:  class XMLParser { private: vector<Someclass> someVec; vector<SomeOtherclass> someOtherVec; public:     template<class T> void fill(std::vector<T*> *vec);     friend std::istream &operator>>(std::istream &stream, XMLParser &ob); }; std::istream& operator>>(std::istream &stream, XMLParser &ob);   XMLParser.cpp:  std::istream& operator>>(std::istream &stream, XMLParser &ob) {     //deserialize objects from stream and store them locally     return stream; }  template <class T> void XMLParser::fill(std::vector<T*> *vec) {     //fill the vector with the right objects }   Everything is compiling well, no errors or warnings. But when its time for linking I'm getting a undefined reference to 'void XMLParser::fill<Someclass>(std::vector<SomeClass*, std::allocator<Someclass*> >*)', XMLParser.o is of course provided.  what I've tried, among other things:  including the allocator: template<class T> void fill(std::vector<T*, std::allocator<T*> > *vec) -> same error  writing a specialization for fill width Someclass: template <> void XMLParser::fill(std::vector<Someclass*> *vec) -> working! but not what I want  I've searched for some examples on the web and none of them is providing the allocator class for the template, so this doesn"t seams to be the way. The specialization is working, but does anyone know why I need to provide a specialization for every class that might come along? Is there a way around? Cause it doesn't seams to be very generic if I have to provide a specialization for every class that might be in the XML.  Thanks Martin


solution set for congruence $x^2 \equiv 1 \mod m$

if $m$ is an integer greater than 2, and a primitive root modulo $m$ exists, prove that the only incongruent solutions of $x^2 \equiv 1 \mod m$ are $x \equiv \pm 1 \mod m$.  I know that if a primitive root mod $m$ exists, then $m = 1, 2, 4, p^m,$ or $2p^m$, where p is an odd prime and $m$ is a positive integer.  Obviously I can check the cases where $m = 1, 2, 4$ by hand but I am having trouble proving the other two cases.


Large number of failed login attempts - cPanel Hulk Brute Force

Mods: Please note that this question is specifically about a server that is managed via cPanel and WHM, which makes it different than the .  The past month, my personal web server has received thousands of these notices. Please note, my server is primarily managed by WHM/cPanel, although I have root ssh, ftp and other traditional access points.   These attacks started by attempting root, but have since progressed to attempting user accounts where I am not certain how they even guessed the correct usernames (albeit wrong passwords).   Is there a way to prevent these kinds of attacks from happening?  Also, here's the number of auto-bans listed just today and some smattering of IP address sources - the attack times for past month are basically around 6:30 am east coast time to 11 pm:


Loosely, a number is describable if it can be unambiguously defined by a finite string over a finite alphabet. Numbers such as $\frac{1}{3}$, $\sum_{n=0}^\infty \frac{1}{n!}$, and "the ratio of circumference to diameter of a circle" are all describable numbers. One can  show that the set of all such numbers is countable.  Let $U$ be the set of indescribable real numbers. I "claim" $U$ is empty, and so every real number is describable. Suppose to the contrary. Place a well-order on $U$ (this can be done assuming the Axiom of Choice). The least element $u$ of $U$ admits the description "the least element of $U$ according to the specified well-order", contradicting the indescribability of $u$.  Obviously, something has gone awry here. I suspect it is some combination of my loose definition of describability and my self-referential "description" of $u$. My (slightly open-ended) question is "What's wrong here?".  P.S. There is a  addressing something rather like my question. As I understand it, the author's response is "the given description isn't really a description". If so, I'd enjoy some elaboration.


Aligning footnote numbering and footnote text

After compiling the following document the footnote  appears as   .   But I would rather like to have a footnote below  (i.e., the footnote numbering and the text of footnote align and to have a . after the numbering) : What are the possible ways to have this behavior?   Hello   \documentclass{book}  \begin{document}  Hello\footnote{Hello}  \end{document}   edit:   I have applied the solution given by henrique in the link provided in a comment:  \makeatletter \renewcommand\@makefntext[1]{%  \hspace*{-2em}%  \parindent 0em \noindent \hb@xt@ 1.8em{\hss  \@thefnmark. }%  #1} \makeatother   There's the option of putting \hss before or after \@thefnmark, aligning the footnote marks to the right or to the left, respectively. I have just modified the number  \hspace*{-2em}  in that code for my particular document.


Why is there a 10-character minimum on edits?

Sometimes I come across errors in answers that are small, but "catastrophic". For example, they wrote is when they meant isn't, or they mis-typed a bash command that could damage someone's system. I can't fix these types of "off by one character" errors due to the character limit.  This has happened at least a dozen times over the last few years of using SO (my current account is a new account - I was tired of all the notifications on my last one). It's a bit frustrating because I want to help improve SO, but the platform seems unnecessarily antagonistic in this case and discourages me from even bothering to fix things in the first place.


Getting null pointer exception in java map collection .How to handle Null pointer exceptions in map

I have used Maputils.IsEmpty() method.I use apache.commons.collections framework class.  if (MapUtils.isEmpty(abcdMap)) {     //steps to execute     } return new arraylist<>(abcdmap.values());  gets null pointer exception in return line. When did debug in the eclipse, I could see some field values in variables tab as below.(havnt mentioned all the internal fields) entryset : hashmap$entrySet(id) , keyset:null, values:null, How can we handle this nullpointerexception ? Can you suggest some other way of checking null condition for Maps.Thanks in Advance!!


I've just found out about Earth-616 and Earth-1218. What is the main difference between the two and which "Earth" is the one we see in the current Marvel movies?  EDIT  Just found out Earth-199999 is the Cinematic Marvel Universe... but why? where do these numbers originate from?


There is a problem of laziness or "disappearance" of the person who asks the question

From my observation, many people ask something and simply go away. They sometimes even receive 3–4 answers, take the codes, and run away without commenting anything, without voting anything, and without picking any answer.   Is this a normal thing? (Is the forum not interactive in finding a solution?)  If it's not normal, what should be done against it?


Why is it called "characteristic $0$" and not "characteristic $\infty$?"

There may not be a good answer to this; it is perhaps more or less a matter of coincidence. But the thing is: For any ring, the characteristic of the ring is the order of the element $1$ in the ring --- except if this order is $\infty$, in which case the characteristic is zero. So wouldn't it be more natural to call it characteristic $\infty$? Is there some smart reason behind this that I just haven't noticed yet, or is it just because mathematicians are weird?


Extension of partial derivatives and the definition of $C^k(\overline{\Omega})$

The following is an excerpt from Folland's Introduction to Partial Differential Equations:  Let the open set $\Omega\subset{\mathbb R}^n$, and $k$ be a positive integer. $C^k(\Omega)$ will denote the space of functions possessing continuous derivatives up to order $k$ on $\Omega$, and $C^k(\overline{\Omega})$ will denote the space of all $u\in C^k(\Omega)$ such that $\partial^{\alpha}u$ extends continuously to the closure $\overline{\Omega}$ for $0\leq|\alpha|\leq k$.  As I understand, an extension means that there exists $\widetilde{\partial^{\alpha}u}$ which is defined on $\overline{\Omega}$ and $\widetilde{\partial^{\alpha}u}|_{\Omega}=\partial^{\alpha}u$. And "extends continuously" means $\widetilde{\partial^{\alpha}u}$ is continuous with respect to the relative topology on $\overline{\Omega}$.  Here are my questions:        How do people usually do such extension?   When does such extension exist and when does not?   Let $\Omega$ be an open subset of ${\mathbb R}$. Is there any   non-trivial counterexample such that   this kind of extension does not exist?


http://stackexchange.com/ onebox is white

I just oneboxed http://stackexchange.com/, but the image was pure white (I think): . Thinking that this may have been a MSE-only issue, I did it in two other rooms  and . Both times, it was was the same white image.    This can be fixed by changing <img src="http://cdn-chat.sstatic.net/chat/img/se-logo-white.png" to <img src="http://cdn.sstatic.net/stackexchange/img/logo.png.


How can we make the work spaces like 2X2 Grid on Ubuntu18.04?

Ubuntu 18.04 shows the workspace vertically. All work spaces shows below ones. How can we make it like as previous (2X2 Grid)?


proving $\csc^2 \left( \frac{\pi}{7}\right)+\csc^2 \left( \frac{2\pi}{7}\right)+\csc^2 \left( \frac{4\pi}{7}\right)=8$

How can I prove the following identity using complex variables $$ \begin{align*} 1) & \csc^2 \left( \frac{\pi}{7}\right)+\csc^2 \left( \frac{2\pi}{7}\right)+\csc^2 \left( \frac{4\pi}{7}\right)=8 \\  2) & \tan^2 \left( \frac{\pi}{16}\right) + \tan^2\left( \frac{3\pi}{16}\right) + \tan^2\left( \frac{5\pi}{16}\right)+ \tan^2\left( \frac{7\pi}{16}\right) = 28 \end{align*} $$ On earlier problem, I was given,  $\displaystyle (z+a)^{2m}-(z-a)^{2m}=4maz  \prod_{k=1}^{m-1} \left(z^2+a^2 \cot^2 \left(\frac{k\pi}{2m} \right )\right ) $ for integer $m>1$. I am not sure if I can use this is helpful. I am stumped please help.


I am trying to build a JavaScript initcap function which correctly converts the first letter in each word to upper case as the other letters to lower case.  All examples I have found converts the first character which is incorrect, eg: joe smith (c e o) should convert to Joe Smith (C E O), not to Joe Smith (c E O)  CSS transform is not an option as the value is returned to a server.  Probably using regular expressions is the way to go but I am no expert at these. Any help ?


I have a 6 plus. I have left ios 9.something there. If I want to update right now, as of right now the ios 12 is availble but i must install it from itunes.      Can I downlaod 10.0 on itunes and upgrade my 9.x to 10.x manually SO I dont have to install  12x


Novel about teleportation and a child assumed to be the savior of the galaxy

I could swear that I got this answered once via the TVTropes YKTS forum, but all I can find is my failed query.   It's a Sci-fi novel, involves the last member of an alien race saying that a particular child will be a savior of the galaxy. Everyone assumes that this means that he will be able to transcend the teleportation limits (if I recall correctly, they could teleport up to some amount, say 22 kilograms, but the moment they added a gram more, it failed). His father was a former football player and it was referenced a few times that he used a football carry for the baby with the head in one hand and the rest of the body on one forearm. The parents were killed by some sort of extremists and the boy was tested for his teleportation abilities and they found that he couldn't transcend the limit. And... that's about all I remember.  I read it in middle school, I believe, so that means it was definitely published before 2000 and likely before 1994.


I am running Ubuntu 16.04 and when I open .deb files, it opens Ubuntu Software. When I press the install button in Ubuntu Software, it opens a "waiting to install" process and never installs.  The output for sudo apt install /home/potato/Downloads/discord-0.0.4.deb:  potato@Potato:~$ sudo apt install /home/potato/Downloads/discord-0.0.4.deb [sudo] password for potato:  Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'discord' instead of '/home/potato/Downloads/discord-0.0.4.deb' The following additional packages will be installed:   libappindicator1 libc++1 libindicator7 Suggested packages:   clang The following NEW packages will be installed:   discord libappindicator1 libc++1 libindicator7 0 upgraded, 4 newly installed, 0 to remove and 4 not upgraded. Need to get 21.9 kB/47.9 MB of archives. After this operation, 146 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 /home/potato/Downloads/discord-0.0.4.deb discord amd64 0.0.4 [47.6 MB] 95% [Connecting to us.archive.ubuntu.com]                                       Err:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libindicator7 amd64 12.10.2+16.04.20151208-0ubuntu1   Temporary failure resolving 'us.archive.ubuntu.com' E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libi/libindicator/libindicator7_12.10.2+16.04.20151208-0ubuntu1_amd64.deb  Temporary failure resolving 'us.archive.ubuntu.com' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   output for dpkg -i  sudo dpkg -i /home/potato/Downloads/discord-0.0.4.deb Selecting previously unselected package discord. (Reading database ... 244590 files and directories currently installed.) Preparing to unpack .../Downloads/discord-0.0.4.deb ... Unpacking discord (0.0.4) ... dpkg: dependency problems prevent configuration of discord:  discord depends on libappindicator1; however:   Package libappindicator1 is not installed.  discord depends on libc++1; however:   Package libc++1 is not installed.  dpkg: error processing package discord (--install):  dependency problems - leaving unconfigured Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ... Processing triggers for mime-support (3.59ubuntu1) ... Errors were encountered while processing:  discord


How did Isaac Newton figure out how the law of gravity worked?

There are  and  similar Phys.SE questions, but I didn't find what I'm looking for, nor was the person's question specific enough. How did  figure out $$F=GMm/ r^2~?$$ What was his reasoning? What evidence led him to think this?


Can somebody explain to me graphically or intuitively why this is true? Because if we think in terms of the base of the triangle formed inside a unit circle it seems like it should not be negative.


When you select an object in blender a yellowish ring appears around it. And no matter how much your rotate your view or the object, the outline will only appear on the visible outline of the object. It does not appear on every edge.    How can I get this effect on any object like an object modifier(but it doesn't have to be of course)? I also want to be able to change the width and set the material. I will be rendering this with openGL as an animation. Some objects rotate in my animation and I want them to be able maintain an outline.


Would it be wrong to copy-paste questions from Quora?

Since Quora just went public, I decided to have a look around and found certain topics like Gmail that contained questions that would be great for the Web Apps SE-site.  However, would it be considered plagiarism if I simply asked the same questions on the new site?  Edit: I would only look at the titles for an interesting question to ask, so if I write my own question body, it's not plagiarism in the real sense of the word. However, it's probably not really polite since if we are better indexed or have a better PageRank, we would steal some of their attention.  In response to Jeff's answer: how should I attribute to the sites? Simply mention I found this question on Quora and link to it?


I'm using the default installation of openssh-server for my Ubuntu 14.04 server. I can connect through the console as root like normal, with my username and password. When I try to SSH with the same username/password, however, I repeatedly get Access Denied errors. /var/log/auth.log reports Failed password for root from <ip address> port <port> ssh2, but I'm entering the correct password.  Why can't I connect to the server via SSH, even though the username and password ARE correct?


I am trying to decide if I can consider myself a native English speaker

I was born in Amsterdam, Holland. I learnt Dutch from my parents and in school. Around the age of 5-6 I started learning English. I watched English television and had English conversations with my mother and we also had frequent English speaking guests in our home, with whom I spoke English. I spoke English well before I started learning it in school around the age of 11.  When I was 13 I moved to Denmark and lived in an all-English speaking community for 9 years. I also continued my schooling in English as well as further studies.   Now I speak English as my first language. I still speak Dutch, but it's not quite as fluent as English. These days people assume I'm American when they hear me speak. I work in English, I speak English at home, I read English fiction for leisure, etc. I also tend to find grammatical and typographical mistakes very quickly, and I speak better English than most people I know, including slang.  So now I'm interested to know if English is really my first language, and if I am a native English speaker.


How are the file metadata stored in Windows?

(I'm using Windows XP but I guess it's similar in all the recent versions of Windows.)  When you create for example a new empty text document, you'll find in its properties that it has size of 0 bytes. Zero bytes means no information. No data. But still, the file has some name, it can still carry the dates of last access, modification and creation. It carries the information whether it's hidden file or not, whether it's read-only or not...  So where are all the metadata stored?


What would be the effects of the Dementors' Kiss on a Horcrux contained within a living person?

Could the Dementors’ Kiss destroy a living Horcrux, like Harry? Lupin explains the Dementors’ Kiss to Harry in Prisoner of Azkaban:     ‘They call it the Dementors’ Kiss,’ said Lupin, with a slightly twisted smile. ‘It’s what Dementors do to those they wish to destroy utterly. I suppose there must be some kind of mouth under there, because they clamp their jaws upon the mouth of the victim and – and suck out his soul.’   Harry accidentally spat out a bit of Butterbeer. ‘What – they kill –?’   ‘Oh, no,’ said Lupin. ‘Much worse than that. You can exist without your soul, you know, as long as your brain and heart are still working. But you’ll have no sense of self any more, no memory, no ... anything. There’s no chance at all of recovery. You’ll just – exist. As an empty shell. And your soul is gone for ever ... lost.’   Prisoner of Azkaban - Page 183 - British Hardcover   Subsequently, Dumbledore tells Snape in The Prince's Tale in Deathly Hallows:     'On the night Lord Voldemort tried to kill him, when Lily cast her own life between them as a shield, the Killing Curse rebounded upon Lord Voldemort, and a fragment of   Voldemort’s soul was blasted apart from the whole, and latched itself on to the only living soul left in that collapsing building.   Deathly Hallows - Page 550 - British Hardcover   I noticed that it says the portion of Voldemort's soul latched onto Harry's soul, but it does not specify in canon that the two souls assimilate one another, as opposed to co-existing (aside from Dumbledore saying, 'To speak of one [Harry] is to speak of the other [Voldemort].')  When delivering the Kiss would a Dementor be able to tell there was a portion of another person’s soul along with the victim’s own soul? If not -- based on what we know about the Dementors’ Kiss, Horcruxes, and the soul from canon -- could the Dementor destroy the Horcrux portion of the soul while leaving the victim’s original and untainted soul untouched and intact? Or would both portions of both souls be sucked out by the Dementor?  From the King's Cross chapter in Deathly Hallows we know it is possible for the Horcrux portion of attached souls to be destroyed while the other part lives. Based on what we know from canon could the Dementors' Kiss be a means of destroying a Horcrux?  Related question . (What effect would the Dementors' Kiss have on Voldemort prior to the destruction of his Horcruxes?)


Why does it take 3 days to do electronic transfers between banks?

It seems like electronic transfers can take 2 - 3 days to complete. For example, when I ask my online broker to transfer money from my checking account, the money won't actually be available to trade with until the third business day.  Why is this? Don't banks just use some kind of EDI? Is there some kind of tangible benefit to them of having the additional time (other than the banks hanging on to the money a little longer)?


How to return 2 leading 0 in toString() method?

public class Date  {     private int day,                month,                year;     public Date(int day, int month, int year)    {       this.day=day;       this.month=month;         this.year=year;       }     public int getday()    {          return day;        }     public int getmon()    {        return month;      }     public int getyear()    {          return year;       }     public void setd(int day)    {        this.day=day;    }     public void setm(int month)    {        this.month=month;    }     public void sety(int year)    {        this.year=year;    }     public String toString()    {       return " "+getday()+"/"+getmon()+"/"+getyear();    } }   How to make the toString method to return 2 leading 0? So that if I call it in the main if I call the toString method it will print  The output of that is  2/10/199  my expected output  02/10/1999


Is Poisson–Lindley an exponential family? If not, why?

$$\begin{aligned}f_Y(y_i)&=\frac{{\theta_i}^2\left(y_i+\theta_i+2\right)}{\left(1+\theta_i\right)^{y_i+3}}\\ &=\exp\ \log\left[\frac{{\theta_i}^2\left(y_i+\theta_i+2\right)}{\left(1+\theta_i\right)^{y_i+3}}\right]\\ &=\exp\left[\log\left(\frac{{\theta_i}^2\left(y_i+\theta_i+2\right)}{\left(1+\theta_i\right)^{y_i+3}}\right)\right]\\ &=\exp\left[\log\left({\theta_i}^2\right)+\log\left(y_i+\theta_i+2\right)-\log\left(1+\theta_i\right)^{y_i+3}\right] \end{aligned}$$ Need to write in the form $$f(y) = \exp{ [y(\theta) - b(\theta)]/ a(thi) + c(y, thi)}$$ I am actually stuck here and I am not sure about whether it can be written as canonical form or not. I have read somewhere that mixed distributions are not members of the exponential family.


Action is not fired when called from another thread

In my app I am running a method that takes few seconds to run and I need to fire that multiple times with different parameters to achieve what I want. Later on I started having performance problems and decided to fire those actions in multiple threads to reduce the time spent for running it. I implemented everything as expected, but when it comes for firing that thread it just freezes. It says threads are running, but never finishes. I thought maybe my methods that I am calling in threads are locking the same object and that is causing the threads to freeze, but it seems that is not the issue.   Here is a sample code:    public abstract class ModelBase {     public static void RunInMultiThread(List<Action> actions)     {          Action testAction = new Action(() =>         {             Console.WriteLine("Other test");         });         List<Thread> threads = new List<Thread>();         foreach (Action action in actions)         {             ThreadStart dlg = () => { action(); };             Thread thread = new Thread(dlg);             thread.Start();             threads.Add(thread);         }          bool anyAlive = true;         while (anyAlive)         {             anyAlive = threads.Any(t => t.IsAlive);         }     } }  /// <summary> /// This class is autogenerated /// </summary> public class Model : ModelBase {     public void FireActions()     {         List<Action> actions = new List<Action>();         for (int i = 1; i <= 100; i++)         {             Action action = new Action(() => { DoSomething(i); });             actions.Add(action);         }          RunInMultiThread(actions);     }      public void DoSomething(int a)     {         Console.WriteLine("Test " + a);     } }   I am creating the new instance of the Model class and calling the FireActions method. I can see the list of threads in the RunInMultiThread() method and it says all the tasks are running. I don't see anything in the output.  To make it simpler, I passed the testAction action to the ThreadStart and that worked. I am very surprised why it doesn't work if I pass the actions that came in the list?  NOTE: The Model class is actually autogenerated and located on another library and it's .NET version is 4.0. That library is built using the System.CodeDom.Compiler. ModelBase class is on another project and it's .NET version is 4.7.1.   Any ideas why it won't run my actions that is passed though the list??


Creating Ellipse in WGS84, but with metric parameters

I have the function  --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse) SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2)   I have points in WGS84 (x,y), radiuses in meters (rx, ry), rotation angle in degrees. And I need a new WGS84 geometry as a result.  As you can see I can't call this function without conversions between WGS84 and some metric SRID. But my points aren't in a definite region. So a SRID which is optimal for one point, throws an error for another point during conversion.  Is there a common way to get an optimal metric projection (SRID) for a WGS84 point? Or at least to use some rough, but world-wide universal metric projection? Or maybe there's a trick for this case?


I have been given a set of reports from several experiments. Each experiment contains of several steps and each step has one docx report containing images placed "in text".  Is there any way how to extract all images at once? I can export them separately, but it seems to be a waste of time.


I am creating a new website for a client, and I think a single page website / layout will be pretty neat. There is not that much detailed content, it is a company that imports a lot of products from different companies. So it will be a bit of a showcase of the different types of products / equipment you can order. Of the whole catalog only maybe 10 products are actually shown.  Now I have the basic structure with sections and links like:      #home / #products / #equipment / #services / #contact.    Now from what I understand is that Google does not index links containing #, so there will be no problem of duplicate content, everything will be indexed as the frontpage.  Now what I want to optimize is searching. This company is agent of some product in the country, meaning only they have the permission to import and sell that product. This means  that when somebody searches for product x, this website pops up as the first hit.  Now can I make it that they will be automatically brought to the #products part of the website directly from google.  I was thinking of something like having google index the different sections as different pages. Is something like that possible?


How can I assign a variable's content to a variable's name in perl?

For example  $get = <>; chomp($get); $$get = "something";   if user inputted name for $get I want to assign "something" to $name


Video not playing in web browser with Bluetooth headphones connected. How can I fix this?

I have an Emby media server running on Ubuntu 16.04 on a home server. I like to watch video on my laptop, running Ubuntu 16.10. Playback works as expected but when I try to watch with my Bluetooth headphones connected videos will not play.  If I run top on my server I can see that ffmpeg is maxing out the CPU:  6626 emby      20   0 1094264 348240  27820 R 181.2  4.3  10:46.21 ffmpeg   As soon as I quit trying to playback the video CPU usage drops back to an expected normal level.  If I disconnect the Bluetooth headphones, video playback immediately works OK and audio comes through the laptop built in speakers OK.  I usually use Firefox but I've tried Chrome, Chromium and Opera but they all exhibit the same behaviour when trying to play video with the headphones connected.  It appears the behaviour is not limited to my Emby media server, I've tried to play YouTube videos and they will not play either with the Bluetooth headphones connected.  The headphones and Emby video playback both work OK with my Android phone.  If I play the same video file from my server through VLC on my laptop, the video and audio work fine. This is a workaround but not my preference.  The problem seems to be related to playing video in a web browser with Bluetooth headphones connected. Can anyone help me get this working?


Newest blender 2.8: Object visible in render button missing

In the latest version of blender 2.8 I can not find the button for an object that allows it to be shown in the rendered image. There is only one 'eye' icon left, which makes the object invisible/visible in the viewport.


What is the relation of sound propagation to air pressure?

I am wondering, air makes sound propagate. So in a vacuum there is no sound, but what is the relation of pressure to sound volume? Is it linear?  If I have a source of sound and let's say I am in a room with an air pressure half of the pressure outside, would the sound be 0.5 lighter? Or does air pressure have no impact on the sound volume?  Is there a comprehensible formula for that?


I have been coding and using Arduinos for quite some time now.  However I am ready to move up to using straight AVR chips without the arduino bootloader.  My question is what are resources to do this?    I want to use linux / mac so winavr is out of the picture as is avrstudio.  If there is no such thing as what I am after I will settle for a windows virtual machine.  But until I know for sure.  What I want is some type of IDE that uses avr-gcc.  As a bonus to this question does anyone have any good resources on learning C for avr?  Specifically how to configure Makefiles etc for the various different chips?


If I have a function $y=x^x$, that can be denoted in hyperpower notation as $^2x$, but I will be denoting it as $ y= $ hyp$_2(x) $. In general, for hyperpowers, $y=x^{x^{x^{...}x}}$ or in my notation $ y= $ hyp$_\alpha(x) $. The problem with the hyperpowers I don't know how to calculate them for non-integer $\alpha$. Is it even possible to have non-integer $\alpha$?   Thanks.


How to prevent Python from opening too many files while threading?

I need to run a specific function every second. I have searched for a solution and found :  import threading  def printit():   threading.Timer(5.0, printit).start()   print "Hello, World!"  printit()   It seems to be the code I have been searching for. But after running those lines of code for 20 Minutes I have got following error message:     Exception in thread Thread-1896: Traceback (most recent call last):   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner   File "/usr/lib/python3.5/threading.py", line 1180, in run File   "/home/pi/scanner/api/brightness.py", line 37, in adjust_brightness   File "/home/pi/scanner/api/brightness.py", line 14, in get_brightness   OSError: [Errno 24] Too many open files   It seems that every time the function is called a new thread starts. Is there a way to stop the previous thread before the new one gets generated? Or are there other solutions where this doesn't happen?


I am trying to put the symplectic form of the 2-sphere defined by $\omega_u(v,w) := \langle u,v\times w\rangle,$ where $u \in \mathbb{S}^2$ and $v, w \in T_u\mathbb{S}^2$. I just can't do this in stereographic coordinates. Would you help me?


This sounds silly but I saw this and I couldn't figure it out so I thought you could help. The below is what I saw.  You see a top you want to buy for $\$97$, but you don't have any money so you borrow $\$50$ from your mom and $\$50$ from your dad.  You buy the top and have $\$3$ change, you give your mom $\$1$,your dad $\$1$, and keep $\$1$ for yourself.  You now owe your mom $\$49$ and your dad $\$49$.  $\$49 + \$49 = \$98$ and you kept $\$1$.   Where is the missing $\$1$?


Vertically align text and box without flexbox

So I was forced to work with old technology and got stuck. With flexbox this wouldn't have been an issue, but I can't seem to get it right without it. Here is an example of what I want:    It's supposed to be straight forward, but being accustomed to flexbox made me a cave animal when it comes to old ways of aligning. Here is what I tried based on suggestions online, but the box and text still aren't aligned vertically. Can someone save me? (the green border is for better showing if it is centered)

 test  test2


Exporting coordinates from LAS files to CSV?

Is there any tool available for extracting the X, Y and Z coordinates from a .las file and exporting them to a .csv or similar file?


Undefined reference: trying to initialize pointer array of objects from different class

The solution from the  is to initialize the pointer after the class definition but I have found no success doing so. Trying to insert A B::AArray; or A B::AArray = new A[10]; gives me multiple errors including "conflicting declaration" and "cannot be initialized by a non-constant expression". I can't seem to find a way to define B::AArray anywhere in the code.  class A{ public:     int Avar;     A(int Avar = 0){this->Avar = Avar;} };  class B{ private:     static A *AArray; public:     static void setAArray(); };  int main(){     return 0; }  void B::setAArray(){     A *data;     data = new A[10];     AArray = data; // <- delete this line and the program complies }   This piece of code says I have an undefined reference to 'B::AArray' and won't compile. How do I resolve this if I want a static pointer to an array of class A objects in class B?  Note: my class does not use multiple files currently and everything is under one .cc file


What is this component on circuit schematics?

It's a resistor like coloured 2 pin component from a power supply board of a home theatre, with a glass-transparent aspect. I'm a hobbyist and not into complex circuit till now...  looking for an answer online but couldn't find anything.  Thanks


Prove that In A simple linear regression, $SSR/\sigma^2$ follows chi square with one degree of freedom

In A simple linear regression, $SSR/\sigma^2$ follows chi square with one degree of freedom where SSR denotes the sum of squares due to regression. Although I get that it will have one degree of freedom, I just am not able to think how to prove that  $SSR/\sigma^2$ will follow chi square. How do I prove that it's the square of a standard normal?. I am new to statistics and self learning. I tried searching the site. But most of the answers are given in the context of multi linear regression. I don't understand multi linear much right now . I just need a hint in proving that it can be expressed as the square of a standard normal... Could someone please help. Thanks a lot


Firefox: Downloading files with drag and drop

In Firefox, if you drag and drop a URL (pointing to MyDocument.PDF, for example) into  (or Windows Explorer), Firefox will create a link (MyDocument.URL pointing to MyDocument.PDF) instead of downloading the PDF file. Is it possible to actually download the file instead of getting a .url file? To be more clear: I want to get the actual file when I drag and drop it, instead of getting a URL.  Yes, I know, I could use 'Save target as...' in the contextual menu but this will open an additional 'where to save' dialog box.


How to prove that $\mathbb{Q}$ ( the rationals) is a countable set

I want to prove that $\mathbb{Q}$ is countable. So basically, I could find a bijection from $\mathbb{Q}$ to $\mathbb{N}$. But I have also recently proved that $\mathbb{Z}$ is countable, so is it equivalent to find a bijection from $\mathbb{Q}$ to $\mathbb{Z}$?


Can someone explain what exactly each score of the BLOSUM62 matrix means?

The descriptions that I've found say it's the log odds ratio (observed/expected) where expected is the assumption that there is no correlation between amino acids.  I'm slightly confused as to what this means? Do we have a database of sequences and if there are 10 A's out of 1000 amino acids is it's expected simply 10/1000 * sequence length for all sequences?   What is the observed? Is the observed different for every sequence so there is a different BLOSUM matrix for each sequence? And can someone explain how this table represents 62% of "kept identity"?   Sorry if these questions seem nonsensical or vague, I'm not of a biology background.


In tex environment, when I try to use the verbatim function using verbatim packages, sometimes the longer text in the line tend to be cut off. How can I resize the text to fit into the line or automatically extend the text to the next line so as to retain all the text. For example I have the following text:      \begin{verbatim}         C **  RAINCVT   =CONVERTS RAIN TO UNITS OF M/SEC , inch/day=0.0254m/86400s=2.94E-7m/s, inch/h=7.05556E-6m/s C **  EVAPCVT   =CONVERTS EVAP TO UNITS OF M/SEC, IF EVAPCVT<0 EVAP IS INTERNALLY COMPUTED C **  SOLRCVT   =CONVERTS SOLAR SW RADIATION TO JOULES/S/SQ METER (Watts/m^2)     \end{verbatim}   In my output the first line doesn't show all the text. I would also appreciate if someone could tell how to limit the floating verbatim ? In tables using the label [h] at the end would fix the position of the table which doesn't seem to work on verbatim.


I'm currently unable to access anything via the Stack Exchange app under iOS; is this a known issue?


Biber and biblatex version mismatch despite correct versions installed

So, after a biber update a few days back I get the following message:  ERROR - Error: Found biblatex control file version 3.4, expected version 3.5. This means that your biber (2.12) and biblatex (3.11) versions are incompatible. See compat matrix in biblatex or biber PDF documentation.  In itself this is nothing new and remedied by updating to the newest versions. However, according to Miktex, my currently installed version of biblatex is 3.12.  Looking into the .bcf gave me: version="3.4" bltxversion="3.11"  which confuses me even more. To add to that, a new, clean installation of Miktex 2.9 doesn't have any biblatex version installed (at least according to the package manager) but I still get the same message. To my best knowledge there are no secondary biblatex instances on my system. What am I missing here?


Call Apex Methods with Params From Visual Force

Is there a way to call an Apex method with input parameters from Visual Force?  For example, if I have this Apex method:  public static String formatAddress(String city, String state, String country){     String formatted = city;     if(!String.isEmpty(city)){         formatted += ", " + city;     }      if(country != "US"){         formatted += ", " + country;     }      return formatted; }   And I have this VF page:  <apex:repeat value="{!fooList}" var="foo">     <apex:outputText value="{!formatAddress(foo.city, foo.state, foo.country)}" /> </apex:repeat>   I know I can put the city/state/country values up as page params, and pull them in Apex from the page params map, or put them in member variables on the controller, but I was looking for a way to do this without having to do any temporary storing of the data.  Thanks    edit -  sorry I couldn't reply to the comments below, but to provide more clarification:  @Rao - I've never used js remoting before, but quick glance at your link it looked like it will do ajax calls and update the dom later on.  I don't think this will work in my situation since the info I'm trying to print is not dynamic and will not need to be updated via ajax.  also, since I'm looping through a list, I don't think it would be a good idea to do ajax calls within a loop  @IllusiveBrian - I can definitely store the formatted addresses in a map, but I'm trying to keep my view state low.  this is definitely a viable solution though  @sfdcfox - I was going to do this but I thought I'd end up storing the data in memory twice, one for the actual "foo", and another for the "fooWrapper", which isn't bad but I was just looking for a leaner solution


If Jon Snow indeed was the son of Lyanna and Rhaegar,  how did he burn his arm in book one when he tried to save the Lord Commander Mormont from the wight? If he was part fire, how could he have singed himself?


I have a C++ library that provides various classes for managing data.  I have the source code for the library.  I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time.  I'm using GNU tool chain (gcc, glibc, etc), so language and architecture support are not an issue.  Are there any reasons why this is technically not possible?  Are there any gotcha's that I need to watch out for?  Are there resources, example code and/or documentation available regarding this?    Some other things that I have found out:   Use the following to wrap your C++ headers that need to be used by C code.     #ifdef __cplusplus extern "C" {   #endif   //   // Code goes here ...   //   #ifdef __cplusplus   } // extern "C"   #endif    Keep "real" C++ interfaces in separate header files that are not included by C.  Think  here.  Using #ifndef __cplusplus #error stuff helps here to detect any craziness. Careful of C++ identifiers as names in C code Enums varying in size between C and C++ compilers.  Probably not an issue if you're using GNU tool chain, but still, be careful. For structs follow the following form so that C does not get confused.  typedef struct X { ... } X  Then use pointers for passing around C++ objects, they just have to be declared in C as struct X where X is the C++ object.   All of this is courtesy of a friend who's a wizard at C++.


How to get the page number where a Theorem appears?

I want to write an article where it will: "See the proof of Theorem 4.1 in the page ...". How can I access this page number in Latex?  Thanks.


Asymmetric encryptions' computational complexity

I need to know the computational complexity of the public key encryption (e.g. Paillier), please.  (i.e.Paillier in his paper mentions that the computational complexity of most of public key encryptions is $O(n^3)$, but is not clear to me why)


Code to build all possible strings, and find a specific one doesen't work as expected

Part of a task I'm trying to solve is building all possible combinations of letters and whitespace. I'm trying to find a specific String, while building the combinations. I think i implemented the solution well, but my test tells me otherwise.  I'm taking the chars from an array and in a for loop I build a String from them, then print the solution. When I built all the combinations of let's say "1 character combinations", then i move on to "2 character combinations". I have a boolean to check if the contents of the StringBuilder is equal to the given String that i want to find. I checked, and the example String was indeed built, but the boolean didn't change.  public static void main(String[] args) throws InterruptedException {      findString("rxc");  }  public static void findString(String string) {     boolean isFound = false;     String allChars = "abcdefghijklmnopqrstuvwxyz ";     char[] sequence = allChars.toCharArray();     int lengthOfExpression = 3;     //builder contains 3 whitespaces at the beginning     StringBuilder builder = new StringBuilder("   ");      int[] pos = new int[lengthOfExpression];     int total = (int) Math.pow(allChars.length(), lengthOfExpression);     for (int i = 0; i < total; i++) {         for (int x = 0; x < lengthOfExpression; x++) {             if (pos[x] == sequence.length) {                 pos[x] = 0;                 if (x + 1 < lengthOfExpression) {                     pos[x + 1]++;                 }             }             builder.setCharAt(x, sequence[pos[x]]);         }         pos[0]++;          if (builder.toString() == string) {             isFound = true;         }          System.out.println(builder.toString());     }     System.out.println(isFound); }   Expected result would be a 'true' printed at the end. Instead, my result is as follows:  //lots of lines of combinations omitted  r s t u v w x y z    false


javanullpointer by reading from a file while using scanner, bufferedreader and filereader

I'm new to Java programming. I use  java to write simple macros for my simulation tool. In the following part of the code I want to find a minimum and a maximum value in a csv file which is "whitespace" seperated.  Now, I have the problem that I get the java.lang.NullPointerException message on my output- window. Than it says that the macro playing is done.  I have some marker in the code and the output ends on this position.  Does anybody have the clue why this not work?  public void VelMinandMax (String Velocity_Data) {  velMagMax = 0.0 ;  velMagMin = 100.0 ;  FileReader fr1 = null ; BufferedReader br1 = null ; Scanner sc1 = null ;  try {     fr1 = new FileReader(Velocity_Data);     br1 = new BufferedReader(fr1);     sc1 = new Scanner(br1);       while (sc1.hasNextLine()) {         sc1.nextLine();           if (sc1.hasNextDouble()) {             double velMag = sc1.nextDouble();             double coordX = sc1.nextDouble();             double coordY = sc1.nextDouble();             double coordZ = sc1.nextDouble();               if (velMag>velMagMax)                 {                 velMagMax = velMag ;                  }             if (velMag<velMagMin)                  {                 velMagMin = velMag ;                   }         }     }    } catch (FileNotFoundException e) {     System.out.println ("Error : File Not Found") ; } finally {     sc1.close() ;     try {         br1.close() ;         fr1.close() ;          }     catch (IOException e2)  {         System.out.println ("IOException");          }     } }   Edit Output:  public execute MethodVol CalcVelRef VelMinandMax java.lang.NullPointerException


IChing and space travel identification question

There was a short that I read in an anthology, when I was on my anthology kick about 8-15 years ago. I am fairly positive that the story was from pre-1995, if that helps anyone. I know it wasn't a novella, but it wasn't a short-short if I recall that too.  The premise:  A group of super-bright scientists are selected to go on a (experimental?) space craft from Earth.  The details I'm firm on:   One of the astronauts was a young chinese man who recreated the iching as a set of tokens and used them to setup a form of horoscope since the constellations didn't match the familiar ones anymore.   The details I'm pretty sure about:   They end up diverting from their pre-assigned flight path and flying into space forever. They all went mad. That the young chinese man was indeed a young Chinese male. He may have been a she, and she may have been from another oriental country, but I know it was about the iChing. That always stuck out to me.


Can I use a power adapter with more current but lower voltage on another laptop?

Possible Duplicate:        I have the opposite problem outlined in   My AC adapter (19 V, 3.95 A, 75 W, 3-pin) Part No. PA3468E-1AC3 for Toshiba Laptop L40 18Z is now useless. I am currently risking using an IBM Thinkpad adaptor (my old laptop) after checking the specification. The centre pin polarity is the same, I cannot currently find any references to Wattage output for the IBM adaptor - but the only difference I can find is in current and voltage.  The defunct Toshiba adapter is rated 19 V and 3.95 A. The IBM adapter is rated 16 V and 4.5 A.  I've used the IBM for several hours with no ill effect - risky I know! The lower voltage means that the battery isn't charging - but my concern is the higher current - 0.55 more.   Could this damage the sensitive internal electrics in the longer term - or is it unlikely to make a difference. If it works, which it does - could I confidently continue to use this until I've sourced a proper replacement?


Delegate immutability and assignment operator

I read that delegate are immutable objects.  If I have into a thread:  EventHandler handler = (s, e) => Console.WriteLine("..."); EventHandler copy = handler; copy(new object(), EventArgs.Empty);   that copy is a thread safety operations so when I invoke copy(...) if another thread eliminated the delegate from handler no exception can raise.  However If I make, i.e,:  handler.GetHashCode() and copy.GetHashCode() they both returns the same code.  I thought that the assignment operator did a new instance of that delegate and that the new reference had put into copy variable...  How can, thus, copy and handler be independent if they both references the same object in memory?  Confused!


Image looks embossed when converted to SVG

I converted a raster image to vector in Illustrator CS6 using Image Trace then the Expand option, though when I save as an svg the image looks embossed. I suspect it's due to the layer background being white and the paths not lining up, but I'm unsure how to fix it or prove that theory without manually having to adjust every path.   This is how it looks in Illustrator before I export it:    The image looks like this when saved/exported with art optimized option:


Why is Ubuntu's clipboard so hit and miss?

I find that a lot of the time if I copy some text for example and then close the window being copied from, the paste function does not paste anything.  I've noticed this in Ubuntu 9.04 right up until present version. Is there a work around for this? Is there any reason why the developers are not looking into this?


I'm reflecting upon the distinction between a sentence and a proposition in logic and philosophy. I knew that a proposition is the meaning of a declarative sentence (i.e. the abstract content of a declarative sentence, the bearer of truth-value), whereas a sentence is simply a group of words (symbols, signs) ordered according to some grammatical rule in any natural or artificial language. A sentence isn't necessarily meaningful.   According to these definitions, you could say hat a predicate like "is interesting" is a sentence. Of course a sentence like "is interesting" wouldn't express a proposition, but still, it would be a sentence. This seemed ok to me until I remembered that propositional logic is sometimes called sentential logic. But then you cannot say that "is interesting" is a sentence, because it certainly isn't a sentence in the sense of sentential logic! As a result, I'm getting confused about what a sentence is according to sentential logic.   Can someone help?


How long does it take these boys to paint a fence?

I came across the following question:     If 3 boys can paint a fence in 2 days what part of the job can     be completed by two boys in 1 day?   The answer to this problem is $\frac13$.  I can't manage to tackle this problem. Could anyone tell me what would be the quickest way to solve this problem (This question is a standardized test based question). Any help would be appreciated.


Physical intuition for higher order derivatives

Could somebody give me an intuitive physical interpretation of higher order derivatives (from 2 and so on), that is not related to position - velocity - acceleration - jerk - etc?


Calculate the integral $ F(a)=\int_{0}^{\infty} \frac{e^{-2x}-e^{ax}}{x}  dx$, where $a>0$.  And what about $F'(a)?$  Please I need help with this integral.


For some reason a chair i downloaded for my scene doesnt show in the final render i dont know how to get it in the render

I have made an bedroom it looks fine in the viewport render but when I actually render it the chairs doesn't show. I got the object from Blenderkit but I also got some other stuff that shows like the katana Viewport:  Render:


How do I know what the symmetry group of a Lagrangian is?

If I had a Lagrangian of the form  $$ \mathcal{L} = (\partial_{\mu}\phi,\partial^\mu \phi)-U[(\phi,\phi)]$$  where $\phi = (\phi_1,\phi_2,\ldots,\phi_n)$ is an $n$-dimensional vector of complex fields, and $(u,v)=v^\dagger u$ is the usual  inner product, how do I know what the symmetry group is? At first glance I would say $SU(n)$ as it will preseve the inner products, but surely an $n$-dimensional unitary representation of ANY group would preserve the inner products too?


i want while loop for date 2018-03-28 to 2018-04-02 in unix

i want while loop syntax in UNIX for date 2018-03-28 to 2018-04-02


Looking for a movie where there is a Powerful Board Game played by two brothers?

I can't remember the title. It's a board game where two brothers played it. When they played the board, it sent them to space? It's a board where I think it has different levels,each levels has a card, and each levels has different obstacles in space? One level in there, they even put their house being pulled by the sun? And there is also a part there where there is an astronaut.


Consider the following alternative implementations that derived, internal classes are intended to override, returning true:  public virtual bool IsInternal => false;   ...and...  public virtual bool IsInternal() => false;   What is the difference memory- and performance-wise?   Can the compiler detect the static results and, when optimizing/inlining, use them instead of saving the property value for each instance or invoking the function?  Can these virtual members be inlined by the compiler at all and what would the impact be?


How to run a command as a user whose login is disabled?

I am trying to use the su command to run an application as another user  In this case I am trying to run irssi  blah@ubuntu: su - [username] irssi (enter password)  blah@ubuntu: (nothing happens)  blah@ubuntu: su - [username] -c irssi (nothing)   I run gksu and set same parameters and it works, and doesn't ask me for the user password. What is the issue? And how do I solve it?  I should note the user was created like this  adduser --system --disabled-login [username]   if it makes any difference....sigh.


I have a problem for my assignment which I dont know how to solve. can anyone please help me? Show that $E(XE[X|G])=E[(E[X|G)^2]$


I want to upgrade my laptop hard drive to one with more space.  I dont want to reinstall everything.  Can I "clone it" to a new drive so that the laptop doesnt know the difference ?  Can this be done ?  Thanks.


How to make Synaptic the default to install .deb files?

I have tried a lot and Ubuntu software center crashes the most when installing .deb packages with it. And I would like to make synaptic package manager as the default to open .deb installation files. How to set up synaptic as default package manager in Ubuntu?


I don't understand why $Var(X) = E((X-\mu)^2)$.   It's defined as the "expected value of the square of the deviation of $X$ from the mean" but I don't understand why it couldn't be $E(X-\mu)$ as that seems more intuitive for "deviation from the mean".  Is the purpose of the squaring to make deviations positive? Because if so, why not just $E(|X-\mu|)$ instead? What's the point of the squaring?


If $2$ numbers $n$ and $m$ are given, how can be found out the number of numbers with zero between and including $m$ and $n$ ($m \leq n$)?. For example, if $m=10$, $n=100$ the numbers with zeroes are $10,20,30,40,50,60,70,80,90,100$ .i.e 10 numbers.  My question is that there is any recursive formula to calculate the number of  numbers with zero in a given range. If so, what is that? And what is the reasoning behind it? Please explain it clearly.


So, I have been trying to solve how to simplify $$|e^{2iwt} - 1|$$ to $$2|\sin(wt)|.$$ However, I've been working on the problem for quite a while now without making any progress. I've tried to solve it by using Euler's formulas, but it's not helping much. If anyone could help me, by just giving me a tip, I would be really thankful.


How to type un-perpendicular ? I found \nparallel for unparallel from amssymb package, however I only found \nvdash which is rotated. Are there another alternatives?


How can i move files including its version history from one document library to another?

I am using a workflow action "copy item" and "delete item from current list" which copies the files from one document library to another but when the files are copied over to a different library, it removes all the version histories.  I know there is a manual way to move item using "Open With Explorer" which moves files with its version history but we don't want to use that and want something that moves files with its version history automatically...  Any Help Would Be Greatly Appreciated.  Thanks You


How long will a 10 second youtube intro take to render? I have had it rendering for hours upon hours and it all seems too much!

I am not asking for a solution to speed it up, i simply want to know how long it should take!  I would also like a way to speed it up but not something technical, im new to Blender!


I find it very fiddly to embark and disembark, sometimes the ship just refuse to approach the land! does the landing site have to be allied land with a port facility or something...? And  sometimes i click the troop to move toward ship and they eventually do board the vessel, but clicking embark does nothing at all. Its very frustrating and fiddly especially combined with the huge slowdown. makes me wish it was turn based because i lose some conflicts trying to transport troops and clicking again and again to transport them on ships but by the time they eventually  (if ever) board and disembark I've missed the battle and lost again!  lol i lose enough without shipping megabug!


This is what I see:  GNU GRUB version 2.02~beta2-9ubuntu1  Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.  grub> _   What should I do now?


What's the best way of validating user input. PHP or Javascript?

I am making a contact from and I almost finished it, but I want to make sure that it isn't easy for people to spam to my mail. At the moment I am checking if the user has filled in all fields using Javascript and if they don't, then there is an element text being changed to something like: "You have to fill in this field". Now I wanted to validate text and emails using the filter_var function from php and then change the text to something like: "Please fill in a valid email". This is the Javascript code I am using atm   $(document).ready(function() {   document.getElementById('submitButton').onclick = function() {     var firstName = document.forms["contactForm"]["firstName"].value;     var lastName = document.forms["contactForm"]["lastName"].value;     var email = document.forms["contactForm"]["email"].value;     var message = document.forms["contactForm"]["message"].value;      var submit = true;      if (firstName == null || firstName == "") {       document.getElementById("firstName_error").innerHTML = "Please enter your first name";       submit = false;     }      if (lastName == null || lastName == "") {       document.getElementById("lastName_error").innerHTML = "Please enter your last name";       submit = false;     }      if (email == null || email == "") {       document.getElementById("email_error").innerHTML = "Please enter your email";       submit = false;     }      if (message == null || message == "") {       document.getElementById("message_error").innerHTML = "Please enter your message";       submit = false;     }      return submit;   }    document.getElementById("firstName").onkeyup = removeWarning;   document.getElementById("lastName").onkeyup = removeWarning;   document.getElementById("email").onkeyup = removeWarning;   document.getElementById("message").onkeyup = removeWarning; });  function removeWarning() {   document.getElementById(this.id + "_error").innerHTML = ""; }


meaning of divergence and its mathematical intuition

how does divergence which means sink or source equal to ∂Fx/∂x+∂Fy/∂y +∂Fz/∂z.I have been thinking it for a long time and i think "divergence tells us how fast the vector increases when we move apart from the vector source". What has divergence which means sink or source has something to do with volume


My chain broke today and I want to get a new replacement for it I just don't know what size I need my bike has 3 gears in front and 6 in the back which I'm guessing is an 18 speed and if you can leave any suggestions for a chain I will appreciate it preferably under $30 I just commute to school.


My code bellow grabs some content. in this content there are some photos. How can i loop through this content find all images and return their src?  my code so far:  $items = $html->find('div.post-single-content',0)->children(1)->outertext; foreach($items $node) {  $node->find('img'); } print_r ($node);


I did some changes while switching a branch called users-authentication, I commit them. then I switched again to master to merge these changes as the command line below. It says there is a conflict while merging. how can I solve it, I really don't want to lose anything.  $ git merge users-authentication


Show that $\sum \limits_{i=1}^n log(i)$ is O(n log n)

How can I show that $\sum \limits_{i=1}^n \log(i)$ is $O(n \log n)?$ (Log in base 2).


I'm faced with a conceptual problem, where I am supposed to describe the motions of the following system (two masses on each end of a totally inelastic rope hanged on a pulley):  I understand that there is the gravitational force acting, and also a second, opposing force in the rope. My problem is that I don't understand the nature of this second force. Where does it come from? How do I summarize it for each of the masses? From my solutions manual I know that it must be equal $|T_1|=|T_2|$ for each masses, but that sounds plain counterintuitive for me. Can you please shed some light on this? UPDATE: the problem is formulated so that the pulley and the rope are both massless, and the bearing has no friction.


Solving for $f(2004)$ in a given functional equation

Given that $$f(1)=2005$$ and $$f(1)+f(2)+...f(n) = n^{2}f(n)$$ for all $n>1$. Determine the value of $f(2004)$.  My progress:  I first substituted $n-1$ into the equation to get $f(1)+f(2)+...+f(n-1) = (n-1)^{2}f(n-1)$ and then I subtracted it from the first equation to get $$f(n) = n^{2}f(n)-(n-1)^{2}f(n-1)$$. I got a little stuck so I checked the answers for a hint and it said that: $$f(n) = \frac{(n-1)^{2}}{n^{2}-1}f(n-1)$$. How is this so? I don't understand the last part.


(Parameter Choice) Using Differentiation under integral for $e^{-x^2}$

I have the integral:      $$\int_{-\infty}^\infty e^{-x^2} \, dx$$   And I’d like to solve it using differentiation under the integral sign. I understand that I must convert $e^{-x^2}$ to $e^{-x^2}g(x,t)$, where $g(x,t)$ is just some term involving a new parameter $t$. I tried multiplying by $e^{-2xt}$, which doesn’t really seem very logical, however, I just do not know what to put. How do I find the appropriate term to make the whole process work?


I found this new and interesting code in my project. What does it do, and how does it work?  MemoryStream stream = null; MemoryStream st = stream ?? new MemoryStream();


Calculating the peak voltage of a zener diode output

I have a problem with this homework, I have to calculate the peak voltage of the output after stabilizing with a zener diode.  My Input Voltage is Vin = 5V + 0.7Vsin (2pif*t) with f=10kHz  My circuit is a simple regulator with no load resistor. The series resistance is 82 Ohms, Zener voltage is 3V, max. current through the diode is 33.3mA. How can I calculate the peak output ? My problem is the offset created by 5V, wouldnt the Zener voltage be reached immidiately with this configuration ?         – Schematic created using


Received multiple email from apex trigger

I have written a trigger to send email. Whenever the trigger is fired i am getting equal no of mails which is equal to no of records retrieved.  Ex - If i am getting 3 records, three times i am receiving email. Can anybody tell me where i am going wrong -  trigger taskEmail on Project__c (after update ) {     set<String> projName = new set<String>();     list<Task__c> listTask = new list<Task__c>();      for(Project__c pro : Trigger.new) {         projName.add(pro.Name);     }      listTask = [SELECT Id,Project_Approval__c,Project_Name__c,Status__c,Task_Executioner__c FROM Task__c WHERE Project_Name__c IN : projName];     system.debug('11111' + listTask.size());     EmailTemplate et=[Select id from EmailTemplate where name='Multiple Tasks'];     List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();      if(listTask.size() > 0) {     system.debug('222222' + listTask.size());         for(Task__c con : listTask ) {         system.debug('33333  enter for ');                if(con.Project_Approval__c =='Approved' && con.Status__c == 'Open'){             system.debug('444   enter if inside for ');              Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();             mail.setTargetObjectId(con.Task_Executioner__c);             mail.setTemplateId(et.Id);             mail.setSaveAsActivity(false);             mail.setWhatId(con.Id);             mails.add(mail);         }         system.debug('0000000');      }      Messaging.sendEmail(mails); } }


Separate web page title from Google search sitelink

NOTE: This question was previosuly marked as duplicate by someone, but it was not a duplicated of the suggested alternative post. Moderators, please read carefully before dismissing someone's question as duplicate.  Google seems to use the Title tag as the primary source for determining sitelink titles.  However, I noticed that for some sites, the page title is not the same as the sitelink title.  For example, Airbnb has a sitelink titled 'Business Travel':    But when you enter the page the title is actually 'Corporate & Business Travel on Airbnb':    Does anyone know how to determine the title of a sitelink, and make it different than the target page's title?  Thanks!  *Note: The precise process of determining the sitelink title is automated, and Google is not transparent about it at the moment.


(Misunderstood) special relativity and equivalence of motion

Let $A$ be the person who is standing on the Earth (ignoring gravitational field, etc.). Let $B$ be the person who is moving to the Proxima Centaura and back. By the time dilation equation we get: $$t_A=\gamma \cdot t_B$$ because the time is running slower for $B$ than for $A$. But the motion of $B$ back and forth is equivalent to the motion of $A$ forth and back, isn't it? Thus, by the same equation: $$t_B=\gamma \cdot t_A$$ and clearly, $\gamma$ must be 1 for both equations to be true, so $v=0$ and so they are both stationary, which is a paradox. Where is an error in my process of thinking?


Recently my house has been invaded by acrobat ants. They are everywhere. On our tables, in our plates, in our glasses. They tend to be menace and have caused us a lot of trouble.


Finding the dimension of the orthogonal complement

Let $U=M_{n}(\mathbb{C})$, and we define a bilinear form $\xi (A,B)=n\cdot tr(AB)-tr(A)tr(B)$. How do I find $dim(U_{\perp })$?  I know that $U_{\perp }=\{A \in M_{n}(\mathbb{C})|\ \forall B\in M_{n}(\mathbb{C}), n\cdot tr(AB)-tr(A)tr(B)=0 \}$. I have no idea how to continue. I'd appreciate any help. Thanks.


While passing an array to a function in java and then assigning it to a new array, I am getting the same old array. public static void main(String[] args) {         int[] arr1 = { 1, 2, 3, };         changes(arr1);         for (int val : arr1) {             System.out.println(val);         }     }  private static void changes(int[] arr1) {     int[] arr2 = { 7, 8, 9 };     arr1 = arr2; }  Why is it so when passing array deals with passing the reference to that array?


Make Feature Layer won't display in Table of Contents

I have a point layer "SurfaceLocation".  It has a data field called "AgeRank".  One of the values it can be is "M".    In Modelbuilder, I want to take that layer, select only the points that have a value of "M", and create a new layer in the Table of Contents.  I'm using the "Make Feature Layer" tool.  I use "SurfaceLocation" as the input, apply the correct expression, name the Output layer "Minors" and set the output to "Add to Display".  I run this and nothing happens.  No new layer appears in the Table of Contents.  When I try running it again, I get an error saying the Output Layer "Minors" already exists.  It's not in the Table of Contents, so where is it?  I've tried closing and relaunching ArcMap.  I've tried rebuilding this in a new model (and it still says it already exists).  "Add results of geoprocessing operations to the display" is checked in geoprocessing options.  I've reviewed  and decided to post this question because that didn't have an answer that worked for me.  I was hoping for answers that I could use.    I've tried making the output layer a parameter.  When I run the model, it doesn't even show up at the beginning for a value (the start parameter does).  Unfortunately, I don't know a thing about python yet.  I was hoping there was a tool that I couldn't find that would do this.  Further explanation: Not sure why this simple problem can't have a simple solution.    The model is an oval (layer input) a rectangle (Make Feature Layer) and another oval (layer output).  I want the input to be an existing layer without any definition query.  I want the tool to apply the definition query and output another layer into the TOC.  I do not want to create another feature class. The model doesn't have to look like this.  If I need to string a couple of tools together to do it, that's fine.  * If I was doing this manually, I'd right click on the first layer, select copy, paste it, rename it, and add a definition query.  Then I would "Apply symbology from layer". *  I can't find a tool that does this.  "Make Feature Layer" doesn't put it in the TOC.  It puts it in_memory.  That would be fine if I could then find a tool that takes it out of memory and adds it to the TOC.  Being in_memory doesn't help me.  I want to display it, not do any processing to it.


My man command seems to have disappeared.  Typing man <something> returns  The program 'man' is currently not installed. You can install it by typing: sudo apt-get install man-db   however man-db is already installed and reinstalling it does nothing. Typing which man doesn't find anything.  xman works, so the actual man pages are there: it seems the front-end driver has gone missing. How can I download the front-end driver or recreate a copy of it (I seem to recall it's a small shell script).  Running Ubuntu 14.04.5 LTS on a Dell laptop with x86 processor  /usr/bin/man doesn't exist - that's essentially the problem.  I did try uninstalling man-db (as root) in order to reinstall it, but it won't let me. It gets a permission failure. I thought root could do anything, but apparently not....


How can I reset all system file permissions in Debian 10?

I want to reset all system file permissions. Because I used sudo chmod 777 -R / command. But I don't know how.


How to turn off cheats in minecraft after creating the world with cheats enabled

I'm creating a Minecraft map that I want players to not have permissions to use cheats so they cant use the setblock command and set blocks as air and break the map. Is there any way I can turn off cheats after creating the world with cheats on? (to get command blocks)  Thanks


Why do my lights glow when the switch is off?

I have 4 down lights controlled by 1 dimmer switch. When I turn them off they all still glow very slightly. What causes this and how can I fix it?


K-Means clustering for mixed numeric and categorical data

My data set contains a number of numeric attributes and one categorical. Say, NumericAttr1, NumericAttr2, ..., NumericAttrN, CategoricalAttr, where CategoricalAttr takes one of three possible values: CategoricalAttrValue1, CategoricalAttrValue2 or CategoricalAttrValue3. I'm using default . It works with numeric data only. So my question: is it correct to split the categorical attribute CategoricalAttr into three numeric (binary) variables, like IsCategoricalAttrValue1, IsCategoricalAttrValue2, IsCategoricalAttrValue3 ?


Show that $C[a,b]$ is a complete space under the metric $d(f,g)=\sup_{t\in [a,b]}|f(t)-g(t)|$.

$C[a,b]$ is a normed vector space of all continuous complex valued functions on $[a,b]$, with supremum norm   $$\|f\|_\infty=\sup_{t\in [a,b]}|f(t)|.$$  The metric induced by the norm is  $$d(f,g)=\|f-g\|_\infty = \sup_{t\in [a,b]}|f(t)-g(t)|.$$  Show that $C[a,b]$ is a complete metric space under this metric induced by the supremum norm (i.e. show $C[a,b]$ is a Banach space).


Items in array do not update correctly if in a nested loop

I have the following sample code:   recs = [] for x in range(1,3):     rec = {         'A': x     }     recs.append(rec)     print(rec)     for y in range(1, 3):         rec['B'] = y         recs.append(rec)         print(rec)  print('----- Array after exiting loops') for r in recs:     print(r)   This gives this output:  {'A': 1} {'A': 1, 'B': 1} {'A': 1, 'B': 2} {'A': 2} {'A': 2, 'B': 1} {'A': 2, 'B': 2} ----- Array after exiting loops {'A': 1, 'B': 2} {'A': 1, 'B': 2} {'A': 1, 'B': 2} {'A': 2, 'B': 2} {'A': 2, 'B': 2} {'A': 2, 'B': 2}   Now I can resolve it with this code:   for y in range(1, 3):     rec2 = rec.copy()     rec2['B'] = y     recs.append(rec2)     print(rec2)   What I am looking for is explaining why this behaviour occurs when you go into a nested loop.


typeof function declaration vs. function expression

I encountered some confusing issue with using typeof function when the function is declared or when the function is defined as a variable assignment. Here is a sample code:       //This displays "undefined"      console.log(typeof window['a']);       //This displays "function"      console.log(typeof window['b']);       function a() {};      b = function() {};   EDIT: This has nothing to do with hoisting. I have added the following equivalent Node.js code, which is complete so there are no doubts about what else is going on in the program:       function a() {};       b = function() {};       console.log(typeof global['a']);      console.log(typeof global['b']);   The output is:      undefined     function   Can someone explain in light of the above updates why a function declared has no entry in the global/window object?   This is NOT a duplicate. The other questions do not address this specific issue about the returned value of typeof when function is declared as a function or as a variable assignment.


How to add event listener to newly added elements?

I'm adding list items with delete buttons to list and old items can be deleted but newly added cannot.  I tried to add an event listener to new list items' delete buttons additionally but I couldn't.  var deleteButtons = document.querySelectorAll(".delete"); deleteButtons.forEach(element => {   element.addEventListener("click", deleteItem); });  function deleteItem(e) {   e.target.parentElement.parentElement.removeChild(e.target.parentElement); }   I watched Brad Traversy's dom videos on Youtube and tried to make delete items part on my own. Commented codes are Brad's codes. In my codes, I tried to select delete buttons and add them, eventListener. With deleteItem function I can delete old list items but cannot delete newly added. Because newly added list elements' delete buttons have not event listener. My question is "In Brad's version, how newly added to list items have event listener and in my version newly added delete buttons have not?"  Codes:


If $p$ is a factor of $m^2$ then $p$ is a factor of $m$

I'm a complete beginner and not sure where to go with this proof of Euclid's lemma. Any help would be greatly appreciated.     If $m$ is a positive integer and a prime number $p$ is a factor of $m^2,$ then  $p$ is a factor of $m.$   So far I have:  Since we know that $m$ is a positive integer, then $m^2$ must also be positive. We also know that $p$ is positive integer, since it is a prime number.  So $m^2 = p*k$ where $k$ is positive since both $m^2$ and $p$ are positive. Therefore, $k$ is greater than or equal to $1.$  ...?


I need to highlight some parts of code containing both text and numbers using the siunitxpackage but I get an invalid-token-in-number, the token being a number!  Here's my mwe:  \documentclass{article}  \usepackage{soul} % Enables highlighting \usepackage{siunitx}  \begin{document}      %% Error:      %% siunitx error: "invalid-token-in-number" and "Invalid token '6' in numerical input."         \hl{         Dummy text to avoid SI as very first argument of hl         \SI{666}{\nm}         Dummy text just in case}   \end{document}   Thanks for your help.


Python: How do I change only one of the variables inside of a list within a list?

So I created a list within a list and printed it:  a = [] b = [] for i in range(3):     a.append(0) for i in range(3):     b.append(a) print(b)   and the result was: [[0, 0, 0], [0, 0, 0], [0, 0, 0]] as expected  but when I try assigning the first value of the first list within b with  b[0][0] = 1 print(b)   the result comes out as: [[1, 0, 0], [1, 0, 0], [1, 0, 0]]  How do I assign 1 to only the first value so I get: [[1, 0, 0], [0, 0, 0], [0, 0, 0]]?


Is there a name for the mushy sludge that forms around/beneath meat as it cooks?

I've found the terms "aspic" and of course "drippings" and "gravy", but I don't think any of those quite describe what I'm asking about — for example, we just baked some meatballs and between each one there was a mix of both liquid fat and a grey-ish/pink-ish sludge. With chicken meat it tends to be whiter. It has a texture somewhere between cooked liver and jello.  Is there a proper name for this "sludge"? Are there any particularly traditional uses for it?  UPDATE: another question calls this same thing "scum", and the answers deal with what it is:   I'm wondering here what it's called, i.e. if there's a more generous term for it than "sludge" or "scum".


When I try to upload an image, I'm presented with the following dialog box,    The dialog box does not allow uploading either from my computer or by posting a link.  This happens only on Chrome browser (running on Windows). Clearing cache and cookies, and restarting computer do not resolve.  Is this just my computer? Or is this a site-wide bug?  Additional info:  Clicking on 'click' to upload does nothing. Dragging an image onto dialog redirects me to the file location on my computer. Clicking 'Add picture' redirects me to http://[SE-domain].com/upload/image?https=true.  UPDATE: A Norton extension for Chrome was the source of the problem.


I've tried to open port 8605 on my server (used for socket connections) using:  iptables -I INPUT 2 -s 0/0 -p tcp --dport 8605 -j ACCEPT   However the change is not persisting, the port closes itself once a day (I assume something is being regularly reloaded).  How can I make my change persist?  EDIT  Despite saving it, the change does not persist, each day it needs to be corrected.  Crontab does not seem to have any obvious changes, and the server is not restarting. Any ideas?  EDIT  I found out that iptables was running under  so I needed to updated the rules in there.


Why won't a new Ubuntu 20.04.2 install mount old encrypted home directories?

I keep home directories on a separate /home partition.  When I reinstall Ubuntu (generally Ubuntu-Mate), I format the root partition but keep /home and create user accounts in the same order with the same user names and passwords.  When upgrading to Ubuntu 16 years ago, this worked seamlessly; old home directories decrypted just fine. Now I just reinstalled up to Ubuntu 20.04.2.  I checked around and it looked like everything should work the same as last time.  I recreated the same user account with the same username and password but it won't unencrypt the old home directory.  I can log in from the terminal to check things out but the graphical login just takes my password then kicks me back out. Did something change in Ubuntu 20 that's causing the problem?  Where can I look to track down the problem?  Or was there something necessary to decrypt the drives that I blasted when I reinstalled and formatted the root partition?


I created a new Admin account in Sierra High and needed to delete the previous admin account which is marked now as the standard user. However, after unlocking as admin and selecting the respective user that I would like to delete, I see the - sign is marked as Grey.     This is all accounts and I would like to delete the mac user account,   $ dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]' name: mac password: ******** uid: 501 gid: 20 dir: /Users/mac shell: /bin/bash -- -- name: chaklader password: ******** uid: 502 gid: 20 dir: /Users/chaklader shell: /bin/bash   How do I delete the respective account? I find a code snippet to run on the terminal, i.e, sudo /usr/bin/dscl . -delete "/Users/mac". Should I try that and will work out?  Update:  As an answer suggested, I'm not logged in to the the fast user switching menu.    As it was asked, I run who in the terminal and get the result,   $ who  chaklader console  Dec 28 06:01  chaklader ttys000  Dec 28 14:51   So, in brief the other user, mac was not in the terminal.


Unable to Install Chrome on Ubuntu 16.04 and unable to update Ubuntu

This is what  appears when I try sudo apt-get update:


Identify 3 states at the input - Automotive circuit 24V system

I have a requirement to build a circuit which can identify 3 states at the input and the output is given to ADC of uC. I have the below circuit for 12 V systems:  The input can be connected to gnd, battery(T87) or left open. I am trying to use the same circuit for 24V system but since the ISO pulses(have to consider ISO pulses since input can be connected to battery) would go up to +- 600V in the 24V system, what are the changes that I will have to make. I have to probably change the resistor values and packages. What about the diode ? what are the parameters that I have to consider for diode selection ? and what would be the worst case for the diode, for example like Jump start, load dump , ISO pulses, reverse polarity ? the switching diode BAW56W was chosen for 12V system because it was already available in the BOM of our product. Here is the link to my other related question, I was not too clear while asking that question. My main requirement is that my circuit differentiate between 3 states


Let's consider the following sentence:  \documentclass[10pt,a4paper]{article} \begin{document} We often call these players \emph{spoiler} and \emph{duplicator}, \emph{\'Elo\"ise} and \emph{Ab\'elard} or $\exists$ and $\forall$. \end{document}   What I'd want now is a slanted version of the \forall and the \exists symbols, is there a way to do this (some sort of \mathsl or something like that)?  Or would you say that this really is too ugly?