Obtaining a level-$\alpha$ likelihood ratio test for $H_0: \theta = \theta_0$ vs. $H_1: \theta \neq \theta_0$ for $f_\theta (x) = \theta x^{\theta-1}$

Suppose I have a sequence of iid random variables $X_1, \ldots, X_n$ following the pdf:  $$ f_\theta (x) = \theta x^{\theta-1} $$  for $\theta >0$ and $0 <x<1$.  I would like to obtain a level-$\alpha$ likelihood ratio test for the null hypothesis $H_0: \theta = \theta_0$ versus the two-sided alternative $H_1: \theta \neq \theta_0$ where $\theta_0$ is a known constant.  MY ATTEMPT:  I first construct the ratio:  \begin{align} \lambda(x) &= \dfrac{sup_{\theta=\theta_0}L(\theta|X)}{sup_{\theta\neq\theta_0}L(\theta|X)} \\ &= \dfrac{\theta_0^n \left(e^{\sum log x_i}\right)^{\theta_0-1}}{\left(\frac{n}{-\sum logx_i}\right)^n \left(e^{\sum logx_i}\right)^{\left(\frac{n}{-\sum log x_i} - 1\right)}} \\ &= \left(\dfrac{-\theta_0 \sum log x_i}{n}\right)^n e^{n+\theta_0 \sum log x_i} \end{align}  The denominator is calculated using the MLE of $\theta$ which is $\theta^{MLE} = \frac{n}{-\sum log x_i}$. Now, I'd like to find the likelihood ratio test, in that I would like to choose a constant $c$ such that:  $$ \alpha = sup_{\theta = \theta_0}P_\theta\left(\lambda(x) \leq c\right) $$  Now, $-\sum logx_i \sim Gamma(n, \theta)$ but I CANNOT isolate the above equation due to the $log$ form. What is the right answer here? Thanks!


Mother's day in my family always involves a bouquet of balloons.  Mom wanted to take the balloons we gave her home on the plane but in this hyper security aware atmosphere we doubted it was possible.    Getting them through security checkpoints would be a hassle at best.  As carry on's they'd fit overhead but likely wouldn't play well with other luggage.   We considered checking them but doubts ranged from air pressure changes to the baggage handler getting across the tarmac without accidently causing an air space violation.  The most practical solution is of course to just buy Mom more balloons when she returns home but Mom is sentimental.  Is there any guidance for this or was Mom crazy for even thinking we could do it?


Difference between 2 Ways of List Comprehensions in Python?

I was using dynamic programming to implement the Matrix_Chain Problem, i.e. figure out the minimum number of multiplications to be done in matrix multiplication via parenthesizing. My code was not working until I changed the way of initializing list m. Could someone explain why, even when m = [[0]*n]*n and m = [[0 for x in range(n)] for x in range(n)] make seemingly identical list, m = [[0]*n]*n will results in matrix entry not being correctly updated to the minimum cost?   I made list m = [[0]*5]*5 and printed   for a in m:   print(a)   I made list n = [[0 for x in range(5)] for x in range(5)] and also printed in the same way. The results are identical.   import sys def Matrix_Chain (p, n):    m = [[0]*n]*n #problematic step    for i in range (1,n):     m[i][i] =0    for L in range(2, n):      for i in range(1,n-L+1):             j = i + L -1         m[i][j] = sys.maxsize          for k in range (i, j):         q = m[i][k] + m[k+1][j] + p[i-1]*p[k]*p[j]         if q <  m[i][j]:           m[i][j] = q    return m[1][n-1]   For argument p = [1,2,3,4] and n = 4, I expect to see 18, the minimum number of multiplications. However, the m = [[0]*n]*n way will return 9223372036854775807, which is the sys.maxsize.  The m = [[0 for x in range(n)] for x in range(n)] way returns the correct answer 18.


Jquery not calling function on click of dynamically added button

I have a function and some code:  function findMember(str) {         // console.log('search: ' + str);          $.post("includes/search.php", {             search: str,         }, function(data, status) {             // console.log(data);             $('#creatorSearchMain').html(data);         });      }      $('#creatorSearchInput').keyup(function() {         var target = $('#creatorSearchInput');         findMember(target.val()); //remove and uncomment other if want to wait before request     });   This selects the text from an input and uses it with .post to query the database to search for a user with the name searched. The .post returns html code that is added to a div.  In that html that is returned there is a button:  <button class="followButton " type="submit" value="1">Follow</button>   When that button is clicked it runs another javascript function.  This all works perfectly except for when I try and click the button after I have used .html to add the html returned to the div.  To clarify, the button works when the page is first loaded and it is there but when I put it back there with the new results it does not seem to be picked up by the javascript.  This is what I am using to activate the onclick button function:  $('.followButton').on("click", function() {  #code in here });   Thanks in advance!


How to set a property of an object which name is in string form?

IDE: Visual studio 2010, C#, .NET 4.0, Winforms application. Before I begin see this class:    public class Car {    private string _break;              public string Break    {       get { return _break; }       set { _break = value; }    } }   And I have another class:  public class Runner {    Car cObj = new Car();     string propertyName = "Break";    //cobj.Break = "diskBreak"; I can do this but I have property name in string format       cobj[propertyName] = "diskBreak"; // I have the property name in string format    // and I want to make it's Property format please suggest how to to this? }   I have the property name in string format and I want to convert this in property and want to initialize it. Please tell me how to perform this, I think it is possible using reflection. But I don't have that knowledge.


Why do I not have any directory except 'home' with new user?

I created a new non-root user and did the following:  useradd -m newusername  passwd newusername  usermod -a -G sudo newusername  chsh -s /bin/bash newusername    I need to install software as a non-root user, but when I'm logged in as that user,   cd Downloads   does nothing. The directory doesn't exist. Did I do something wrong when creating the user, or am I missing something?  cd /home/newusername/Downloads   does not work either.


Schengen visa Bank balance and funds parking related question

I am going to Europe this August and wish to apply for visa from Dutch consulate in May. I have recently started looking out for the bank balance I need into my account.  I have understood that I shouldn't add lot of money into my account otherwise it could be considered as funds parking, but to this I want to check , can I not add surplus cash I have with me of around 75K INR to my account ?  Also generally my wife transfers me some money from time to time, like I've paid for her flight tickets and she will transfer that amount to me. Will transfers within my family also cause an issue?  Lastly if these transfers cause an issue then how can I convince the visa authorities that it is actually my money being deposited and my wife whose transferring for money to me why she owes me.  P.S, it's almost 3 months left for my visa, if I do add the money now and it stays in my account for 3 months and I hope it's not considered as funds parking.


Online tools to look up words from pronunciation

Are there online tools to look up words from their pronunciation? For example, when I hear /bεə/, I want it to tell me that there are words bear and bare that are pronounced /bεə/.


I was asked to evaluate the following sum: $$\sum_{k=1}^{\infty}\frac{1}{k}\int_{\pi k}^{\infty}\frac{\sin(x)}{x}dx$$  I'm trying to use $$\int_{0}^{\infty} \frac{\sin(x)}{x}dx=\frac{\pi}{2}$$ However, it doesn't seem to work. Any help is greatly appreciated.


I've got a simple Leaflet map with a basemap and one map-layer coming from my own hosted GeoServer.  I made the layers show up nicely in a map.  Now I want to add popups on the point layer showing information stored in MapService.  I couldn't find too much information about that topic.   There's one link to a working example but the link seems to be broken. I found another example which I addopted. You can see it on . I'd like to display the content of the name field in the attribute table but nothing happens when the user clicks the map.  Any idea?


Let $S \subseteq \mathbb{R}^2$ and the distance of any two points in $S$ is rational. Prove $S$ is a countable set.

$S$ is a subset of the $\mathbb{R}^2$ plane, how do we prove that its countable? isn't it trivial that $S$ will be countable if distance is rational, or is $\mathbb{R}^2$ itself a countable set, which is why $S$ is countable? If so, how do we prove $\mathbb{R}^2$ is a countable set?


All fonts become invisible on occasion after unlock

Now and then, I'll unlock my computer and see this:    You can see in the bottom-right corner that when I open the calendar, nothing is shown. This is true for most applications.  Now look at the bottom-left:    The fonts used in the MATE toolbar are, unlike most applications, just mostly invisible! They have changed color from white to a dark, translucent color that blends in with the rest of the panel.  What could possibly be causing this? A reboot fixes it, but I'd like to ensure that it doesn't happen again.  I am running Ubuntu 16.04 64-bit. I have upgraded from Ubuntu 14.04 64-bit. Before  you ask, I do not have a graphics card. I have integrated graphics:  $ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)


Is there a relation between card(P($\mathbb Q$)) and card($\mathbb R$);

I am pretty stuck on this problem.From which direction should I start?


is a question about the canonical momentum that I had asked some days ago, but I still have one point that I am not understand.  Considering a particle moves in a magnetic field with charge $q$ and mass $m$, its hamiltonian is $$H=\frac{\vec{P}^2}{2m}=\frac{(\vec{p}+q\vec{A})^2}{2m}$$ where $\vec{p}$ is the momentum of the particle, $\vec{A}$ is the vector potential of the magnetic field and $\vec{P}$ is the canonical momentum of the particle.  I think, because of the expression of the hamiltonian, the canonical momentum $\vec{P}$ is a conserved quantity.  But by the answer in , it seems that the canonical momentum is not conserved even in a simple example that a particle moves in a homogeneous magnetic field.  I am confused about this question. Is the canonical momentum conserved when a particle moves in magnetic field?


Empty comment field has notice "enter at least undefined characters"

When I open a new comment field, but before I have entered anything, next to the Add Comment button it says "enter at least undefined characters". When entering something then deleting all of it, the same message appears. This occurred on the page  but seems to happen regardless which page I use.  This is on Mozilla Firefox 68.0.2 on Android 9. No userscripts I'm aware of. By next to I mean that below the comment field, on the left hand side there is the Add Comment button, and in the middle (to the right of the button) there is the status message indicating either what I reported or (eg now) "267 characters left".  Screenshot:


Different "free space" indications in Macintosh HD after upgrading to El Capitan

I wanted to know what was the free available space in my internal HD (I actually have a SSD). In Finder, if I trust the Show Info information (right click or cmd+I on Macintosh HD icon in the Finder sidebar) I get a certain available space. Otherwise, if I just press the spacebar (quick insight), I get a different value, it seems that it's not updated. Finally, also Disk Utility reports a different value.  Why these three different values?  (this gap first appeared after upgrading to El Capitan and trash is already empty).  Available space displayed when clicking Show Info:    Available space displayed when pressing spacebar:    Available space displayed in Disk Utility:


AppleScript to change resolutions on my monitor

I have reviewed multiple scripts that address primarily changes on a retina display.  I have a standard monitor (iMac 27").  The line of code that seems to give me trouble is:  tell application "System Events" to tell process "System Preferences" to tell window "iMac"  I have substituted the name of the window containing the parameters of my monitor (see picture).  What am I doing wrong here?  Thanks.


Can we have regular numbers citations and superscript citations at the same time with natbib?

I would like to be able to cite some articles as superscript, and some not.  The problem is that if I try this :  \documentclass{article} \usepackage[numbers, square, super]{natbib}  \begin{document}  patotos are definetly good for you\cite{who09} and in \cite{who09} they show that they have an harmonious form.  \begin{thebibliography}{0} \bibitem{who09} Who J F. Nice Book. 2009. \end{thebibliography}  \end{document}   I would have all citations as superscripts while I would like the second cite not to be in superscript because I actually mention the article (but I don't want to present all the writters)... =)


After upgrade to Windows 8.1, no Skydrive icon in task bar

I upgraded to 8.1 and now I don't see the SkyDrive icon in the task bar, nor the green light under it indicating the my computer is communicating with SkyDrive. When I go into Control Panel |..|Notification Area Icons, SkyDrive is listed and noted as Up to date. However even though I mark it to Show Icons and Notifications I don't see any icon in the taskbar.  Is it supposed to be this way, or do I have a problem?  I kind of got used to that little green synchronizing indicator giving me a warm and fuzzy feeling.


Working remotely from another EU country

I work in Finland for a Finnish company. Due to covid, I work remotely all the time. Given this situation, I would like to work from another Schengen country for couple of weeks. What are the laws that allow or ban me from working couple of weeks from another Schengen country? Edit: I'm a non-EU national and I have a resident permit A.


"GNUTLS ERROR: A TLS packet with unexpected length was received." when mointing with ifuse

I use a macbook pro 3.1 with Ubuntu 10.04 as single boot; I have also added the ppa:pmcenery/ppa  to have the last updated library to use ipod and co., and upgraded the whole system.   I have some trouble trying to mount my iPod Touch because Nautilus does not auto-mount it. I tried to manually mount it using ifuse:  r@mbp:~$ sudo mkdir /media/ipod r@mbp:~$ sudo ifuse /media/ipod/   When I tried to open the ipod icon on the desktop I have: Access was denied!  So, to browse the ipod I have to use:  r@mbp:~$ gksudo nautilus   Doing this I can not oped ipod in Rhythmbox. I also tried to change the permission of the mounting point:  r@mbp:~$ sudo chmod 777 /media/ipod   but nothing changes. I also tried to use ifuse without sudo but I have this error:  r@mbp:~$ ifuse /media/ipod GNUTLS ERROR: A TLS packet with unexpected length was received.   Do you have any further suggestion??


Proving determinant product rule combinatorially

One of definitions of the determinant is:  $\det ({\mathbf C})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \prod_{k=1}^n C_{k \lambda ({k})}})$  I want to prove from this that  $\det \left({\mathbf {AB}}\right) = \det({\mathbf A})\det({\mathbf B})$  What I have so far:  $(AB)_{k\lambda ({k})} = \sum_{j=1}^n A_{kj}B_{j\lambda(k)}$  so we have for the determinant of $\mathbf {AB}$  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \prod_{k=1}^n \sum_{j=1}^n A_{kj}B_{j\lambda(k)}})$  Now I'm not sure how to denote this, but the product of the sum I think is the sum over all combinations of n terms, each ranging from 1 to n, so I'll denote this set of all combinations $C_n(n)$ for n terms each ranging from 1 to n, analogous to the permutation set, but all combinations instead of permutations.  then I get  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \sum_{\gamma \in C_n(n)} \prod_{k=1}^n A_{k\gamma(k)}B_{\gamma(k)\lambda(k)}} )$  then I can at least seperate the product:  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \sum_{\gamma \in C_n(n)} \prod_{k=1}^n A_{k\gamma(k)} \prod_{r=1}^n B_{\gamma(r)\lambda(r)}} )$  I changed the k to an r in one product because it's a dummy variable so I think it doesn't matter, I don't really know if this thing is helpful but this is my attempt at a solution so far.  Thanks to anyone who helps!


