Let $Y_{1},Y_{2},\ldots,Y_{n}\sim N(0,\sigma^{2})$. Prove that $T(Y)=\frac{1}{n}\sum_{k=1}^{n}Y_{i}^{2}$ is the MVUE for $\sigma^{2}$.  My approach:  I need to prove that $T(Y)$ is the MVUE for $\sigma^{2}$, so I need to show that:  $T(Y)$ is a sufficient statistic for $\sigma^{2}$. $T(Y)$ is a complete statistic. Therefore, by the Lehmann–Scheffé theorem we can conclude that $T(Y)$ is the MVUE for $\sigma^{2}$.  Since that $$L(\sigma^{2})=\underbrace{\left( \frac{1}{\sqrt{\sigma^{2}} \sqrt{2\pi}}\right)^{n}}_{=h(\mathbf{y})}\underbrace{\exp \left\{-\frac{1}{2\sigma^{2}}\sum_{i=1}^{n}x_{i}^{2} \right\}\cdot \mathbf{1}_{\{x\in \mathbb{R}\}}(x_{i})}_{=g[T(\mathbf{y});\sigma^{2}]}$$ so by the Factorization's theorem we can conclude that $T(Y)$ is a sufficient statistic. Now, for to prove that I need to show that: For all measurable function $g$ and for all $\sigma^{2}$ we have $$\mathbb{E}_{\sigma^{2}}g(T)=0 \implies \mathbb{P}_{\sigma^{2}}[g(T)=0]=1$$ But how can I prove that part? On the other hand, how would you use Rao-Blackwell's theorem to prove this result?

Given $X_1,...,X_n$ iid. random variables which follow a $\mathcal{N}(\mu, \sigma^2)$ distribution. I already proved that  $T:=\frac{1}{n}\sum_{i=1}^n (X_i-\mu)^2$ is a minimal sufficient statistic for $\sigma^2$. Since, I want to apply the Lehmann-Scheffe Lemma, I have further to show that $T$ is complete, meaning that $\mathbb{E}_{\sigma^2}[g(T)]=0\Rightarrow g(T)=0$ for any measurable function $g$.   However, I am unable to do this, as I don't know how $T$ is distributed. Also there is a theorem which states that in exponential families the statistic is complete if the parameter space contains an open neighbourhood about the origin, but this is clearly not applicable since $\sigma^2\in (0,\infty)$. I would appreciate a little hint.


I am studying parabolas, but the way exponents are distributed is confusing me to oblivion.  $(y_2 – 2)^2$  $y_2^2 – 4y_2^2 + 4$   I do not understand how can the first expression be simplified to the next. Could someone please provide an explanation?

I'm going over my quadratic equations for the ACT and I came across this quadratic:  $$(x – 2)^2  – 12$$  My teacher said we could have factored it out into this:  $$x^2 – 4x – 8$$  But I just don't understand where he got the $-4x$! Help?


So I got 2 new 500GB hard drives and I installed Windows 7 first on the first hard drive and on the second I installed 12.04 ubuntu.   Is there any software that I can use to make it easier to get a boot menu to choose the os that I want to boot into?

I have two hard drives. One is used for Windows and one is empty. I want to install Ubuntu on the empty hard drive. The Windows hard drive is disk0 in Windows and the empty hard drive is disk1. When I install Ubuntu and it asks where I want to install it, I choose "Something Else" but I am stuck there. What do I choose for "boot loader installation"?


The sequence is: $x_{n+1}=\frac{1}{2}(x_{n}+\frac{a}{x_n})$ for$ , n \in \mathbb{N}_{0}$, $a>0$ and $x_{0}=a$  Hint: Show at first that $x^{2}_{n+1} - a \ge 0$ and than take $x_{n+1}-x_{n}$  I tried this way: $\frac{a}{x_0}$ is not negativ, so the sum of $x_{0}+\frac{a}{x_0}$ and $\frac{1}{2}(x_{0}+\frac{a}{x_0})$ is also not negativ.  I guess that I should prove it for $x_{n}$ that it's not negativ with induction.

a) Let $a>0$ and the sequence $x_n$ fulfills $x_1>0$ and $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$ for $n \in \mathbb N$. Show that $x_n \rightarrow \sqrt a$ when $n\rightarrow \infty$. I have done it in two ways, but I guess I'm not allowed to use the first one and the second one is incomplete. Can someone please help me?  We already know $x_n \rightarrow \sqrt a$, so we do another step of the iteration and see that $x_{n+1} = \sqrt a$.  Using limit, $x_n \rightarrow x, x_{n+1} \rightarrow x$ (this is the part I think it's incomplete, don't I have to show $x_{n+1} \rightarrow x$, how?), we have that   $$x = \frac x 2 (1 + \frac a {x^2}) \Rightarrow 1 = a/x^2 \Rightarrow x = \sqrt a$$ b) Let the sequence $x_n$ be defined as $x_{n+1}= 1 + \frac 1 {x_n} (n \in \mathbb N), x_1=1$. Show that it converges and calculate its limit. "Tip: Show that sequences $x_{2n}$ and $x_{2n+1}$ monotone convergent to the limit." I didn't understand the tip, how can this help me? Does it make a difference if the number is odd or even? Thanks in advance!


I upgraded to Ubuntu 20.04 from 19.10 and my wifi adapter is not connecting to any Wifi network. It scans all available networks but is unable to connect to any network.I tried all possible solutions found in the internet but no use. Please help!  Following are the details of my wireless card:DMI   *-network                       description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:02:00.0        logical name: enp2s0        version: 15        serial: 04:d4:c4:e2:da:b4        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=MII        resources: irq:49 ioport:e000(size=256) memory:f7804000-f7804fff memory:f7800000-f7803fff   *-network        description: Wireless interface        product: RTL8822CE 802.11ac PCIe Wireless Network Adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:04:00.0        logical name: wlp4s0        version: 00        serial: 80:91:33:c9:2b:d5        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=rtw_8822ce driverversion=5.4.0-29-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11        resources: irq:62 ioport:d000(size=256) memory:f7600000-f760ffff   *-network        description: Ethernet interface        physical id: 1        bus info: usb@1:3        logical name: enxfcde56ff0106        serial: fc:de:56:ff:01:06        capabilities: ethernet physical        configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.1.101 link=yes multicast=yes

I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is:  *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 48:ba:4e:5c:06:5f size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff  *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: import:d000(size=256) memory:fe900000-fe90ffff   Output from "lspci -nnk | grep -A2 0280":  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)


In my PATH variable I see duplicate paths that I have no idea how they ended up there.  /home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/var/lib/snapd/snap/bin:/home/user/projects/bin:/snap/bin:/var/lib/snapd/snap/bin  Note for instance the number of occurrences of /snap/bin.  I tried grep for the PATH but I couldn't find anything strange. I also checked all the usual suspects .bashrc, .profile, .bash_profile, and the system wide definitions too, no luck.  EDIT: I am aware of the standard location where the PATH variable is set and read the answers to this  and this .

I'm trying to set my path variable to look like this:  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jgrande/android-sdk-linux/platform-tools:/usr/lib/jvm/java-7-openjdk-amd64/bin/:/usr/lib/jvm/java-7-openjdk-amd64/jre/bin   And for some reasons, no matter what file I edit, the variable always ends up looking like this (with the java path repeating a bunch of times):  PATH=/usr/local/java/jdk1.7.0_79/bin:/home/jgrande/bin:/usr/local/java/jdk1.7.0_79/bin:/home/jgrande/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jdk1.7.0_79/bin:/usr/local/java/jdk1.7.0_79/jre/bin:/usr/local/java/jdk1.7.0_79/bin:/usr/local/java/jdk1.7.0_79/jre/bin   I've tried to edit my personal .bashrc and .profile as well as /etc/environment, /etc/bash.bashrc, /etc/profile, and set it in /etc/profile.d. Now, there is jdk.sh in /etc/profile.d where the PATH variable is identical to the incorrect one I posted above. However, I tried to comment out the line and even remove jdk.sh altogether and that still didn't fix it.  Otherwise, I've noticed that if I log in as another user, I'll have the correct PATH variable, and don't have the messed up one with java being repeated a bunch of times.  So, I was wondering, where else could my PATH variable be defined that I haven't checked yet?


I have a module located in a different directory.  I want to import it in another module.  When I try to import from the directory, I get a syntax error.  How do I import other local modules?  from "C:\User\Sam\module" import abc

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


In the paragraph before equation 6.20, the book says:  "...If we begin with the assumption that the unnormalized log probabilities are linear in $y$ and $z$, we can exponentiate to obtain the unnormalized probabilities..."  With this assumption, we proceed to equation 6.20, and onwards to derive the sigmoid output unit.  My question is, why is assumption reasonable? The book seem to provide no justification.

