Connectedness of subsets of topological space

Let $A$, $B$ be closed subsets of topological space $X$. Given that $A\cup B$ and, $A\cap B$ are both connected.  How can we show that both A, B are connected? This is in general not true for any subsets of $X$. I can't construct a counter example.  I mean,  both $A$, $B$ must be closed for this. What happens when they are open?


Derive the centroid of an area from a limiting procedure

I wondered if the centroid of an area could be derived as a limit from the centroid of the solid of revolution built by the same area revolving around an axis of revolution.  e.g.: the volume centroid of a spherical wedge is $C_{V} = \frac{3\pi}{16}r\frac{\sin[\theta]}{\theta}$, where $r$ is the radius of the sphere and $\theta$ is the dihedral angle. The centroid of a semicircular lamina is $C_{A} = \frac{4r}{3\pi}$  Now I tought it was possible a limit procedure like $\lim\limits_{\theta\to 0} C_{V}$=$C_{A}$, but that's false and I would like to know why (I guess that has something to do with the passage from three-dimension to two-dimension)  Thanks


I thought I was doing it right but obviously ... not  in C:\Windows\System32\drivers\etc\host  127.0.0.1       myDomain   Question 1 : why doest it work for 'myDomain' (myDomain leads to localhost) but not 'myDomain.com' ? Everytime I add dots to the name, it is not recognized ( is an error)  in Apache conf :  <VirtualHost *:80>     DocumentRoot "C:/wamp/www/myproject/web"     ServerName myDomain ServerAlias myDomain     <Directory "C:/wamp/www/myproject/web">     AllowOverride All     Allow from All </Directory> </VirtualHost>   if I type in a browser : http//myDomain => I am in the documentRoot  but I cannot access directly to what is in the web folder :   Obviously there is something I did not understand, I thought that using the virtual host name (myDomain) I would be in the web folder.  Question 2 : what is wrong ?  Thank you for your help


After MiKTeX update: suddenly all fonts (incl. existing path-referenced ttf files) are not found by fontspec / LuaLaTeX anymore

I just updated my MiKTeX packages (and also did FNDB refreshes, updmap and everything and also already tried a complete fresh install), but now I suddenly get loads of errors telling me that my fonts are not found, for example:  fontspec error: "font-not-found" The font "Philosopher-Regular" cannot be found.   At first I thought that some packages are missing because of the November Package Refactoring (). But for some of my fonts this can't be the reason, because I load some font files like this, which also triggers this error:  \newfontfamily\PhilosopherRegular[Path=../]{Philosopher-Regular.ttf}   And these files are in my git repository (and it compiled just fine before the update on the exact same code).  What ways do I have to attack this error?


Quantum mechanics textbooks that use path integrals

I'm looking for a textbook in quantum mechanics that relies heavily on Green functions and the path integral formalism to supplement my QM books. I want to do some calculations using alternative methods (path integrals, green functions, Lagrangians etc).


Why: A holomorphic function with constant magnitude must be constant.

How can I prove the following assertion?    Let $f$ be a holomorphic function such that $|f|$ is a constant.  Then $f$ is constant.    Edit: The more elementary the proof, the better. I'm working my way through a complex analysis workbook, and by this exercise, the only substantial thing covered has been the Cauchy-Riemann equations.


I wish to achieve following. There may be many variant of this.


How different is Conversion from Casting?

I've just started C# and trying to grasps the basics of the language first. I am reading the book "C# 5.0 in a Nutshell" and confused a bit on Numeric Conversions. The book says:     The suffixes U and L are rarely necessary, because the uint, long, and ulong types can   nearly always be either inferred or implicitly converted from int:  long i = 5; // Implicit lossless conversion from int literal to long    alongside I tried these 2 statements on LINQPad:  int x=123456; uint y=x;   But, the statement resulted an error saying, "cannot implicitly cast int to uint" and an explicit cast was required like this:   uint y=(uint)x;   Why the implicit casting or conversion failed? I'm confused between the book and compiler if this is a casting or a conversion?


Math symbols in .pdf bookmarks tab not displaying correctly

I am using the commands  \usepackage{hyperref} \hypersetup{pdftex,colorlinks=true,allcolors=black} \usepackage{hypcap}  to create clickable links in the index and references, and also to create an index in the bookmarks tab in .pdf readers. It works as intended except for the fact that math symbols don't display right, they show something close to the tex code. Is there any way to fix this? This what happens:  Red arrows should be $\sigma(E,E^*)$ and $W^{1,p}_0(\Omega)$. You get the point.


Let (X,d) a metric space. Show that a function is continuous

Let (X,d) a metric space. Show that the function y↦d(x,y) is continuous. Please help me, I don't know where to start.


Solve $\lim_{n\to\infty} \sum_{r=0}^n \frac{\binom{n}{r}}{(n^r)(r+3)}$

$\lim_{n\to\infty} \sum_{r=0}^n \frac{\binom{n}{r}}{(n^r)(r+3)}$   I have no idea how do I solve this problem. I do know I have to somehow convert this in a function of $\frac{r}{n}$ cause this looks to me as Riemann integral problem.  Any help would be appreciated.


Difference between component.get("") and component:find("")

what is the difference between component.get("") and component:find("")?  I thought component.get("") was for aura:attribute and component.find("") was for lightning:input but if on my client-side controller I do component.get("") with a lightning:input, I get an error, the page doesn't load itself.  I read the documentation () but I don't understand.  This is my example:  lightning:input aura:id="salutationTest" label="Hello" name="hello" value="hello" console.log(component.get("salutationTest"));   The page doesn't load itself and I have no error message.


Did the title quality checker fail in this circumstance? Can it be improved?

is not the same as this question because that is explicitly about SO and the "problem". This question takes a broader approach to the title filter.    This question was inspired by . There's legitimate reason to be upset and think perhaps something has gone wrong, but the deliver of that post leaves much to be desired.  In that post (because I'm sure it will be deleted soon), the OP is complaining that the site (doesn't say which one, though from the user profile I'd go with EL&U) would not accept the following title:     evangelism vs evangelicalism?   However, it did accept the following "improved" title:     evangelism vs evangelicalism? aoeutsnhaoeusnthaoesunthaoesntu   This certainly does not seem right.  So here I am asking if something broke here and if the title checker needs to be improved. Did something fail here? Does it need improvement?    Proof  Just to be sure that the OP wasn't exaggerating, I tried this on MSE about 30 seconds ago. Here's the snapshots and a link to the now deleted question.  Prohibited title    Permitted title    Link to dummy question  And here's the link to that question (now deleted):


I would like to change the timer on the "The system will power off automatically in 60 seconds" dialog. The battery on my device dies about 30 seconds into this message.   There doesn't seem to be a setting for this in the usual places (gsettings, dconf, system settings, etc).  I am not interested in removing this dialog or changing the shutdown behavior, I just want to change the amount of time that it waits.


Story Identification: Accidental Magic Dancing Fish Rain

Please help me identify a story.  It involves a magicians apprentice who summons a rain of fish by dancing incorrectly while casting a spell.  His master had a cold or something and could not use magic at the time.  There was something about summoning or trying to summon butterflies too.  I read it in the 90s.  It had other funny stuff in it, like a Robert Asprin story, but probably not by Asprin based on what I've read recently in the Myth series.  Probably not Xanth series as the characters in Xanth all seem to have one and only one power.  Pretty sure it was a novel or novella, not a novelette.


Piping curl http://cheat.sh/python to less is showing strange ESC[38;5;246m

I am kinda new to Linux.   My base issue: I need to show the output of curl cheat.sh/python like a man or less page, so that I can easily scroll up and down.  What have I tried: curl cheat.sh/python | less  outout: some weird text like this-     ESC[38;5;246m# Python is a high-level programming languageESC[39m   ESC[38;5;246m# and python is a Python interpreter.ESC[39m      ESC[38;5;246m# Basic example of server with pythonESC[39m   ESC[38;5;246m# Will start a Web Server in the current directory on   port 8 000ESC[39m ESC[38;5;246m# go to    ESC[38;5;246m#ESC[39m ESC[38;5;246m# Python v2.7ESC[39m   ESC[38;5;252mpythonESC[39mESC[38;5;252m   ESC[39mESC[38;5;252m-mESC[39mESC[ 38;5;252m   ESC[39mESC[38;5;252mSimpleHTTPServerESC[39m ESC[38;5;246m# Python   3ESC[39m ESC[38;5;252mpythonESC[39mESC[38;5;252m   ESC[39mESC[38;5;252m-mESC[39mESC[ 38;5;252m   ESC[39mESC[38;5;252mhttp.serverESC[39mESC[38;5;252m ESC[39mESC[   38;5;67m8000ESC[39m ...   After having a look at , I tried: curl -vs cheat.sh 2>&1 | less  but output was kinda same:     Accept: /    * Mark bundle as not supporting multiuse HTTP/1.1 200 OK Server: nginx/1.13.12 Date: Wed, 25 Mar 2020 17:50:04 GMT Content-Type:      text/plain; charset=utf-8 Content-Length: 25502 Connection: keep-alive      Strict-Transport-Security: max-age=63072000; includeSubdomains      X-Frame-Options: DENY X-Content-Type-Options: nosniff  { [2429 bytes data]   ESC[38;2;0;204;0m_ESC[0mESC[38;2;0;204;0m_ESC[0mESC[38;2;0;204;0m   ESC[0mESC[38;2;0;204;0m ESC[0mESC[38;2;0; 204;0m ESC[0m   | |     __ | |   _| |__ ESC[38;2;0;204;0m\ESC[0mESC[38;2;0;204;0m   ESC[0mESC[38;2;0;204;0m\ESC[0mESC[38;2;0;204;0m ESC[0mESC[38;2;0;   204;0m ESC[0m ESC[48;2;85;85;85m ESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85mTESC[0mESC[48;2;85;85;85mhESC[0mESC[48   ;2;85;85;85meESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85moESC[0mESC[48;2;85;85;85mnESC[0mESC[48;2;85;85;85mlESC[0mESC[48;2;85;85;85myESC[0m   ESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85mcESC[0mESC[48;2;85;85;85mhESC[0mESC[48;2;85;85;85meESC[0mESC[48;2;85;85;85maESC[0mESC[48;2;85;85;85mt   ESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85msESC[0mESC[48;2;85;85;85mhESC[0mESC[48;2;85;85;85meESC[0mESC[48;2;85;85;85meESC[0mESC[48;2;85;85   ;85mtESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85myESC[0mESC[48;2;85;85;85moESC[0mESC[48;2;85;85;85muESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;   85;85;85mnESC[0mESC[48;2;85;85;85meESC[0mESC[48;2;85;85;85meESC[0mESC[48;2;85;85;85mdESC[0mESC[48;2;85;85;85m   ESC[0mESC[48;2;85;85;85m ESC[0mESC[ 48;2;85;85;85m ESC[0m ...   Finally if I change the above code like (this is probably the wrong approach) : curl -vs cheat.sh 1>&2 | less  Then I will get the needed output of curl, but upon pressing a button the terminal shows like:     ~       ~       ~       ~       ~       ~       ~       ~       ~       ~       ~ (END)   and I can basically press q to quit out of less from there.


Can someone give me a short description and comparison of the different road cycling pedal / shoe systems?

I am looking at buying a pedal/shoe system as the clips and straps I am using are hurting my feet again.  It's been a long time since I have bought a road pedal / shoe system, and I have forgotten the differences between SPDs, Look pedals and all the others.    Can someone give a short comparison of each pedal system with pros and cons of each? My usage is/will be mainly city street cycling and then road cycling (recreation, not racing).  I'd prefer if people would give the pros and cons of each and not their opinion on the "pedal system war".  :) However, "I use them because I find XYZ and it helps in ABC ways" is very useful.