Create out of office reply without Exchange

How can you make a rule to auto reply when you are out of the office. Outlook doesn't have this kind of rule.


Is there an example of a power of prime ideal in a polynomial ring that is not primary?

The question may have been addressed in Math SE before; but my question is a little variation of it, coming because of a very common example for this question.  It is well known that powers of a prime ideal need not be primary and a standard example is to consider the quotient of $k[x,y,z]$ by the ideal $(xy-z^2)$, and in the quotient ring, take the prime ideal $(\bar{x},\bar{z})$; its square is not primary.  Now this example of prime ideal is in quotient of polynomial ring.   Q. Can we construct an example of a prime ideal within a polynomial ring, say $k[x,y]$ or $k[x,y,z]$, whose some power is not primary?


How to display research findings in portfolio

I am a bit confused about how to display qualitative research findings in a UX research portfolio. I know that people spend like a minute on each project and I don't know how to quickly give them a sense of my findings without making it boring. I know images can be the best way to represent some findings but I don't want to entirely depend on them because sometimes images don't load due to internet issues.


options for appearance of links in hyperref

If I use  \usepackage[colorlinks]{hyperref}   I get colored links for \cite (not good for printing or even viewing) but table of content looks fine.  If I use  \usepackage[colorlinks=false]{hyperref}   I get \cite  links in black with a colored frame (this looks very good) but the table of content looks strange with extra long boxes.  What are my other options? Can you have two styles in different parts of a document?   How do you make the page numbers in TOC to be the links instead of the section headers?


A field worker has to make altogether 43 visits, at least one on each day. Is there a period of consecutive days on which he makes exactly 21 visits if he makes his visits on 22 days? What happens to the problem if he makes his visits on 23 days instead of 22 days?  How can I approach to solve this problem using Pigeonhole principle, thanks.


How to find the total number of exchanges?

Given n objects held by n people, how to find the total number of valid exchanges, where a valid exchange means that all persons hold different objects after the exchange?  eg for 4 objects 1 2 3 4: valid exchanges are:  2 1 4 3  2 3 4 1  2 4 1 3  3 1 4 2  3 4 1 2  3 4 2 1  4 1 2 3  4 3 1 2  4 3 2 1  Therefor the total number of valid exchanges are 9.


On my reelbox (running Ubuntu) I have found a file in /etc/init that contains the following  # frontpanel-pre - check for frontpanel CAPs and adjust time #  description     "check frontpanel caps"  #start on starting mountall #start on tty-device-added DEVNAME=/dev/ttyS0  task  script         (         /sbin/dev_frontpanel.sh         /sbin/reelfpctl -capability         ) > /dev/.frontpanel.caps         initctl emit --no-wait frontpanel-linked end script   I wonder if the dot in /dev/.frontpanel has some special meaning in linux  I thought the output of the commands in the brackets will be written to a file called ".frontpanel.caps" in /dev/ but there is no such file. In /dev/ there is a frontpanel which is a link to /dev/ttyS0  Could it be, that e.g. echo something > /dev/.frontpanel.caps actually sends data (something in this case) to /dev/frontpanel ?  What does .caps do then?


Proof that the continuous image of a compact set is compact

Let $X\subset \mathbb R^{n}$ be a compact set, and $f :\mathbb R^{n}\to \mathbb R $ a continuous function. Then, $F(X)$ is a compact set.  I know that this question may be a duplicate, but the problem is that I have to prove this using real analysis instead of topology.   I'm struggling with proving that $F(X)$ is bounded. I know that the image of a continuous function is bounded, but I'm having trouble when it comes to prove this for vectorial functions.   If somebody could help me with a step-to-step proof, that would be great.


power series expansion and closed solution

given the series  $$ \sum_{n=0}^{\infty} \frac{x^{n}}{an+b}=f(x) $$  so for any postive integer $ an+b $ is never 0  how could i get $ f(x) $  from this Taylor series ??


Cannot load the "pstricks" option in mdframed package

I tried to frame texts in double lines following directions in the mdframed package manual. However, I cannot even load the mdframed package with the "pstricks" option. Following are my codes:  \documentclass{article} \usepackage{amssymb} \usepackage[framemethod=pstricks]{mdframed} \begin{document}   \begin{mdframed} test \end{mdframed} \newpage \end{document}   And this is the error message I am getting:  ....... ("C:\Program Files\MiKTeX 2.9\tex\latex\mdframed\md-frame-2.mdf")) (C:\Users\Jerry\Desktop\test.aux) ("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii" [Loading MPS to PDF converter (version 2006.09.02).] ) ! Undefined control sequence. <recently read> \c@lor@to@ps   l.7 \end{mdframed}**   Thank you very much for your kind assistance... ?


can we transfer data via quantum entanglement (likewise we communicate today) to a specific target

Today we rely on electromagnetic field for communication. I'm a entrepreneur, I want to know why we can't transfer data with this technology to transfer data from one place to another place. It can reduce us to rely on emf. And quantum entanglement able to send data to everywhere.


How do I attach a terminal to a detached process?

I have detached a process from my terminal, like this:  $ process &   That terminal is now long closed, but process is still running, and I want to send some commands to that process's stdin. Is that possible?


How to approach logistic regression on skewed dataset

I have a dataset with about 1M negative examples and 4700 positive examples. I'm trying to create a classifier that tries to predict the % of an example being positive.  Given how much the data is skewed, should I just give up or are there algorithms that perform well with skewed data?


In the side bar of the site when looking at the Help Centre there are two areas for Privileges.  One is listed with Reputation but has nothing to do with Privileges only Reputation. And the other Privileges that has all the information about it.


Standard Input setting after configuring process.launchPath = "/usr/bin/sudo" in swift

It is handle after I configuring taskOuput's launchPath to "/usr/bin/sudo". How can I modify the code to make it works?  let theTask = Process() let stdin = FileHandle(forReadingAtPath:"c") let taskOutput = Pipe() theTask.launchPath = "/usr/bin/sudo" theTask.standardOutput = taskOutput theTask.standardInput = stdin theTask.standardError = taskOutput theTask.arguments = ["mkdir", "/usr/local/newfolder"] theTask.launch() theTask.waitUntilExit()


Does anybody knows, if there is a way to use a property that is animated as source for a binding? As far as I found out, is that an animation doesn't "really" set the value on the property, and therefore doesn't fire the changed events, which is needed to trigger the binding.  tia Martin


Align an equation and a tikz picture with anchor and baseline

I'm trying to get the math part the equation to be centered with the tikz picture:  \begin{equation}   \mathcal{G} =    \begin{tikzpicture}[]     \tikzstyle{vertex}=[anchor=base,baseline,     circle,fill=black!25,minimum size=18pt,inner sep=2pt]     \node[vertex] (G1) at (0,0)   {1};     \node[vertex] (G2) at (1,0)   {2};     \node[vertex] (G3) at (1,1)   {3};     \node[vertex] (G4) at (0,1)   {4};     \draw (G1) -- (G2) -- (G3) -- (G4) -- (G1) -- cycle;   \end{tikzpicture} \end{equation}   But instead it places it on an even baseline:    My attempts at the tikz portion come from the related questions:      I think I'm misunderstanding the syntax between \tikz \node, \tikzpicture and \tikzstyle. What do I change to align the tikz picture without adjusting the raw coordinates?


I'm bemused by the inability of TV presenters to pronounce the letter "x" as in "six", introducing a "k" in its place (so six is pronounced as "sick", sixth as "sickth"). The same also tend to omit entirely the second "f" in "fifth", making do with "fith". The presenters are all British.  I find this irritating. Is there any good reason for it?