Background: I'm studying chapter 6 of Deep Learning by Ian Goodfellow and Yoshua Bengio and Aaron Courville. In section 6.2.2.2 (pages 182 of 183 ) the use of sigmoid to output $P(y=1|x)$ is motivated.  To summarize some of the material they let $$z = w^Th+b$$ be an output neuron before an activation is applied where $h$ is the output of the previous hidden layer, $w$ is a vector of weights and $b$ is a scalar bias. The input vector is denoted $x$ (which $h$ is a function of) and the output value is denoted $y=\phi(z)$ where $\phi$ is the sigmoid function. The book wishes to deﬁne a probability distribution over $y$ using the value $z$. From the second paragraph of page 183:     We omit the dependence on $x$ for the moment to discuss how to deﬁne a   probability distribution over $y$ using the value $z$. The sigmoid can be motivated by constructing an unnormalized probability distribution $\tilde P(y)$, which does not sum to 1. We can then divide by an appropriate constant to obtain a valid probability distribution. If we begin with the assumption that the unnormalized log probabilities are linear in $y$ and $z$, we can exponentiate to obtain the unnormalized probabilities. We then normalize to see that this yields a Bernoulli distribution controlled by a sigmoidal transformation of z:   \begin{align} \log\tilde P(y) &= yz \\ \tilde P(y) &= \exp(yz) \\ P(y) &= \frac{\exp(yz)}{\sum_{y'=0}^1 \exp(y'z) } \\ P(y) &= \phi((2y-1)z) \end{align}   Questions: I'm confused about two things, particularly the first:   Where is the initial assumption coming from? Why is the unnormalized log probability linear in $y$ and $z$? Can someone give me some inituition on how the authors started with $\log\tilde P(y) = yz$? How does the last line follow?


Maybe this question has been asked before but I just do not know how this question should be asked  I have the following code. I do not know what is the rationale for the parameter being passed in as const modifiers and then passed into internal constructor.   bool somefunction(const cv::Vec4i& l1_c, const cv::Vec4i& l2_c) {    cv::Vec4i l1(l1_c), l2(l2_c);    // why code it in such a manner?                                      // what the advantages?    ...... other codes but l1 and l2            is used as values ........  }   Isn't it more simple to use as cv::Vec4i& l1c as follows  bool somefunction(cv::Vec4i& l1_c, cv::Vec4i& l2_c) {        ...... other codes and l1_c and l2_c        is used as values .........  }   Regards

So why exactly is it that it's always recommended to use const as often as possible?  It seems to me that using const can be more of a pain than a help in C++.  But then again, I'm coming at this from the python perspective:  if you don't want something to be changed, don't change it.  So with that said, here are a few questions:   It seems like every time I mark something as const, I get an error and have to change some other function somewhere to be const too.  Then this causes me to have to change another function somewhere else.  Is this something that just gets easier with experience? Are the benefits of using const really enough to compensate for the trouble?  If you don't intend on changing an object, why not just not write code that doesn't change it?   I should note that at this point in time, I'm most focused on the benefits of using const for correctness and maintainability purposes, although it is also nice to have an idea of the performance implications.


Which of these is grammatically correct?  "The statement is incorrect when the following are all true:" "The statement is incorrect when all the following are true:"

"We are all mad." "We all are mad."   I think each of these conveys the same idea. Besides this, we can use "we are all" alone. I hear the first one more frequently.  Does the second one sound worse to a native speaker? I wonder about this.  Note: I'm not a native speaker.


I am wondering what problems might occur if i reduced the voltage from the usual 5v down to 4.2v.

In AVR datasheets under the Electrical Characteristics section you will typically find a graph like this (this one is from the ATMega328):    I've seen designs that seem to "work" but operate outside the shaded envelope. Specifically, I've seen 3.3V (Arduino) designs that run the clock from an external 16MHz crystal. Clearly, this is out of spec. What are the practical negative consequences of running outside this envelope?


I'm looking for information on my Uncle, Rudolf Neumann who served with the Waffen SS. He was killed on March 06 1942 in Russia

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


I am adding spanish as a language and I'm having problems with the encoding.  All the spanish characters work perfectly locally (this makes it harder to debug):    But on the server they look this way:    I'm pretty puzzled, you can see the beta version .  My doctype and charset are the following:  <!DOCTYPE html> <html> <head>     <meta charset="UTF-8"> ...   Which should be correct as far as I understand.  I am using gettext for translations.  I checked and the declared encoding of the .po file is UTF-8.  I also set bind_textdomain_codeset to UTF-8.  I'm not sure where the problem is actually relying.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


When the tax bill was still pending, I recall reading somewhere that the bill changed capital gains tax so that instead of using the cost-basis for the stock in question you used a first-in first-out strategy so that the oldest cost-basis is the one use when selling.  I haven't been able to find anything that says whether this made it into the final law or not however. Does it still matter which stock you sell or is the cost basis used always the oldest under the new tax law?

An early draft of the GOP tax reform bill contained this provision, as reported by :     The Senate draft of the Tax Cuts and Jobs Act would require sellers of stock in any one company to dispose of shares in the order they were acquired. Sellers could no longer designate which blocks of their shares they wished to sell to minimize capital gains taxes. The new rule would be “first in, first out” (FIFO).   Did this provision survive in the final bill, and if so, does it apply to ETFs as well as company stocks?


Here are the approaches that I've tried so far:  If $a_n^{-1/(n+1)}$ is bounded, say $a_n^{-1/(n+1)} \le c,$ then $\sum\limits_{n \ge 1} a_n^{n/(n+1)} \le \sum\limits_{n \ge 1} ca_n,$ so the series converges by the comparison test. Else, $\lim\sup a_n^{-1/(n+1)} = \infty \, (*) \, \Rightarrow \lim\inf a_n^{1/(n+1)} = 0 \Rightarrow -\infty = \lim\inf \frac{\log(a_n)}{n+1}.$ But $\sum\limits_{n \ge 1} a_n $ converges, so $\lim\sup \frac{a_{n+1}}{a_n} \le 1 \Rightarrow 0 \ge \lim\sup \log\left(\frac{a_{n+1}}{a_n}\right) = \lim\sup \frac{\log(a_{n+1})-\log(a_n)}{(n+2)-(n+1)} = \lim\sup \frac{\Delta \log(a_n)}{\Delta (n+1)}.$ My idea was to use Stolz-Cesaro here to derive a contradiction, but because we have $\lim \sup$ in $(*)$ instead of just $\lim,$ we are forced to work with $\lim \sup, \lim \inf.$ To top it all off, we can't even get the infinums and supremums to be pointing in the right directions. I don't think that the convergence of $\sum\limits_{n \ge 1} a_n^{n/(n+1)}$ can be proved directly from $(*),$ and I'm not sure what other ideas we can use.  Another idea I had was to suppose $M = \sum\limits_{n=1}^{\infty} a_n$ and let $\sum\limits_{n=1}^{b_i} a_n \ge M(1-2^{-i})$ with $b_1, b_2, \dots$ minimal. Then $\sum\limits_{n=b_i+1}^{b_{i+1}} a_n < \frac{M}{2^i},$ and through some fiddling with the power mean inequality we get $\sum\limits_{b_i + 1}^{b_{i+1}} a_n^{n/(n+1)} < (b_{i+1}-b_i)^{1/(b_i+1)} (2^{-i}M)^{b_i/(b_i+1)}.$ But now we need to show $\sum\limits_{i \ge 1} (b_{i+1}-b_i)^{1/(b_i+1)} (2^{-i}M)^{b_i/(b_i+1)}$ converges given $\{b_i\}$ is monotonic increasing, which may not be true due to how much information about $\{b_i\}$ we threw out.  I noticed that we may assume $\{a_n\}$ is monotonic decreasing. Then we have a more manageable bound: $\sum\limits_{n=b_i+1}^{b_{i+1}} a_n \le (b_{i+1}-b_i)a_{b_i}^{b_i/(b_i+1)}.$ But this looks similar to the series we wish to show converges, so it appears we have not made any progress at all. We also have $(b_{i+1}-b_i)a_{b_{i+1}} < \frac{M}{2^i},$ so this sum is further bounded by $\frac{M}{2^i} a_{b_{i+1}}^{-1} a_{b_i}^{b_i/(1+b_i)} = \frac{M}{2^i} a_{b_{i+1}}^{-1/(1+b_i)} \left(\frac{a_{b_i}}{a_{b_{i+1}}}\right)^{b_i/(1+b_i)}.$ We've gotten rid of the pesky $b_{i+1}-b_i$ term and introduced the rapid decay inducing term $2^{-i},$ but now we have to deal with $a_{b_i}/a_{b_{i+1}}.$ But there's no guarantee that $a_{b_i}/a_{b_{i+1}}$ is well behaved, i.e. small. It could even be unbounded.  Yet another possible path: At most $M \cdot 2^{i+1}$ terms lie in the interval $[2^{-i-1}, 2^{-i}],$ so the contribution to the sum $a_n^{n/(n+1)}$ coming from $n$ such that $a_n \in [2^{-i-1}, 2^{-i}]$ could be estimated, if only we had a lower bound on $n.$ Without any lower bound on $n$ we can only conclude $a_n^{n/(n+1)} < a_n \le 2^{-i},$ which gives the estimate $M \cdot 2^{i+1} \cdot 2^{-i} = M/2.$ But $\sum\limits_{i \ge 1} M/2$ is divergent, so we need a stronger estimate.  Are any of these approaches on the right track? Do you have any hints or suggestions about how to finish the problem? I suppose the worst case scenario would be that none of my ideas lead anywhere and I have to tear down all this progress and start from scratch again. Hopefully this is not the case.

Given a positive sequence $(a_n)$. Prove that if $\displaystyle \sum_{n=1}^{\infty} a_n$ converges, then so does $\displaystyle \sum_{n=1}^{\infty} a_n^{\frac{n}{n+1}}$.   I tried to use the root test, and I was stuck with the case $\lim \sup \sqrt[n]{a_n}=1$. Maybe we need some trick here.  Thanks so much.


I am an Indian Citizen currently on H4 visa in USA. I will be travelling from Columbus to New Delhi (India) via amsterdam. Please help me out with information if I will need a transit visa to go via amsterdam or not. I have a 3hr stopover in amsterdam. I have a valid Indian Passport but my currently stamped H4 visa is expired. I have a visa approval document which I will use to get a H4 visa stamping in India. Please let me know if I need a Transit Visa in amsterdam based on my situation.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I want to install Ubuntu on Windows with windows installer but it does not ask if I want to install it on a partition, so I assume they are going to erase my old OS, Will this happen?

Possible Duplicate:          How does the Wubi installer work?  Which partition does it install Ubuntu on?  If it's on the Windows partition, where is it in the filesystem?


I am adding dynamically hyperlink and want to execute click event as below when ever user clicked on it but it is not firing up.

   When user selected some option  in DropDown then it goes and get areas from server then ajax get calls this function by passing data to this function   function updateAssignedAreas(data) {              debugger;             var areas = data.split(',');             $.each(areas, function (i, item) {                 $('#assinged_areas > tbody:last').append('
' + item + '	' + ''                     + '
');             });         }   This is the function when user click on unassign must call but not firing at all    $('.btn-danger').click(function (parameters) {             debugger;         });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Other provided information: 'Let A and B be square matrices of the same size.'  The last question for my Linear Algebra assignment involves providing matrices $A$ and $B$ that satisfy the above requirement, as well as 'Give a valid identity for $(A + B)^2$' and I do not see any theorem or example from my text that helps me break this problem down. So far I have been guessing random matrices to no avail and I know there must be a methodical solution to this.  What do I need to know in order to approach this problem?

The below statement is a true/false exercise.  Statement: For all square matrices A and B of the same size, it is true that $(A + B)2 = A^2 + 2AB + B^2$.  My thought process: Since it is not a proof, I figure I can show by example and come to a valid conclusion based on such example.  My work:  Come up with a square matrix A and B let both be a 2 by 2 matrix(rows and cols must be same).  Matrix $A$:  $A = \begin{array}{ccc} 3 & 5 \\ 4 & 6 \\ \end{array} $  Matrix $B$:  $B =  \begin{array}{ccc} 5 & 8 \\ 9 & 4 \\ \end{array} $  $A + B =  \begin{array}{ccc} 8 & 13 \\ 13 & 10 \\ \end{array}$  $(A + B)^2 =  \begin{array}{ccc} 233 & 234 \\ 234 & 264 \\ \end{array}$  $A^2 =  \begin{array}{ccc} 29 & 45 \\ 36 & 56 \\ \end{array}$  $(AB) =  \begin{array}{ccc} 60 & 44 \\ 74 & 56 \\ \end{array}$  $2(AB) =  \begin{array}{ccc} 120 & 88 \\ 234 & 112 \\ \end{array}$  $B^2 =  \begin{array}{ccc} 97 & 72 \\ 81 & 88 \\ \end{array}$  $A^2 + 2AB + B^2 =  \begin{array}{ccc} 246 & 205 \\ 265 & 256 \\ \end{array}$  Based my above work, the answer is false.   Is there another way to approach the problem? It seems like a lot of work needed to be done for a true/false question which raised my suspicion about whether there is a better way to look at the problem.


Suppose $d'(x,y)= \frac{d(x,y)}{1+d(x,y)}$ for $x,y \in X$ and I want to prove $d$ and $d'$ are equivalent metrics on $X$.  I would show $$\lim_{n\rightarrow\infty}d(x_n,x)=0 \quad\Longleftrightarrow\quad \lim_{n\rightarrow\infty}d'(x_n,x)=0.$$  To prove $\lim_{n\rightarrow\infty}d'(x_n,x)=0 \Rightarrow \lim_{n\rightarrow\infty}d(x_n,x)=0$, is it valid to say:     if $0=\lim_{n\rightarrow\infty}d'(x_n,x)=\frac{\lim_{n \rightarrow > \infty}d(x_n,x)}{1+\lim_{n \rightarrow \infty}d(x_n,x)}$,      then $\lim_{n \rightarrow \infty}d(x_n,x)=0$.   If it's invalid, what am I doing wrong?  Thanks!

Let $(X,d)$ be a metric space and for $x,y \in X$ define $$d_b(x,y) = \dfrac{d(x,y)}{1 + d(x,y)}$$ a) show that $d_b$ is a metric on $X$  Hint: consider the derivative of $f(t)$ = $\dfrac{t}{1+t}$  b) show that $ d$ and $ d_b $ are equivalent metrics. c) let $(X,d) $ be $(\mathbb{R}, |\cdot|)$ Show that there exists no $ M>0$ such that $ |x-y| $ $\leq$ $Md_b$ $(x,y)$ for all $ x,y$ $\in$ $\mathbb{R}$  I have calculated $f(t)$ and $f'(t)$ and from this I know $f(t)$ is an increasing function as $f'(t)$ is strictly positive. But I don't know where to go from here or how to do parts b) and c)


I have a string which contains both form $date0$ and ''$date0$'' (single '). I am using this regex to match (\$([^\$]+)\$) but it's only matching $date0$. What regex should I use that matches both?

I'm developing an algorithm to parse a number out of a series of short-ish strings. These strings are somewhat regular, but there's a few different general forms and several exceptions. I'm trying to build a set of regexes that will handle the various forms and exceptions; I'll apply them one after another to see if I get a match.   One of these forms goes something like this:  X (Y) Z   Where:   X is a number I want to capture.  Z is static, pre-defined text. it's basically how I determine whether this particular form is applicable or not. Y is a a string of unknown length and content, surrounded by parenthesis.    Also: Y is optional; it doesn't always appear in a string with Z and X. So, I want to be able to extract the numbers from all of these strings:   10 Z 20 (foo) Z 30 (bar) Z   Right now, I have a regex that will capture the first one:  ([0-9]+) +Z   My problem is that I don't know how to construct a regex that will match a series of characters if and only if they're enclosed in parenthesis. Can this be done in a single regex?


I want to write pretty and well-documented code base for my project. One thing that I want to do is to have method details for my black-box part of the code base. Like this:  /// <summary> /// The methods summary /// </summary> /// <param name="numX">Number x.</param> /// <param name="numY">Number y.</param>   But I don't want to write it over and over for every class that extends the interface, instead I want to write it in the interface and have the description appear on all the classes that implement the method.  Is that possible?

Suppose I have this interface  public interface IFoo {     ///     /// Foo method     ///     void Foo();      ///     /// Bar method     ///     void Bar();      ///     /// Situation normal     ///     void Snafu(); }   And this class  public class Foo : IFoo {     public void Foo() { ... }     public void Bar() { ... }     public void Snafu() { ... } }   Is there a way, or is there a tool that can let me automatically put in the comments of each member in a base class or interface?  Because I hate re-writing the same comments for each derived sub-class!


I'm taking my day and a half brined chicken breast out of the brine today.  Unfortunately I can't cook them for 2 days since I won't be home.  Is it okay to cook brined meat at a later date?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


Unfortunately I have clicked on the edit button in the attributes table and the spreadsheet with the polygons and their attributes has disappeared (see picture).  It is likely that I am making a mountain out of a molehill but I really do not know how to make the spreadsheet reappear.  Thank you in advance

How does one change the Attribute table view on QGIS 3? An initial answer says to use the Switch to Table view button but I can't seem to find this button.


I had a 1 TB western digital external hard disk filled with data. Mistaking it for another USB drive, my friend right clicked and went ahead with formatting. Within around five seconds after the formatting began, I cancelled the process and removed the USB connection. I re inserted the hard disk afterwards, only to see that drive is not assigned any letter by PC, and it asks to be formatted, if I try to open. I tried accessing with Linux also, but to no avail. whats is my best way ahead to recover the data? how much of the data might have got formatted? Is there any way I could access the data that haven't been formatted from the disk, and then go for recovering the remaining formatted data, instead of going for recovery of the entire 1 TB using some tool?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I simply want to use the \multimapboth symbol, which belongs to the \txfonts package; however I don't want to install this package, as it changes some formatting on my document... How can I do this? Thank you in advance.  EDIT: I'm looking for something like the answer to  question, just don't know how can I find more details about my symbol...

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


I am having a hard time with a homework problem getting my program to output a percentage properly. My goal is to just have my percentages be two decimal places out, even if it is  0.00%. Keep in mind, this is a level one programming course so the solution should be fairly basic, I just don't know why I can't see it. Thank you for your help.  I get these outputs:  supposed to be > 7 evens (100.00%) mine > 7 evens (100.0%)  supposed to be > 4 evens (36.36%) mine > 4 evens (36.36363636363637%)  Below is my code:  while(input.hasNextInt()) {        int num = input.nextInt();     totalcount++;     totalsum = totalsum + num;      if(num % 2 == 0) {          totaleven++;      }  }  double percent = (((double)totaleven/totalcount) * 100.00); <<< this right here System.out.println(totalcount + " numbers, sum = " + totalsum); System.out.println(totaleven + " evens " + "("+percent+"%)");   }

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


This is the content of root's crontab:  0       23      *       *       0-4     /usr/sbin/rtcwake -time `date --date="+16 hours" +"%s"` -m mem   This is set to fire off that command every Sun-Thu at 11pm. The command is essentially a suspend for the next 16 hours while I'm at work to save power. I've test the command with smaller times (30, 60 seconds) and it works. However, when I wake up in the morning and check my machine, it's still running.  Here's what's in the logs:  Jul 24 23:00:01 gallactica CRON[5033]: (root) CMD (/usr/sbin/rtcwake -time `date --date="+16 hours" +")   So does this mean it ran? Why didn't it actually work?

I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:  0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log   Unfortunately I get this message when that runs:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   I have tried escaping the date part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


I can't see whole responses on the mathematics site on mobile (iOS) because sometimes the LaTeX runs off of the screen. Can you add a horizontal scrolling feature please?

Stack Exchange formats math, but often the formatted math is wider than the screen. It would be nice if formatted math were scrollable the same way that formatted code wider than the screen is scrollable.


I'm using SAS in order to create a model for a cars datasets. The response variable y, is the price of the car. By the way I'm using the PROC MODEL statement in order to check heteroskedasticity. This is the output:                                 Test di eteroschedasticità Equazione       Test               Statistica     DF    Pr > ChiQuadr    Variabili  price           Test di White           56.32     27           0.0008    Cross of all vars                 Breusch-Pagan           11.43      7           0.1208    1,                                                                          normalized_losses,                                                                          height, bore,                                                                          stroke,                                                                          compression_ratio,                                                                          simbol, peak_rpm   Questions:     Is there heteroskedasticity? Breusch-Pagan accepts the null hypothesis, while White doesn't. I couldn't put in the proc model statement all my variables, because some of them were qualitative. Could this be a (or maybe "THE") problem?

Testing for heteroscedasticity I get these results: Breusch–Pagan / Cook–Weisberg test for heteroskedasticity  $H_0$: Constant variance  $H_a$: Heteroskedasticity   Variables: fitted values of log_expdu    chi2(1)      =    21.41   Prob > chi2  =   0.0000    White's test  $H_0$: homoskedasticity  against $H_a$: unrestricted heteroskedasticity   chi2(47)     =     48.91   Prob > chi2  =    0.3964    The Breusch–Pagan test tells me that there is heteroskedasticity, while the White's test tells me the opposite. Which result should I use?


When user enters from php page to mysql it makes wierd characters like Pyr«±n«±es, ????? etc, when typing ' æøå éá etc.  I have tried anything now.   PHP files is saved as UTF8 without bom. Altered all tables, database and converted to UTF8 HTML META charset utf8 Form has "accept-charset="utf-8" Right after connection: mysql_query SET NAMES UTF8 PHP Header with charset: utf-8   What to do? When it's going to database it makes those annoying characters.  Please help me.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


There is a program that starts with the system as shown in the image below.  I do not know how to find out which program is this.

I have just found an unknown process in Task Manager. I have scanned my system with Windows Defender on Windows 8.1 and it could not detect any issues.  But there is something there that shouldn't be there.  I cannot get rid of this process. I can not view its Properties or its file location like I can with any other process because those options are greyed-out/disabled.  How can I find more information about this on my system and how can I get rid of it when Task Manager won't let me perform any operations on it?


I'm trying to make a program that takes a string of number words "One hundred ninety two thousand seven hundred thirty one" and turn it into the corresponding number. This is the code I have so far:  def string_to_num(text):     text = text.lower()     words = text.split()     numbers = []     output1 = []     output2 = []     output3 = []     output4 = []     hold = 1     l = 1     for current_word in words:         number  = word_to_number(current_word)         numbers.append(number)     for i in range(len(numbers)):         current_num = numbers[i]         if i == len(numbers)-1:             output1.append(current_num)             continue         else:             previous_num = numbers[i-1]             if current_num > 999:                 output1.append(current_num)                 continue             else:                 if previous_num < current_num:                     output1.append(current_num * previous_num)                     output1.pop(i-l)                     l += 1                     continue                 else:                     output1.append(current_num)                     continue     for i in range(1, len(output1[:])):         current_num = output1[i]         previous_num = output1[i-1]         if current_num > 999:             output2.append(current_num)             continue         else:             if output1[i-1] > current_num and previous_num < 1000:                 output2.append(current_num + previous_num)                 continue             else:                 output2.append(current_num)  print('output2', output2) string_to_num('One hundred ninety two thousand seven hundred thirty one')   It works in the way that at the beginning, the function takes the number word and puts it through another function I have 'word_to_number()' that converts it to its corresponding number. I put all the values of numbers into a loop that gives the following result:  [1, 100, 90, 2, 1000, 7, 100, 30, 1]  The next part of the program adds makes sure the hundreds are added multiplied by the right factor. It takes the previous list and converts it into a list that looks like this:   [100, 90, 2, 1000, 700, 30, 1]  Note that the 100 and 700 are now combined.   The part that Im having trouble with is adding the numbers together and adding them to a new list, output2. The current code above produces the following list:   [190, 92, 1000, 700, 730, 31]  When it should look like this:  [192, 1000, 731]  Any Idea on how to get this working correctly? I've tried adding the numbers together and then using .pop to remove the original number from the new list, but I get the error 'Index is not in range'. Any help is greatly appreciated!

I need to convert one into 1, two into 2 and so on.  Is there a way to do this with a library or a class or anything?


I am getting compilation error when I am checking if an address is 64 byte aligned or not.  error: invalid operands to binary expression ('void *' and 'int')    #define BYTE_ALIGNMENT 64   void *is_mem_aligned(void* ptr){      if(ptr%BYTE_ALIGNMENT == 0){           printf("already aligned %p\n",ptr);           return ptr;      }  }

I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:  The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary? b) Free the memory after the memset_16aligned has executed.  {        void *mem;    void *ptr;     // answer a) here     memset_16aligned(ptr, 0, 1024);     // answer b) here     }


A given explanation for a light bulb's continuous spectrum of emitted light was that energy levels in solids overlap, therefore all energy changes can occur.   How can these changes occur? If an electron had enough energy to move into this 'overlap' space, how would it give out energy subsequently?  Can a spectrum ever be truly 'continuous'? Since the energy changes are just changes in discrete levels, tending towards a continuous distribution?

By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant?


I'm trying to get all the classes in the main package of my Bukkit plugin using   This is my code to get all of the classes  public class ClassFinder {  public static Set<Class<?>> getClasses(String packageName) {     Set<Class<?>> classes= new HashSet<>();     Reflections reflections = new Reflections(packageName);     classes=reflections.getSubTypesOf(Object.class);     return classes; }   }  I was previously using a different way of getting all the classes, which was a bit more clunky, and didn't use this api. However, upon making subclasses, this method broke. I've tried a few different variations of this code, but it still throws a NoSuchMethodError.  Here's the Stack Trace  java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;     at org.reflections.Reflections.expandSuperTypes(Reflections.java:380) ~[?:?]     at org.reflections.Reflections.<init>(Reflections.java:126) ~[?:?]     at org.reflections.Reflections.<init>(Reflections.java:168) ~[?:?]     at org.reflections.Reflections.<init>(Reflections.java:141) ~[?:?]     at pro.pvpgod.core.utils.ClassFinder.getClasses(ClassFinder.java:15) ~[?:?]     at pro.pvpgod.core.Core.registerCommands(Core.java:109) ~[?:?]     at pro.pvpgod.core.Core.onEnable(Core.java:95) ~[?:?]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:271) ~[spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugin(CraftServer.java:376) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.craftbukkit.v1_11_R1.CraftServer.enablePlugins(CraftServer.java:326) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.craftbukkit.v1_11_R1.CraftServer.reload(CraftServer.java:750) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.Bukkit.reload(Bukkit.java:540) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.11.2.jar:git-Spigot-3fb9445-6e3cec8]     at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]   Any help would be greatly appreciated :)

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


I want to create a quiz app, and to do this, I think I need a database with all the questions and the answers.  I found the tutorial on how to create a database programmaticly on the official Android Developer site, but I don't think that is what I need, because I don't need to create a database when the application run, I need to have an already compiled database where I can read the questions and the answers from it.  First of all, is this the correct way to do a quiz app? And if it is, how can I do that?

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


I'm not able to get rows list....it is coming null from below code.     public class ParsingTest1      {      public ParsingTest1()      {        String jsstring = '{"totalsForAllResults": {"users": "2"}, "rows":          [["San Francisco","358","375"],["San Jose","358","375"],["Mid          Peninsula","358","375"],["Greater Bay","358","375"],["Los          Angeles","358","375"]]}';        Test1Wrapper tw = new Test1Wrapper();        tw =         (Test1Wrapper)System.JSON.deserialize(jsstring,Test1Wrapper.class);        system.debug('Result : '+tw);      }     public class Test1Wrapper    {      public map<string,string> totalsForAllResults { get; set;}      public list<rows> r1 { get; set; }    }     public class rows    {       public string n1 { get; set; }       public string s1 { get; set; }       public string s2 { get; set; }    }     }

How can I deserialize this json object:      {     "response": {         "count": 1,         "benchmark": 0.22567009925842,         "requests": [             {                 "request": {                     "id": 537481,                     "image_thumbnail": "",                     "title": "Request for new bin(s) - residential",                     "description": "Propmain ref  3234-1114",                     "status": "submitted",                     "address": "36 Pine Tree Close",                     "location": "Peterborough, England",                     "zipcode": "PE1 1EJ",                     "user": "",                     "date_created": 1417173208,                     "count_comments": 0,                     "count_followers": 0,                     "count_supporters": 0,                     "lat": 52.599967,                     "lon": -0.233482,                     "user_follows": 0,                     "user_comments": 0,                     "user_request": 1,                     "rank": "0"                 }             }         ],         "status": {             "type": "success",             "message": "Success",             "code": 200,             "code_message": "Ok"         }     } }   What i've tried:   Map<String,Object> rawObj = (Map<String,Object>) JSON.deserializeUntyped(jsonString);     Map<String,Object> responseObj = (Map<String,Object>)rawObj.get('response');     List<Object> reqs = (List<Object>) responseObj.get('requests');     System.debug('Map Size = ' + reqs.size());     Map<String, Object> i = new Map<String, Object> ();     for (Object x : reqs) {          i = (Map<String, Object>)x; }     Map<String,Object> requests = (Map<String,Object>)i.get('request');     System.debug('Map Size = ' + i.size());     for (String field : i.keySet()){          Object id = i.get(field);         Object title = i.get('title');         System.debug('Id : ' + id);         System.debug('title : ' + title);          //System.debug('Title : ' + title);       }


so I recently found out how to rip game models from a game, thing is for the texures to come with them I had to texture them in 3ds max. I use blender to animate so I was wondering if there was a way, if any to get the model from 3ds max with the textures on it. I tried doing it a few different ways but the texures were all messed up when i put them on the model. any ideas?  before you mark as a duplicate I know how to get the model in blender, I do not know how to make the textures correct on the model once it's in blender

I've tried to import but I don't see the (.max) file as an option when importing. Is there another way to import the 3DMax model into Blender for rigging and animation?


I created a self-signed certificate with OpenSSL. When using the -purpose parameter to examine the certificate I see some warnings in the output. Can someone explain this warnings ?  C:\OpenSSL\keys>C:\OpenSSL\bin\openssl x509 -in ca.crt -purpose Certificate purposes: SSL client : Yes SSL client CA : Yes (WARNING code=3) SSL server : Yes SSL server CA : Yes (WARNING code=3)

I tried to find my root CA today and went through all my certificates using openssl x509 -in /path/to/certificate -purpose.  As I found what should be my root CA I got this output:  Certificate purposes: SSL client : Yes SSL client CA : Yes (WARNING code=3) SSL server : Yes SSL server CA : Yes (WARNING code=3) Netscape SSL server : Yes Netscape SSL server CA : Yes (WARNING code=3) S/MIME signing : Yes S/MIME signing CA : Yes (WARNING code=3) S/MIME encryption : Yes S/MIME encryption CA : Yes (WARNING code=3) CRL signing : Yes CRL signing CA : Yes (WARNING code=3) Any Purpose : Yes Any Purpose CA : Yes OCSP helper : Yes OCSP helper CA : Yes (WARNING code=3) Time Stamp signing : No Time Stamp signing CA : Yes (WARNING code=3)   It seems that some parts of linux or its tools are not as well documented as one thought. It could find no answer to this question not even this site could answered it three years ago ().  I hope that times have changed and someone here is now capable of answering the question what that WARNING code=3 is all about. Maybe also supplying a list of all possible warning messages and their cause, if there is such.


I am a non-EU student studying in Barcelona and have a valid residence permit of Spain. Currently, I am in Venice as an exchange student and I want to apply for UK Standard Tourist Visit Visa.   Can apply for UK Standard Tourist Visit visa from their authorities in Italy, instead of going to Spain & applying?  I couldn't find any information on the UK website about this.

I am an Indian citizen, studying in the USA on an F1 visa that expires in 2019.   I was hoping to visit England for a couple of weeks on my way back home to India in June, but I do not have a valid UK Tourist visa. I was wondering if I could apply for the visa from the USA itself.


$$(xy+x\ne -1 \land yz+y\ne-1 \land zx+z\ne -1 \land xyz=1)\\ \implies \frac x{xy+x+1} + \frac y{yz+y+1} +\frac z{zx+z+1} = 1$$ I tried finding each variables value using $xyz=1$ $(ex.x=1/yz)$ , and then replacing them but didnt really get anything. Then i tried writing the $1$s as $xyz$ and i could simplify some of them but still nothing. Thank you in advance


I guess the easiest way to prevent sql injection on PDO::Query which take arguments from the user is to use PDO::prepare and PDO::execute. However in my case I have an insert statement which takes a param from user. For this purpose I'm using PDO::exec. Below is not the exact code.  $db = new PDO("Connection String to connect to MSSQL"); $rowsAffected = $db->exec("Insert into MyTable (UserParam) Values($userParam)");   How can I prevent an sql injection on this?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have a set of land-use maps that I created years ago in ArcMap (see image attached), I need to do more work using them but I have since lost the shapefiles. Is there any way in ArcGIS that I can break this image into polygons based on the different colours of the image? Or do I need to redraw them all by hand?

I was wondering whether there's a way to classify simple non-spectral TIFF images in ArcGIS (maybe based on similar colour values of image pixels like graphic software applications such as Photoshop can do)?


I have a new MBP with 10.9 installed on it.  I normally work by swapping between desktops that have a specific function (like one has Mail.app and Cal.app running on it).  Once I started using mavericks I noticed that when I'd click on a dock icon, the order of the desktops is rearranged.  I do not think this is how things worked on 10.7, but as I no longer have that machine, I can't confirm.   Is there a way to disable this behavior because it's very annoying.

When you have several desktops open, each program in a different one, let's say Firefox in Desk 1 and Finder in Desk 5. When you open a file in Finder that opens in Firefox, it moves desk 5 all the way over to desk two, shifting everything backwards.   How to you keep this in place so that opening files will open in their programs like normla, but never shift the desktops out of order?


On ajax success i have list of generated forms:   ...             success: function (data) {             $el.append('<form method="POST" class="submit_form">Name: '+data[i].namen+'          Id: '+data[i].id+'
   SomethignElse: '+data[i].se+'
 SomethingElse2: '+data[i].se2+'             <input type="text" name="id" value="'+data[i].id+'" id="id_test" />      <input type="button" class="submit_button1"  value="Add"/></form>
');     i = ++ i;             } ...   Also i have a click functionto submit this forms/form:   $(".submit_button1").click(function(){ //do something });   but nothing happens on click. Is it possible to submit in this way?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have been trying to customize the ribbon with more options like smart tool tabs, chart tool tabs, add-ins, blog post etc. But the only tabs that appear on the ribbon are view and developer. Anything after that won't appear on the ribbon at all. Any help would be appreciated as I have tried everything possible. The version of Office I am using is Office Standard 2013. I have already tried the options in a similar question, but the problem is that it doesn't create a grouping which I expect would be created if I use Customize the Ribbon option.

How can I control which tabs are available to be opened in the MS Word 2010 ribbon?  Under Word Options > Customize Ribbon > Main Tabs there are several groups checked (Blog Post, Insert (Blog Post), Outlining, Background Removal), but they don't appear on the ribbon even though there is space for them. How is one supposed to turn them on or get to them?  The one in particular I'm after today is the Blog Post tab, which I know I can get to in a round about way via File > New > Blog Post Template. However I don't want a new post, rather an old one, which means File > New > Blog Post Template > Open existing > [select from list] > [close new blog post window] > [slap No I don't to save darn it]. Extra work for nothing is irritating; how do I get Blog Post (or Outlining or ...) to show up in that nice empty space next to AddIns?


Tried installing windows with a installation CD, i deleted some partitions because it was an unknown partition (which was used by ubuntu) then the installation failed.Now whenever i boot up my laptop i get a unknown file system grub rescue error. What can i do that will fix this error? Is there anything i can do?  I have already tried installing windows xp, but it doesn't identify any hard drives. I've placed a ubuntu installation dvd in the disk drive, but i don't get the prompt to boot from disk. i've also tried going into the grub menu by holding the shift key. It'll say grub loading, followed by unknown file system.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


A pop up window appeared on my phone ,about some wifi booster simuntaneously an other window got on and told that my phone was infected by an virus ,but my antivirus was active and then i scaned my phone but it was clean . Please explain did my phone really have a virus in it?

I have just received a message from an Android app on my phone saying my phone has been infected with a virus and to click a link to fix the problem.   I'm not sure I trust this, is it possible to have a virus on Android?


I am currently reading "Quantum Field Theory for the Gifted Amateur". In chapter 2 Phonons are introduced as solutions (in k-space) of a coupled harmonic oscillator. In real space the oscillator is coupled, but apparently not in k-space (after doing a Fourier-Transform on the x,p Operators). During the solution the author used periodic boundary conditions but I don't see why they should accurately describe a finite crystal that is not shaped like a ring.  In a different book the solution was also obtained with periodic boundary conditions.  Are more realistic boundary conditions impossible to solve? I would have guessed that we assume that the wave-function (of the phonons) is supposed to be zero outside of the lattice instead of this infinite periodic behaviour.  A fininte crystal might be very different than a infinite crystal (interpreation of the periodic boundary). They seem like two completely different systems. Why do we use periodic boundary conditions and how accurate is this?

The cyclic  says that if we consider a one dimensional lattice with length $L$, and if $\psi(x,t)$ is the wavefunction of an electron in this lattice, then we can say that $\psi(x+L,t) = \psi(x,t)$ for every $x$. Applying this boundary condition leads to correct solutions for $\psi$. This boundary condition can also be generalized to three dimensional lattices and can be applied when working with phonons instead of electrons.  I wonder if there is a reasoning why these boundary conditions can be applied. They appear to me as elegant boundary conditions, but I don't see any reason why these conditions could be applied. Can we derive the Von Karman boundary conditions or are they just an experimental result?


The additive group of rational numbers is not isomorphic to the multiplicative group of positive rational numbers. How should I show this? What structural property does the first group possess that the other does not?

A question that may sound very trivial, apologies beforehand. I am wondering why $( \mathbb{Q}_{>0} , \times )$ is not isomorphic to $( \mathbb{Q} , + )$. I can see for the case when $( \mathbb{Q} , \times )$, not required to be positive, one can argue the group contains elements with order 2 (namely all negatives). In the case of the requirement for all rationals to be positive this argument does not fly. What trivial fact am I missing here?


$\DeclareMathOperator{\tr}{\mathrm{tr}}$ Is the inequality in title true for non-negative definite matrices?? I could neither prove this result, nor provide a counter example.  Context  I was trying to prove that Frobenius norm is a matrix norm, i.e. $$||AB||_F\le||A||_F\cdot||B||_F\\ \iff\tr(B^\top A^\top AB)\le\tr(A^\top A)\cdot\tr(B^\top B)\\ \iff\tr(A^\top ABB^\top)\le\tr(A^\top A)\cdot\tr(B B^\top)$$ Now if that happens for all positive definite matrices $A$ and $B$, that means trace of product of two non-negative definite matrices is less than or equal to the product of their traces.  Please help, and provide a proof of this result which doesn't rely on the multiplicative inequality for Frobenius norm (since that result is proved to be equivalent to it, and I don't know the proof of that result).

Let $A$ and $B$ be two arbitrary matrix with proper dimension for multiplication.   Consider this trace inequlaty which is trace of multiplication of two matrices versus their individual traces  $$\text{tr}(AB) \leq \text{tr(A)}  \text{tr(B)}$$   1- Do we have result for rectangular matrix that satisfy this inequality?  2- If they were square matrices what are the conditions?  3- Is there any specific name for this inequality?


How to add custom validation ("daterangerequired") of date range picker input controls to method $.validator.addMethod().
   <input class="form-control input-sm from_date" name="Experience2" placeholder="Select First Date" aria-invalid="false">   to   <input class="form-control input-sm to_date" name="Experience2" placeholder="Select Secound Date" aria-invalid="false">

How can I specify a custom date formate to be validated with the  for jQuery?


I 'm planning to apply for Masters in Computer Science (Non-thesis). I 'm wondering if both, pregnancy and school, can be managed at the same time. Or is better to wait until I get my baby and then apply for the school. I 'm trying to learn from others experiences.

I've seen a lot of "kids-in-grad-school" advice that's geared towards male PhD students with stay-at-home wives. I'm a female MD PhD student married to a male MD PhD student, and neither of us is going to quit our career. We are both willing to put in the time needed to raise a family.   I'm interested in hearing from the following perspectives (EDITED FOR MORE DETAIL): (a) For women who had kids while they were in graduate school -- how did you decide on when to have kids? earlier in grad school vs. later? (since pregnancy can be very difficult for some women e.g. severe morning sickness, I think optimal timing could potentially differ depending on if the grad student is male or female.)  Also, how did you approach being pregnant in an academic environment? (i.e. did anyone harass you as being 'less dedicated'? I know this is not a reason NOT to have kids, but I'm just curious about it. Men who are expecting a child can keep it a secret. Women can't keep it a secret because everyone they meet including total strangers can see that they're pregnant after a certain point.)  (b) For men or women who had kids while they were in graduate school and did NOT have a stay-at-home partner - how did you deal with childcare? Reason for asking: if you have a stay-at-home partner, childcare for the bulk of the day has already been solved. If you don't have a stay-at-home partner, it's a very big issue.  So - what approach did you take? (e.g. alternating schedules between caregivers? nanny? au pair? daycare? relatives? friends? babysitters?)  This question is different from   because the vast majority of those answers are written from male perspectives and from perspectives of people with stay-at-home partners.


Assume that I have the following function  public static bool RequiresQuotes(this SqlDbType sqlType) {     switch (sqlType)     {         case SqlDbType.Char:         case SqlDbType.NChar:         case SqlDbType.NText:         case SqlDbType.NVarChar:         case SqlDbType.Text:         case SqlDbType.VarChar:         case SqlDbType.Xml:         case SqlDbType.DateTime:         case SqlDbType.SmallDateTime:         case SqlDbType.Date:         case SqlDbType.Time:         case SqlDbType.DateTime2:         case SqlDbType.DateTimeOffset:             return true;         default:             return false;     } }   Does it make a performance difference to return true for each case rather than the above, or will it be optimized by the compiler?  For example if I call SqlDbType.Char.RequiresQuotes(); will it check all cases until it reaches SqlDbType.DateTimeOffset and then returns true or will only check the first case and then return true?

What is the benefit/downside to using a switch statement vs. an if/else in C#.  I can't imagine there being that big of a difference, other than maybe the look of your code. Is there any reason why the resulting IL or associated runtime performance would be radically different? Related:


I just answered my own question  (GeoPheonix answered in the comments but didn't provide a full answer), and the string in the code isn't displaying correctly:    This may seem like a minor nitpick but in this case it could cause confusion as the issue was related to the ?>.  (and as we all know, )

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


First, It's not a duplicate post. I have already tried the methods written for different phones like  but it's for LG and Samsung phones.  Also, I have watched  but "Maps" is not shown as an option along with cut and copy.  Please help me get this phone to work.

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


If the product of $n$ positive real numbers is $1$.Then prove that their sum is never less than $n$.

I've seen a question in my math book with this explanation above it: "If the product of n positive real numbers is 1, then the sum of these numbers must be more than n". I was wondering if this is correct, and if it is, could someone give an explanation or a proof for it?


If $X$ is a continuous random variable with positive values,find it's Cumulative distribution function (CDF) and it's probability density function (PDF) for $$Y = \sqrt{X}$$  This was a detable question on another topic so I made it a seperate one.  Can someone explain how do we solve this problem to it's end? (putting some theory/ explanations in between would be appreciated. My goal is to understand the concepts that are behind this and be prepared for problems of equal difficulty). Thank you.       Added by A.F. This was originally the "third pattern" of .  Possible solutions may exist on the linked question.

There is a pattern excercise:  First pattern: We have $X$ and the probability density function is usually:  $$ f(x) = \begin{cases}   {ax+bx^2} &  {0\lt x \lt 1} \\   0 & \text{else}   \end{cases} $$  Then we are given $E|X| = 0.6$   And usually asks to find:  a) $P\{X>0.5\}$  b) $Var(X)$    Second pattern:  $$ f(x) = \begin{cases}   {cx^4} &  {0\lt x \lt 2} \\   0 & \text{else}   \end{cases} $$  Where c is a constant. Find:  a) Mean value of $X$  b) Variance of $X$     Third pattern (it's more like a reverse problem):  We are given $Y= \sqrt{X}$, find it's cumulative distribution function (CDF) and  it's probability density function (pdf).    Update:  The third one is transferred to a .  This is not homework. I'm self-studying and in need of some help. Thank you.


Decide $y$ For a certain complex number $z = x+ iy$ so that $$\sin(z) = 2?$$  What I think to have realised is that I need to write it in the form $$e^{x+iy}$$ but can't seem to find a way how.

I'm trying to find all $z\in \mathbb C$ with $\sin z = 2$ but I'm stuck.  I tried writing $\sin z = {e^{iz} - e^{-iz}\over 2i} = 2$ and then writing $z = x + iy$ but the expression I got was $e^{ix}e^{-y} - e^{-ix}e^{y}=4i$ and I don't see how it's possible to solve this for $x$ and $y$.     Please could someone tell me how to calculate the inverse values of   the complex sine function?   I had also tried letting $w=e^{iz}$. Then I got the quadratic   $$ w^2 - 4i w + 1 = 0$$  and using the formula for quadratics I got  $$ w_{1,2} = {4i \pm i \sqrt{20}\over 2}$$  Taking the logarithm I got  $$ i z_{1,2} = \ln{{4i \pm i \sqrt{20}\over 2}}$$  whereas I should be getting   $$ z = ({\pi \over 2}  + 2\pi k ) - i \ln(2 \pm \sqrt{3})$$  for $k \in \mathbb Z$.


In general relativity, the energy-momentum tensor is written as   $$ T^{\mu \nu } \sim \frac{1}{\sqrt{|g|}}\frac{\delta \mathcal L}{\delta g_{\mu\nu}},$$  while in field theory it is written as   $$ T^{\mu}{}_{ \nu } = \frac{\delta \mathcal L}{\delta \partial_{\mu} \phi} \partial_{\nu} \phi - \delta^{\mu}_{\nu} \phi .$$   I am having trouble reconciling these two expressions. Also since diffeomorphisms, and hence translational invariance, are a gauge symmetry in general relativity, how can there be a non-zero conserved current for translational invariance, i.e. the energy-momentum tensor?

What is the correspondence between the conserved canonical energy-momentum tensor, which is $$ T^{\mu\nu}_{can} := \sum_{i=1}^N\frac{\delta\mathcal{L}_{Matter}}{\delta(\partial_\mu f_i)}\partial^\nu f_i - \eta^{\mu\nu}\mathcal{L}$$ (the four conserved Noether currents corresponding to four possible spacetime translations)  where $\{f_i\}_{i=1}^N$ are the $N$ matter fields in the theory, and we assume $f_i\mapsto\alpha^\nu\partial_\nu f_i$ for translations,  and stress-energy tensor from the Einstein-Hilbert action, which is: $$ T_{\mu\nu}\equiv-\frac{2}{\sqrt{-g}}\frac{\delta\mathcal{L}_{Matter}}{\delta g^{\mu\nu}} $$   In particular, how do you get that the two are equal (are they?) for Minkowski space, for which there is no variation in the metric?


I am testing two predictive models,  Each of them in 10 experiments.  I therefore have 10 ROC curves (with AUC) for first experiment and 10 ROC curves for second experiment.  How to compare these series and see if difference between them is statistically significant ?   How to get confidence intervals / P value ?

I have a test set of 100 cases and two classifiers.  I generated predictions and computed ROC AUC, sensitivity and specificity for both classifiers.  Question 1: How can I compute p-value to check if one is significantly better than the other with respect to all scores (ROC AUC, sensitivity, specificity)?    Now, for the same test set of 100 cases, I have different and independent feature assignments for each case. This is because my features are fixed but subjective and provided by multiple (5) subjects.  So, I evaluated my two classifiers again for 5 "versions" of my test set and obtained 5 ROC AUCs, 5 sensitivities and 5 specificities for both classifiers. Then, I computed the mean of each performance measure for 5 subjects (mean ROC AUC, mean sensitivity and mean specificity) for both classifiers.  Question 2: How can I compute p-value to check if one is significantly better than the other with respect to mean scores (mean ROC AUC, mean sensitivity, mean specificity)?    Answers with some example python (preferably) or MatLab code are more than welcome.


Is it possible to put pairwise disjoint open 3d-balls with radii $\frac{1}{2},\frac{1}{3},\frac{1}{4},\dots$ inside a unit ball?    not an original question,  I found it somewhere in the internet once, but without any answer.

This problem occurred to me when I came across a similar problem where the radii were taken over only the primes. That question was unanswered, but it seems to me infinitely many circles of radius $1/2, 1/3, 1/4...$ can fit into a unit disk. The area of all those circles would be $\pi \sum_2^\infty 1/n^2 = \pi^3/6 -\pi$, which is less than the area of the unit disk $\pi$. But can the circles actually be packed with no overlaps?


I encountered a problem with emission light and shadow I get after rendering. Namely, I create the cell light as you can see in screenshot, and gave them emission material as light source. Also, I create reflection background plate.  I tried everything in Cycles mode of rendering...without Denoising (I get really grainy render), with Denoising default setup (grainy effect just get blurred but it's still visible)...increasing the Radius value to max (I get combination of grainy and blurry render).    Any suggestion, what to change to get clear photo realistic image?  Thanks.

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


Recently my Smartphone (Lenovo Vibe X3) stolen by someone. It’s very painful for me. When it was stolen, I was able to ring my phone till 10-15 min but that time I was not able to sign in my gmail account on desktop computer so that I can track it using Android Device Manager. My phone was locked with fingerprint and patterns both. And some apps were locked with App Locker..  After 2-3hrs, I was able to sign in my gmail on the same desktop computer and with the same password but Android Device Manager couldn’t locate device. I don’t know how that stealer manipulated everything. Even an anti-theft application was also installed. However, it couldn’t be traced.  I request to all expert users for assisting me for two concerns. Is it possible to trace device with IMEI? Please let me know, how to do this? How to tackle such problems? And Please let know some best apps that can trace a device even with IMEI and mobile GPS.  I complaint to nearest police station but it doesn't seem helpful. That's why I need assistance from expert user. If stealer removes my gmail account from phone but GPS is ON, in that case will ADM work?  I have gone through a . Is it helpful for an android device, if these are installed before device lost/theft?   Apart from this please provide me better tips & tricks.  Regards GNS

I have lost my Android Phone. How can I track it via IMEI number.   Can I install any application which can given me the number of SIM currently on given IMEI number.  Please help


Given the following code (a reduced situation of a complexer code):  #include <type_traits>  template<unsigned i> struct index_st {     using type = void; };  struct pack {     template<unsigned index>     static typename index_st<index>::type get();      template<unsigned index>     using unpack_t = decltype(get<index>()); };  template<typename P, unsigned index> struct unpack {     using type = typename P::unpack_t<index>; };  int main() {     unpack<pack, 3> u; }   The following compilation error is thrown by gcc (4.8.1):  sample.cpp:21:38: error: expected ';' before '<' token      using type = typename P::unpack_t<index>;                                       ^ sample.cpp:21:38: error: expected unqualified-id before '<' token sample.cpp: In instantiation of 'struct unpack<pack, 3u>': sample.cpp:26:21:   required from here sample.cpp:21:38: error: 'typename pack::unpack_t' names 'template<unsigned int index> using unpack_t = decltype (get<index>())', which is not a type   My objetive is getting the type returned by pack::get<index>() inside the unpack structure.  I've tried to do it with and without the using statement, using std::result_of and other combinations, but in all cases, I was not capable to get the return type of get (a parametric member function).  What is the correct way to do it?

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I have installed intermediate certificate on server according to all tutorials for IIS, that is: "Certificates MMC snap-in, you choose computer store, you'll have the option to place the intermediate certificates"  When I access the service on server machine the certificate chain is correct (root cert -> intermediate cert -> my cert). However when I'm trying to access this page from client site I see only my cert in certificate chain (meaning there's no intermediate cert).  If I understand correctly (from what I've read in different topics here) I should install intermediate cert only on server machine and it should be sent to clients, no need to install intermediate cert on client machines? Is this right?

We have a GlobalSign Domain certificate for our domain. I've installed the certificate into IIS and added the GlobalSign Domain Intermediate certificate to the Intermediate certification authorities for the local computer  It seems that IIS is not sending through the intermediate certificate (causing an error in firefox), just the domain certificate. I've verified this with OpenSSL and also various websites including GlobalSign's own health checker.  Looking In IIS, I can follow through the chain and each certificate is "ok", without the option to install any indicating they already are.  Any ideas on what may be wrong?


I have XML file like this  <?xml version="1.0" encoding="UTF-8" standalone="no"?>     <linearlayout layout_height="match_parent" layout_width="match_parent" orientation="vertical">   <textview layout_height="wrap_content" layout_width="match_parent" text="Hello XML!"/>   <button layout_height="wrap_content" layout_width="wrap_content" text="Click Me"/> </linearlayout>   and i want each attribute of element be on it's own line like this  <?xml version="1.0" encoding="UTF-8" standalone="no"?>     <linearlayout    layout_height="match_parent"    layout_width="match_parent"    orientation="vertical">   <textview      layout_height="wrap_content"      layout_width="match_parent"      text="Hello XML!"/>   <button      layout_height="wrap_content"      layout_width="wrap_content"      text="Click Me"/> </linearlayout>   how can i do this using java ?

I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?  String unformattedXml = "<tag><nested>hello</nested></tag>"; String formattedXml = new [UnknownClass]().format(unformattedXml);   Note: My input is a String. My output is a String.   (Basic) mock result:    <?xml version="1.0" encoding="UTF-8"?> <root>   <tag>     <nested>hello</nested>   </tag> </root>


I'm puzzled by      For 2019, the IRS defines a high deductible health plan as any plan with a deductible of at least $1,350 for an individual or $2,700 for a family.    That's understandable.  My in-network deductible for individuals is $1,500 and $3,000 for family, so the plan qualifies as HD.     An HDHP’s total yearly out-of-pocket expenses (including deductibles, copayments, and coinsurance) can’t be more than $6,750 for an individual or $13,500 for a family.   This seems to imply that the OOP must be less than $6,750, and that seems completely bass-ackwards.  Thus, am I reading it wrong, or is the regulation completely bass-ackwards?

In order to be eligible to make tax deductible contributions to an HSA account, you must have a qualifying HDHP (High deductible health plan). Among the requirements, is a deductible and max OOP within certain limits, which for 2016 has an upper bound of .  From my point of view, if the deductible and/or max OOP was higher than that, you still would have a "High deductible health plan". Perhaps it could be thought of as "Extremely High", but you would no longer be eligible to contribute to an HSA, which seems generally unfair to me. To make matters worse, the ACA plans available on the exchange are allowed to have a max OOP of $13,700, and after doing a quick search of them yesterday, it turns out that the majority of the plans are maxed out at $13,700, and thus are incompatible with an HSA.  What are the reasons for having an upper bound on the deductible of a qualifying HDHP? Is the fact that the exchange plans have a higher deductible just a mishap?


I have a maybe silly question. Let's take the example below. class Myclass():      def __init__(self):         pass      def function_1(self):         print("1")      def function_2(self):         print("2")  variable = "1"  if variable == "1":     Myclass().function_1() if variable == "2":     Myclass().function_2()  Would it be possible to replace the "if" conditions with something like: Myclass().function_{0}().format(variable)  If yes, how ?

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I am working on this problem, but I am not able to simplify the expression.   So please help me.  Thanks in advance

How to prove the following trignometric identity? $$ \cot7\frac12 ^\circ = \sqrt2 + \sqrt3 + \sqrt4 + \sqrt6$$  Using half angle formulas, I am getting a number for $\cot7\frac12 ^\circ $, but I don't know how to show it to equal the number $\sqrt2 + \sqrt3 + \sqrt4 + \sqrt6$.  I would however like to learn the technique of dealing with surds such as these, especially in trignometric problems as I have a lot of similar problems and I don't have a clue as to how to deal with those.  Hints please!  EDIT:  What I have done using half angles is this: (and please note, for convenience, I am dropping the degree symbols. The angles here are in degrees however).  I know that $$ \cos 15 = \dfrac{\sqrt3+1}{2\sqrt2}$$  So,   $$\sin7.5 = \sqrt{\dfrac{1-\cos 15} {2}}$$ $$\cos7.5 = \sqrt{\dfrac{1+\cos 15} {2}} $$  $$\implies \cot 7.5 = \sqrt{\dfrac{2\sqrt2 + \sqrt3 + 1} {2\sqrt2 - \sqrt3 + 1}} $$


Hello Ubuntu Community,  Ok so basically, I had a dual boot and yesterday I deleted the linux partition not thinking about what could happen. All was fine till today because I restarted my pc. As I started my pc I got into the grub rescue menu. I was a bit confused as of why it still exists so I searched online. I found some videos but those weren't really helpful because I would need a Windows USB/CD or a Linux live USB/CD. So right now I am pretty much stuck without any ideas on how to continue with this problem. I am a starter at linux and all that, I honestly just wanted to try it out because of the AMD Drivers  Thanks for helping!

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


In my astro class we are learning about red/blue-shifting and I was wondering how to related to stars. So if a star is moving in some direction, the light leaving the direction of motion would be blueshifted, while the light coming out the back of the star would be red-shifted. The problem is then, doesn't the light leaving in the direction of motion carry more momentum due to its lower wavelength. So we have an unbalanced situation. So shouldn't the star slow or even stop over time?  My intuitive guess is that it has something to do with the two different relative frames, one from the star and one from an external observer. That or something do with with the changing mass of the star? Like it really is slowing down but it is losing mass at the same time so it balances out.  Not really expecting an answer but just wondering where my thinking is wrong.

From what I understand, the frequency of light coming from the source moving towards an observer increases. From $ E=hv $ , this implies increase in energy of photon.  What really is confusing, is where does that extra energy come from? And also where is the energy is lost during opposite Doppler effect (red shift)? Why doesn't this violate the conservation of energy?


I need to know how to install Google Chrome and how to use terminal on Ubuntu 14.04.

How do you install Google Chrome on Ubuntu?


The following indicates the expression "true instanceof Boolean" evaluates to false. Why would this expression evaluate to false?    $(document).ready(function() {      var $result = $('#result');      if(true instanceof Boolean) {     $result.append('I\'m a Boolean!');   } else {     $result.append('I\'m something other than a Boolean!');   } });

"foo" instanceof String //=> false "foo" instanceof Object //=> false  true instanceof Boolean //=> false true instanceof Object //=> false false instanceof Boolean //=> false false instanceof Object //=> false  12.21 instanceof Number //=> false /foo/ instanceof RegExp //=> true  // the tests against Object really don't make sense  Array literals and Object literals match... [0,1] instanceof Array //=> true {0:1} instanceof Object //=> true  Why don't all of them? Or, why don't they all not? And, what are they an instance of, then? It's the same in FF3, IE7, Opera, and Chrome. So, at least it's consistent.


i wanna  create folder in  one  of  my hard disc partition but  i  can't because I'm not  the  owner. How do I do this?

I have a number of drives internal and external. Some are partitioned. Most mount automatically at boot (all did at one point).    One partition is owned by root and therefore does not mount automatically. I know how to mount it as root.   I do not know how to take ownership of that partition as user X. I have tried changing permissions using the gui in Nautilus as root. They are not accepted and immediately revert.  The partition is NTFS. The other parition on that drive is owned by me as user and mounts automatically


Apart from obvious performance considerations, is there any mathematical or crypto reasons that imply that we sign a hash rather than a raw content ?  I read that it was because the hash must fit in the modulo size, but on the reverse when one encrypt with a public key RSA, the "size" doesn't seem to be a problem (ex: I never heard something like "we can't encrypt a file bigger than 256 bytes using a RSA public key").  Apart from performance/optimization, why don't we sign raw byte x509 certificate rather than hash ?

The  below illustrates the process of  a message with RSA:    As diagram shows, the message is first hashed, and the signature is then computed on the hash, rather than on the full message.  Why hash the data before signing it? Why not sign the whole message? Of course, it'll save time if you sign just the hash value, but I've heard there are also security issues with directly signing the full message. If so, what are they?


As a feature request, I would ask that you please add support for iPhone X.   Currently the app doesn’t use the entire screen. This would be immensely helpful.

The Stack Exchange app doesn’t look very good on Apple’s brand new flagship phone yet.    Also the app can’t identify the device model either. (Says Unknown (iPhone 10,3))   App Version: 1.6.6.2 Device: iPhone X (iPhone10,3) OS Version: Version 11.1 (Build 15B93)


I am using a template on overleaf () and I wrote the entire document. I had created a png file, with the same size of a page, to put on the cover, but I can't. The picture is inserted within the page a yet consider the margin, so the image stand dislocated from the upper left corner. I had created a .pdf with the image but the same problem appears. For those examples I used changepage, pdfpages packages and I wrote within the environment titlepage. I couldn't find any other question that assembles with this one. I want to put a png file into the first page of the document ignoring margins and other things that this template automatically puts on the page.

I am generating one report where I need to use background image. But I found that image always starts leaving some margin space to left side.    \documentclass{article} \usepackage{wallpaper} \usepackage{mdframed} \usepackage[top=2cm, bottom=2cm, outer=0cm, inner=0cm]{geometry} \begin{document}  Some content \ThisLRCornerWallPaper{1.0}{image.jpg} \end{document}    How can I use background image covering whole page?


Is it possible to dynamically rename spaces, (as if I was renaming a folder or file), so I can write small descriptions of the ongoing project contained in each?

The default new desktop space is named 'Desktop 1'. If you create a new one, it is named 'Desktop 2'. Is there a way to change those default names to something more meaningful?  Additionally, it looks like you can't rearrange spaces either and the 'automatically rearrange spaces based on most recent use' checkbox seems to do nothing.


$$y'+P(x) \cdot y=Q(x)$$  Why it's called Linear Differential Equation? The function y might be curved.

My mother is teaching a high school course on multivariable calculus, and they were studying linear differential equations of the form $$y' + P(x) y = Q(x),$$ and the question of why this equation is called "linear" came up.  In terms that these students are familiar with, since they haven't been exposed to linear algebra yet, my thought was to say that the equation for a line, $y = mx+b$, is "linear" in $x$ (ignoring the technicality that it's actually an affine equation, not a linear one), because it's in the form "coefficient times $x$", and then we allow another term which is just a lonely coefficient. And then we extend this notion to saying that the above differential equation is "linear" in $y$ and $y'$, but this time the coefficients are allowed to be functions of $x$.  That's probably a good enough hand-wavy explanation to help students remember the definition, at the very least. I couldn't really think of a good reason why it "should", a priori, be kosher to allow coefficients to be functions of $x$ here. At that point it seems to me like you just have to get into the linear algebraic definition of linearity, which, being completely foreign to the students... it just seems to be a bit too deep of a rabbit hole for this purpose.  So my question is: does anyone have a better way of approaching this? And if you think my hand-wavy explanation above is largely acceptable, is there a way you can explain why multiplying by non-constant functions of $x$ "should" still be considered linear in $y$?


We have been living in Saudi Arabia ..       We have lived in Saudi Arabia   ...   What is the difference between them, or they are the same in meaning ?  And what do you understand, when you hear these two sentences?

Here I know I have one present perfect and present perfect continuous sentence.   I have lived in Europe for 2 years. I have been living in Europe for 2 years.   Can you use both of them interchangeably? What is the exact difference between them? To me both suggest that the person is still living in Europe.


I opened before some laptop batteries. But this is the first time I see it. This is an IBM ThinkPad cell battery.  See picture below, the two pins to the left are connected, resistance between left-right pins is around 46 ohm (45.9 & 45.3).  What could be? What it does? What the main benefit of using it here?   The way it was mounted on the top of transistor, may be indicate something. As requested by PlasmaHH. Resistance raise with temperature, I used a cigarette lighter, 45.9 → 46.6 & 45.3 → 45.9 . Not much change in the freezer, 45.9 → 45.8 & 45.3 → 45.2 .     Closeup:

Attached you find photos of a Li-Ion battery's PCB. I'd like to know what this component is called and what its use is.  The component in question is the three pin stretched silver "bridge". The white blobs seem to be glue, while the black things you see are ICs. There is nothing beneath the brownish center of the component.