How to put a cloned image to another HDD

My question is simple =)  I am making a clone image using dd on the terminal on my Ubuntu system. I am saving it on external hdd. Now how do I upload that image to my 1 TB HDD thats in my tower. Also should I format that 1TB to EXT4 or NTFS.   Thank you in advance


interpreting coefficients with binary dependent and independent variables

Say the logistic regression is where I have $Y_{i}$ as dependent and $D_{i}$  as independent with coefficient beta.  Then how do I interpret beta when both my $Y_{i}$ and $D_{i}$ are binary? I say this because usually while interpreting, the authors of papers, multiply beta   by 100. So say beta is 0.045 , then is it correct to say that when D goes from 0 to 1 then Y increases by 0.045 units in layman language? What is the rationale for giving it a percent interpretation here? Because Y is going from say 0 to 0.045?


Does GROUP BY inherently imply DISTINCT?

I believe GROUP BY in SQL would make DISTINCT unnecessary because if you group by a column then there will only be one of each value in the result, but I want to make sure I am understanding the keywords correctly. Is it the case that you would not need to do this:  SELECT DISTINCT a_uuid FROM table GROUP BY a_uuid HAVING NOT bool_or(type = 'Purchase')   because you could just drop the DISTINCT completely?


Factory reset needs gmail account password but i cant recover gmail account

I want to factory reset my samsung A3 2016. It asks me to enter the gmail account password but awhile ago I removed that gmail account and now I cant recover it. How can I remove this gmail from my phone?


When Rendered In Cycles Lamps Seem To Disappear

When I render there seems to be no lighting in the scene.  Here's a link to download the files


System alerts / errors in B2B web design - How to design system alerts so that users pay attention to them

I need some support with one problem 🙂 System messages in B2B web applications, specifically about them being ignored by users. Can you recommend any references or share your experience in designing them? System messages - I mean messages related to the operation of the system, namely: information about errors in the database information about upcoming deadlines warning about unsaved user actions information about the timeliness of data and the possibility of their supplementation  That is, partly about situations not resulting from the user action but from the system. The assumption is - message recognition, invasiveness in the scope acceptable by the user, creating the feeling of importance for safety and work in the system (but not to treat these messages as a buzzing disturbing fly) Thanks in advance for your help


How easy is it to keep two LVM partitions in sync

I've got an Ubuntu 14 VM (holding backups) with two very large disks. One disk (the primary) is locally in the data center. The other is on media physically separate (another building). My hope is to easily take a snapshot of the primary file system and then update the secondary with that data.  If I were using ZFS, this would be quite easy. I'm not sure if it is nearly so easy with LVM/ext4 though.  I'm familiar with how to take a snapshot of the file system with LVM. (). However, everything I find on google (including this link) seems to suggest mounting the snapshot and then backing up the file contents. I'd prefer to duplicate the file system itself.  The question  is very similar. Though in my case, I'd like to duplicate to a second LVM partition rather than to a file on a remote server.


Choosing lambda.1se and lambda.min in Lasso

In R, when we use glmnet package. We use cv function as cross validation in finding the value of lambda. In the package, we will find two options in the bottom, lambda.min and lambda.1se. If I use Lasso selection, which lambda should I pick in Multinomial Logistics Regression using Lasso?   Some recommended in using lambda.1se as it is simpler and comparable to the best model. Yet, I cannot find one reliable citation.  Please help, thank you.


Automatic reduplication of equal sign in the beginning of broken formula

Suppose we have the following code  \documentclass{article} \begin{document} $a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z$ \end{document}   which produces the following result   I want to have an additional equal sign automatically added before symbol s.  UPDATE  The same question about \leq and  $a \leq b \leq c \leq d \leq e \leq f \leq g \leq h \leq i \leq j \leq k \leq l \leq m \leq n \leq o \leq p \leq q \leq r \leq s \leq t \leq u \leq v \leq w \leq x \leq y \leq z$


Let $\theta \in \mathbb{R}$ and $X_1, X_2,..., X_n$ be independent and identically distributed with density \begin{equation}         f(x; \theta) = I\left(|x-\theta| \leq \frac{1}{2}\right)     \end{equation} as usual, denote the order statistics by $X_{(1)}<X_{(2)}<\cdots < X_{(n)}$. Letting $T_n = \frac{1}{2}(X_{(1)} + X_{(n)})$, compute $E(T_n - \theta)^2$ I know I can write this as $E(T_n - \theta)^2 = E(T_n^2) - \theta^2$, however, I don't know how to compute $E(T_n^2)$. I'm thinking I need $n$ nested integrals to take into account $X_2,...X_{n-1}$ as well even though we only care about the average of $X_1$ and $X_n$.


Integral $\int_0^2 \frac{\arctan x}{x^2+2x+2}dx$

I am tring to evaluate $$I=\int_0^2 \frac{\arctan x}{x^2+2x+2}dx$$ The first thing I did was to notice that $$\frac{1}{x^2+2x+2}=\frac{1}{(x+1)^2+1}=\frac{d}{dx}\arctan(x+1)$$ So I integrated by parts in order to get $$I=\arctan 2\arctan 3-\int_0^2\frac{\arctan(x+1)}{1+x^2}dx$$ I let $x=u+1$ but when I do that I get $$I=\arctan 2\arctan 3+\int_{-1}^1\frac{\arctan(u)}{1+(1+u)^2}du    =\arctan 2\arctan 3$$ Now this is not close to the approximation given by wolfram. What have I done wrong and how to solve this?


Use 'Two dollar word' or 'Ten dollar word' or other?

We commonly use the phrase "two dollar word" in our company, but recently I have seen "ten dollar word" and "four dollar word" being used.   Which is the most common one, and therefore which should we use?


Setting PATH in /etc/environment and .bashrc has corrupted the system

Using Ubuntu 14.04, was trying to set simply JAVA PATH (that is where the saga began) now my system seems totally corrupted.   I initially edited the PATH in etc/environment (that is where my PATH seems to be) and also added a line export JAVA_HOME.   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/jdk1.8.0_111/bin" export JAVA_HOME=/opt/jdk1.8.0_111    This seemed to work till it did not. It did not work seemingly because of some old versions of JVM that were conflicting/confusing.   Based on forum wisdom I edited .bashrc  export JAVA_HOME= /opt/jdk1.8.0_111 export  PATH= $PATH:$JAVA_HOME/bin    Probably there was some syntax error (or something).   Now I am getting all kinds of errors when I open a terminal:  bash: export: `=': not a valid identifier bash: export: `/opt/jdk1.8.0_111': not a valid identifier bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/jdk1.8.0_111/bin:/opt/jdk1.8.0_111/bin': not a valid identifier   Note: Duplicate jdk in path - this likely is because PATH both in .bashrc and environment.  Now I am unable to find/edit either etc/environment or .bashrc  @ubuntu:~$ sudo gedit /etc/environment bash: sudo: No such file or directory @ubuntu:~$ sudo gedit ~/.bashrc bash: sudo: No such file or directory   Fixed this above issue Thanks @muru   My core problem seemingly is caused by multiple java versions but I have only JAVA version  $ sudo update-alternatives --config java update-alternatives: error: no alternatives for java   My program is not finding JAVA_HOME  $ sudo service dse start Java executable not found (hint: set JAVA_HOME)     $ echo JAVA_HOME JAVA_HOME ~$ java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14)   Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)  What do I do now?


Inequality $\sum\limits_{1\le k\le n}\frac{\sin kx}{k}\ge 0$ (Fejer-Jackson)

Show the following inequality for any $x\in [0, \pi]$ and $n\in \mathbb{N}^*$, $$ \sum_{1\le k\le n}\frac{\sin kx}{k}\ge 0. $$  I have this question a very long time ago from a book or magazine but I cannot solve it by myself and did not know how to solve it until today.   My try: for $n=1, 2, 3$, one can check this by hand.


Can I install a Linux program on an NTFS partition?

So I know you can share files between OSes with NTFS partitions, but can I install Linux packages/programs/software into the NTFS partition and will they work fine on the Linux OS?  My situation:   I have an SSD with low memory. It has Windows and I'll partition it to have Linux as well. I am hoping I can give 20 GB to an Arch Linux root (/) and it'd be enough. I have an HDD for large files and programs, right now only large Windows programs are in here, but I wanted to put in the large Linux programs in there as well.   I understand Linux stores binaries in the /bin folder so I'm not sure, were I to install something in the HDD, that it would work.   implies that I would need to create an ext4 partition inside the HDD in order to install programs in it (or store program data in it).     You can create an ext4 partition in the HDD and mount it at /home/[your user name]/.wine   You can create a separate Steam (ext4) partition in the HDD if you want.    it also says:     Only "static-binary" compiled programs may be installed (rather copied) in sub-folders of /home and expected to work.   Which seems like it'd be the answer to my question, but I'm not sure what it means.


Here's the command, formatted what I thoughtwas correctly...  /tellraw @p ["",{"text":"This map is based off of 1.9 features such as detecting when you pick up items,","color":"green"},{"text":" [HINT] ","color":"dark_green","bold":true,"clickEvent":{"action":"run_command","value":"/tellraw @p {{\"text\":\"[HINT]\",\"color\":\"dark_blue\"},{\"text\":\"This pickaxe cannot break lit glowstone lamps.\",\"color\":\"light_purple\"}}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click For Hint"}]}}},{"text":"so you may need to think outside of the box for some levels. good Luck!","color":"green"}]   However it's giving me Invalid json: malformed JSON at line 1 column 3 Please help!


Sampled rows is very less for auto update stats in SQL Server 2016

I have SQL Server 2016. One of the table is having 9.24 million records. One of the stats (no filter on stats) on it is getting auto updated by SQL Server with sampling rate of 1 % (120023 rows). As per the formula mentioned in below URL, sampling % should be around 5 % but that is not the case. I want to know why? Am I missing something? Or there is no standard formula for it?  Also just wanted to verify the threshold (modification counter) for updating the stats in SQL Server 2016 is (mentioned below) or something else will cause the delay / premature update of stats (I know REBUILDING INDEXES will update stats indeed)? Threshold = √((1000)*Current table cardinality)


'setenv' command not working on tcsh shell when called explicitly