How can I safely connect a subpanel in a detached garage to the main with a 3-wire connection?

This weekend I attempted to install a breaker box into a pre-wired garage.  The previous owners took the breaker box with them when they moved, and since I have installed quite a few subpanels, it seemed like an easy job to replace it.  The subpanels I have installed have always used 4-wire connections, so I was surprised to find that only three wires had been run underground through the conduit, and the ground was attached to a separate rod at the garage.    Reading up on the permits for the house and some NEC info lead me to believe that this was a pre-2005 installation, at which point 3-wire was still allowed to connect a sub to a main in a detached structure.   My question is this:  What is the correct setup for neutral and ground in the sub panel?  Should they be bonded, and do I need to attach a ground to the buried rod at the garage as well?    Specifically, I need to know if this image shows a correct setup before I proceed.  This question has been touched upon in other posts, but not adequately answered:   (source: )


So yes, I head the term come up quite often: "canonical homomorphism", "canonical map,  " etc.    What is really meant by this ?


Artin's Algebra pages 155 & 156 list the types of symmetry of a plane figure as:   Reflective Rotational Translational Glide   He then goes on to say "Figures such as wallpaper patterns may have two talk about other figures having combinations of independent" symmetries. EDIT: He says "... having combinations of independent translational symmetries". See Joriki's answer.  Why doesn't glide symmetry count as having two independent (reflection + translation) symmetries? If we're going to count combinations, why not have rotation + translation etc. as their own types too?


Show that $\mathbb R$ is cardinally larger than any separable metric space S.  I have been trying to solve this on my own. My idea was to start by mapping the open balls of positive rational radius around the points in the dense set of S to the corresponding in $\mathbb R$. Now any ${x}\subset S$ can be written as a limit of an appropriate sequence of open balls, which would correspond to a similar limit in $\mathbb R$, in case the limit exists.  Then I would need to show that different limits are obtained in $\mathbb R$ for different $x\in S$. This is a step I am not sure how to show.   Alternatively, one could show that all possible sequences of rationals have no greater cardinality than reals. What would be a good way to show this? I know that all reals can be written as some convergent sequence of rationals, but I am looking for something slightly different here.  I did not find this useful as it does not fill in the details:


"depends upon developing" vs "depends upon development"

This is an English test item: The human eye is nature's most fantastic organ, and the high degree of development of human society probably depends upon ......... . a) developing of this organ b) the development of this organ Which choice is correct? And why is the other one not correct? Thanks


Why perfect square has odd number of factors

can someone please describe me why only the perfect square has odd number of factors.why does other number not has odd numbers of factors? I understand it but don't find any mathmetical proof.Please help me


Taking the square root of both sides of a congruence.

Quite probably a silly question, but if I have:  $a^{2} \equiv 1 \pmod n$, is this the same as $a \equiv 1 \pmod n$?


In the body of my document, I am able to refer to do the following without any problems:  \cite[Lemma 2]{ABC} renders as [ABC, Lemma 2] (with the appropriate hyperlink to the bibliography). However, LaTeX gets angry when I attempt  \begin{theorem}[\cite[Lemma 2]{ABC}] xyz \end{theorem} and fails to compile; presumably it is using the first ] to close the first [ rather than the second. The desired output would look something like  Theorem 1 ([ABC, Lemma 2]). xyz  (with the hyperlink to the bibliography preserved). Is there a way to make this compile properly? I am using amsthm, in case that is relevant. Thank you.


Why don't I just buy high yield dividend stocks?

I am seeing percentage over 5%, 10% even. I know there are taxes and stuff but the numbers seem more appealing than things like online savings account (~2% annual). And you could compound at each payout. Is this a much "safer" option than non-dividend stocks? Pls explain.


Ubuntu Phone: How to uninstall preinstalled apps (bcc sport, bbc, cnet, engadget,...)

Currently, my Ubuntu Phone Aquaris E4.5, wants me to update a bunch of preinstalled apps like engadget, cnet, bbc, euronews, bbc sport.  How can i uninstall those apps?


ls -l --group-directories-first (act on symlinks as well)

ls option --group-directories-first causes directories to be listed on the top, which makes the output of ls nice and clean:  ls -l --group-directories-first   However, it does not act on symlinks, which are actually symlinks to directories. There is a possibility to use   ls -l -L --group-directories-first   which will list both kind of directories on top, but will not distinguish between proper directory and symlinked directory, which is again confusing.  Can ls display symlinked directories on top, while still keeping them distinct from regular directories?  EDIT: I am using bash.


ubuntu 18.10 doesn't boot to gdm after update

I've just updated to 18.10 from 18.04 and immediately hit a snag. My os doesn't boot anymore. It starts then comes to a moment when splash appears then it disappears and what I see is a message that [ok] Started Gnome Display manager. Sometimes it's something other but still no boot. Funny enough that if I hot ALT + F2 during boot it seems to restart gdm or something because I see how splash blinks and gdm loads, I can enter password and everything seems to be working. Well, my question is what could it be and how to fix it because it's quite annoying.   Specs are: AMD® Ryzen 5 1500x quad-core processor × 8 15,7 GiB GeForce GTX 1060 6GB/PCIe/SSE2


How can we access "Modify All Data" setting from profile in apex

Profile has a setting "Modify All Data". How can we access "Modify All Data" in apex and in which object it is stored.


Is Lambert Academic Publishing a reputable company?

I was contacted by the Acquisition editor of Lambert Academic Publishing (LAP) to publish my bachelor's thesis as a printed book. Is LAP any good? I have no idea about it; I have just heard that it's a freelance publishing house.


How to implement custom icons for my script/addon?

Is it possible to use different icons other than the default set and how?


A mathematical step done by Schrödinger in his solution to the hydrogen atom I need clarification on

in his paper "" he begins by introducing the : $$H\left (q,\frac{\partial{S}}{\partial{q}} \right)=E\tag{1}$$ such that $S$ is Hamilton's characteristic function (usually denoted $W$). Then he performs the Ansatz $$S=K \ln\psi\tag{2}$$ and writes the hamiltonian explicitly to arrive to the following equation: $$\frac{(\nabla\psi)^2}{2m}-\frac{2m}{K^2}\left (E+\frac{e^2}{r} \right)\psi^2=0.\tag{1"}$$ so far so good, I understand the steps. but then he integrates the equation over all space and regards it as a functional to be minimized, he writes (Equation (3) in the paper): $$\delta J=\delta \int dxdydz \left[ \frac{(\nabla\psi)^2}{2m}-\frac{2m}{K^2} \left (E+\frac{e^2}{r} \right)\psi^2\right ]=0\tag{3}$$ and by performing the variation "The Standard way" as he writes in German: he gets the well known form for the Schrödinger equation for the Hydrogen Atom. (equations (4) and (5) in the linked paper.) I understand how to perform the variation, but why did he define such a functional in the first place? why is the volume integral over the eigenvalue problem a functional to be minimized?


How can I scale the interval $[1,8388609]$ to the interval $[-10,10]$?  I am not sure how to do this.


What's the difference between a proverb and an idiom?

I think I have a notion what is what but maybe you know a good definition what is what? For example "Hindsight is always 20:20" — is that a proverb or an idiom?


Translating Physics: phenomena show or shows?

I'm reading Russian tutorial about basic Physics and saving images for the Anki cards describe them in English, Google translator helps me. I entered in Google translator phrase about the fact that bodies consists of small parcels. What phenomena show that substances are composed of particles separated by gaps? Why does phenomena show? Is phenomena a plural form?


Tensor product vs. Cartesian Product for composite quantum systems

Why are states describing composite systems given by tensor products and not Cartesian products? They both belong in spaces of equal dimension, what are the differences between the two?


Parsing of Json response from Tooling API code

Please have a look through the attached debug log  Below is my code:- Apex Class:-              Http http = new Http();     HttpRequest request = new HttpRequest();     request.setEndpoint(Url.getSalesforceBaseUrl().toExternalForm()+'/services/data/v50.0/tooling/query?q=SELECT+Id,EntityDefinition.developername,status+FROM+apextrigger');     request.setHeader('Authorization', 'OAuth ' +userinfo.getSessionId());     request.setMethod('GET');     request.setHeader('Content-Type', 'application/json;charset=UTF-8');     HttpResponse response = http.send(request);       system.debug('3rd party response '+response.getBody());             Map<String, Object> payload1 = (Map<String, Object>)JSON.deserializeUntyped(response.getBody());          system.debug('List of Records '+payload1.get('records'));         List<Object> items = (List<Object>)payload1.get('records');              for (Object item : items) {                  Map<String, Object> i = (Map<String, Object>)item;                  System.debug(i.get('EntityDefinition'));                 }  Here I need to get the 'DeveloperName' from the Logs generated.What else i need to do in the above code?Basically i need to get the Id, developername, status field value from the endpoint url and display it in the table. Any inputs?


Does Ubuntu work properly on a laptop HP Pavilion 15 -CD006LA?

I'm thinking to buy a HP laptop model pavilion 15 -CD006LA, to install Ubuntu, but I read that there are some problems with Ubuntu on HP laptops.  Do you have any information about this? Is it recommended to buy a HP laptop, or should I buy one from another company?  I hope that you can provide me some arguments for and against...


Comma separated output based on varchar field

I have this    MS SQL Server 2008 Schema Setup:  CREATE TABLE AccessUser (     AccessUserID int,      AccessUserName varchar(255),      AccessUserType int,      AccessUserGroups varchar(255) );  INSERT INTO AccessUser (   AccessUserID,      AccessUserName,      AccessUserType,      AccessUserGroups ) VALUES     (1, 'Group 1', 2, ''),     (2, 'Group 2', 2, ''),     (3, 'John', 5, '@1@'),     (4, 'Nick', 5, '@1@@2@');   Query 1:  SELECT DISTINCT Empl.AccessUserName AS Name, Firm.AccessUserName AS FirmName FROM AccessUser AS Firm, AccessUser AS Empl WHERE Empl.AccessUserType = 5 AND Empl.AccessUserGroups LIKE ('%@' + CAST(Firm.AccessUserID AS VARCHAR(10)) + '@%') ORDER BY Empl.AccessUserName ASC   :  | NAME | FIRMNAME | |------|----------| | John |  Group 1 | | Nick |  Group 1 | | Nick |  Group 2 |   QUESTION: How can i modify the Query, to output this:  | NAME |      FIRMNAME      | |------|--------------------| | John |  Group 1           | | Nick |  Group 1, Group 2  |   What I want to do is to commaseparate the Firmname, if the user has more than one AccessUserGroups.  Is it even possible to do so in one query?


Brightness control (Fn+ ...) not working on Ubuntu 14.04 Asus Q502LA

I installed the Ubuntu 14.04 on Asus Q502LA laptop.  Most of the things work fine, but brightness control does not work. First, everytime on reboot, the brightness resets to 100% brightness. Second, the keys (Fn+F5 and Fn+F6) do not work either.    I tried pretty much all of the suggestions that I could find here.  None of them worked. Did anyone have any success with getting the Fn+ keys working again to control the brightness in 14.04?  Thanks,


Let $x, y ∈ (−2, 2)$ and $xy = −1$. Find the minimum value of $\frac{4}{4-x^2} + \frac{9}{9-y^2} $ ? My Attempt let $t=\frac{4}{4-x^2} + \frac{9}{9-y^2} $ , replacing $y$ by $- \frac{1}{x}$ we get $t=\frac{1}{1-(\frac{x}{2})^2} + \frac{1}{1-(\frac{1}{3x})^2} $ . Using AM-HM inequality we get $t(1-(\frac{x}{2})^2 + 1-(\frac{1}{3x})^2) \geq 2^{2}.$  let $ m =(1-(\frac{x}{2})^2 + 1-(\frac{1}{3x})^2)$ and using AM-GM inequality we get $m \leq 5/3$. But from this point my inequality signs are getting mixed up. Am I on right track?


Finding the uniquely determined region of a PDE

(a) Solve the equation $yu_x+xu_y=0$  with the condition $u(0,y) = e^{-y^2}$. (b) In which region of the xy plane is the solution uniquely determined?     I did the first part but I don't understand how to do part b.  I read   But I don't understand how the argument is based. A more clear explanation is appreciated


Wired connection problem Ubuntu 12.04 LTS

I am not new to ubuntu, but have encountered this problem several times. I am running with a wired connection on ubuntu 12.04 LTS. When I worked with ubuntu for the first two- three weeks or so, the connection seemed to work fine, and I hadn't even set up the connection- it had been auto-detected by ubuntu, which is natural. But now, the connection seems to have not working (its not detecting at all) . On repeatedly restarting my computer, I found that the internet seeme to connect (or detect), like 1 out of 5-8 restarts. Is there any solution to this unusual problem, as I have tried all the solutions on this site and other sites too, but have not found a working solution. On my other partition on windows vista, this problem never occurs and the internet connection alway connects. PS: If there is any extra info I have to provide like error logs or any other info just tell me and I will do so, as I desperately want a solution.  Output for sudo lshw -c network-  *-network                   description: Ethernet interface    product: NM10/ICH7 Family LAN Controller    vendor: Intel Corporation    physical id: 8    bus info: pci@0000:01:08.0    logical name: eth0    version: 01    serial: 00:1a:92:6b:2e:b1    size: 100Mbit/s    capacity: 100Mbit/s    width: 32 bits    clock: 33MHz    capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=full firmware=N/A ip=10.0.0.2 latency=32 link=yes maxlatency=56 mingnt=8 multicast=yes port=MII speed=100Mbit/s    resources: irq:20 memory:fdefe000-fdefefff ioport:ee00(size=64)   Output for cat /var/log/dmesg | grep eth0 -  [    1.199914] e100 0000:01:08.0: eth0: addr 0xfdefe000, irq 20, MAC addr    00:1a:92:6b:2e:b1 [   18.108866] ADDRCONF(NETDEV_UP): eth0: link is not ready [   19.317182] ADDRCONF(NETDEV_UP): eth0: link is not ready [   19.317593] ADDRCONF(NETDEV_UP): eth0: link is not ready [   19.320152] e100 0000:01:08.0: eth0: NIC Link is Up 100 Mbps Full Duplex [   19.320401] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


For my Django app I have Events, Ratings, and Users. Ratings are related to Events and Users through a foreign keys.  When displaying a list of Events I want to filter the ratings of the Event by a user_id so I know if an event has been rated by the user.   If I do:  event_list = Event.objects.filter(rating__user=request.user.id)   (request.user.id gives the user_id of the current logged in user) ...then I only get the events that are rated by the user and not the entire list of events.  What I need can be generated through the custom SQL:  SELECT * FROM `events_event` LEFT OUTER JOIN (   SELECT *   FROM `events_rating`   WHERE user_id = ##   ) AS temp  ON events_event.id = temp.user_id   Is there an easier way so I don't have to use custom SQL?


Is it possible to open a terminal in the current directory?

I am new to Ubuntu, and was wondering whether it is posible to open a terminal with a path matching your current location in the file manager? In Windows it was very easy, but how do you do it in Linux?


Now a days many images display using css like below :
&nbsp;
   Above div will show logo image, But as using CSS for logo instead of  tag. So not take the benefits of alt tag by SEO point of view.  My question is :  Which technique or method I use for image SEO in this type of image?  I mean, Which technique is useful for image SEO, when images is coming from CSS?


Questions about the existence of a function

Question 1: Study the existence of  $C^1$ function $f : \mathbb{R} \rightarrow \mathbb{R}$ satisfying $\forall x\in\mathbb{R},\mbox{ } f\circ f'(x)=x.$    Question 2: Study the existence of  differentiable function  $f : \mathbb{R} \rightarrow \mathbb{R}$ satisfing $\forall x\in\mathbb{R},\mbox{ } f\circ f'(x)=x.$    Question 3: Study the existence of  $C^1$ function $f : \mathbb{R} \rightarrow \mathbb{R}$ satisfying $\forall x\in\mathbb{R},\mbox{ } f'\circ f(x)=x.$    For question 1, such a function can not exist because : f' must be injective and since f 'is continuous, f' must be strictly monotonous. For example, If we assume that f 'is strictly increasing  We can show that $\displaystyle \lim_{x\rightarrow -\infty}f'(x)=-\infty$ and $\displaystyle \lim_{x\rightarrow +\infty}f'(x)=+\infty$ which implies that f ' is surjective .  with a simple argument it shows that f is injective ( if $f(x)=f(y)$ by surjection of $ f'$ , we have $f'(a)=x $ and $f'(b)=y$ for some real $ a,b $ , thus implie $a=f(f'(a)=f(x)=f(y)=f(f'(b)=b$  so $ x=y$).   the continuity of f proves that f est strictly monotonous. For example, if we suppose f strictly inreasing, we must have $f'>0$. this contradicts the surjectivity of $f '$  For Question 2 , I need help


No such file or directory when I try to cd to a directory with two words in the name

I  am trying to untar a file and to do so, I have to go to the directory in terminal.     So as in the screenshot above, My downloads are stored in Downloads/Chrome Downloads. But when I type the command,  cd Downloads/Chrome Downloads cd home/Downloads/Chrome Downloads cd home/Downloads/Chrome-Downloads cd home/Downloads/Chrome_Downloads cd Downloads > cd Chrome Downloads   It says NO such file or directory  Please tell me the correct command to change directory of a folder with two words as the file name (Chrome Downloads).


Help ending a proof using binomial theorem: $\sum_{k=0}^n {n \choose k}\cdot\frac{(-1)^k}{k+1} = \frac{1}{n+1}$

I need to prove the following: $$\sum_{k=0}^n {n \choose k}\cdot\frac{(-1)^k}{k+1} = \frac{1}{n+1}$$  Started from the left, I got this far:  $$\frac{1}{n+1}+\sum_{k=1}^n {n+1 \choose k+1}\cdot(-1)^k$$  Am I right so far? Any ideas how to move on? thanks.  Edit: I guess my last move had a mistake, then perhaps this is ok? $$\frac{1}{n+1}\cdot\sum_{k=0}^n {n+1 \choose k+1}\cdot(-1)^k$$  How do you suggest I move on?


Prove if the remainder is relatively prime to the divisor, the dividend is also relatively prime to the divisor and vice versa?

The remainder of $a÷b$ is $c$, both $a$ and $b$ are positive integers. How to prove:  $gcd(c,b)=1 \iff gcd(a,b)=1$  $gcd(a,b)=1 \iff gcd(c,b)=1$


Can an opened pack of dried yeast be stored for later use?

I purchased a 25 gm active dry yeast. It says to use it with 500 ml flour. However I just want to make a couple of pizza bases, 100 gm each max. So can I use 40% of it today, and use the rest later? How to store the open pack, do I need to seal it and pack?


What is it called when at university there are two subjects being held at the same time?

For example, I need to enroll in two different courses at university, but there is a schedule in which both are held.  Is it an 'overlapped schedule' or something similar? Is there a proper expression for this purpose?


Easy criteria to determine isomorphism of fields?

Let $K$ be a field and $f,g$ irreducible polynomials in $K[X]$, is there a nice iff condition for $K[X]/(f)\cong K[X]/(g)$?  ($\cong$ denotes an isomorphism that is the identity on restriction to $K$).  Thoughts: It is sufficient that they are $K^\times$ multiples of each other. I'd hoped this was necessary but it isn't as $\mathbb{Q}[X]/(X^2-2)\cong\mathbb{Q}(\sqrt2)=\mathbb{Q}(\sqrt2+1)\cong\mathbb{Q}[X]/(X^2-2X-1)$ with the middle two fields viewed as subfields of $\mathbb{C}$. It is necessary that they have the same degree. Please let me know if there are any other simple necessary conditions. Thanks!


Why is the torus with a point missing homotopy equivalent to figure-8-space?  $T^2 \setminus \{p\} \simeq S^1 \vee S^1$


Are there any stats about skill ratings in Dota 2?

I just got told that if you search for recent games, your games are organized into skill brackets.  Since all my solo matches are in "very high" and I dont consider myself very skilled, and i do a lot of dicking around i wonder how big the "very high" skill bracket is, it must be pretty big.  Are there any Stats from Replay parser/ api sites how many players/matches are in what bracket?


I just installed (dual boot) Ubuntu 16.04 (amd64) on my HP Pavilion (i3-7100, 1TB) laptop but it is not showing any available wifi device. When I look at network in settings only network proxy is displayed and also I don't have Ethernet cable slot in my laptop. How can I fix this problem?  rfkill list all displays the following result:  0: acer-wireless: Wireless LAN     Soft blocked: yes     Hard blocked: no   output of the command : lspci -nnk | grep -A2 Network  01:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10)     DeviceName: Intel Dual Band Wireless-AC 3168 802.11 ac 1x1 WiFi + BT 4.2 Combo Adapter     Subsystem: Intel Corporation Device [8086:2110]


I know that garbage collection is automated in Java. But I understood that if you call System.gc() in your code that the JVM may or may not decide to perform garbage collection at that point. How does this work precisely? On what basis/parameters exactly does the JVM decide to do (or not do) a GC when it sees System.gc()?  Are there any examples in which case it's a good idea to put this in your code?


I did a Maths question on mechanics using calculus and physics students disagreed, why are the solutions different?

So, I did the following question and got 2 different answers.  Question: A lighthouse located 300 metres from a straight shoreline sweeps its beam of light around in a circle at a constant rate of 1 revolution every 60s. Let $\theta$ be the angle (in radians) that the beam of light makes with the perpendicular to the shoreline. How fast (in metres per second), is the beam moving along the shoreline when it is at $\frac{\pi}{6}$ radians from the perpendicular?  Solution 1 When the question is done by defining distance along the shore as $x$ and finding $\frac{dx}{dt}$, this is what we get:  $\frac{dx}{dt}=\frac{dx}{d\theta}\frac{d\theta}{dt}=\left(300\sec^2 \frac{\pi}{6}\right)\left(\frac{2\pi}{60}\right)=\frac{40\pi}{3}$  Solution 2 When the question is done by resolving $v=r\omega$, this is what we get:  $\frac{dx}{dt}=v\cos \frac{\pi}{6} = \frac{300}{\cos \frac{\pi}{6}} \cdot \frac{2\pi}{60} \cdot \cos \frac{\pi}{6} =10\pi$  Why would the 2 solutions give different answers?


difference between two codes in big O notation in java

I was reading about arrays and I programmed the first code below . The teacher did program the second code for searching in an array for a specific number. What is the difference in ordo notation between the two following codes in java . Which code performs better and what its big O notation.  My code  public static void main(String[] args) {     int[] data = { 100, 110, 120, 130, 140, 150 };    int index = binarySearch(data, 120);    System.out.println(index); }  private static int binarySearch(int[] data, int i) {     if (data.length == 0)    {       return -1;    }     for (int k = 0; k < data.length; k++)    {       if (data[k] == i)       {          return k;       }    }     return -1; }        Teacher's code  public static void main(String[] args) {    int[] data = { 100, 110, 120, 130, 140, 150 };    int index = binarySearch(data, 120);    System.out.println(index); }  static int binarySearch(int[] keys, int v) {    int position;    int begin = 0, end = keys.length - 1;    while (begin <= end)    {       position = (begin + end) / 2;       if (keys[position] == v)       {          return position;       }       else if (keys[position] < v)       {          begin = position + 1;       }       else       {          end = position - 1;       }    }    return -1; }


Is it possible to use two different internet connection for different applications in windows 10?

My computer has two ethernet adapters and I have two internet connections which have their respective routers connected to those ethernet ports on the PC.  Is it possible to use them both at the same time for mutually exclusive tasks?  for ex, using one connection for downloading torrents while using the other one for surfing web via a browser?


Recently I get a lot of 2-year or older posts in Close Votes review queue. We all saw those legacy questions which would be closed in 10 seconds and get downvotes nowadays (primarily opinion-based or too broad). While I do understand that most obvious answer is to follow the rules, I can't help but assume that rules were different before and so I wouldn't want to ban something which was not against the rules at the time it has been posted. Really, would the rules be like they are now if not for those legacy posts to support the historical value of SO?  Additionally, I assume that if a question has 50+ upvotes, it is valuable and supported by the community. Lots of questions in my favourites list wouldn't survive today, but are favourited by many people. Should such questions be protected from closure/deletion? What are the guidelines for reviewers on such questions?   My reasoning is that closing procedure is supposed to get rid of questions which are unlikely to generate helpful answers:     they are unclear, too broad, or otherwise problematic to identifying   the problem in a way that can be properly addressed by answerers   But those questions already have good answers. I just don't see how closing (let alone deleting) them would improve SO. "On hold" status is completely useless in such case because the author is definitely not coming back to edit years old question and why would that even be useful? Again, the answers are already there...  Looking forward to hear your opinions.


For the sentence mentioned below, which verb form (singular or plural) of "cost" fits correctly into the blank space and what is your reason for it:  "Every pale tomato slice, wilted pickle, and brown lettuce leaf [cost/costs] an extra 25 cents at Bernie's Burger Emporium."  I'm aware that "every" would take a singular verb in every case. However, does this still hold true when multiple entities are connected by the coordinating conjunction "and"?  Would your answer change if I write something like this:   "Every item 1, every item 2, and every item 3 [cost/costs] an extra . . ."


What do you mean by frequency of SHM and how is it related to angle covered in a UCM?

What is the difference between angular velocity and angular frequency and in what reference is it used in SHM?


If $|f(x)-f(y)|<(x-y)^2$ for all $x,y \in \mathbb{R}$. Then $f(x)$ is constant.   $\bf{Attempt}$ Put $x=y+h$ where $h \rightarrow 0$  Then $\displaystyle |f(y+h)-f(y)|<(y+h-y)^2 = h^2$  So $\displaystyle \displaystyle \lim_{h\rightarrow 0}\bigg|\frac{f(y+h)-f(y)}{h}\bigg|<\lim_{h\rightarrow 0}h$  So $\displaystyle |f'(y)|<0$  Now how can I calculate $f(x)$? Could someone help me? Thanks


How do I find a long running query with process ID, process name , login time, user , start time and duration?

Can anyone help me to find a below given details for long running query. ProcessID, process name, database, host ,user ,process login time, query start time and query duration.   I am looking for a query or an SP which gives me this data.


When should I create a new tag? How do I request a new tag if I don't have enough rep?

Can someone please create the tag  on our site? We need to have it because        Foo is a recent/upcoming release / edition / model / episode of a popular, established OS / board game / bike brand / TV show   Foo is a hot new language / ingredient / game   we're currently using some other tag for questions about Foo, but it's causing ambiguity with a separate thing that's also named Foo      This is not a joke post. We get a lot of feature requests that ask for this or that tag to be created, and every time, a discussion ensues wherein people explain that there is no "tag creation department" and that community members create tags just by using them. I'm posting this "question" so that future requests of that type can be closed as a duplicate of this, saving time and eliminating redundant conversations for everyone involved.     See also:


Best way to test for a variable's existence in PHP; isset() is clearly broken

From the :  isset() will return FALSE if testing a variable that has been set to NULL.   Basically, isset() doesn't check for whether the variable is set at all, but whether it's set to anything but NULL.  Given that, what's the best way to actually check for the existence of a variable?  I tried something like:  if(isset($v) || @is_null($v))   (the @ is necessary to avoid the warning when $v is not set) but is_null() has a similar problem to isset(): it returns TRUE on unset variables!  It also appears that:  @($v === NULL)   works exactly like @is_null($v), so that's out, too.  How are we supposed to reliably check for the existence of a variable in PHP?    Edit: there is clearly a difference in PHP between variables that are not set, and variables that are set to NULL:  <?php $a = array('b' => NULL); var_dump($a);   PHP shows that $a['b'] exists, and has a NULL value.  If you add:  var_dump(isset($a['b'])); var_dump(isset($a['c']));   you can see the ambiguity I'm talking about with the isset() function.  Here's the output of all three of these var_dump()s:  array(1) {   ["b"]=>   NULL } bool(false) bool(false)     Further edit: two things.  One, a use case.  An array being turned into the data of an SQL UPDATE statement, where the array's keys are the table's columns, and the array's values are the values to be applied to each column.  Any of the table's columns can hold a NULL value, signified by passing a NULL value in the array.  You need a way to differentiate between an array key not existing, and an array's value being set to NULL; that's the difference between not updating the column's value and updating the column's value to NULL.  Second, , array_key_exists() works correctly, for my above use case and for any global variables:  <?php $a = NULL; var_dump(array_key_exists('a', $GLOBALS)); var_dump(array_key_exists('b', $GLOBALS));   outputs:  bool(true) bool(false)   Since that properly handles just about everywhere I can see there being any ambiguity between variables that don't exist and variables that are set to NULL, I'm calling array_key_exists() the official easiest way in PHP to truly check for the existence of a variable.  (Only other case I can think of is for class properties, for which there's property_exists(), which, according to , works similarly to array_key_exists() in that it properly distinguishes between not being set and being set to NULL.)


Windows: How to reset the administrator password?

I Have a Windows XP VMWare Fusion image whose admin password is not known. How can I reset to recover the password?


scanf function doesn't read doubles correctly

In my homework, I have some problems with scanf function:  /* Can Doğu */ #include <stdio.h> #include <stdlib.h> #include <math.h>  /* My Function prototypes */ double calculate_profile_area(int edgecount,double edgelength); // Has two parameters: edgecount & edgelength. Returns double type value. double calculate_volume(double a,double h); // Has two parameters: profilearea & boxheight. Returns double type value. double calculate_price(double p); // Has one parameter: volume. Returns double type value.  /* My main function */ int main(void) {  /* Variables & input-output part */ int count; double length,height,area,volume,price; area=0.0,volume=0.0,price=0.0; printf("Enter edge count for box profile: "); scanf("%d",&count); printf("Enter the profile-edge length and box-height: "); scanf("%lf%lf",&length,&height);  /* Calling my functions */ area=calculate_profile_area(count,length); volume=calculate_volume(area,height); price=calculate_price(volume);  /* Printing the results */ printf("Box profile area is %.2lf cm square.\n",area); printf("Box volume is %.2lf cm cube.\n",volume); printf("Total sugar price is %.2lf TL.\n",price); system("pause"); return(0); }  /* calculate_profile_area function */ double calculate_profile_area(int edgecount,double edgelength) { double profilearea=0.0; profilearea=edgecount*((edgelength*edgelength)/(4*tan(M_PI/edgecount))); return(profilearea); }  /* calculate_volume function */ double calculate_volume(double a,double h) { double v=0.0; v=a*h; return(v); }  /* calculate_price function */ double calculate_price(double p) { double cost=0.0; if(p>=0 && p<=500)     cost=p*120; else if(p>=501 && p<=1000)     cost=p*100; else if(p>=1001 && p<=2500)     cost=p*80; else if(p>=2501 && p<=5000)     cost=p*65; else if(p>=5001)     cost=p*50; return(cost); }   When I enter a double value (2.15), my compiler reads it as 2.14999999. Thus my 'area' result is calculated as 54.59 (which should be 54.60). Any idea why my result is not correct?


it crashed my browser or it has crashed my browser

Which one is correct? Please let me know. It crashed my browser or it has crashed my browser. Comments are appreciated.


I have a struct array :  struct Stu* arr = (struct Stu*)calloc(ogr,sizeof(struct Stu));   And I have a void function it gets arr as a paramater and i have to find the len of arr in function.  struct Lsn {     char lsn_name[50]; };  struct Stu {     char name[40];     char surname[20];     char st_id[11];     struct Lsn* lsn; };


Prove that $\sin(\sin...(\sin(x))..)$ converges asymptotically to zero

I'm not able to mathematically prove that the equation $$x(k+1)=\sin(x(k))$$ converges asymptotically to zero. By a simple thought it can be concluded that for any $x(0) \in \mathbb{R}$ it applies $x(1)=\sin(x(0)) \qquad \qquad \quad x(1) \in [-1,1]$ $x(2)=\sin(\sin(x(0))) \qquad \, \, \, \, \, x(2) \in [-0.84,0.84]$ $x(3)=\sin(\sin(\sin(x(0)))) \, \, \, \, x(3) \in [-0.74,0.74]$ ... Which means that with every step the solution is closer and closer to zero, however I'm not able to prove it. Does anyone know how to solve this problem please?


Scientists shown a fake anti-gravity device to motivate them to build the real thing

There exists a SF short story about anti-gravitation called the Mother of Invention (AFAIK). A bunch of scientists are shown a (fake) movie in which an anti-gravity device is demonstrated by an inventor. The scientists are told the inventor's notes were lost/destroyed and they have to start from scratch. The bottom line - there was no anti-grav invention, the scientists needed to believe it had been invented so they would think 'outside the square'.   Anyone know who wrote the short story, and has anyone got a copy?


Proper grammar for plural possession including myself?

I know that when referring to myself and a friend, it is proper to say "John and I", as opposed to "me and John". But when referring to ownership, I can't figure out whether this still applies. For example, "John and I's car" certainly sounds more incorrect than "me and John's car", since "I" cannot be pluralized. What is the proper way of phrasing this?


Can i Hide a field from a lightning:recordForm and populated before submitting? Im getting the fields from recordTypeId

Controller  init : function(component, event, helper) {     //get record type id     var reportType = component.get("v.pageReference").state.recordTypeId;     console.log(component.get("v.pageReference").state.recordTypeId);     //save into the attribute     component.set("v.recordTypeId", reportType);     console.log('Fields');     console.log(component.find('salesProjectForm'));     console.log(event.getParam('fields')); },  formSuccess : function(component, event, helper) {     var toastEvent = $A.get("e.force:showToast");       toastEvent.setParams({         "title": "Success!",         "message": "Record is successfully created!",         "type": "success"       });       toastEvent.fire(); },  handleOnLoad : function(component, event, helper) {     console.log("handleOnLoad");     var record = event.getParam('record');     console.log(JSON.stringify(record));     // I've noticed this will fire multiple times. If you don't set some criteria  // to protect against it, this workaround will result in an infinite loop if(record !== undefined && !record.fields.Name.value){      // I did not test if setting both value and displayValue attributes are required     record.fields.Name.display = false;     event.setParam('record', record);     } },  handleSubmit : function(component, event, helper) {     event.preventDefault(); // stop form submission     var eventFields = event.getParam("fields");     console.log('handlesubmit');     eventFields["Name"] = "Test Value";     component.find('myfsalesProjectFormorm').submit(eventFields); }   HTML  <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,lightning:hasPageReference" access="global"> <aura:attribute name="recordTypeId" type="Id"/> <aura:handler name="init" value="{!this}" action="{!c.init}" /> <lightning:card iconName="custom:custom19" title="lightning:recordForm">     <div class="slds-p-left_large slds-p-right_medium">          <lightning:recordForm             aura:id="salesProjectForm"             objectApiName="Opportunity"             layoutType="Full"             columns="2"             recordTypeId="{!v.recordTypeId}"             onsubmit="{!c.handleSubmit}"             onsuccess="{!c.formSuccess}"             onload="{!c.handleOnLoad}"/>     </div> </lightning:card>


Is it best to use a comma following an inline address?

Is it proper to include a comma at the very end of an inline place address? Also, in case it is relevant, the sentence is the title of an article.  For example:     Examples of cross-gene fertilization within a sample from Bogota, Colombia 2009-2011.   or      Examples of cross-gene fertilization within a sample from Bogota, Colombia, 2009-2011.


Confused by step in calculating fundamental groups of cell complexes using Seifert-Van Kampen theorem

I understand the statement of the Seifert-Van Kampen theorem - given an open cover ${A,B}$ of a space ${X}$ such that ${A\cap B}$ is non-empty and path-connected, then $$ \pi_1(A\cup B) = \frac{\pi_1(A)*\pi_1(B)}{N} $$ where ${*}$ is the free product, and $N$ is the normal subgroup of ${\pi_1(A)*\pi_1(B)}$ given by $$ N = \{f_*(c)g_*^{-1}(c)\ |\ c \in \pi_1(A\cap B)\} $$ where ${f_*}$ and ${g_*}$ are induced from the inclusions ${f : A\cap B\to A}$ and ${g : A\cap B\to B}$ respectively. I understand this is essentially to stop us from "overcounting" loops essentially. Applying this to the torus, looking at the fundamental polygon for it, - we can use the open cover ${A=T^2\setminus \{x\}}$ for $x$ in the interior of the square (so the punctured torus) and ${B =}$ interior of the square of the torus. We would then have ${A,B}$ are open, and ${A\cap B}$ is clearly path-connected and ${A\cap B\simeq S^1}$. This gives us that $$ \pi_1(T^2) = \frac{(\mathbb{Z}*\mathbb{Z})*\{0\}}{N} = \frac{\mathbb{Z}*\mathbb{Z}}{N} $$ but then I am confused about how we can find ${N}$. I understand that for every $c$, we have ${g_*(c)=1}$, hence we essentially just have $N$ being generated by ${f_*(c)}$. But how would we find ${f_*(c)}$?


Yet Another Question Regarding Jordan Form

The Problem:  Let $A$ be a $5 \times 5$ matrix with characteristic polynomial $(x-2)^3(x+1)^2$ and minimal polynomial $(x-2)^2(x+1)^2$. What are the possible Jordan forms for $A$.  My Approach:  There are many questions of this form here on StackExchange, but I seem to be encountering some contradictory interpretations when going through them all. So let me see if I understand what's going on...  Obviously (up to permuting the Jordan blocks), the Jordan form of $A$ is of the form \begin{pmatrix}     2  &  a_1  &  0  &  0  &  0 \\     0  &  2  &  a_2  &  0  &  0 \\     0  &  0  &  2  &  a_3  &  0 \\     0  &  0  &  0  &  -1 &  a_4 \\     0  &  0  &  0  &  0  &  -1 \end{pmatrix}  where $a_i \in \{0,1\}$, for $i = 1,2,3,4$. That is, it's simply a matter of determining precisely which $a_i$ are $0$ and which are $1$. I believe that, since the multiplicity of the root $x = 2$ in the minimal polynomial of $A$ is $2$, this means that the largest possible Jordan block associated with the eigenvalue 2 is $2 \times 2$; and so at least one of $a_1, a_2$ must be $1$. But must there necessarily be such a Jordan block? (Note that I interpret a "Jordan Block" to necessarily be a matrix with $1$s along the superdiagonal--I've seen it defined differently elsewhere.)  Similarly, since the root $x = -1$ has multiplicity 2 in the minimal polynomial, I take this to mean that the largest Jordan block associated with the eigenvalue $1$ is $2 \times 2$. (Again, must there necessarily be such a Jordan block?)  This means that a possible Jordan form of $A$ is \begin{pmatrix}     2  &  0  &  0  &  0  &  0 \\     0  &  2  &  1  &  0  &  0 \\     0  &  0  &  2  &  0  &  0 \\     0  &  0  &  0  &  -1 &  1 \\     0  &  0  &  0  &  0  &  -1  \end{pmatrix}  Now, I know that the Jordan form cannot be a diagonal matrix (as this is only true when the minimal polynomial is a product of 5 distinct linear factors); so we can't have $a_i = 0$, for each $i = 1, 2, 3, 4$. Moreover, we can't have $a_1 = 1$, for each $i = 1,2,3,4$, since there can be no Jordan blocks larger than $2 \times 2$. In fact, if we fix the diagonal entries as they appear above, it follows that $a_3 = 0$ and only one of $a_1, a_2$ can be 1.  Is there anything I can conclude?


Schengen area 90 days limit: Can I leave on the 91st day?

Can anyone tell me if the 90 days is in fact 90 nights? Can you leave the Schengen area on the 91st day? Or are you only allowed 89 nights and you are required to leave on the 90th day?


Why is the onboard trip shorter when riding on a relativistic rocket as compared to a Newtonian rocket?

In the top answer for  on the Space Exploration StackExchange, it's calculated that a rocket traveling at constant 1g of acceleration over 100,000 light years would, under Newtonian physics, accomplish the journey in 662 years while reaching a peak velocity of 321 times the speed of light, while when you take relativity into account, it reaches its destination in just 22 years (in its own reference frame), while traveling at just under light speed.  Since as far as the rocket can tell, it's still accelerating just as fast, why does the relativistic rocket reach its destination in 22 years instead of 662 years? I haven't really studied relativity in any formal context, but I would have expected intuitively it to arrive just as quickly, with the time dilation cancelling out the superluminal acceleration - is there something about the time dilation/space compression that isn't symmetrical?


biblatex - how to romanize words in italic title and v.v

In this article:  a question was raised but not really answered.   I have the same problem, but now with biblatex.   If my entry is e.g.:   @article{Diensberg:boy,     author= "Diensberg, Bernhard",     title=  "The etymology of modern English \textit{boy}: a new hypothesis",     journal="Medium {\AE}vum",     volume= "50",     number= "4",     pages=  "79--87",     year=   "1981",   }   then I want "boy" to be romanized if the bibstyle in effect italicizes titles, and italicized if the current bibstyle romanizes titles.   I can't see anything in the biblatex manual to achieve this.  Is it possible?  I am doing this (and no more):  \usepackage[style=authoryear,sorting=nyt,hyperref,dashed=true,backend=biber]{biblatex} \DeclareFieldFormat{postnote}{#1} % no "p" in postnotes \DeclareFieldFormat[article]{title}{`#1'} % no quotes \DeclareFieldFormat[inbook]{title}{`#1'} % no quotes \DeclareFieldFormat[incollection]{title}{`#1'} % no quotes \DeclareFieldFormat[mastersthesis]{title}{`#1'} % no quotes \renewbibmacro{in:}{} % no "In: " \renewcommand*{\labelnamepunct}{\addcomma\space} % comma after author, no t"." \renewcommand*{\newunitpunct}{\addcomma\space} % commas everywhere


ΔE⋅Δt⩾ℏ/2  Does the energy time uncertainty principle imply that an object would have to stay for an infinite amount of time in a state for there to be no uncertainty in the energy of that state?


Is there another way to book an appointment for my Schengen visa when the web site is at full capacity?

I can't  book an appointment for Schengen visa for France. I get a message      We are currently at full capacity. Please try again later.     Is there any other way to book the appointment?


Is $\mathbb{Q}\times \mathbb{Q}$ a field?

Is $\mathbb{Q} \times \mathbb{Q}$  a field ?    We know that $\mathbb Q$ is a field. But, if we think of $\mathbb Q\times \mathbb Q$, what would be the answer?


What do we call a person who is really smooth at talking?

Some people are really good at conversations and they can run a conversation perfectly without having to reach for words. They always find the right words to say in any situation and as a result, people enjoy their conversations. What is that person called in English?


Does anyone have experience subsetting/clipping a large NAIP imagery file in MrSID format? Some of the NAIP files we have are by county and they have really large file sizes.  The files are from the FSA .  How does it work if you subset a MrSID file? Does ArcGIS has to uncompress it first before it can proceed to clip or subset an area of interest?


Studying the equation $\ln(x)- 1+ x^2=0$

Can the equation $\ln(x)- 1 + x^2=0$ be solved without the Lambert $W$ function ? (I didn't study Lambert W yet).  By inspection I can see that $x=1$ is a solution. Are there other solutions? And is there a systematic way to find them?


Requirement: Get the size of a folder or a remote computer within a reasonable timeframe.  WMI takes way too long to enumerate a directory and then calculate the size of its content's.  I attempted the following code however it says that its not a valid path  String Folder = Row["Location"].ToString(); String[] Files = Directory.GetFiles(@"\\" + Folder.Remove(0, 2) + @"\c$" + Folder, "*", SearchOption.AllDirectories); long TotalFolderSize = 0; foreach (String File in Files) {     TotalFolderSize += new FileInfo(File).Length; }   I'm not overly that great with PInvoke, still pretty new to C#. I saw that Kernel32.dll has some calls for files and disk but cannot find anything about folders or directories.  so the questions are    Is there a API/Function in C# that can get the size of a directory over the network. Is there a PInvoke call that you can use to do this What is the best way to do this?


Why does adding color to a table row increase the height?

I'm trying to make a beamer slide containing a table with the text in a row styled in a different color. However, the row's height increases when colored, as opposed to the default. The same problem occurs if I use the \rowfont command. How do I correct this?   \PassOptionsToPackage{table}{xcolor} \documentclass[compress]{beamer}  \begin{document} \begin{frame}     Example 1     \rowcolors{1}{gray!30}{blue!30}     \begin{tabular}{|p{0.5\textwidth}|}         \hline         \color{blue}{Foo} \\         Bar\\         Baz\\         \hline     \end{tabular}\\[1in]      Example 2     \rowcolors{1}{gray!30}{blue!30}     \begin{tabular}{|p{0.5\textwidth}|}         \hline         Foo \\         Bar\\         Baz\\         \hline     \end{tabular} \end{frame} \end{document}     I want the table to look like "Example 2", but with the row text colored as in "Example 1".


Property of subsequences of a Cauchy sequence

I'm going over an old homework question in my Analysis class that I missed. My professor's solution was confusing so I am looking for additional help.  The question is: If $\{p_n\}_{n \in \mathbb{N}} $ is a cauchy sequence in a metric space, show that for any $\epsilon > 0$ there exists a subsequence $p_{n_i}$ such that $d(p_{n_i}, p_{n_{i+1}}) < \frac{\epsilon}{2^{i+1}}$.  My solution was to choose $p_{n_1}$ and $p_{n_2}$ such that $d(p_{n_1}, p_{n_2}) < \frac{\epsilon}{4}$ and then choose $p_{n_j}$ for $j \geq 2$ such that $d(p_{n_j}, p_{n_{j+1}}) < \frac{\epsilon}{2^{j+1}}$ which we can do since the sequence is Cauchy.  If you could explain how to do it and why my solution doesn't work, that would be much appreciated. Thanks in advance.


ScreenToWorldPoint(Input.mousePosition) always returns 0 for X and Y coordinates

I'm trying to convert the mouse position (Input.mousePosition) into world points, but for whatever reason the X and Y coordinates are always, always 0. Here, I printed mousePosition and ScreenToWorldPoint()'s output:  The -10 in the Z is understandable, but why do I get 0s in X and Y regardless of the actual, varying mouse position? This is inside a custom display I set inside Game View (1440x3040). I tried Free Aspect, but that didn't change anything. I tried parenting the script to an empty game object centered on origin just in case, but that didn't do anything either. The code: Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); Debug.Log(mousePos); Debug.Log(Input.mousePosition);  Or, more generally: private bool hitProjectile() {     bool hit = false;     Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);      Debug.Log(mousePos);     Debug.Log(Input.mousePosition);      if ((mousePos.x >= (pt.position.x - radius) && mousePos.x <= (pt.position.x + radius)) &&         (mousePos.y >= (pt.position.y - radius) && mousePos.y <= (pt.position.y + radius)))         hit = true;      return hit; }  The game is in 2D, the camera is perspective, and I'm using URP. The script is trying to determine if the mouse clicked on a circle (/w a CircleCollider2D). What the hell is going on? I hope this is not a URP thing. I've had nothing but bad experiences with it.


What is the planet farthest from Coruscant in the Star Wars Galaxy? I understand that this information might not be available. If it isn't, please tell me.


How Do I Combine More Than 2 Normal Maps?

Hi I've been looking everywhere and I found an answer but it still doesn't apply to what I'm asking. I'm new with Cycles and have trouble with it, but I was wondering how I can combine more then two normal maps? I have different image textures and want to apply them all to a model without having to adjust a factor or whatever, and this is my set up so far:    If I can get some help and get an uncomplicated node set up that would be amazing, anyways thanks guys!


I can't retag or otherwise edit a question while waiting for an edit I reviewed from queue to be approved or rejected

Happened on , fwiw. In particular I voted to reject it, then visited to add comment and vote to close, and wanted to add a  tag, but couldn't because had to wait to see the fate of the edit.


Why does dd from /dev/urandom stops early?

On my current Linux system (Debian Jessie amd64), I'm getting different behavior for dd using /dev/urandom (/dev/random behavior is properly documented). If I naively want 1G of random data:  $ dd if=/dev/urandom of=random.raw bs=1G count=1 0+1 records in 0+1 records out 33554431 bytes (34 MB) copied, 2.2481 s, 14.9 MB/s $ echo $? 0   In this case only 34MB of random data are stored, while if I use multiple reads:  $ dd if=/dev/urandom of=random.raw bs=1M count=1000 1000+0 records in 1000+0 records out 1048576000 bytes (1.0 GB) copied, 70.4749 s, 14.9 MB/s   then I properly get my 1G of random data.  The documentation for /dev/urandom is rather elusive:     A read from the /dev/urandom device will not block waiting for more   entropy.  As a result, if there is not sufficient entropy in the   entropy pool, the returned values are theoretically vulnerable to a   cryptographic attack on the algorithms used by the driver.  Knowledge   of how to do  this  is  not  available  in  the  current unclassified   literature, but it is theoretically possible that such an attack may   exist.  If this is a concern in your application, use /dev/random   instead.   I guess the documentation implies there is some sort of maximum read size for urandom.  I'm also guessing that the size of the entropy pool is 34MB on my system, which would explain why the first read of 1G failed at about 34MB.   But my question is how do I know the size of my entropy pool? Or is dd stopped by another factor (some kind of timing issue associated with urandom?).


I cannot understand why this is not valid housing

These two houses  are exactly like the house on the left. I have taken the wall out and put it back in multiple times and I really don't know what is going on this is making my brain melt


Check if value in array (include is not a function)

How to write if include? condition in JavaScript?  My sample code is here:  var a = ['red', 'green', 'blue', 'yellow']; if (a.include("red" )) {      alert(a); }   It gives the following error:  SyntaxError: missing : in conditional expression


Show that $\mathrm{Cov}[g(X), h(X)] \ge 0$ whenever $g$ and $h$ are nondecreasing.

Intuitively, the covariance of two nondecreasing functions of a random variable should be nonnegative. However I can't seem to come up with a proof for this. Here is the formal setup: Let $X: (\Omega, \mathcal A)\to (\mathbb R, \mathcal B)$ be a random variable defined on the probability space $(\Omega, \mathcal A, P)$ and let $g$ and $h$ be nondecreasing functions $\mathbb R \to \mathbb R$. To make sure that everything is well-defined assume that $E[g(X)^2]<\infty$ and $E[h(X)^2]<\infty$. Question: Is is always true that $$\mathrm{Cov}[g(X),h(X)]\ge 0\,?$$  Some notes:  Note that the assertion is equivalent to showing that $E[g(X)h(X)]\ge E[g(X)]E[h(X)].$  I tried reducing the problem to showing that $$E[Xf(X)] \ge E[X]E[f(X)]$$ holds for every nondecreasing $f$ whenever $E[X^2]$ and $E[f(X)^2]$ are finite. To do this, I defined $Y=h(X),$ $f = g \circ h^{-1}$ and wrote $$E[g(X)h(X)]=E[g(h^{-1}(Y)Y] = E[f(Y)Y].$$ But this assumes that $h$ is strictly increasing, which is not necessarily true. Moreover, even in this case I'm not sure how to start.


Let's say $f:A \to B$ is a function between metric spaces, and that $f$ is continuous at $a \in A$.  Does it imply that there exists a ball $B(a,r)$ such that $f$ is continuous for every point of $B(a,r)$ ?  I can't think of a counterexample. Thanks!


How can I merge files on a line by line basis?

cat file1  foo ice two   cat file2  bar cream hundred   Desired output:  foobar icecream twohundred   file1 and file2 will always have the same amount of lines in my scenario, in case that makes things easier.


Can I force a unit test to wait for a Sharing Rule to be created?

Ideally, I'd like to write a unit test to help me "dummy check" for unexpected effects of the upcoming guest user sharing setting changes.  We'd had some controller/trigger code "gracefully handling" data it couldn't see thanks to the new sharing restrictions ... which resulted in simply "not doing" some work that it was supposed to do, which from a business process perspective isn't "graceful" at all (it was an important automation for downstream processes).  I'd like to write up a unit test with some system.assert statements validating that "data still goes where it's supposed to" when the "submit" button a public-facing Visualforce page of a community is clicked.  Unfortunately, I can't seem to make the "submit" button on a Controller for a public-facing Visualforce page work in the context of a unit test because the record whose creation it results in doesn't get its corresponding "sharing setting" record created in time for the execution context to pick it up.  I did a little proof of concept here ...  @isTest public class TestClass {      private static Id guestProfileId = Util.getProfileIdByName('Public Facing Portal Profile');     private static User guestUser;     private static Id portalGroupId = [SELECT Id FROM Group WHERE Name = 'Public_Portal' LIMIT 1][0].Id;      private static Custom_Object__c co;       private static testMethod void runTest() {         createCO();         Test.startTest();         // Note that putting createCO() inside the test and doesGuestSharingRuleExistForCO() doesn't help.         // That's what I was afraid of.         try {             doesGuestSharingRuleExistForCO(co.Id);         }         catch (Util.DeveloperException e) {             System.assert(FALSE, e.getMessage());         }         Test.stopTest();     }       private static void cacheUsers() {         guestUser = [SELECT Id FROM User WHERE profileid = :guestProfileId AND IsActive = TRUE LIMIT 1][0];     }      private static void createCO() {         co = new Custom_Object__c();         INSERT co;     }      private static void doesGuestSharingRuleExistForCO(Id coId) {         List<SObject> existingSharingRulesOnCO = [             SELECT Id FROM Custom_Object__share             WHERE RowCause = 'GuestRule' AND AccessLevel = 'Read' AND ParentId = :coId AND UserOrGroupId = :portalGroupId LIMIT 1         ];         if ( existingSharingRulesOnCO.isEmpty() ) { throw new Util.DeveloperException('Guest User sharing is not on for this custom object ID'); }     }      private static Boolean isCOSharingFlippedOnAtAll(){         String lookingFor = 'Custom_Object__Share';         for (Schema.SObjectType sObjectType : Schema.getGlobalDescribe().values() ) {             String sobjName = String.valueOf(sObjectType);             if (sobjName.contains(lookingFor) ) { return TRUE; }         }         return FALSE;     }  }   Am I just out of luck?  Is there no way to properly unit-test the effects (to automations relying upon "guest user" sharing settings when running as "guest user") of simulating the insertion of records into my database from a Visualforce page, due to not being able to separate out "execution context" enough and "wait" for the sharing rule record for the new record to come into existence?


Final Fantasy XIII Post-Completion Length

How long, in approximate hours, does it take to get everything in Final Fantasy XIII that happens after you defeat the final boss?   This includes all the Cie'th Stones, Crystalarium mastery and any other side quests which can be left until the very end of the game.


I have not come up with a solution for the following warning:  main.cpp: In member function 'void MyClass::increase()': main.cpp:350: warning: conversion to 'short unsigned int' from 'int' may alter its value   main.cpp:  class MyClass { public:    MyClass() : myShort(0) { }    void increase() { myShort *= 60; } // Line 350  private:    unsigned short myShort; };  int main(int argc, char** argv) {    MyClass myObj;    myObj.increase(); }


Header: Section on the left, subsection (if existent) on the right

I have got two questions and would be extremely grateful for any help (especially with the first question)!  Question 1: I am using the article class and would like the section title (including section number) to appear on the LEFT; additionally, on pages belonging to a subsection, the subsection title (excluding number) should be printed on the RIGHT.  To create the header I used the following code:  \documentclass{article}  \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{fancyhdr}  \renewcommand{\subsectionmark}[1]{\markright{#1}}  \pagestyle{fancy} \fancyhf{} \rhead{\rightmark} \lhead{\sectionmark} \rfoot{\centering \thepage}  \begin{document}  \section{Introduction}  \section{Chapter 2}   \subsection{A subsection}   \subsection{Another subsection}  \section{Chapter 3}   \subsection{First subsection in Chapter 3}   \subsection{Another subsection in Chapter 3}  \section{Conclusion}  \end{document}   The problem is that with this code, the left-hand header is empty and the right-hand header gives the subsection title (if a subsection exists) and otherwise it gives the section title.  I would be very grateful if someone would show me how to get the desired header, described above!  Question 2: I don't want the header to appear on the first page of a new section. Is there anything one could include in the preamble to achieve this, instead of having to add \thispagestyle{empty}in the code underneath each \sectioncommand?  Many thanks in advance! :)


Omit specific subsection from table of contents?

Is it possible to omit a single specific subsection from the table of contents, while keeping it numbered as usual within the main body, and keeping other subsections listed?  (I am using the amsart class.)


Determinant of unit identity matrix is equal to the trace plus one of that matrix?

I am trying to show that  $$\det \left(I_{n} +  \begin{bmatrix}  a_{1} \\ a_{2} \\ \vdots \\ a_{n} \end{bmatrix}  \begin{bmatrix}b_{1}&b_{2}&\cdots&b_n \end{bmatrix} \right)  = 1 + \sum_{m=1}^n a_{m}b_{m}$$     I know I have to use the fact that  $$\ M=QDQ^{T}$$  I can see that with a diagonal matrix its determinant its equal to its trace, but I am having a hard time figuring out what to do with that identity and that 1?


How do shareholders make money with stocks from the company if the company is losing profitability?

I'm new to the stock market, and I'm still trying to see the bigger picture of what's essentially going on. As far as my knowledge goes, people buy stocks to get a share of profits from the company. But if the company is making no profit, or even has a negative profit, stock prices can still increase due to buying volume, as traders buy low after a crash and sell high after a rally.  So does the price of the stock depend on the traders/investors or how much profit that the company makes?  How can you explain the significant decrease in profit, but a rise in stock prices?   Are traders/investors just competing against each other by swing trading since companies are now cutting dividends, and no profit is coming into the market pool?  And are dividends the "profit" that the companies hand out to traders/investors as they profit? I'm just confused where the "shares of profit" from the company comes in as opposed to the actual price of the share itself.


Adding map legend displayed on Google Earth?

My colleague sent me an *kml file with a map legend and said it was exported from AgLeader software. I am using ArcGIS to convert my shapefiles into *kml files and I've tried both "layer to kml" and "map to kml" conversion but still can't add a legend.    More detailed description: I added a legend to layout and saved my layers as a map document *mxd, ran "map to kml" converstion and output a *kmz file but it still doesn't show me the legend.   I am using ArcGIS 10.4 for Desktop.  Does anyone know how to do this?


Will DDR4 2400Mhz RAM run on the MSI H170 GAMING M3 motherboard?

first question to this forum and i would be happy if someone could help me.  I am building a PC and i have bought some components. I already bought the motherboard MSI H170 GAMING M3 with these specs:  -Supports 6th Gen Intel® Core™ / Pentium® / Celeron® processors for LGA 1151 socket  -Supports DDR4-2133 Memory. Supports ECC, un-buffered memory  -DDR4 Boost: Give your DDR4 memory a performance boost  So i tend to buy a kingston RAM 8GB at 2400mHZ  My questions are:  1)The motherboard specs mention that it supports DDR4 2133MHZ, will this ram run smoothly on this motherboard? Can it run at full 2400Mhz?  2) In the near future i plan to buy one more RAM of the same type. Will it run on dual channel?  Thanks in advance


Local dedicated hosting space (own hardware)

Where can I find local dedicated hosting space for my own hardware?   I know I can rent dedicated hosting from various companies online, but usually I think that means I'm renting their hardware too. I just need a space with a network connection and a power outlet. That's it. How much would this cost? What would I search for? Is it available easily? Or would it only be the sort of thing huge companies would do? I'm in the greater NYC area.  It's for a project I'm working on, but the thing's loud and annoying. I'd be willing to pay a little to get it out of sight and out of mind. I don't even care too much about the quality of the network connection. I'd rather not rent other people's hardware cause it probably would cost a fortune to rent a machine like this (tons of ram).


How can we prevent "assembly" tag being tagged to .NET assembly question

I am seeing this happen again and again. Sometimes people tag the .NET and C# questions with "assembly" tag while in reality it belongs for Assembly programming questions.


I saw loads of posts with similar issues; I've looked at the solutions with no luck so far.  I use Ubuntu 12.04 LTS Desktop, installed in partition sda5, mounted as /. The main part of the disk is allocated to sda6, mounted as /Home.  I cannot either:   cd into this Home directory use mkdir to create a sub folder   I can see it and create files etc, when logged in as root, using nautilus, but from a terminal I just get:   -su: cd: /Home: No such file or directory   I am new to Ubuntu (coming fom Windows) and although I thought I was getting to grips with it, this has me beat.   Any help appreciated. TIA


Difference between Export PDF and Print to PDF in Safari

What is the difference between to File > Export as PDF and File > Print > Save As PDF?


Can I use the airtrain from JFK if I'm not flying?

I'm going to pick up someone from JFK terminal 1. I wanted to know whether I can use the AirTrain from any terminal on JFK to Jamaica station? Can I go through the terminal and use the AirTrain even if I'm not flying in or out of JFK?


Find whether the state code is related to the Country code

When state/country picklists are enabled, in an apex class can i find whether the state code is related to the country code.  Currently if no check is done.  I'm getting the below error in the visual force page.  Invalid State Code  Invalid state specified for field     Can we handle such type of errors. I have tried by making the below code changes but no use.  Contact myContact = new Contact(); myContact.MailingCountryCode = 'US'; try {     myContact.MailingStateCode = 'NL'; }catch(Exception e){  ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,'No Relation')); }   Is there any way to find whether the state code is related to a country code.  Thanks in advance


Is there a website for searching/booking European trains?

Is there a website to search for European train tickets? I mean something like kayak.com, expedia.com, airfare.com, etc for trains? I know there are specific countries' website like bahn.de, sbb.ch, voyages-sncf.com, etc. But is there a website to search and see the prices easily without having to go through many steps?


Please don't red alert me for queues I've handled

I have found the  has been helpful in prompting me to review queues.  There should be red when there's red dots against review queues:   image stolen from   However, when I have used all my reviews for some queues:    If those queues are large enough to warrant the red alert, it will still show on my review icon, even though none of the queues I am able to review in are not alerting.     It would be better if it is like this:    Can we have the red alert vanish if the alert is for queues we have finished reviewing for the day please? It's honestly annoying and will eventually degrade the UX for avid reviewers. (imo)


“Nonsense” is somewhere between “not an answer” and “spam”. It’s not spam. People flag it as both.  Can we have a “nonsense” flag reason, please? It would alleviate the (minor) confusion, and it could also get dealt with faster than “not an answer” or “other”.  e.g.     oranges oranges oranges oranges oranges hi   Apparently VLQ already covers this, though.


Java Swing: Displaying images from within a Jar

When running a Java app from eclipse my ImageIcon shows up just fine.  But after creating a jar the path to the image obviously gets screwed up.  Is there a way to extract an image from the jar at runtime so I can then open it up?  Or, is there a better way to do this?  I'd like to distribute a single jar file if possible.


If a bullet is fired vertically upwards, when it comes back does it fall to the same spot?

What I'm basically asking is that if a body is projected with sufficiently high velocity so that it doesn't escape from the earth's gravitational field but reaches an appreciable height with respect to the radius of the earth, then when it comes back will it land on the same spot from which it was fired?  You can neglect drag force and winds but do consider the rotation of the earth.   Basically what has to be considered is that the net force acts towards the centre of the earth and so I tried conserving angular momentum. That shows that the angular velocity of the object will decrease with increasing height above the earth. So basically the object moves with smaller angular velocity for some time in it's path.   That led me to believe that when the object finally lands back on earth it wouldn't do so at the place from which it was projected. Am I wrong?


Login page 404 still happening!! Cannot login on stack exhcange

This question never got answered, I wanted to ask a new question on stack overflow, I had forgotten I had this issue months ago.  The problem is still happening, it prevents me from logging in, as after entering my credentials I get redirected back to the home page in a not logged in state, upon checking console I see a 404 has happened (may be unrelated issue though).


partitions showing different sizes on gparted and MS Disk Management

I'm trying to install Ubuntu 14.04 LTS on an HPG60 Laptop. I'm having a difficulty to install this coz I cant see the unallocated space I prepared in Windows.  As you can see on the attached screenshot:    I've prepared an unallocated space 96.72GB using Disk Management.  But when I boot up ubuntu and check Gparted,  I'm seeing this instead    An unallocated space of 1MB?!  Never encountered this before. I've installed ubuntu on a lenovo laptop that I use on office but I never like this before. Anybody have any idea why this is happening?


I was looking for Stack Overflow on the App Store. Is there a reason for SO/SE not to be there?  Accessing the amazing repository here through iPad would be wonderful.


I am using the following phrase in an abstract I'm writing:     in situ formation of planets   I wanted to ask if a hyphen is needed in this phrase, and if so where?   says that "in situ" should not be hyphenated because the two words are not two separate adjectives, but rather "in situ" is a single adjective, borrowed from Latin.  I wanted to confirm that this analysis carries over to this particular usage of "in situ".


If $X$ is homeomorphic to $Y$ then is $X/{\sim}$ homeomorphic to $Y/{\sim'}$?/

Let $f:X\to Y$ be a homeomorphism between topological spaces. Suppose we have an equivalence relation $\sim$ defined on $X$. Define an equivalence $\sim'$ on $Y$ by $y_1\sim'y_2$ iff $x_1\sim x_2$ where $y_i=f(x_i)$     Is $X/{\sim}$ homeomorphic to $Y/{\sim'}$?   I have a well defined continuous map $F:X/{\sim}\to Y/{\sim'}$ given by $[x]\mapsto[f(x)]$. This can easily be seen to be bijective. I am having trouble proving that this is open. I know there is some diagram chasing involved but I am confused.  We have the following commutative diagram - $\require{AMScd}$ \begin{CD}     X @>f>> Y\\     @Vq_XVV\circlearrowright @VVq_YV\\     X/{\sim}@>>F> Y/{\sim'} \end{CD}  If $U$ is open in $X/\sim$ then $q_X^{-1}(U)$ is open in $X$ and $f(q_X^{-1}(U))$ is open in $Y$. To prove that $F(U)$ is open in $Y/\sim'$ we need to show that $q_Y^{-1}(F(U))$ is open in $Y$. This will be true if $f(q_X^{-1}(U))=q_Y^{-1}(F(U))$. But I am having trouble proving this is equality. Any help will be appreciated.  Thank you.