I can run setenv command just fine in my tcsh shell like this:  echo $0 /usr/bin/tcsh echo $SHELL /usr/bin/tcsh setenv START_TIME `date +%s` echo $START_TIME 1499355967   But, whenever I run it explicitly like shown below, it doesn't work. I need to do this because I have to specify shell when executing it via python subprocess call, otherwise it will call a sh shell as default.  /usr/bin/tcsh -i -f -c 'setenv START_TIME `date +%s`' echo $START_TIME START_TIME: Undefined variable.   What's the problem here? I searched for this issue online, but couldn't find any issue similar to this. This is extremely frustrating.


Using diff to show both contents of new files and that new empty files are created

After executing these 4 commands, directory "a" has file "1" with contents "test" and file "2" which is empty, and directory "b" is empty.  $ mkdir a $ mkdir b $ echo test > a/1 $ touch a/2   We can run  $ diff -r a b Only in a: 1 Only in a: 2   Which isn't helpful for a patch.  Or, we can run  $ diff -rN a b diff -rN a/1 b/1 1d0 < test   Which is great for file "1" because we see its contents, but now file "2" has disappeared.  This is because the -N flag means "treat absent files as empty", so I presume diff can't see the difference between the empty file "a/2" and the (pretend, since really empty) empty file "b/2".  Is there a way to make diff show us, in one execution, that a new empty file has been created, and the contents of a new non-empty file -- in a format that patch can use?  Or, would this require a new option to diff?


I have a Brie Cheese that has not been opened. It shows an expiration date that is 6 weeks ago. Is it still safe to eat?


How do I append a string containing a style tag as-is to the document head with vanilla js?

I'm asynchronously rendering a template serverside with  in node. At the point of rendering the body, I have a string (containing line breaks) that needs to be inserted in the document head:  // this is what I have serverside var stylestring = `<style type="text/css" data-style="some-id-that needs to be preserved"> .lfwARz {   margin-bottom: 0;   margin-top: 0; } </style>`   Since at that point I've already sent the <head> to the client, I need to insert a script that sets these styles to the head clientside. But I'm having trouble getting this to work.  This approach works:  // gets run clientside <script>   var style = document.createElement('style')   style.type = 'text/css'   style.innerHTML = '${() => sheet.getStyleTags().replace(/(\r\n|\n|\r)/gm, '').replace(/<\/?style.*?>/g, '')}'   document.head.appendChild(style) </script>   But it results in a loss of the data attribute (which I need to preserve so the styles won't get rerendered on the client).


Null point exception - passing value (TexView) from Fragment to MainActivity

I know this is a commonly asked question but I can not find the solution for this plus the fact that I'm a beginner in programming.   I'm trying to make text wrap around image work but I get null point exception error   Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference   when passing TextView id to MainActiviy  So I have this Fragment.xml  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="make.appaplication.Fragment4">    <!-- TODO: Update blank fragment layout -->  <ImageView     android:layout_width="150dp"     android:layout_height="150dp"     android:src="@drawable/nature"     android:id="@+id/imageView"     android:layout_weight="1"     android:layout_marginRight="17dp"     android:layout_marginEnd="17dp"     android:layout_alignParentTop="true"     android:layout_alignParentRight="true"     android:layout_alignParentEnd="true" />  <TextView     android:id="@+id/textView3"     android:textSize="17dp"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:text="@string/text_page_1"     android:layout_below="@+id/textView5"     android:layout_alignParentLeft="true"     android:layout_alignParentStart="true"     />   and passing its values to MainActivity like so  String text = getString(R.string.text_page_1);      Drawable dIcon = ContextCompat.getDrawable(getApplicationContext(),R.drawable.nature);      int leftMargin = dIcon.getIntrinsicWidth() + 10;      SpannableString ss = new SpannableString(text);      ss.setSpan(new MyLeadingMarginSpan2(3, leftMargin), 0, ss.length(), 0);      TextView messageView = (TextView) findViewById(R.id.textView3);     messageView.setText(ss);   And I have these two lines of code       TextView messageView = (TextView) findViewById(R.id.textView3);     messageView.setText(ss);   after    setContentView(R.layout.activity_main);   and in onCreate method  Can anybody help me to solve this problem, please?


Do photons move from their point of view?

If at light speed time doesnt exist do photons not move from their point of view? If they dont, what would happen if you took a photon and somehow stopped it would it be at the same point at its POV that it is at your POV?


Could we add a Candidate Score viewer to our profiles?

Either as a rep privilege or perhaps implemented for any user profile, allowing a user to see themselves and how much their score reflects how much they've been contributing to the community.    Referencing this thread that details how to get the , I assume most people on this site do this out of goodwill, just like the moderators do. SE is a user-driven site, and the moderators are all mostly volunteers who spend time and effort doing a nearly thankless job for free. As such, I do believe users are in general willing to look for how they can change in order to contribute to the community even more. I know I'm severely lacking in many areas on some sites and aim to change that, no matter how long it could take.  Adding a candidate score section or something of the sort to our profile pages could be a great way for people who aspire to be moderators but know they aren't quite there yet, just like myself. It would be a great way to understand where we lack and where we exceed and excel as community members and I think this feature would greatly aide in that.  The way the current badge tracker is great -- it sets goals for the next badge. But imagine we could have a "candidate score" tracker that would allow us to see how we weigh up against an "ideal" moderator candidate, and allow us to improve from there.


Simple examples of uncorrelated but not independent $X$ and $Y$

Any hard-working student is a counterexample to "all students are lazy".  What are some simple counterexamples to "if random variables $X$ and $Y$ are uncorrelated then they are independent"?


bounding the sum of squares of lengths of a quadrilateral inscribed in a unit square

Consider this nice little problem: if $ABCD$ is a quadrilateral inscribed in a unit square, then $$2\leq AB^2+BC^2+CD^2+DA^2\leq4$$ (Evidently this is . I also found it in another nice collection of problems, .)  Here's the straightforward algebraic proof I used: let $x_1$, $x_2$, $x_3$, $x_4$ denote legs of the right triangles with hypotenuses $AB$, $BC$, $CD$, $DA$, with no two of the $x_i$ lying on the same side of the square. Then the Pythagorean theorem gives $$AB^2+BC^2+CD^2+DA^2=\sum_{i=1}^4 x_i^2+(1-x_i)^2=\sum 1-2x_i(1-x_i)=4-2\sum x_i(1-x_i)$$ But $$0\leq x_i(1-x_i)\leq\frac{1}{4}$$ and the claim follows. (The lower bound of 2 is achieved when the vertices of $ABCD$ are the midpoints of the sides of the square, and the upper bound of 4 is achieved when $ABCD$ is the square itself.)  I'm curious about other approaches to the problem. Perhaps the result falls out of a more high-powered theorem in geometry? Or does the problem essentially boil down to a nice application of clever quadratic algebra?


Force GraphicsMagick to resize image to specific width

I'm batch processing a folder of image to a uniform width with GraphicsMagick (though I assume the same would apply to ImageMagick):  $ gm convert -resize 1000x in.jpg out.jpg   But when I inspect some of the images, I get 999px instead of 1000px.  $ gm identify -verbose out.jpg  ==> Image: out.jpg ==> Format: JPEG (Joint Photographic Experts Group JFIF format ==>   Geometry: 999x591   Is there a way to enforce the right width? I assume it's doing some estimation to preserve aspect ratios.


Difference between types of Thai black soy sauces (Healthy Boy brand)

I've noticed that a lot of Thai dishes call for thick black soy sauce, but they rarely specify the type. Occasionally, a recipe will specify a certain brand, and sometimes they'll note if you should use the "sweet" (pad see ew, pad kee mao, etc.) or "regular" (pad ka prao, etc.).  When looking, I'll usually stick with Healthy Boy, since that seems to be the standard (and the most widely available in the US). When I get to the local Asian market, though, I'm confronted with about 5 or 6 types of Healthy Boy soy sauce, each of which says "Black Soy Sauce."  Within those, I've been able to narrow it down to three major types so far:    Black Soy Sauce - Thick, salty, sweet, strong flavor Sweet Black Soy Sauce - Thick, somewhat salty, very sweet, strong flavor. Not always labeled "sweet" Light/Thin Black Soy - Thinner consistency (similar to regular soy sauce). I have never tried this.   While it's easy to tell the light from the others (just flip over the bottle), telling the difference between the sweet and regular is not always as easy. Thankfully, Healthy Boy color-codes the bottles. So far, I have seen:   Light Orange (regular?) Dark Orange ("stir fry seasoning with soy sauce?") Brown/brown-orange Green (says Black Soy Sauce B, I think. High sugar content, mostly additive) Red (sometimes says "sweet") White (sometimes says "sweet") Yellow - thin/light Yellow - thick   Each of those typically have varying sugar/salt contents, and have anywhere from 3 to 10 ingredients. Some are also labeled "Natural Ferment" (sub-questions: What does this mean? Does it matter?)  Just going by the bottle color, is there an easy way to tell the difference between all of these? Also, are certain colors more suited to certain dishes?  (I've also seen a couple Bronze and White that are mushroom and oytser flavored respectively, but this isn't about those ones.)


issues when deriving a non-template class from a template class in C++

I'm trying to inherit a non-template class from a template class that specified witch type I need  My code is like this:  the header file for base class(updated):  //base.hpp template<typename T> class Base { public:     Base(T a,int b) :             aa(b) {         this->bb = a;         // ... some code     }     // .. some functions ( all are NOT virtual ) protected:     const int aa;     T bb;     // .. some non-constant variables }   The header and code for derived class:  //derived.hpp #include <SFML/System.hpp> #iclude "base.hpp"  class Derived: public Base<sf::Vector2i> { public:     Derived(float, int, Vector2i);     // .. other methods protected:     // .. other variables }  //derived.cpp #include "derived.hpp"  Derived::Derived(float initf, int myint, Vector2i vec) :         Base(vec, myint) {     // ... some codes }   "sf" referes to the namespac for working with SFML library. I'm using SFML 2.0 that compiled from the source using cmake  (for more information you could see: )  When I try to compile these codes with a command similar to this:  $ g++ ./main.cpp ./derived.cpp ./base.cpp -lsfml-system   I get some linker error that tell:  In function `Derived::Derived(float, int, sf::Vector2<int>)': undefined reference to `Base<sf::Vector2<int> >::Base(sf::Vector2<int>, int)'   Also I'm using "g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3" as my C++ compiler with C++11 enabled.


Looking for Ubuntu 20.04 screenshot editor integration!

In Ubuntu 20.04 (at least my upgraded system) there is now a default screenshot tool, blue icon with some dots ... which I actually really like! I have had trouble with Shutter already before the upgrade, and am looking for a way to very directly edit a screenshot after taking it with this new cool default tool ― just a lightweight image editor for cropping and pixelizing areas, like the one that Shutter used to integrate with. Do you have a quick recipe for how to integrate any such tool into the default screenshot tool? Or a standalone such lightweight tool that starts quickly when launched? With Shutter there was a great screenshot editor integrated, but it took a whole procedure to setup, and (maybe in my own fault) Shutter stopped working cleanly for me at some point. Thanks!!


How does Obito not lose his eyesight after excessive use of the mangekyo?

I've been thinking about his Mangekyo and how it seems to have had no impact on his eye sight and how he could have escaped the effects. After much thought on the topic I think I might have the solution and am wondering if this is a valid theory or not. My theory is you need both Mangekyo to hurt your vision. Since he had only 1 eye this effectively allows him to use part of its power for no effect compared to people like Itachi and Sasuke who do have both and had issues with this. Basically if I didn't make it clear enough with only 1 eye he couldn't get Susanoo or the other great abilities but also didn't have the downside of losing his sight. So do you think this is a valid theory? I know its unprovable either way just trying to see if I'm the only one who thinks this is a possible solution.


Does rooting a device and installing a custom ROM SIM unlock it as well?

I'm a bit confused about this topic. I have a T-Mobile myTouch 3G which I've recently replaced with a Nexus One so it's kind of standing there. I was contemplating rooting the myTouch and installing an alternative ROM but I also wanted to unlock it so it can be used with other carriers.  Now, the real questions:  When rooting and installing a custom ROM, will that also unlock the phone so it can be used with other carriers? Or is that a baseband feature?


How to create the first contact created on account to become primary contact?

My problem is this:  If an Account has no Contacts, then the first created contact by default becomes the primary and that value should be set in reference. If the primary contact is deleted, the next available contact, if there is any, should be the primary contact and the relationship on account should reflect this. If all contacts are deleted, the primary contact reference on Account will be blanked out.  Here is my code so far:  public class CreatePrimaryContactHandler {     public static void createPrimary(List<Account> accounts){       Set<Id> accountIds = new Set<Id>();       List<Account> updatedAccounts = new List<Account>();       List<Contact> con = new List<Contact>();       for (Contact c : con) {         accountIds.add(c.AccountId);       }        Map<Id,Account> accountMap = new Map<Id,Account>([Select Id, Primary_Contact__c, (Select Id, Name from Contacts where IsPrimary__c = true) from Account where Id in :accountIds]);         for (Contact c : Trigger.new) {         if (c.IsPrimary && accountMap.get(c.AccountId)) {             Account updAccount = accountMap.get(c.AccountId);             updAccount.Primary_Contact__c = c.Id;             if (updAccount.Contacts != null && updAccount.Contacts.size()>0) { // This will identify if account already has primary contact set               // Not sure what you want to do? Throw an error? or turn off the iS Primary on older contact?             }              updatedAccounts.add(updAccount);         }        }        update updatedAccounts;     }  }   Trigger:  trigger CreatePrimaryContact on Contact (after insert, after update){     CreatePrimaryContactHandler.createPrimary(); }


Why does the output differ greatly when i change the location of the dictionary within or outside a for loop?

When I change the location of the new_alien dictionary to within the initial for loop, the output acts as expected. My main issue is when I change the location of new_alien to outside the loop, the final output changes all of the list into the one in the second for loop. I am kinda new to dictionaries so I appreciate the help!  #example code from Python Crash Course by Eric Matthes that i used as practice aliens = []  #the problematic dictionary location #new_alien = {'color' : 'green', 'points' : 5, 'speed' : 'slow'}  for number in range(0,30):     new_alien = {'color' : 'green', 'points' : 5, 'speed' : 'slow'}     aliens.append(new_alien)  for change in aliens[0:3]:     if change['color'] == 'green':         change['color'] = 'yellow'         change['points'] = 10         change['speed'] = 'medium'  for test in aliens[:5]:     print(test)   The expected result is as follows:  {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'green', 'points': 5, 'speed': 'slow'} {'color': 'green', 'points': 5, 'speed': 'slow'}   but when i change the new_alien dictionary to before the first for loop, the result is as follows:  {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'} {'color': 'yellow', 'points': 10, 'speed': 'medium'}


The question of the second law of thermodynamics

I am asking question which definitely will be considered as duplicated but I want to ask it more explicitly to prevent empty speech. Suppose we have "closed" system which is consists of alone planet and its gas atmosphere. Planet gravitation sorts gas particles, cold are near the ground hot are on top. So $T$ distribution is not uniform, so $H$ is not maximum. So axiom (as it does not have any formal proof) known in physics as "second law of thermodynamics" is violated. I want you to explain me what I am missing here. At the same time, the conditions of common sense, I consider:  Do not drag by the ears additional concepts that no one knew when this axiom was formulated in 19th centery.  Use any valid math (of 19th century), but gravity must be taken into account.  The more complex proof you involve, the more holes there can be as in a complex program, which will be found anyway.   UPDATE  I asking again not to drag in unnecessary entities. There is no sun, there is just a huge cobblestone in space of mass M and gas pressed to its surface by attraction, while all this is in a mirror thermos, or in other words, we ignore the infrared radiation. In short, we are talking about the simplest model that can only be imagined and which people in the 19th century should have imagined. 2 second law of thermodynamics: H is not decreasing during time and its is going to be maximum in closed (in terms of energy pass) system. It is violated because if we set (in our simple computer model) T to be uniformly distributed, some time pass it will not be uniformly distributed because of gravitation.


I am trying to solve an RSA problem. In order to calculate $d$, I have to calculate $d$ with $e=3$ and $$d\cdot e\equiv1 \pmod{40}$$ Obviously the answer is $d=27$, but I want to solve this with the extended Euclidean algorithm. Though I know how this works, I am stuck because in the first step of the algorithm I get $$40=3\cdot13+1$$  The remainder is 1 and the algorithm stops there.  How do I get $d=27$ by using the extended Euclidean algorithm?  I dont have a problem solving other similar examples that dont stop in the first step. But here, because it stops in the first step of the algorithm, I get confused.


Given $P(B\mid A)=1-\varepsilon$ for some $0<\varepsilon<1$ and $P(C\mid B)=1$, prove that $P(C\mid A)≥1-\varepsilon$

We need to show that, given $P(B\mid A)=1-\varepsilon$ for some $0<\varepsilon<1$ and $P(C\mid B)=1$, that $P(C\mid A)≥1-\varepsilon$. Since we know that $P(C\mid B)=1$, it follows that $P(B \cap C)=P(B)$. This however, doesn't really help much. I tried a lot of things, but I couldn't prove this question, although it seems pretty straight-forward.


Is there a way to convert an image to grayscale?

Is there a way to convert a colored image to grayscale both for printing as well as screen viewing through pdfLaTeX?


How can remove software from Ubuntu startup?

When I start Ubuntu some software automatically starts with Ubuntu startup, for example Teamviewer. I don't want to start any software during startup except Ubuntu community software. Can Ubuntu have any startup manager software to optimize startup? Also how can I manage manually Ubuntu startup processes?


Can AirPods be be used with multiple Charging Case units?

Can I use one pair of AirPods with two or more Charging case units? Can I take turns charging the case, and deposit AirPods into either without any bother?    for USD $69.  Apple announced their  a  charging case upgrade for AirPods.


Specify CSS class names on SVG paths using Illustrator

Is there a way to edit SVG files in Illustrator where you can specify a CSS class for each path?  I already know in Illustrator that if you give the layer name an actual name, Illustrator will use that name as the path's ID, which is fine if you don't plan on reusing the icon more than once on the same page.  My current workaround is to just use the IDs method, but then later convert the IDs to classes in my code editor, but it's pretty annoying to have to do every time I generate my SVG sprite.  If that's currently not possible in Illustrator, are there any other apps that will allow you to specify that? Or maybe a Grunt or Gulp package?  It looks like you might be able to do it with Inkscape with a , so I might look at that if there's no other good solutions out there.


I know that you can combine tabularx and longtable functionality with either ltxtable or ltablex, but is there something similar for tabulary? My searching has come up dry when looking for any way to get tabulary to work with very long tables.  The table I am working with has large amounts of text that requires line breaking in multiple columns. Some cells have very little, and some have a lot, and I would like to see the column widths juggled to minimize total table length. I realize I could manually do this with the {>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X} functionality in tabularx, but what I'm making is intended to be a template that should work well with any particular arrangement of data that gets thrown in. Am I doomed to using tabularx and manually adjusting the hsize numbers each time I want to make a table?


How to write ubuntu image to a bootable USB stick in a Chromebook?

My main computer running Windows 10 is showing BSoD, and I want to install Ubuntu in it. I have a spare Chromebook. How to make a bootable usb stick with it, which I can use to install Ubuntu?


UNEXPECTED BEHAVIOR OF currentTimeMillis() in JAVA

Why does it take more time for insertion in the same SET the first time and much less time when I try to insert the second time. Why there is a change in the behavior for the same code? The Employee class contains two fields and generates a hash code. This is of no use here but related to a different program. What I am trying to do is to calculate the complexity of various Collections for better performance on CRUD operations. But when I first add 200000 elements into the HashSet it takes more time. When the same code runs again it takes much lesser time. I don't know how it is working internally. Any help is appreciated. IN THE OUTPUT THE HASHMAP CORRESPONDS TO THE HASHSET ONLY. REFER TO THE CODE. class Employee {     String name;     int age;          @Override     public int hashCode() {         return age;     } }  public class NonDuplicateObjects {     private static final int COLLECTION_SIZE = 2000000;     private static final Object DUMMY =`enter code here` new Object();     public static void main(String[] args) {             Employee e = new Employee();         e.age = 0;         e.name = "Rahim";         Employee[] eArr = new Employee[COLLECTION_SIZE];         ArrayList<Employee> al = new ArrayList<>();         HashMap<Employee, Object> hm = new HashMap<>(COLLECTION_SIZE);         HashSet<Employee> hset = new HashSet<>(COLLECTION_SIZE);         long startTime;         long timeDiff;                  System.out.println("PROGRAM FOR TIME COMPARISION ON THE BASIS OF CRUD OPERATIONS");         System.out.println("PERFORMING ADDITION/INSERTION:");              //  Insertion in an array         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i)         {             ++e.age;             eArr[i] = e;         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by array: " + timeDiff);         System.out.println("SIZE: " + eArr.length);                  //  Insertion in a ArrayList         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             al.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by ArrayList: " + timeDiff);         System.out.println("SIZE: " + al.size());              //  Insertion in a HashSet         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             hset.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by HashMap: " + timeDiff);hset.clear();         System.out.println("SIZE: " + hset.size());         //  Insertion in a HashSet         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             hset.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by HashSet: " + timeDiff);         System.out.println("SIZE: " + hset.size());     } }


I am getting error with this code:  \documentclass[12pt]{article} \usepackage{ucs} \usepackage[utf8x]{inputenc}  \usepackage[ukrainian]{babel} \usepackage{fontenc} \usepackage{inputenc} \usepackage{calc} \usepackage{pstcol} \usepackage{pstricks,pst-plot} \usepackage{pst-text} \usepackage{pst-char} \psset{xunit=0.7cm,yunit=5cm} \begin{document}  \begin{pspicture}(-7.5,-0.4)(7.5,1.2) \psaxes[Ox=0,Oy=0,Dx=1,Dy=0.2,linecolor=black]{->}(0,0)(-7,-0.3)(7,1.1) \end{pspicture}  \end{document}   Code error:  ! Undefined control sequence. <recently read> \c@lor@to@ps l.17 \end {pspicture}   Help me please. Whats wrong? P.S. Sorry for my bad english


Review window (without edit privs) silently fails on attempts to edit when another is pending

Was doing  and I wanted to edit the question. The edit link appeared broken (clicking the link did nothing) so I reloaded. Still nothing. I simply selected "No Action" and figured I'd just go edit it directly in the question.  Upon going to the answer and attempting to edit, the problem became clearer    So it appears that something is up with this notice in the review window. I can't reproduce it to check if it's something simpler. To recap   Visit the Late Answer or First Post queue where you have no edit privs  Find a review with a pending edit Attempt to edit   Using Firefox 57.0.4


How to save my pick list value to custom object FeedbackFrom__c?

I am having 10 pick list fields for my custom object FeedbackFrom__c Each fields having different VF Page(Totally 10 VF Page) at page 11 am having one submit button. if i click it should save all the selected pick list value as well it should show an average based on my Pick list value.  Note:-  Once submitted, pop up to show " You have rated location name good/average/low/excellent"  Final rating will be an average of the ratings given to all the 10 Fields. Consider low = 1, average=2, good=3, excellent=4       How can i achieve this by using Apex and Visual force.?


Putting a matrix inside of caption gives \caption has an extra }

I am trying to insert a matrix inside of the caption of an image.     The compiled pdf displays the picture, but gives an error that says:     \caption@{indecipherable} has an extra }     Can someone please point to me where I might have inserted an extra }? Because I don't see it anywhere!  \documentclass{article} \usepackage[utf8]{inputenc}  \usepackage{amsthm} \usepackage{amsmath} \usepackage{thmtools}        \usepackage{graphicx} \setlength\parindent{0pt} \usepackage[linesnumbered,ruled]{algorithm2e} \usepackage{hyperref} \usepackage{caption}  \usepackage{cleveref}  \begin{document} \section{Introduction} \begin{figure}[ht]     \begin{center}         \includegraphics{jpg-to-pdf.pdf}     \end{center}     \caption{$x^\star =\begin{bmatrix} \alpha, \beta, \gamma \end{bmatrix}$}     \label{fig:just_picture_of_cute_cat} \end{figure} \end{document}   Does anyone also know what ydblarg is?


Hopefully easy question for those of you into electronics, but as software person bit out of my depth.  What power supply should I be getting for the following LED strip for nice even light single color strip with dimmer attached? (that's not going to blow up/burn out)  Length: 10 meter (2 joined 5 meter strips)  Color: Red  Led per meter: 60  Wattage: 14.4 per meter  Voltage: 12v  Dimmer: LED dimmer mini RF 12-24V 12A  Been checking and calculating (12v /5A? ) but so confused by watts  volts, amps starting to doubt every answer I come up with


Palindrome String Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1

While trying to check Palindrome String getting this error"String Index out of bound -1"  public static void main(String[]args) {      String s= "Madam";     String Temp=s;     String k=new String();     //System.out.println(s.length());     int m=s.length();      for (int i=5;i>=m;m--) {         System.out.println(m);         String t=String.valueOf(s.charAt(m-1) ) ;         k=k+t;         System.out.println(k);     }      System.out.println(k);      if (k==Temp) {         System.out.println("String is Palindrome"+" "+k);        } else {         System.out.println("String is not Palindrome");      } }


I'm wondering if anyone could show me where my logic in this selection sort (yes it's for educational use, I realize that there's an Arrays.sort() method) is flawed.   public static void selectionSortByName() throws IOException {     String temp;     for (int i = 0; i <= nameArraySize; i++){          String smallest = name[i];           for (int j = 0; j <= nameArraySize; j++){             if (name[j].compareTo(name[i]) < 0){                 temp = smallest;                 name[j] = temp;                 name[i] = smallest;             }         }      }   }   I'm getting a NullPointerException on my line with the compareTo method, so I would expect that I just have a logic error in one of my conditionals.  Any help would be great, thanks!


Is it in anyway possible to add custom fonts to Sharepoint Modern sites/pages? I know it's possible to change the theme for Sharepoint Online, but it's very limited (only color palette).   I don't want to use classic experience and/or Masterpages.   Would it be possible to add custom fonts to custom webparts and thereby applying to the whole site/page?  Any advice is welcome.


Test run for Web Service Callout batch class

I have an apex class which fetches and upserts data from external source to Salesforce. Below is the batch class: global class PolicyCalloutBatchClass implements Database.Batchable<Integer>,Database.AllowsCallouts, Database.Stateful {     global Iterable<Integer> start(Database.BatchableContext context) {         Integer[] values = new Integer[0];         while(values.size() < 2999 || Test.isRunningTest()) values.add(values.size());         return values;     }     global void execute(Database.BatchableContext context, Integer[] values) {                  HttpRequest policyreq = new HttpRequest();         policyreq.setMethod('GET');         policyreq.setTimeout(120000);         policyreq.setEndpoint('<endpoint>');         policyreq.setHeader('Authorization', 'Bearer ' + <token>);         Http policyhttp = new Http();         HTTPResponse policyres = policyhttp.send(policyreq);         String policyresponse = policyres.getBody();         JsonParser objJsonParser = (JsonParser) JSON.deserialize(policyresponse, JsonParser.class);                    JsonParser.cls_value clsValue = objJsonParser.value;         Map<String, JsonParser.cls_data> clsDataMap = new Map<String, JsonParser.cls_data>();         for(JsonParser.cls_data objClsData: clsValue.data){             clsDataMap.put(objClsData.id, objClsData);         }         list<Policy__c> updatelist = new list<Policy__c>();         for (String eachIdFromMap : clsDataMap.keySet()){                          Policy__c policy = new Policy__c(                 unique_id__c = clsDataMap.get(eachIdFromMap).id,                 agent_id__c = clsDataMap.get(eachIdFromMap).agentId);             updatelist.add(policy);           }         try{             upsert updatelist unique_id__c;             }         catch(DmlException e){             system.debug('This class didnt compile');         }     }     global void finish(Database.BatchableContext context) {              } }  Below is my Mock test class: @isTest global class MockHttpResponseGenerator implements HttpCalloutMock {     // Implement this interface method     global HTTPResponse respond(HTTPRequest req) {           HttpRequest policyreq = new HttpRequest();         policyreq.setMethod('GET');         policyreq.setTimeout(120000);         policyreq.setEndpoint('<endpoint>');         policyreq.setHeader('Authorization', 'Bearer ' + <token>);         Http policyhttp = new Http();         HTTPResponse policyres = policyhttp.send(policyreq);         String policyresponse = policyres.getBody();                         return policyres;     } }  Below is my test class: @isTest  private class PolicyUpdateController_Test {     static testMethod void testPostCallout() {         Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator());                    Test.startTest();       Database.executeBatch(new PolicyCalloutBatchClass(), 50);          Test.stopTest();              } }  Now, when I run the above test class, either the test class runs forever without any output or I could see the error as  System.LimitException: Too many callouts: 101  Can anyone please let me know if there is any way to get this done? Thanks!


The problem is shown on the picture. I want to use prime symbol for derivative of vector, but as you can see, it doesn't look well (prime symbol and vector arrow are 'glued' together). What would be the easiest way to fix it?


How do I create a custom ringtone for my iPhone?

The iPhone has a very limited selection of default ringtones.  How do I create a new ringtone for my iPhone?


How to view results of last clamscan scan?

I scanned pen drive using clamscan and I closed the terminal after scanning without reading the result.   Now one of my folders on the pen drive is missing. I wanted to know if clamav deleted it.   So I want to view the last scan result.


What are analogous words to "occidental" and "oriental" for southern and northern?

Definitions  Occidental: "1: relating to the countries of the West"  Oriental:  "1. of, relating to, or characteristic of the Orient, or East; Eastern."  So, occidental is effectively a word that is a synonym to western, and oriental is a synonym to eastern.  Do similar words to these exist for northern and southern?


One of my players' characters has a habit of taming random wild animals for use in combat in all the games I've hosted with him in them, and so far I've just had him make a series of Animal Handling checks, with varying DCs depending on the animal. I'm hosting another game with him in it, and I wanted to find out beforehand if I'm doing it right.  Are there any official rules for taming wild animals? Or should I continue what I'm doing already?  For anyone wondering, he is not a , nor is there one in the party.


Circular arrangement of equal quantities of letters or objects

How  many ways are there to arrange the letters $A$, $A$, $B$, $B$ around a circle? My first go with was is to arrange $4$ objects around a circle with gets us $(4-1)!$ but we have to take care of the inner arrangements of $A$, $A$ and $B$, $B$ which leaves us with $$\frac 6 {2! \cdot 2!}  $$  but that's obviously wrong. I have tried other methods too but they fail to generalize. By counting by hand for both the $2A$'s and $B$'s case and the $3A$'s and $3B$'s case we get the answers $2$ and $4$ respectively (hopefully I didn't make any mistakes counting)   what's wrong with my argument? what's the right method for solving this? how can this be generalized?


Check if a specific string contains any lower/uppercase

Is there a way to check if a specific string contains any lower/upper case ?  E.G :  String myStr = "test"; if (myStr.contains("test") { // I would like this condition to                                  check the spell of "test", weather it is                                 written like "Test" or "teSt" etc... //Do stuff }   With this syntax, it works only for the exact same string. How could I make my condition for anyform of "test", like : "Test", "tEst", "tesT" etc... ?


what is the meaning of 'normality' as a difference between parametric and nonparametric method?

I'm so confused of the definition of the terminology, "normality". I mean, normality of what?   According to central limit theorem, regardless of the distribution of population,the computed values of the average will be distributed according to the normal distribution, which allows us to do statistical analysis.  However, lots of sources of information say that in order to do the parametric method which includes most of the statistical analysis we conduct, the data should follow normal distribution.   In my view at this point, tho arguments don't agree, and they contradicts to each other.  I want to specify the term, 'normality' of data.


What are underfull hboxes and vboxes and how can I get rid of them?

Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them?


Let $H$ be a Hilbert space and let $T:H\to H$ be a bounded self-adjoint linear operator.     Show that there exists $x \in H$ with $\|x\|=1$ and $|\langle Tx,x\rangle |=\|T\|$.   I know that $\|T\|=\sup\{|\langle Tx,x\rangle| : \|x\|=1\}$. I think the completeness can produce such $x$, but I don't know how to prove this.


Prove whether or not a subgroup is normal in the dihedral group $D_4$

Let $H$ be the subgroup of the dihedral group $D_4$ generated by the elements $\left<I\ (\text{identity}),p^2\epsilon\ (\text{flip across the horizontal diagonal})\right>$. I have to tell whether or not this is a normal subgroup of the dihedral group $D_4$ (the regular polygon with 4 sides).   I know that $H = \{I,p^2\epsilon\}$. After that I made the multyplicative tale of D_4 and I saw that that $xH = Hx, \forall x \in D_4$, therefor H is normal in $D_4$. But I'm not sure if this is the way it should be done. I think that there is another way which does not imply the multyplicative table.


I have just installed Ubuntu 16.04 on a machine. When I try to boot I get sent to grub, and entering the following commands allows me to boot correctly:   set root=(hd0,4)    linux (hd0,4)/boot/vmlinuz-4.13.0-38-generic root=/dev/sda4   initrd (hd0,4)/boot/initrd.img-4.13.0-38-generic   boot   I have gone into the system, run an update, run sudo update-grub (no errors), shut down and booted back up. I still get sent into grub rather than straight to ubuntu. What is going wrong?


How to insert a space between two variables in JSP?

I have one line of html in a form on a JSP page like this:  <c:forEach var="entry" items="${set}">     <input type="checkbox" name="thing" value="${entry.key} ${entry.value}"> </c:forEach>   However, the space between the key and the value ${entry.key} ${entry.value} is lost when the form is submitted. I've tried using a \ before the , in that case both the \ and the  are still there when submitting.  It seems that Java EL does not preserve isolated spaces, is that right? If so, is there a valid workaround?  EDIT: This is so silly of me, many thanks to Cthulhu. But I still don't understand the behavior after adding a \. Why would that cause the space to show?


difference: should sleep or should be sleeping

In the following sentence, are both "sleep" and "be sleeping" correct? If so, what's the difference?  When can I leave? I should sleep / should be sleeping at home now.


My fresh installation of Ubuntu seems to be having an issue detecting eth0. I have tried few things but nothing worked for me.  For example, I have tried what is being advised on this link.   Furthermore, I added these few lines to /etc/network/interfaces   which was originally empty.  auto eth0 iface eth0 inet dhcp   I also tried the following. After downloading the driver from here:   Entering the following commands:  cd e1000e-3.3.5.3/src   Editing nvm.c, function e1000e_validate_nvm_checksum_generic (line 563) to  s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw) {     /*     s32 ret_val;     u16 checksum = 0; u16 i, nvm_data;   for (i = 0; i < (NVM_CHECKSUM_REG + 1); i++) {     ret_val = e1000_read_nvm(hw, i, 1, &nvm_data);     if (ret_val) {         e_dbg("NVM Read Error\n");         return ret_val;     }     checksum += nvm_data; }   if (checksum != (u16)NVM_SUM) {     e_dbg("NVM Checksum Invalid\n");     return -E1000_ERR_NVM; } */       return 0; }   Finally, build and install:  make sudo rmmod e1000e sudo make install sudo modprobe e1000e   Upon entering the command ifconfig, I receive the following  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:560 errors:0 dropped:0 overruns:0 frame:0           TX packets:560 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:54167 (54.1 KB)  TX bytes:54167 (54.1 KB)  wlp3s0    Link encap:Ethernet  HWaddr a4:34:d9:92:f1:58             inet addr:192.168.1.82  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: 2602:306:3a54:4190:b664:4bd6:984d:dd39/64 Scope:Global           inet6 addr: fe80::f960:171e:a497:f047/64 Scope:Link           inet6 addr: 2602:306:3a54:4190:cba:bd01:e6fd:411c/64 Scope:Global           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:2141 errors:0 dropped:0 overruns:0 frame:0           TX packets:1230 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000    Upon entering the command inxi -SNxz, I receive the following:  System:    Host: abdu-Default-string Kernel: 4.13.0-36-generic x86_64 (64 bit gcc: 5.4.0)            Desktop: Unity 7.4.0 (Gtk 3.18.9) Distro: Ubuntu 16.04 xenial Network:   Card-1: Intel Ethernet Connection (2) I219-V bus-ID: 00:1f.6            Card-2: Intel Wireless 8260 driver: iwlwifi bus-ID: 03:00.0   So the card is being detected but cannot be used for some reason.  The output for ip link  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000     link/ether a4:34:d9:92:f1:58 brd ff:ff:ff:ff:ff:ff   Problem solved by following the instruction on this link:   Any help is appreciated.


I was going through and cleaning up my network profiles. I removed the link from a couple of them and then noticed the link was not there after the third or fourth.  Is there a time limit on how many you can delete a profile from in a given period? It's been several minutes and I still can't remove them at all.


Why didn't the rebels on Hoth use X-Wings to fight AT-ATs?

do a good job explaining why the Imperial forces didn't have fighter protection for their ground force on Hoth.  But nothing there explains why the Rebels didn't use X-Wings to easily dispatch the AT-ATs and buy more time. They obviously had them available because they were sending them off with transports and some of these were obviously not sent until after "defending" the base (since a few of the pilots of the X-Wings were the Rogue Squadron pilots fighting in the Battle of Hoth).  This happens in the EU in the book  (in fact, the cover picture shows this scene) with great success and Wedge actually comments, on page 120:     Back then we were in airspeeders - undergunned and overmatched... Not the case this time [referring to being in X-Wings against AT-ATs instead of speeders on Hoth]   This indicates X-Wings can perform in cold conditions - there was snow in this environment as described by Corran Horn after he is shot down. The temperature difference between day-time on Hoth and here is unknown however.  Additionally, the X-Wings were able to destroy the AT-ATs with their laser cannons only - no grappling was required.  I suspect the answer is basically "because that would have been boring to watch on-screen" but it seems there may have been an actual in-universe reason outside of this.


Can you use your once a day Lv1 Spell with Magic Initiate feat with a higher spell slot you have if you are a caster class?

Can you use you once a day Lv1 Spell with Magic Initiate feat with a higher spell slot you have if you are a caster class? EX: If Wizard with Magic Initiate feat hand chose the Lv1 Chromatic Orb spell as their once a day, can they use that spell with allotted spell slots the wizards have. Can they use the spell with 3rd r 4th Lv slot?


Prove $\sum_{n=1}^{\infty}|a_{n}b_{n}|$ converges if $\sum_{n=1}^{\infty}a_{n}^{2}$ and $\sum_{n=1}^{\infty}b_{n}^{2}$ converge

This is a homework problem for an undergrad topology course.  Let $l^{2}$ be the set of all real-valued sequences $(c_{n})$ where $\sum_{n=1}^{\infty}c_{n}^{2}$ converges. Let $(a_{n}),(b_{n})\in l^{2}$.  Claim: $\sum_{n=1}^{\infty}|a_{n}b_{n}|$ converges.  I've done a couple of examples where $a_{n}$ and $b_{n}$ are general harmonic series. I've also written out the definition of convergence for $a_{n}$ and $b_{n} $. My problem is that thus far I do not understand on any level why my claim is true.


I've recently gotten into a team that heavily utilizes unit testing. Nobody can explain to me why this form of testing is so important, but they treat it like law.  I understand that the idea of automated testing is to prevent regression, but I don't see how that could be a problem in the first place. Modular, object-oriented, concise code that is well-commented doesn't have a problem with regression. If you build it right the first time, and design for the inevitable slough of feature adds that happen in the future, you'll never need tests.  And further, isn't that what graceful error handling and logging is supposed to accomplish? Why spend weeks hashing out assert statements and unit tests when you can just ensure that all your external dependencies double-check their availability first?  Am I being arrogant in coming to the conclusion that unit testing is a crutch for "bad" codebases which are flawed and built poorly?  This is a serious question. I can't find any good answers anywhere, and everyone I ask seems to think I'm being a troll if I question the purpose of automated testing.  EDIT: Thanks for the answers, I think I'm understanding it now. I see a few people voted to delete, but I'd like to thank the people that answered; it really did help!


Let  $(X,\tau)$  and  $(X,\tau')$  are both  metrizable topological vector space, and let  $(x_{n})\subset X$ and $x\in X$ and  $x_{n}\rightarrow x$ in $\tau$  topology if and only if $x_{n}\rightarrow x$ in $\tau'$ topology . Prove  then two topologies coincide on $X$.


Mail send by server gets denied by mx.hotmail.com

I got an notice that some clients werent receiving their emails, all clients used hotmail accounts, while i looked into logs i got this part  Sep 25 07:52:51 s22090 named[25045]: client 127.0.0.1#44056: query (cache) 'hotmail.com/MX/IN' denied Sep 25 07:52:51 ...#56174: query (cache) 'mx2.hotmail.com/A/IN' denied Sep 25 07:52:51 ...#59417: query (cache) 'mx2.hotmail.com/AAAA/IN' denied Sep 25 07:52:51 ...#54682: query (cache) 'mx1.hotmail.com/A/IN' denied Sep 25 07:52:51 ...#60299: query (cache) 'mx1.hotmail.com/AAAA/IN' denied Sep 25 07:52:51 ...#54353: query (cache) 'mx4.hotmail.com/A/IN' denied Sep 25 07:52:51 ...#55171: query (cache) 'mx4.hotmail.com/AAAA/IN' denied Sep 25 07:52:51 ...#55501: query (cache) 'mx3.hotmail.com/A/IN' denied Sep 25 07:52:51 ...#33547: query (cache) 'mx3.hotmail.com/AAAA/IN' denied Sep 28 06:39:52 ...#52626: query (cache) 'd7ddfeb7120a9845bbb8f56e789c4f.pamx1.hotmail.com/A/IN' denied Sep 28 06:39:52 ...#44450: query (cache) 'd7ddfeb7120a9845bbb8f56e789c4f.pamx1.hotmail.com/AAAA/IN' denied   Which i cant really understand why it blocks/denies, anyone can help?  edit  Return-Path:    <spedeus@s22090.vps.name-servers.gr> X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on s22090.vps.name-servers.gr X-Spam-Level:   ** X-Spam-Status:  No, score=2.4 required=5.0 tests=HTML_IMAGE_ONLY_20, HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,MIME_HTML_ONLY,NO_RELAYS autolearn=no version=3.3.1 X-Original-To:  info@spedeus.com Delivered-To:   info.spedeus@s22090.vps.name-servers.gr Received:   by s22090.vps.name-servers.gr (Postfix, from userid 507) id 3BDC9192511F; Wed, 7 Oct 2015 14:35:57 -0400 (EDT) To: info@spedeus.com Subject:    xxxxx X-PHP-Originating-Script:   507:class.phpmailer.php Date:   Wed, 7 Oct 2015 14:35:57 -0400 From:   "Spedeus.com" <noreply@spedeus.com> Message-ID: <b1ea97c7e45bfc0362e77ee9d6470b0c@www.spedeus.com> X-Priority: 3 X-Mailer:   PHPMailer 5.2.1 (http://code.google.com/a/apache-extras.org/p/phpmailer/) MIME-Version:   1.0 Content-Transfer-Encoding:  8bit Content-Type:   text/html; charset="UTF-8"   the DNS records  mail    A - IPv4 Address    185.25.22.90 spedeus.com MX - Mail Server    5 mail.spedeus.com. spedeus.com SPF - Sender Permitted From v=spf1 a mx a:spedeus.com ip4:185.25.22.90 ?all   edit2  Oct  8 05:33:24 s22090 postfix/pickup[13686]: 9AD7619265B0: uid=0 from=<info@spedeus.com> Oct  8 05:33:24 s22090 postfix/cleanup[15659]: 9AD7619265B0: message-id=<1444296804.15654@spedeus.com> Oct  8 05:33:24 s22090 postfix/qmgr[13687]: 9AD7619265B0: from=<info@spedeus.com>, size=602, nrcpt=1 (queue active) Oct  8 05:33:26 s22090 postfix/smtp[15661]: 9AD7619265B0: to=<xxxxx@hotmail.com>, relay=mx4.hotmail.com[65.55.37.104]:25, delay=2.1, delays=0.12/0.01/0.64/1.3, dsn=2.0.0, status=sent (250  <1444296804.15654@spedeus.com> Queued mail for delivery) Oct  8 05:33:26 s22090 postfix/qmgr[13687]: 9AD7619265B0: removed   As i see, it gets removed from queue after queued for delivery.


How to define global functions in zsh (macOS) that are available in scripts?

Since macOS 10.15 (Catalina) the default shell has changed from bash to zsh. One of the things I'm running into is I cannot get my own global functions working. I used to export these from .bash_profile but zsh doesn't seem to know the concept of exporting functions.  Say I have this:  function greet { echo "Hello $1, how are you today" }  If I then run hello RocketNuts on the shell, it says Hello RocketNuts, how are you today. So far so good.   Now I want to make this function global so that it's also available in scripts.  I have tried:   putting it in .zshrc putting it in .zshenv   I also tried creating a subdir ~/myfunctions and a file called ~/myfunctions/greet which contains:  function greet { echo "Hello $1, how are you today" } greet "$@"   and then in either ~/.zshrc or ~/.zshenv I add:  fpath=( ~/myfunctions "${fpath[@]}" ) autoload -Uz greet   However, none of these methods make the greet function available in scripts.  From the shell, they all work fine. With either method, I can invoke the greet function manually on the shell.   But if I have a file test.sh which does greet Somebody and run that, it always says "greet: command not found".  How do I get this working in zsh?


How can I change the default website connection timeout in Chrome?

I want to change the default timeout in Chrome. In Firefox I can set the value of network.http.connection-timeout in about:config - but how can I do that in Chrome?


I am getting this error code:  Exception in thread "Thread-2" java.lang.NullPointerException at com.game.src.main.SpriteSheet.grabImage(SpriteSheet.java:15) at com.game.src.main.Player.<init>(Player.java:23) at com.game.src.main.Game.init(Game.java:37) at com.game.src.main.Game.run(Game.java:83) at java.lang.Thread.run(Unknown Source)   Here is init() from game  public void init() {     handler = new Handler();     handler.addObject(new Player(200,(370-64),this,1,ObjectId.Player1));     BufferedImageLoader loader = new BufferedImageLoader();     try     {         spriteSheet = loader.loadImage("/spritesheet.png");         background = loader.loadImage("/background.gif");     }catch(IOException e)     {         e.printStackTrace();     }      addKeyListener(new KeyInput(handler, this));     this.requestFocus();   }   The constructor for Player:  public Player(float x, float y, Game game, int playerX, ObjectId id) {     super(x,y,id);     this.game = game;     SpriteSheet ss =  new SpriteSheet(game.getSpriteSheet());     if (playerX == 1)     {         player = ss.grabImage(1,1,32,32);     }     else player = ss.grabImage(4,1,32,32);     gravity = 0.2;     maxDY = 5; }   and Class SpreadSheet  package com.game.src.main; import java.awt.image.*; public class SpriteSheet { private BufferedImage image; /**  * Constructor for objects of class SpriteSheet  */ public SpriteSheet(BufferedImage image) {     this.image = image; }  public BufferedImage grabImage(int col, int row, int width, int height) {     BufferedImage img = image.getSubimage((col*32) - 32, (row*32) - 32, width, height);     return img; } }   And GameObject():  package com.game.src.main;  import java.awt.Graphics; import java.awt.Rectangle; import java.util.LinkedList;  public abstract class GameObject {   protected float x,y; protected ObjectId id; protected float velX = 0, velY = 0;  public GameObject(float x, float y, ObjectId id) {     this.x = x;     this.y = y;     this.id = id; }    public abstract void tick(LinkedList<GameObject> object); public abstract void render(Graphics g); public abstract Rectangle getBounds(); public float getX() {     return x; } public  float getY() {     return y; }  public void setX(float x) {     this.x =x; } public void setY(float y) {     this.y = y; } public void setVelX(float velX) {     this.velX = velX; } public void setVelY(float velY) {     this.velY = velY; }  public ObjectId getId() {     return id; }  public void jump(double jumpHeight, boolean canJump) {     if (canJump)         velY -= jumpHeight; }   }  My project path is:  >1v1    >src    >res   This was working before but when I made Player a GameObject it stopped working. Any ideas?


Can I use "whether" instead of "if" in this sentence?

In the past, some experts wondered if Tut died in a chariot crash.   Can I use whether to take the place of "if" in this sentence?


Is there something like anti-seo techniques? To NOT be found by certain keywords?

I wonder if there is something like anti-seo techniques, enabling me to make a website less findable for certain keywords?  For example: I manage a massage website. This website is purely for massages at home. There are no happy ending or such. It's purely for professional sports- and relaxing massages.  We also explain this about the services on the website. But as many search for xxx services, we still get weekly requests about it. When googling these type of service, we can also find our massage website on the first page of search results, in between escort services websites.  The part where we talk about not providing such services is inside a div with data-nosnippit attribute, between googleoff: index comments.  <!--googleoff: index-->   <div data-nosnippet>     Our text about NOT providing these services is in here...   </div> <!--googleon: index>   How can we avoid to be in search results for these kind of adult services? Is there something like anti-keywords we can use?   This question (or similar) has probably been asked before, but I could not find it.


What is the expected value of the number of randomly chosen real numbers between $0$ and $1$ needed to reach a sum of $1$?

My friend told me that the answer to this question was $e$, which intrigued me, but he refused to tell me why.  My initial intuition was completely wrong. I thought that since the expected value of any one of these numbers (uniformly distributed on $[0,1]$) was $1/2$, the expected number of them you'd need to get a sum of $1$ would be two. I realized this was rather stupid.    This is my attempt at calculating the expected value term-by term. Let $N$ be the number of numbers between $0$ and $1$ necessary for their sum to exceed $1$, and let $P(N=k)$ be the probability that it takes $k$ such numbers. Then the expected value of $N$ is $$E(N) = P(N=2) \cdot 2 + P(N=3) \cdot 3 + P(N=4) \cdot 4 + \cdots$$  I then calculated the first term:  $$P(N=2) \cdot 2 = \frac{1}{2} \cdot 2 = 1$$  Unfortunately, the second and higher terms aren't as easy ...


“There is to be no more loss today” sentence

There is to be no more loss today.  In this sentence, I don’t understand the grammar structure. Why does “to be” come after “there is”?


Sending to multiple emails in a single Gmail contact

As a high school, we need to send regular emails to a certain group of student's parents. We have grouped the students by grade, however, when sending emails, it only sends to the first parent listed. We need to default BOTH parents on every email. How can I set up our contact list?


I got this jquery code where i clone some textfields everytime i click "btn_add", and i need the onchange function i wrote at the end to id_usd_value there works for every new clones i add but it's not working :          Any idea how ??, thanks for your help !


What sort of Q&A does this "Meta Stack Overflow" deal with?

As a new user, may I ask what kind of Q&A and discussions this "Meta Stack Overflow" deals with?


How is an epsilon of 1/1000 non-negligible?

Lately I've been studying cryptography and in the current course I'm taking we're reviewing statistical tests and how they can be used to determine if a pseudo-random generator is secure or not.  Essentially, one of the requirements for a Pseudo-random generator to be secure is that the probability of guessing the next bit in the string is less than 1/2 + a non-negligible epsilon (epsilon being any statistical advantage the computer has of guessing the next bit of the string due to insecurity in the PRG).  In an example the professor uses, he states that the probability of guessing the next bit of output from the PRG is 1/2 + 1/1000 (the non negligible epsilon).  How is 1/1000 non-negligible? I understand we're using computers with thousands of times faster processing power than a normal human brain, but that still means that a computer only has a 50.1% chance of guessing the correct bit. How can a computer leverage that tiny extra probability to crack a secret key?


I'm running 12.04 LTS, and whenever I try to install PlayOnLinux, I keep getting this error:  The following packages have unmet dependencies:  playonlinux : Depends: python-wxgtk2.8 but it is not going to be installed                Depends: mesa-utils but it is not going to be installed  primus-libs-ia32 : Depends: primus-libs but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   I previously installed Bumblebee and Primus so I could optimize my games on Steam.   Is there any way to fix this?


The new sticky top bar covers the review queue sticky bar

The new sticky top bar cover up the review queue buttons in the sticky top bar in review queues.   Without sticky top bar:    With sticky top bar:    Ideally the review queue bar should be still sticky, but below the other sticky bar.


Intuitive explanation of the F-statistic formula?

Introduction to Statistical Learning defines the F-statistic as follows: $$\frac{(TSS - RSS) / p}{RSS / (n - p - 1)}$$ I am trying to interpret this formula intuitively - the numerator looks like the $ESS$ per regressor, and the denominator looks like the $RSS$ per observation. This does not seem like an apples to apples comparison; can anyone explain why it makes sense?  They also say that the expectation of the denominator is equal to the variance of the irreducible error if the linear model assumptions hold (I get this, as the denominator is really the Residual Standard Error, which is an unbiased estimator). They also say the numerator is equal to the variance of the irreducible error if the null hypothesis is true. Therefore the F-statistic will be close to 1 if the null hypothesis is true.  But if you let p = 1, that is, apply the F-statistic to single linear regression, it becomes:  $$\frac{TSS - RSS}{RSS / (n-2)}$$  According to the book, if the regressor has no explanatory power, the F-statistic should be close to 1. But if you imagine a data set where the coefficient on X is 0 (i.e. no explanatory power), $TSS$ will be equal to $RSS$, so the numerator and hence the F-statistic should be 0, not 1 as they claim. What is going on?  Furthermore, if you accept that the F-statistic is 1, as they claim, then $(TSS - RSS) = RSS / (n-2)$, which means $ESS = RSS / (n-2)$. If you think of the F-statistics as comparing explained vs. unexplained variation, this does not seem like a fair comparison since this decomposition makes it the ratio of TOTAL explained variation summed across ALL observations vs. the unexplained variation PER observation. Again, what am I missing?  I am just trying to make sense of it in a layman way, apologies if I am missing something obvious.


I am trying to learn how to find the product of non-disjoint cycles, as you may have guessed from the title. I have the basic idea, but I do not understand it entirely.  I am trying to find $(1352)(256)$ and $(1634)(1352)$, multiplying from right to left.  Please give me some hints/suggestions.  Thank you.


How to indicate that a unit is dimensionless

For my dissertation I am preparing a list of symbols used in the text, which basically is a table that consists of the symbol, a short explanation and the dimension it has as indicated below:  Symbol    Description                                     unit x         way travelled by the thing                      km z         fraction of the x and the total possible way    ?   My problem lies in the second symbol "z" which is a dimensionless quantity. I could of course just leave the unit column empty for such quantities, however that would look a bit like there was something forgotten and therefore I would like to indicate somehow that this symbol denotes a dimensionless quantity. Is there a convention to indicate that a unit is dimensionless?


Constructing a bijection between $S=[1,2]$ and $T=[1,2)$

I am having a bit of trouble with constructing the biijection here. I know that the bijection has to be a piecewise function with one component being $f(x) = x$ when $x$ does not equal $1/n$. But the other component is a bit more tricky, none pass the horizontal line test. Could the other component be $2/n+2$ or how would I go about figuring that component out?


Why is momentum conserved in inelastic collisions? How is it related to momentum-impulse theory?

First of all I want to mention, that I've found many questions around this site and in other websites dealing with my question; however, I don't think they answer my question fully. So I am here to re-ask it and specify some things so that whoever will answer it can focus on my ideas and help me understand momentum better.  So here is my question: Why is momentum conserved in inelastic collisions (perfectly inelastic or just inelastic)?  So here is what I thought about in this question: I understand that elastic collisions have the K.E conserved but inelastic don't.   So in inelastic if K.E is not conserved then... Wnet=deltaKE (work energy theorm) so here that means that their is work done and a net force acting on the system.  Now from impulse momentum... Ft=deltap (isnt here F not equal zero so the change in momentum not equal zero?)  So basically my confusion comes in the fact that to have a change in momentum their must be a force and time, and the force exists because K.E changes?  I hope you will help me understand this concept more, because I cant seem to wrap my head around it. What am I doing wrong?


First tie a stone with a string and fix it on a stick. At rest,the angle between the stick and the stone will be zero. When we start rotating the stone slowly the angle between the stick and the string (or the stone tied to it) becomes 90 degrees (at extreme). Why doesn't the gravitational force pull the stone in downwards direction? Please explain in simple way,I'm just in highschool.  Edit:Why doesn't the gravity pull back the stone?


Should a hot network question that you're currently reading appear on the list of them?

This question is a hot question. As a result, there's a link to it in the "hot questions" sidebar. This...is a bit silly. Why is a question linking to itself? I think it would make more sense to remove self-links and instead list whatever hot question is just below the cutoff.


1% of the global population means roughly 1% in my country?

Assuming that you hear that X affects 1% of the global population, is it safe to assume that it should affect 1% of the population of your country/city/subgroup?  Given that there is nothing in the subgroup to affect the distribution of X. (Assume that the distribution of X is not mentioned, so should we assume normal/Gaussian?*)  I'm asking because, often, I hear X disease is very rare, it only affects 1% of the global population, which sounds HUGE to me.  *if so, you could say that your country is an outlier and it's much less that 1%, but on average, you should be correct, right?


I'm working with TeXShop 3.61 and I'm currently switching from natbib to biblatex. Despite having tried for hours and read through all other entries, I still can't make it work.   .tex Document:  \documentclass{article} \usepackage[backend=biber]{biblatex} \bibliography{Ohne-Titel} \begin{document} Test test test \cite{Lee2009a} \printbibliography \end{document}   .aux File:  \relax  \abx@aux@sortscheme{nty} \abx@aux@cite{Lee2009a} \@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } \@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax } \@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }   .bib Entry:  @article{Lee2009a, author = {Lee, Geun}, file = {:Users/JulianLeitner/Library/Application Support/Mendeley Desktop/Downloaded/Lee - 2009 - A Theory of Soft Power and Korea's Soft Power Strategy.pdf:pdf}, journal = {The Korean Journal of Defense Analysis}, number = {2}, pages = {205--218}, title = {{A Theory of Soft Power and Korea's Soft Power Strategy}}, volume = {21}, year = {2009} }   And here the error message:   LaTeX Warning: Citation 'Lee2009a' on page 1 undefined on input line 5.   LaTeX Warning: Empty bibliography on input line 6.   [1{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]  (./Ohne-Titel.aux)   LaTeX Warning: There were undefined references.   To compile I simply use the Macro --> applescript --> bibliography.   Any help would be highly appreciated!  Julian


How do I go about proving that $$\frac{x^2}{yz+2}+\frac{y^2}{xz+2}+\frac{z^2}{xy +2}\ge \frac{x+y+z}{3} $$ for $1\le x,y,z\le 2$ ?  This is straightforward when $x=y=z$, but I don't see where to go from there.


Why is black a better emitter of heat than white?

I know that black absorbs light and converts it into heat which makes it a good emitter of radiant heat while white reflects it. Let's say if I place 2 cups, 1 black and 1 white, same material, in a dark room, which cools faster? Why is black a better emitter? Is it because it converts light to heat?


I am an Indian citizen and I have a long term EEA residence permit. I will be traveling from Norway to India with transit in Manchester. Unfortunately, I have to check-in again at Manchester as the airlines are different (SAS and Thomas Cook airlines). Will I need a transit visa?


iphone sdk: NSCFString does not match with value

I am using Kinvey Kit in one of my apps. While using query +(KCSQuery *)queryOnField:(NSString *)field withExactMatchForValue:(NSObject *)value, I try matching record with KCSUser userId. It does not match by using self.userId but if I do @"53a7ded611324c8002041603", it matches immediately. self.userId is same as 53a7ded611324c8002041603 except its type is NSCFString.   Its driving me nuts. Is there anyway to change NSCFString to NSString.


Proving a non-universal set doesn't exist in ZFC Set Theory

In ZFC Set Theory, "the set of all sets" famously doesn't exist since it leads to Russell's Paradox. Clearly, there are other constructions that also don't exist like "the set of all non-empty sets" for the same reason.  I want to be able to prove whether a "described" set exists or not.  For example, "the set of all sets that contain natural numbers" $(\mathcal{P}(\mathbb{N}))$ does exist, while "the set of all tuples $(a,b)$ where $a$ and $b$ are sets" does not exist (I think).  Intuitively, it seems that an injection could be used similarly to a proof about the cardinality of a set. I.e., if there is an injection from the universal set to the set $A$, then $A$ is not a set because it has "more" elements (a higher or equal cardinality) than the universal set.  For example, is this a valid proof?:     Let $U$ be the universal set   Suppose $A=\{(a,b)\ |\ a$ and $b$ are sets$\}$ exists   $\forall u\in U$, let $f(u)=(u,\emptyset)$   Then $f$ is an injection from $U$ to $A$   $\therefore A$ does not exist   Is this logic a valid way of showing that a set doesn't exist? I don't think this proof is correct since this it uses the universal set. But is there another way to express the same logical reasoning? Are there any "describable" but non-existent sets that cannot be shown to not exist by this logic? And of course, is there a better general way to show that a "describable" set doesn't exist?


Prove that a group where $a^2=e$ for all $a$ is commutative

Defining a group $(G,*)$ where $a^2=e$ with $e$ denoting the identity class....  I am to prove that this group is commutative. To begin doing that, I want to understand what exactly the power of 2 means in this context. Is the function in the group a power or something?


Is $\operatorname{Hom} _A(M,N)$ a finitely generated $A$-module?

If $M,N$ are finitely generated $A$-modules, is $\operatorname{Hom} _A(M,N)$ a finitely generated $A$-module?


What is the maximum gym level and how much prestige does it take to get to this level?  The highest I've seen is 4 and it was 10k/12k prestige, so I assume that there is at least 5.


How to install Oracle 11gR2 Enterprise Edition on Ubuntu 16.10?

I couldn't find any tutorial to install  Oracle 11gR2 Enterprise Edition on Ubuntu 16.10? Please help.


A question about a prime number diving natural numbers

I need help proving or disproving the following statement: $a$ and $b$ are natural numbers, $p$ is a prime number. If $a^2 = b^3$ and $p|b$, then $p^3|a$. I know that if $p|b$, then there is a single $n$ so that you can make $b$ with $p^n$. Which means that $p^{3n}|b^3$, and thus $p^{3n}|a^2$, but from here I don't understand how to get to, or disprove that $p^3|a$.


The sum of two symmetric random variables is symmetric

If $X$ and $Y$ are two random variables with probability density functions which are symmetric around their respective means, their sum, $X+Y$, has a probability density function which is symmetric around its mean as well. Could someone offer a proof outline? Thanks.    Edit: whuber's example (see comments) shows that the simply specifying symmetric marginals does not result in a symmetric sum Dilip Sarwate's response gives two conditions, each of which is sufficient by itself: circular symmetry of the joint and independence of the marginals


Bash: avoiding filename expansion inside double bracket regular expression test

I am trying to do a regular expression match with a variable that contains an asterisk.  The following set of commands in Bash does filename expansion with the asterisk in the variable on the left-hand side of the operator.  test='part1 * part2' [[ "$test" =~ ^(.+)\ .\ (.+)$ ]] && echo $BASH_REMATCH   Results in: part1 FILE1 FILE2 part2  But it should result in: part1 * part2  I have searched and searched but cannot figure out why this is happening.


I successfully mapped my www.mydomain.com to my Google site (as described ).  However I would like to forward also my naked domain (mydomain.com) to end up in www.mydomain.com.  I assume I should modify 'A' DNS record in my provider but what IP should I point it to?


Point P(-2,5) is reflected on the line y=2x/5. How do you find the coordinates of P using linear algebra? P(-2,5) needs to be mapped across the x axis without using the difference formula


Unable to add a new user to the sudo group

In Ubuntu I can do this in order to add a new group and user:  groupadd group123 useradd -m -s /bin/bash -g group123 user123 usermod -a -G sudo,www-data user123   I was able to do this in FreeBsd:  sudo pw groupadd group123 sudo pw useradd user123 -m -s /bin/tcsh -g group123   But this has failed:  sudo pw usermod -a -G sudo,www-data user123   because the group sudo didn't exist. Why not? doesn't "sudo pw" imply that it must? If not, how to properly add it?


Saying "nothing" then "everything", what does it mean?

In the movie Kingdom of Heaven Bailian of Ibelin asked Saladin, "What is Jerusalem worth?". The latter answered, "nothing" and then he said "everything".  What's the meaning of that?


Novella with psychic killing, southern family cult camp set on fire by a boy who escapes

I'm looking for the name of a novella I read in an anthology, I believe it was a collection of Nebula Award-winning science fiction but I'm not entirely sure.  The story has a main protagonist, a teenager who has the psychic ability to assassinate people. His cultist southern family takes him back after hearing about that, the patriarch talked with him outside and then the boy caught the whole cult camp on fire and escaped. A woman driving a model T picked him up if memory serves.


How do you prove the set $G = \{(x, f(x)) \mid x \in \mathbb R\}$ is closed?

Let $f : \mathbb R \to \mathbb R$ continuous. Prove that graph $G = \{(x, f(x)) \mid x \in \mathbb R\}$ is closed.  I'm a little confused on how to prove $G$ is closed. I get the general strategy is to show that every arbitrary convergent sequence in $G$ converges to a point in $G$.  Here is what I tried so far:   Let $x_k$ be a sequence which converges to $x$. Since $f$ is continuous, this implies that $f(x_k)$ converges to $f(x)$. At this point, can you say every $(x_k, f(x_k))$ converges to a $(x, f(x))$, so $G$ is closed?