I'm aware that you can use an action in combat in order to ready a specific response to be performed as a reaction when a certain event triggers it.   But what if I'm in a situation where combat hasn't begun, and want to ready an action?  Take this situation for example   I approach bandits in a tavern (No combat yet) I confront them and sense that things are about to get violent So I ready a firebolt spell (Before Initiative Rolls) and set it to trigger as my reaction when I see one of them draw their weapon   But since combat hasn't started yet, and I'm in no position to ambush, can I get a head start by readying an action before SHTF.  And if so can I set it to trigger as a reaction to them drawing their swords to begin combat, and fire at one of the bandits before they can react  What happens? Does it count as some sort of opportunity attack, or does it trigger as an bonus/extra attack/reaction/action on my first turn. or is it something else entirely?  In other words, do I have to be in combat in order to take the "ready" action, or can I do so before initiative has been rolled and still gain its benefits.   If I can take the action it before initiative is rolled, does my readied action trigger immediately after the bandit draws his weapon (as described above) or what?

Can players in 5e ready an action before combat begins? If so, does this impose any penalties?  (, but it is written for 4e and IMO the answer left something to be desired)


Find all groups of order $121$ up to isomorphism.  if i'm right, all such groups are abelian groups, since this is $p^2$ for $p$ = $11$ and $11$ is prime.  there's only one, isn't there? isn't it just $\mathbb{Z}_{121} $ which is isomorphic to $\mathbb{Z}_{11} \times \mathbb{Z}_{11}$ ?

I just proved that any finite group of order $p^2$ for $p$ a prime is abelian. The author now asks to show that there are only two such groups up to isomorphism. The first group I can think of is $G=\Bbb Z/p\Bbb Z\oplus \Bbb Z/p\Bbb Z$. This is abelian and has order $p^2$. I think the other is $\Bbb Z/p^2 \Bbb Z$.   Now, it should follow from the fact that there is only one cyclic group of order $n$ up to isomorphism that these two are unique up to isomorphism. All I need to show is these two are in fact not isomorphic. It suffices to show that $G$ as before is not cyclic. But this is easy to see, since we cannot generate any $(x,y)$ with $x\neq y$ by repeated addition of some $(z,z)$.  Now, it suffices to show that any other group of order $p^2$ is isomorphic to either one of these two groups. If the group is cyclic, we're done, so assume it is not cyclic. One can see that $G=\langle (1,0) ,(0,1)\rangle$. How can I move on?


I trying fluid simulator in Blender, and I wanted to make an animation where water flows from centre along to curve and screw along. How setup Inflow for this result:


I'm trying to understand how to solve the following problem:  I have to estimate each parameter of   $f(x)=pϕ(x│μ_1,σ_1^2 )+(1-p)ϕ(x|μ_2,σ_2^2)$  using maximum likelihood estimation. $ϕ(.|μ,σ^2)$ is the pdf of a normal distribution.  So, as I understand it, what I have to do is  $\mathcal{L}(\mu_1,\mu_2,\sigma_1,\sigma_2)= ∏_{i=1}^n\left(p\frac{1}{\sqrt{2π}\sigma_1i} e^{-\frac{(x_i-a_1i)^2 }{2\sigma_1i^2 }}+(1-p)\frac{1}{\sqrt{2π}\sigma_2i} e^{-\frac{(x_i-a_2i)^2}{2\sigma_2i^2 }}\right) = p^n(\frac{1}{\sqrt{2π}\sigma_1i})^n e^{-\frac{1}{2\sigma_1i^2}\sum(x_i-a_1i)^2}+(1-p)^n(\frac{1}{\sqrt{2π}\sigma_2i})^n e^{-\frac{1}{2\sigma_2i^2}\sum(x_i-a_2i)^2}$  Then $ln\mathcal{L}(\mu_1,\mu_2,\sigma_1,\sigma_2)= ln(p^n)ln(\frac{1}{\sqrt{2π}\sigma_1i})^n -\frac{1^2}{2\sigma_2i^2 }(x_i-a_1i)^2+ln((1-p)^n)ln(\frac{1}{\sqrt{2π}\sigma_2i})^n -\frac{1^2}{2\sigma_2i^2 }(x_i-a_2i)^2 $  Is this ok so far? If so, could you show me how to proceed from here?

I'm building a mixture model with the two normal distributions $\mathcal{N}(\mu_1,\sigma_{1}^{2})$ and $\mathcal{N}(\mu_2,\sigma_{2}^{2})$.  So, the density function is $$ f(x) = p_1 N(x; \mu_1, \sigma_1^2) + p_2 N(x; \mu_2, \sigma_2^2), $$ where $p_1+p_2=1$, and $$ N(x;\mu,\sigma) = \frac{1}{\sqrt{2\pi \sigma^2}}\exp\left\{-\frac{(x-\mu)^2}{2\sigma^2}\right\}. $$.  Suppose I have all the sampling data, is there some numerical solution or formula that could derive $p_1$, $\mu_1$, $\sigma_1$ and $p_2$, $\mu_2$, $\sigma_2$?


As I understand it this vulnerability is about browser behavior, would turning off javascript be a temporary mitigation against attack?

The current Meltdown Intel processor vulnerability is currently remedied by having the page table isolation enabled. There is a question how to turn this off:   My question is opposite: is there a way to check on a running system whether the PTI mechanism is effective on the system and thus the system is protected? I'm specifically looking for cat /proc/something or cat /sys/something, not checking for kernel version or config parameter or the like.


Show that $1/\sqrt{1} + 1/\sqrt{2} + ... + 1/\sqrt{n} \leq 2\sqrt{n}-1$ for $n\geq 1$  I attempted the problem but I get stuck trying to show that if the statment is true for some $k\geq1$ then $k+1$ is also true.  My attempt: Base case $n=1$ is true by inspection  Now assume the statement is true for some $k\geq1$. Then $1/\sqrt{1} + 1/\sqrt{2} + ... + 1/\sqrt{n} +1\sqrt{n+1} \leq 2\sqrt{n}-1 + 1/\sqrt{n+1}$ but I am not sure how to show the rest.

Prove that for any positive integer $n$, $$2\sqrt{n + 1} − 2 \le 1 +\frac 1 {\sqrt 2}+\frac 1 {\sqrt 3}+ \dots +\frac 1 {\sqrt n} \le 2\sqrt n − 1$$ Progress I think Riemann sum should be used for the middle term. I got the limit as $n\to \infty$ of the function inside using Riemann sum but what I cannot get are the lower and upper bound.


I want to play Dark Souls series. If I play the III before the others. Will I not understand the story (if there is a story, of course) or something else ?

Is there a significant storyline that progresses from the first game to the third game? Such a story line would cause a player who started with the first game to be incredibly confused, and causing the games to be linked in order. The alternative is that they are all based in the same world, and there are certain parallels I will miss not having played the other games, the latter I can live with, the former, not so much.


I am relatively new to Ubuntu and especially to using terminal commands. I love the system and regret not having discovered it years ago.      In playing around with it and tweaking my system (Ubuntu 13.04) I have somehow lost control of my terminal function. When I attempt to run a command in the terminal I get an error msg.:  E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/virtualbox.list E: The list of sources could not be read.   Is there any way for me to regain control of the terminal and/or stop the "virtualbox error?"

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


I'm in trouble with that thing.  public class Money {           String girl ;           Money mon ;       public void sorry (){           mon.girl = "Isabel" ; //I want to do that (here is basic part) but...                                 //..I get Null Pointer Exception       } }   How can i fix that problem? I really need the solve, if you'll help me I appreciate that guys.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm employed and will attend a conference in the UK but I can't figure out what kind of visa I should be applying for. In the gov.uk website its written I should be applying for a standard visitor visa, but in my application I don't have the option to pick a standard visitor visa.  What appears in my application is type visit and in subtype I have to choose  between business tourism or business academic etc .I work in a university. Should I pick business academic?

I'd like to visit London for a week to attend a conference (2-3 days) and a short 3-day non-recreational training course.  (1) What is the correct type of visa (and subtype) for activities listed above? Training may or may not be the main reason for the visit.   according to VISITORS APPENDIX 3. PERMITTED ACTIVITIES FOR ALL VISITORS (EXCEPT TRANSIT VISITORS)   As a visitor i am permitted to undertake any activities in paragraphs 3 – 27. Can i undertake any of them or just a subset that corresponds to selected visa type/subtype? If i select Visit -> Tourism -> 6 month in visa application form and tell about conference and course then    Can i undertake activities listed in 5 (a) attend meetings, conferences, seminars, interviews; under "Business – general activities" subsection? Can i undertake a short non-recreational course that does not include english language training from 25-b-(ii)? What is an accredited institution? Is there a more appropriate visa type for the visit with a plan that includes activities from paragraph 5(a) and 25-b-(ii)? Can i undertake any activities from paragraphs 4-27? (not 3 A visitor may visit friends and family and / or come to the UK for a holiday) Is "Study - Study (non point-based system) - short-term student 6 month?" a better choice for activities listed in the beginning of this message 5(a) and 25-b-(ii)?    Thanks


mount: mounting /dev/disk/by-uuid/02bc41cc-1e21-4700-a179-be2805a658c4 on /root failed: Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg. BusyBox v1.18. (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands (initramfs)   Please suggest a way out. I am dual booting with windows 7 and I have many photos which I can not afford to lose.

I installed 10.10 a few days ago. The only changes to the default install are the addition of Chrome and Pinta.  It was fine for a few days, then today login etc seemed slow. Likewise it couldn't even render the restart/shutdown menus.  Hoping it was some botched update, I ran the update manager; it tried to install but failed (the UI didn't make it obvious what had failed).  Fine, ok. Shut it down (press enter on the blank shut-down dialog).  Fire it up hoping... And... #fail.  Target filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg.   Is it now a brick?     More details:  GRUB 1.98+20100804-5ubuntu3   With  Ubuntu, with Linux 2.6.35-22-generic   Causes  udevadm trigger is not permitted while udev is unxonfigured Giving up waiting for root device.   Or  Ubuntu, with Linux 2.6.35-23-generic   Causes  mount: mounting /dev on /root/dev failed: No such file or directory   Then the same for /sys and /process


I do not know why those two references can not get cited. I only get a question mark instead of the reference number. I copy the name of the reference and I still have the error!. Here is what I write: \cite{Agembeddedinsi} and it does not work!!!  @article{Agembeddedinsi,    author = "Trolle, Mads L. and Pedersen, Thomas G.",    title = "Indirect optical absorption in silicon via thin-film surface plasmon",    journal = "Journal of Applied Physics",    year = "2012",    volume = "112",    number = "4",     eid = 043103,    pages = "-",    url = "http://scitation.aip.org/content/aip/journal/jap/112/4/10.1063/1.4746699",    doi = "http://dx.doi.org/10.1063/1.4746699"  }  @article{organicdiodes,    author = "Ditlbacher, H. and Aussenegg, F. R. and Krenn, J. R. and Lamprecht, B. and Jakopic, G. and Leising, G.",    title = "Organic diodes as monolithically integrated surface plasmon polariton detectors",    journal = "Applied Physics Letters",    year = "2006",    volume = "89",    number = "16",     eid = 161101,    pages = "-",    url = "http://scitation.aip.org/content/aip/journal/apl/89/16/10.1063/1.2362975",    doi = "http://dx.doi.org/10.1063/1.2362975"  }

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I would like to know what preposition ‘meeting’ should take. Should I say I’m at a meeting or I’m in a meeting?

As a foreign English speaker who never really studied too much English grammar other than the basics at high school, I often struggle to decide what is the correct preposition to use in certain phrases.   At is perhaps the easiest choice to identify, but I find it more difficult to determine when to use on or in.  I know things are on the table or in a box. I’m in a house at street XX,YY.   But are there any rules or ways to find (discounting uncommon exceptions) when to use each form?


Show that if $A \in M_{nxn}(k)$ and $det A \neq 0$ then for each matrix $B  \in M_{nxn}(k)$:  $AB$ and $BA$ are similar. Give an example $A,B$ for which $AB$ and $BA$ are not similar.   If $AB$ and $BA$ are similar then I have matrix $C$ for which $AB=C^{-1}(BA)C$. However I don't know how to prove that this matrix exist if I know only that $det A  \neq 0$. I thought also about a fact that $tr(AB)=tr(BA)$ but I think it laso is unhelpfull for me.Can you get me some tips which facts are helpful for me to do this task?

Given two matrices $A,B.$ On what conditions does $AB \sim BA$ hold?


For some reason, my computer is using a large amount of my RAM but I can't figure out what is actually using it ? I know nothing about computers so please help me!  Useful images:

I have 16GB of system RAM. On startup with no applications open except the task-manager Windows is using about 3gb of RAM. I looked in the processes tab, but nothing seems to be out of the ordinary. How can I find out why my Windows is using so much RAM.    all processes from all users      Reading from the poolmon it seems that my wireless broadcom driver is using about 0.4GB of of RAM. Even if I remove  it would still be using  2.6GB on start-up, which is still too much.      After reinstalling the wireless driver associated with the memory leak. I have a new screenshot and would like to confirm that it was indeed a memory leak.


Problem:  Let $(x_n)_n \subseteq \mathbb{R}$. Suppose there exists $x\in \mathbb{R}$ such that $x_n\rightarrow x$.  Show that $\frac{x_1+x_2....+x_n}{n}\rightarrow x$.  Attempt:  Let $\epsilon>0$. Since $x_n\rightarrow x$, there exists natural number $N$, for which $n> N$ implies $|x_n-x|<\epsilon$. Hence, whenever $n> N$, we have:  $|\frac{x_1+....+x_n}{n}-x|=|\frac{(x_1-x)+....+(x_n-x)}{n}|\leq \frac{|x_1-x|}{n}+...+|\frac{x_n-x}{n}|<n\frac{\epsilon}{n}=\epsilon$.  Is this correct?    Note, the above is non-sense, without looking at previous answers, I have come up with my own solution:  Let $\epsilon>0$. Since convergent sequences are bounded, there exists $U>0$, for which, $|x_n-x|<U$ for all $n$. Since $x_n\rightarrow x$, there exists $N^1$, for which, $n>N^1$ implies $|x_n-x|<\epsilon$. Put $N$ to be such that $N>N^1$ and $N>\frac{UN'}{\epsilon}$. Then, whenever $n>N$, we have:  $|\frac{x_1+....+x_n}{n}-x|$ $\leq$ $|\frac{(x_1-x)}{n}|+.....+|\frac{x_{N'+1}}{n}|+.....|\frac{x_n-x}{n}|<\frac{UN'}{n}+\epsilon<2\epsilon$

Show that if $(x_n)$ is a convergent sequence then the sequence given by the averages $$y_n = \frac{x_1 + x_2 + \cdots + x_n}{n}$$ also converges to the same limit.  Attempt at Proof.   Since $(x_n)$ converges we can say that for all $m$, such that $m \ge N \Rightarrow |x_n - L|\lt \epsilon$.   Base Case. Let n=1 and we have for all m such that  $m \ge N_0 \Rightarrow |x_1 - L|\lt \epsilon$ and also for $m \ge N_1 \Rightarrow |x_{n+1} - L|\lt \epsilon$.  Induction Hypothesis. Assume that for an appropriate choice of $N_2$ we have for all m, $m \ge N_2 \Rightarrow |y_{n} - L|\lt \epsilon$.   Choose $max\{N_1,N_2\}$ such that for all $m \ge max\{N_1,N_2\}$ implies $$|\frac{x_1 + x_2 + \cdots + x_n}{n}- L|+ |x_{n+1} - L|\lt 2\epsilon$$  $$= |\frac{x_1 + x_2 + \cdots + x_n+ n x_{n+1}}{n}-2L |\lt 2\epsilon$$  $$= |\frac{x_1 + x_2 + \cdots + x_n+ n x_{n+1}}{n+1}-L |\le |\frac{x_1 + x_2 + \cdots + x_n+ n x_{n+1}}{2n}-L |\lt \epsilon$$ and $$|\frac{x_1 + x_2 + \cdots + x_n+  x_{n+1}}{n+1}-L |\lt|\frac{x_1 + x_2 + \cdots + x_n+ n x_{n+1}}{n+1}-L|  \lt \epsilon.$$  Is this approach correct? If not, can you please provide the correct proof. I feel as though I made a mistake in the calculations. Thanks in advance.


I can not get my iPad mini to turn on. I have tried to press the home and power button simultaneously but that doesn't work and when it is attached to the charger I hear the charge ding sound. What went wrong. It worked the night before and I did turn it off like I do every evening.

My iPad mini retina is out of warranty,  I forgot to plug in my iPad after the critical battery warning and it went some minutes following the warning. I was not worried because same thing had happened a few times before and iPad was perfectly okay after charging it. However, this time I remember seeing a flash of blue screen immediately after it went black. Then, I plugged it in an waited for a while and tried starting it. Ever since, it fails to start hanging on the apple logo with white background screen.   I tried to connect to my Mac but nothing showed up in iTunes. I am worried now. Can I troubleshoot this or is it broken and needing repair?


I know that it's established that non-measurable sets cannot be constructed without the axiom of choice but I was wondering if countable choice was enough? Since the ones that I have seen use uncountable choice. My intuition tells me no. Since I tend to think of measurable sets as being closed under "countable operations". Although if we're being precise the operations in question are unions, intersections and complements; so i was wondering if we can use countable choice in some way to construct a non-measurable set.

Is axiom of choice required to show the existence of non-measurable sets? Is there a Lebesgue non-measurable set that can be constructed without axiom of choice?  Related question on MO says it is consistent:


I have a very simple controller extension and I'm trying to write a test Class, but I am only able to get 12% coverage. I'm not sure how to cover the rest of thelines below. Right now only my constructor is being covered: Controller Extension public class AcctAddresses {           public List<Account_Addresses__c> addresses{get;set;}      public string DelAddrId { get; set;}      public Account accounts {get;set;}       public Account acct {get;set;}        //Constructor       public AcctAddresses(ApexPages.StandardController controller) {           acct = (account)controller.getRecord();                accounts = [SELECT Id                     FROM account                     WHERE id=: acct.id LIMIT 1];           addresses = [SELECT Id, Primary__c, Street__c, City__c, State__c, Zip_Postal_Code__c, Country__c, Account__c                     FROM Account_Addresses__c                     WHERE Account__r.Id = :accounts.id ORDER BY Primary__c, State__c];       }     //This method is to delete the contact record while clicking the Del link       public pageReference deleteAddress(){          Account_addresses__c ToBeDeleted = [SELECT Id FROM Account_addresses__c WHERE id = : DelAddrId LIMIT 1];           delete ToBeDeleted;           String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();           PageReference redirectPage = new PageReference(baseUrl+'/'+acct.id);           return redirectPage;        }     }  Test Class @isTest  private class AcctAddressesControllerTest {      static testMethod void testMethod1()      {         Test.StartTest();          Account testAccount = new Account();             testAccount.Name = 'Test JN Account';             testAccount.AccountSource = 'Networking';         insert testAccount;                  Account_Addresses__c testAcctAddr = new Account_Addresses__c();             testAcctAddr.Account__c = testAccount.Id;             testAcctAddr.Street__c = '1010 Test Ave';             testAcctAddr.City__c = 'New York';             testAcctAddr.State__c = 'NY';             testAcctAddr.Zip_Postal_Code__c = '11212';             testAcctAddr.Country__c = 'USA';             testAcctAddr.Primary__c = TRUE;             testAcctAddr.Current__c = TRUE;         insert testAcctAddr;          ApexPages.StandardController AcctAdd = new ApexPages.standardController(testAcctAddr);         AcctAddresses AcctAdd1 = new AcctAddresses(AcctAdd);         Test.setCurrentPageReference(new PageReference('Page.Acct_Addresses'));         Test.StopTest();     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


Q. A fair coin is tossed untill head appears for the first time. What is probability that the number of tosses required is odd?  My work: suppose that head comes in first toss so probability of getting head in the first toss $=\dfrac{1}{2}$ suppose that first & second tosses show tails & third toss shows head so  probability of getting head in the third toss  $=(1-\dfrac12)(1-\dfrac12)\dfrac{1}{2}$ $=\dfrac1{2^3}$ suppose that first 4 tosses show tails & fifth toss shows head so  probability of getting head in the fifth toss  $=(1-\dfrac12)^4\dfrac{1}{2}$ $=\dfrac1{2^5}$ suppose that first 6 tosses show tails & seventh toss shows head so  probability of getting head in the fifth toss  $=(1-\dfrac12)^6\dfrac{1}{2}$ $=\dfrac1{2^7}$ ……………. and so on But I am not able to find the final probability of getting head first time so that the number of tosses required is odd.  what should do I next to it? please help me.

A fair coin is tossed until a head comes up for the first time. The probability of this happening on an odd number toss is?  How do i approach this problem ?


In this principle, how can shorter wavelengths on the particle leads to determine more accurate position of the particle? I think it is somewhere related to reflection of the light from the particle, but I can't understand it completely. Please reply.

I'm a mathematician, so I am not familiar with experimental physics.  I am watching MIT course on Quantum Mechanics, and they describe the two-slit experiment with electrons passing through the slits.   Here is my question: How do we measure the position of an electron with a light source?  AND, why does longer wavelength mean we can't be as accurate in our measurement of the position.  What is the apparatus?  How does this actually work in a lab?  What I describe below is described in the video at 59:50 ()  They talk about trying to "cheat" and observe which slit the electron went through.  They say to shine very weak light at the electrons before they pass through the slit.  Sure, the light will impart some momentum and alter the path of the electron a little bit, but if the light is low energy enough, we could perhaps know which slit it went through, yet not change the diffraction pattern by very much.  Great!  Except weak light means low frequency, long wavelength.  Then they say that long wavelength means we can't tell which slit the electron went through.  We need wavelength on the order of the distance between the two slits to know which slit it went through.  But increasing frequency by this amount is just enough to wash out any interference pattern at all, and so our experiment fails.  My question:  How do we measure the position of an electron with a light source?  AND, why does longer wavelength mean we can't be as accurate in our measurement of the position.  What is the apparatus?  How does this actually work in a lab?


Sometimes a single "Rude or offensive" comment flag cause the comment to be instantly removed. What is causing this? This just happened to me, but I don't have the contents of the comment anymore. It included profanities, if that makes a difference.

Caution: R-rated language  Some words, when present in a comment, make it eligible for instant, automatic one-flag deletion. Out of the , only      shit and fuck    appear to work this way. But then there are other, Stack Exchange-specific dirty phrases:    accept rate or accept-rate acceptance rate  what have you tried   whore    Are there other such words or phrases? Is there a complete list of them?     Some suspect words and phrases that do not suffice for automatic deletion:       accept an/the answer, thank you, voting to close, piss, bitch, idiot, cunt (often found on Stack Overflow as a misspelling of "count").


What is the convention for showing toggle icons to a user? This question is specific to password unmasking, but it can easily be used in "on / off" icons et al. In our situation, we have an unmask button at the end of a password field. The password is masked by default, and the icon is an open eye indicating "if you click me, you will see what's behind the curtain" Then the inverse is true when the password is unmasked. The eye is closed, indicating "if you click me, we will hide your password". see the following two images.   for the user's experience, is this the right approach for this situation, or should it be the opposite? Example:  password masked == eye closed icon password shown == eye open icon  Note: we're additionally using a title attribute on the button that says "show password / hide password"

I have a quick question about buttons that toggle between two states. (Think Play/Pause, or Shuffle/Regular Play.) As the title says, should the toggle show it's current state or the state to which it will transition?  I think people are used to the Play/Pause convention. But the Shuffle/Regular play might be more confusing if you show the transition state instead of current. For example, the built-in music player on the Xbox 360 does it this way: when it's in shuffle mode, it shows the icon for direct play and vice versa and it always confuses me (am I in shuffle mode or straight play).  I see it this way: Play/Pause is more like action as in begin playing or pause playing. Yes behind the scenes it is a state transition but to the user, there is an action. Whereas Shuffle/Straight Play is an option and it's best to show the current state (and possibly have only one icon and change button to show that the option is enabled/disabled). Thoughts?


I was reading my old notes and found a question where a number with two decimal point is converted to a single decimal point. I looked around for answer and couldn't find it. I cannot keep it string as I have to return as a float and compare it.  Math.round was rounding it bad and ceil and floor was giving me error.  I came up with this solution.   public class floatRounding{  public static void main(String[] args){   //System.out.println(temperature((float)32.34));  // System.out.println(temperature((float)32.35));   if (temperature((float)32.34)<temperature((float)32.35)){      System.out.println("Here");    } }  public static float temperature(float t){   float newt;   //newt=Math.round(t);    String tem=String.format("%.1f",(t+.009));   newt=Float.parseFloat(tem);   System.out.println(newt);   return newt; } }   Is there a better solution if I am not using decimal format like in this solution   Thanks in advance. Please forgive if its a dumb question.

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?


In the lectures I see, hash functions are always used when we want to sign a document $d$. My question is why they are used in digital signatures? Maybe, because it is more easy and fast to calculate the signature when is used a "block" signature scheme? Do you know some formal paper or book where this is described? I need that for my thesis.

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?


When using my Tamron 16-300mm lens I frequently experience chromatic aberrations in my photos. how so I prevent this?

I've read   here on Photo SE, as well as the  on CA.  I understand that it is inevitable that some amount of chromatic aberration shows up for a particular lens, especially on the extreme cases: high contrast of colors/luminosity, etc.  But I'd like to know if there is any technique one can do to -minimize- this when some photo opportunity arises;    eg: if i'm visiting some place and want a picture of a building, for example. i can't go "meh, too contrasty, results won't be good."     Would stop down the aperture help? I haven't tested it, but according to the causes of CA, it could help (bigger DoF, more things in focus, less specific color in different focus).   Other than that, nothing comes to mind..   I already got a prime lens for the extra oomph of image quality, but i want more :)  please no "buy better gear" of "fix it in post" answers.. Obviously, i can fix stuff in post, AND I DO. But i'd like to make the most of my gear, and spend maybe a bit more time taking a picture, and less on lightroom.


My professor incorrectly inputted a grade of mine and I emailed him to alert him of this error.   Context: In my experience, professors take an ungodly amount of time to correct a mistake.  I was expecting to not receive a response or a correction for several days or even weeks.  My professor within a span of three hours, emailed me his sincerest apologies for his error, corrected the grade, and assured me this would never happen again.  Another detail - we are on spring break.  I want to thank him for this, so . . . "Word/words to describe someone who completes a task in a very quick time, despite having no obligation to do so?"

I thought of precrastination at first but that appears to be the act of planning to procrastinate.


So in D&D 5th edition, one can make a character with a background, e.g. a guild artisan who does locksmithing.  Obviously a locksmith is very good at picking locks, even if he has no levels in the Rogue class.  In this example, consider a guild artisan locksmith who becomes a cleric of Gond, god of craftsmanship.  The PHB doesn't get very specific, but a non-Rogue guild-artisan locksmith character who starts out might get (10 pounds of)  "tinker's tools" or (1 pound of) "thieves' tools."  For adventuring, you could say that the locksmith just takes thieves' tools because they are lighter to carry, but probably that wouldn't be enough to construct a new lock, much less a new trap.  Assuming that the locksmith-adventurer plans to construct new locks (and possible new traps) while in a dungeon, presumably he would need to bring along lots of spare parts, and thus he would have to carry a tool kit at least as heavy as "tinker's tools."  Given earlier questions such as:   I suspect that the rules are not very precise about whether player-characters with a locksmithing background can construct traps while in a dungeon.  From my guesstimate, I would say that they would need to negotiate with the DM to make sure the action is allowed in that DM's campagn.  Am I missing some clear rule on lock-and-trap construction, or did the rule designers just leave it open to interpretation?

The ranger and rogue in my game were asking about setting traps in preparation for a battle that was coming. Another player is convinced rogues can make traps because he saw it happen in D&D sessions online (in streams). But the only information about making traps that I can find seems to be addressed at DMs, in the context of designing dungeons and such. Research Rogues do get proficiency in , but this only lets you disarm traps (not create them):  This set of tools includes a small file, a set of lock picks, a small mirror mounted on a metal handle, a set of narrow-bladed scissors, and a pair of pliers. Proficiency with these tools lets you add your proficiency bonus to any ability checks you make to disarm traps or open locks.  PCs are also able to buy . So it would make sense that nifty rogues could backwards-engineer traps that they can buy and/or disarm, but I'm curious whether the books cover guidance in this regard. Related:   (only covers "hasty traps")   Question What are the options for player characters to create traps? By 'traps' I mean methods or mechanisms designed to influence, hinder, or expose enemies, which must be set up before use, operate on a trigger (set off by target or by trapper are both fine). For this question I'm excluding spells that function as traps.


string query = "A|B";   The output of the next 2 lines are equal to "%A%|%B%" whereas "A%B" is expected!  query = Regex.Replace(query, "|", "%"); query = Regex.Replace(query, @"|", "%");   Why?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I have seen many uses of "===" in conditional statements.  Can anyone tell me what does it mean?   something like ternary operator?  if(typeof(x) == "string") {     x= (x=== "true"); }

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


function months(){     for($i=1;$i<=12;$i++)     if($i<10)   {     echo '<option value="'."0".$i.'">'."0".$i.'</option>';     }     else{     echo '<option value="'.$i.'">'.$i.'</option>';     } }   This populates a dropdown with 01, 02, 03... instead of 1, 2, 3...    So, I concatenated 0 and $i if $i<10 and it works, but maybe it is possible by formatting $i as two digits, or some similar, shorter method ?

I need to cast single figures (1 to 9) to (01 to 09). I can think of a way but its big and ugly and cumbersome. I'm sure there must be some concise way. Any Suggestions


(I am a new to LaTeX.) I'm trying to print a length in centimeters. Here is my code:  \documentclass{article} \begin{document} \newdimen\mylength \mylength=1in  \the\mylength \end{document}   And here is the resulting output:     72.27 pt   However, I want to show output in centimeters: Example: \the dimen [cm]\mylength. How can I do that?

How can one determine the length of the different units (measured 1ex, 1em, 1in, 1pt, 1bp, 1dd, 1pc) in mm?


Yesterday I saw the definition of Dolbeaut cohomology: let $(M,J)$ be a complex manifold, write the exterior derivative as ${\rm d} = \partial +\overline{\partial}$, where $\partial: \Omega^{\ell,m}(M) \to \Omega^{\ell+1,m}(M)$ and $\overline{\partial}: \Omega^{\ell,m}(M) \to \Omega^{\ell,m+1}(M)$, look at the complex $$\cdots \xrightarrow{\hspace{.4cm}\overline{\partial}\hspace{.4cm}} \Omega^{\ell,m-1}(M)\xrightarrow{\hspace{.4cm}\overline{\partial}\hspace{.4cm}} \Omega^{\ell,m}(M) \xrightarrow{\hspace{.4cm}\overline{\partial}\hspace{.4cm}} \Omega^{\ell,m+1}(M)\xrightarrow{\hspace{.4cm}\overline{\partial}\hspace{.4cm}} \cdots$$and put $$H^{\ell,m}_{\rm Dolbeaut}(M) \doteq \frac{\ker(\overline{\partial}: \Omega^{\ell,m}(M) \to \Omega^{\ell,m+1}(M))}{{\rm Im}(\overline{\partial}: \Omega^{\ell,m-1}(M) \to \Omega^{\ell,m}(M))}.$$Great.     Question: Why did we took the above complex instead of $$\cdots \xrightarrow{\hspace{.4cm}\partial\hspace{.4cm}} \Omega^{\ell-1,m}(M)\xrightarrow{\hspace{.4cm}\partial\hspace{.4cm}} \Omega^{\ell,m}(M) \xrightarrow{\hspace{.4cm}\partial\hspace{.4cm}} \Omega^{\ell+1,m}(M)\xrightarrow{\hspace{.4cm}\partial\hspace{.4cm}} \cdots?$$   I get that $f: M \to \Bbb C$ is $J$-holomorphic if and only if $\overline{\partial}f = 0$ so that $\overline{\partial}$ sort of measures how stuff in general would be away from being holomorphic. But I'd like a more solid explanation.

On a complex manifold we have the differential operators  $$\partial:A^{p,q}\to A^{p+1,q}$$ $$\bar\partial:A^{p,q}\to A^{p,q+1}$$ which both square to zero. Hence one can define cohomology groups $$H^{p,q}_\partial=\frac{\ker\partial:A^{p,q}\to A^{p+1,q}}{\partial A^{p-1,q}}$$ $$H^{p,q}_{\bar\partial}=\frac{\ker\bar\partial:A^{p,q}\to A^{p,q+1}}{\bar\partial A^{p,q-1}}$$ But for some reason I only ever see people discussing the $H_{\bar\partial}^{p,q}$, i.e. Dolbeaut cohomology. What makes this more interesting the the $H_\partial^{p,q}$ groups?


Is there any special features in anonymous classes when compared to normal classes as I don't see anything special in those classes?

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


Before I spend any "money" (poke-coins) on storage upgrades, I'd like to know how they work. I'm currently limited to 250 Pokemon and 350 items. Both capacity upgrades cost 200 poke coins.  How much does each upgrade increase my capacity? Is there only one upgrade, or can I continually upgrade my capacity for both Pokemon and items?

In Pokemon Go, bag space and Pokemon storage are limited. First, what are the starting limits?  More importantly, there are upgrades for 50 Bag Space and 50 Pokemon. How many of each of these upgrades these can be purchased?  With all upgrades purchased, what are the resulting limits?


There are many ways in which a web form is made to auto-save and manually save; I'm wondering what would be the best practices to do so.  Form is a web application form, and I want to save user values for the purpose of tracking progress and not losing their work if they take a break or want to resume working on it later. I want them to also be able to click the save button manually. I want them to be able to click a "submit" button to mark it as submitted and asynchronously send it to the database, once all the saves have validated that the form is completed successfully.  Here are some of my concerns (some are technical and others are not):   How often should I auto-save the form? 30 seconds? A minute? More? Less? What determines the best interval to save? Should I save onBlur of every form element, or should I do it onFocusOut at the form? How do I save while user is still filling out a textArea without leaving the focus, yet? How do Gmail and StackExchange do it? I've read that , but when should I asynchronously submit it to the database as opposed to keep it local? What if the user leaves the locally saved form and it still hasn't been submitted to the database? What's the best failsafe for crashing? When should I notify the user that the form is saved like when Gmail does it? Is it bad practice to also include a save button in addition to having a auto-save feature? Should anything change when filling out the form on mobile as opposed to desktop? Is it possible to make the form 100% capable of not losing progress, or is the user bound to lose some data at some point?   Anything else I should be aware of, keep into consideration, or try to implement in order to make the experience more convenient for the user?  If there are any good sources other than  and  for me to read on, please let me know.

When should I save data in an business application?  We have a lot of applications and currently they have not all the same behavior. I am not very experienced with UX and would like to know when I should use AutoSave behavior and when a Save-Button.  The main applications have all a tree-structure on the left hand side and on the right hand side you can edit some data for the selected item in the tree. The data is separated and displayed on different tabs.  The behaviors we have:   Tree is saved automatically; data saved on tab-changed or application closed and selected item of tree changed Tree is not saved, only when save-button is clicked. No tabs on right side. Tree is saved automatically; data is saved automatically, except there is some invalid data.   The data is often displayed in DataGrids (WPF).


"Mike-schmike." I muttered, preoccupied by the way he'd said "you and I." I liked it more than I should.   This is a line from Stephanie Meyer's Twilight novel (page 25). How would we describe 'Mike-schmike' in terms of a literary device. Is there a special name for the rhyming pejorative here?

I recently watched A Series Of Unfortunate Events, and I was puzzled by the expression "Josephine, Schmosephine". The narrator explains that when you don't care about something or someone, you repeat their name, changing the first syllable by "schm-".  Is this a real thing? I haven't been able to find anything about that on the Internet (and it's not the easiest thing to Google).


I was trying to read a file line by line(each line is a hostname), do some processing like this :   while read -r line do    if ping -c1 $line      echo $line is running     fi  done <file.txt    I found that the out put is like this:     is running   is running    ...   As if the variable $line is empty.  Thanks to all who commented this question.  I think I now understand what happened.  So the file has CRLF line ending. And the length of a line is exactly the same as is running.  Because of the CR character at the end of $line, the content of $line gets completely overwritten by is running. If only the length of a line is longer, I would have asked the question differently.

When I am running two while loop and trying to concatenating two variable strings (from two loops), the final output (string) is weird. I have tried different way to concatenating but did not get the answer: Below is the code: [I need vfile="var1_Amon_My_model1*.nc"]  #!/bin/bash jcount=1 extn="*.nc" while read line do mname=$line echo " Working on model - " $mname echo " and model number = "$jcount while read line do vname=$line vfile="${vname}""_Anom_""${mname}""${extn}" echo $vfile done<varlists.txt echo "******************************************" jcount=$((jcount+1)) done<model_test1.txt   In varlists.txt  var1 var2   In model_test1.txt  My_model1 My_model2   After executing the script, it is showing   Working on model -  My_model1  and model number = 1 *.ncm_My_model1 *.ncm_My_model1 ******************************************


I am trying to get the post notice text from the PostHistory table in Data Explorer. I'm having trouble understanding how exactly to do this.  According to the , PostHistoryTypeId of 33 indicates a post notice being added to a given post. From the column descriptions, I'd imagine that either the Text or the Comment columns would contain the actual post notice text. However, it seems as though the Text field is always blank. In addition, the Column field, which seems to contain an ID for use in the Comments table, does not lead to a correct post notice text.  For example: see , and the .  Am I misunderstanding what the Comment field in the PostHistory table actually refers to? Is there some other way to get the actual post notice text from the data?

In  the  holds for PostHistoryTypeId's 33 and 34 the Notice added and Notice removed events. When inspecting those rows with  the comment field holds a number. creationdate        |Post Link           |posthistorytypeid   |comment --------------------------------------------------------------------- 2015-03-29 3:24     |28687143            |34                  |82288 2015-03-29 2:49     |27269748            |34                  |81888 2015-03-29 2:49     |29116980            |34                  |81892 2015-03-29 2:49     |29134963            |34                  |81889 2015-03-29 2:49     |29135107            |34                  |81891 2015-03-29 2:49     |27269748            |34                  |81888 2015-03-29 2:49     |29116980            |34                  |81892 2015-03-29 2:49     |29134963            |34                  |81889 2015-03-29 2:49     |29135107            |34                  |81891  Does that number represents a foreign-key to a table that is missing from SEDE? If yes, and not a great secret, can that table be added to SEDE? If no, what does that number represent? A similar request to add the notice texts in the UI is  yes, this question was inspired by


What would be an example of two non-isomorphic groups $G$ and $G'$ such that for all groups $H$, there are as many homomorphisms $H\to G$ as homomorphisms $H\to G'$? By the Yoneda lemma, if $\hom(-,G)$ is naturally isomorphic to $\hom(-,G')$, then $G$ is isomorphic to $G'$. My question aims at finding an example that shows that it doesn't suffice to just assume that $\hom(H,G)$ and $\hom(H,G')$ are isomorphic for all $H$.

I was thinking about the following: Say we got two groups $A$ and $B$, and we know that for any group C, there is a bijection  $$Hom(A,C) \to Hom(B,C).$$  Are $A$ and $B$ already isomorphic?  If the family of bijections was natural in $C$, this follows from Yoneda's lemma. But does it hold anyway without naturality, just from the cardinalities? I would suspect no but in simple cases (finitely generated). I'd like to hear any thoughts on how to come up with a proof or counterexample.  Also, does the answer change when we consider the contravariant case with an identification $Hom(C,A) \to Hom(C,B)$?


I am having trouble with equation of type:  φ(n) = a, where a is positive integer and n is an integer  I need to find n, since I need to find all numbers n I was thinking about some modular arithmetic relation but didn't come with anything suitable for problem. What is valid mathematical approach for this problem and how all n can be found? Thanks!

Given $m\in\mathbb{N}$, is there a general way to solve the equation \begin{equation} \varphi(n)=m \end{equation} where $\varphi$ is the Euler's totient function? For example, I want to solve for all the $n$'s such that $\varphi(n)=4$. Is there any way to solve it that are also applicable to many (if not general) cases?


I have the following setup  Object : CurrencyConversion__c  Field  : Input_Currency__c  Field  : Convert_Currency__c  I want to invoke a callout to an external webservice via a trigger (before inserting a record) in the above custom object.  I will pass "Input_Currency__c" as parameter (Id will not be passed) and the HTTP Response will contain value for "Convert_Currency__c" which I will stamp it back.  Since this webservice will be asynchronous how am I to identify the same record for which this callout was made by the time I get the response from the webservice ?

I have a trigger on the Custom Object that calls a class. That class makes an HTTP GET request to a Web Service.  However I get the following error:  Callout from triggers are currently not supported.  How can I get data to an external Web Service using Apex code?  However i can use @future method but it can only be support void and this method cannot return results, i need to be able to send data to external ervice and receive acknowlegements from it.


Is there a clever way to do the following string manipulation in C#?  I have any kind of string and im looking for a specified delimiter. The code should divide the string in words before and after delimiter and also include the delimiter. The delimiter could be several times in a row and also could be in the start or the end.   // PSEUDO CODE string = "Hello****wide****world"; delimiter = "****";  // result should be a list<string> like {"Hello","****","wide","****","world"}

I'm splitting a string by three different characters but I want the output to include the characters I split by. Is there any easy way to do this?


I've seen the posts about the angle of view being the same for a 28mm lens on a 1.6 crop sensor as for a 50mm lens on a full frame. I understand it.   But what about the depth of field. Will that match too if the distance to the subject and aperture are the same?

As an example, a 35mm lens on a crop body (such as Nikon DX) is said to be "equivalent" to a 50mm lens on a full frame body. Equivalent here means that they will have the same field of view, but what other aspects will change or stay the same between the two? I'm thinking about things like perspective, bokeh, and depth of field (assuming the same aperture being used on both lenses).


This is probably more of a science philosophy question, but when we introduce those off-shell particles to explain some three body processes weird behaviour, do we really mean that there are actual massive stuff going on into the Compton length, or is it just a formal and mathematical way to make ours predictions correct? Given that the only real things are those who are measured, is there a difference between the two? I'm confused, because if virtual photons carry the e.m. field from an electrically charged body to another, can we directly measure it? Shouldn't we be able to directly "see" them? Do we? Thank you a lot for your patience

There is no "action at a distance" in nature. Attraction of a piece of iron by a magnet, attraction between distant electric charges of opposite sign, have to be mediated by something. The  are proposed as an explanation.  If they have an observable effect, it seems like they must exist. If so, why do we call them virtual? It can't be that they have short lifetimes, as there are short-lived particles (resonances) that we don't call "virtual."  On the other hand, some people say that the so-called virtual particles only exist on paper, or that they are just a technique to help us handle our equations.  So what is the meaning of the word "virtual" here? Do these particles really exist, or not?


I have 734 MB of ram . Can I install Ubuntu 12.10? Could I have any problems?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


this is very short list of my json file:    "slider-client" : {     "properties_attributes" : { },     "properties" : { }   } }, {   "spark2-hive-site-override" : {     "properties_attributes" : { },     "properties" : {       "hive.metastore.client.connect.retry.delay" : "5",       "hive.server2.enable.doAs" : "false",       "hive.server2.thrift.port" : "10016",       "hive.server2.transport.mode" : "binary",       "hive.metastore.client.socket.timeout" : "1800"     }   } }, {   "tez-env" : {     "properties_attributes" : { },     "properties" : {       "heap_dump_location" : "/tmp",       "content" : "\n# Tez specific configuration\nexport TEZ_CONF_DIR={{config_dir}}\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}",       "enable_heap_dump" : "false",       "tez_user" : "tez"     }   } },   how we can capture only the lines that start with:  "properties" : {   and ended with    }   example of expected output      "properties" : { }     "properties" : {       "hive.metastore.client.connect.retry.delay" : "5",       "hive.server2.enable.doAs" : "false",       "hive.server2.thrift.port" : "10016",       "hive.server2.transport.mode" : "binary",       "hive.metastore.client.socket.timeout" : "1800"     }      "properties" : {       "heap_dump_location" : "/tmp",       "content" : "\n# Tez specific configuration\nexport TEZ_CONF_DIR={{config_dir}}\n\n# Set HADOOP_HOME to point to a specific hadoop install directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}",       "enable_heap_dump" : "false",       "tez_user" : "tez"     }   what I did until now is this syntax , is it the best approach ?   awk '/"properties" : {/,/^[[:blank:]]*}$/'  file.json

I have bin searching a solution for my question but didn't find a or better said I did not get it with what I found. So lets talk about what my problem is about. I am using a Smart Home Control Software on a Raspberry Pi and as I found out this weekend using pilight-receive I can catch the data from my outdoor temperature sensor. The output of pilight-receive looks like that:  {         "message": {                 "id": 4095,                 "temperature": 409.5         },         "origin": "receiver",         "protocol": "alecto_wsd17",         "uuid": "0000-b8-27-eb-0f3db7",         "repeats": 3 } {         "message": {                 "id": 1490,                 "temperature": 25.1,                 "humidity": 40.0,                 "battery": 1         },         "origin": "receiver",         "protocol": "alecto_ws1700",         "uuid": "0000-b8-27-eb-0f3db7",         "repeats": 3 } {         "message": {                 "id": 2039,                 "temperature": 409.5         },         "origin": "receiver",         "protocol": "alecto_wsd17",         "uuid": "0000-b8-27-eb-0f3db7",         "repeats": 4 }   Now my question to you:  How the heck can I extract the temperature and humidity from where the id is 1490. And how would you recommend me to do check this frequently? By a cron job that runs every 10 minutes, creates an output of the pilight-receive, extracts the data of the output and pushes it to the Smart Home Control Api.  Someone having an idea - thanks a lot


Stack Overflow is a question and answer site, but so many "questions" are posted here without actually asking a question!    What if there were a requirement to have at least one "?" character in every post? While there are some cases where a valid question can be posed without using the "?" character, IMHO these are few and far between.  There could even be a prominent warning if you try to submit a question without one, saying something like "Stack Overflow is a question and answer site, but it appears you have not asked a question yet! Please edit your post to include a specific and detailed question. For more information, read the FAQ."  This suggestion is mainly to improve new users' questions and teach them how to use this site without requiring someone to always ask "What's your question" over and over again.   The restriction could (should probably) be lifted after reaching a small amount of reputation, which shows you understand how the site works.    Nearly 100% of the time, a post lacking an actual question is either:   Not a real question, leading to closing and eventual deletion. These are often problem statement or requirement, of the form "I'm trying to do ..." or "I would like ...", which usually does not show any research effort. Or, an inferred question, but not truly clear. Often someone ends up commenting "What's your question?" to which the asker has to come back and clarify what they wanted to know in the first place.   In my experience, I find most people that don't ask a question to be new users - meaning they don't understand how Stack Overflow works. Whether they're too lazy to read through the FAQ or they are new to expressing their problems to other people, the end result is the same: unclear non-question "questions".  Forcing at least one question would improve the quality of posts from first-time users. It also would help guide new users before they are subjected to the would-be resulting barrage of downvotes, close votes, and comments for clarification. Specifically:   For not a real question questions it would hopefully force the poster to think about their problem and pose a question. The hope is there will at least be a small increase in the number of people who focus on one particular problem instead of an entire project. For inferred questions, if the question were clear in the first place, explicitly adding it does not detract from the post. In the case where the question is not clear, adding the question is usually all that is needed to clarify exactly what the problem is.     Would this be a good idea, or would there a significant disadvantage to requiring a question mark?  Note I mean requiring a question mark in the body of the post, and not the title.

More than infrequently, opening posts on SO are not questions at all, in the very grammatical sense: They're just statements or vague musings (for instance ), and it's not clear what exactly is being asked (since nothing is technically being asked).  I always feel that it shouldn't be our job to construct a question from someone's undirected ramblings, and so this is usually a NARQ candidate for me.  I was wondering if we could add a very simple check that would count the number of literal question marks in a post and refuse to accept it if there are none. This could be accompanied by a small note on what a question should look like.  What do you think? Should we add this feature?  Update: Since people seem to get hung up on the details, I'd like to clarify that an entirely satisfactory alternative would be to pop up an overridable notice with a warning, like "Hello, you appear to be writing a question. Would you like help?", with a "No thanks" button to dismiss it and submit the post regardless.  Update 2: If you disagree that absence of a question mark is a strong signal that the question is poor, could you please provide examples of good, useful and appropriate questions that do not contain question marks? I've provided several additional examples of when the signal works in the comments, and more come up regularly, so I would appreciate to see some evidence of the contrary.


I am just trying to compute some basic arithmetic, but python won't stop rounding to the nearest integer.   For example, when I input     print float(3 * 1/(1*2) + 1)     it outputs 2.0 rather than 2.5; I can't figure out how to keep it from rounding like this. I would appreciate any help you can provide.

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


Let's say that we have the following RSA setup where $m = pq$, where $p$ and $q$ are distinct primes. In addition, let $d, e \in \mathbb{N}$ such that $d = e^{-1}$(mod $\phi(m)).$ If $M$ stands for a plain text, we let $C \equiv M^e$ (mod $m$), where $C$ is the cypher text. As long as gcd ($C, m) = 1$, $\implies$ $C^d \equiv M$ (mod $m$). It was also shown (lecture) that gcd ($C,m) = 1$ exactly when $gcd(M,m) = 1.$ What happens if, in an unfortunate manner, the message I want to send is not relatively prime to $m$? We know that this never really happens in practice because our choices for $p$ and $q$ are large that the probability of $M$ being divisible by either $p$ or $q$ is roughly about $0$. It could be that $p$ and $q$ were small such that this situation may arise, but RSA should still work (at least I hope it does). With no assumption on gcd$(C,m)$ whatsoever, I want to show that $C^d \equiv M$ (mod $p$), $C^d \equiv M$ (mod $q$), $C^d \equiv M$ (mod $m$). Keep in mind that I know very little about cryptography, but I'm fine working with aspects related to number theory.

Pre-conditions:  Let the public key be $(n, e)$, and $n=pq$, which $p,q$ are large distinct primes. Let $gcd(e, (p-1)(q-1))=1$, and $d$ is the inverse of $e$ modulo $(p-1)(q-1)$.   And let $M$ be the raw message, $M < pq$, and $C$ represents the encrypted message(i.e. $M^e$).    Proof:  Since $M < pq$, and $p, q$ are prime, $gcd(M, pq) > 1$ implies that $gcd(M, p)=p$ or $gcd(M,q)=q$, but not both.  WLOG, consider the case $gcd(M, p)=p$ and $gcd(M, q)=1$. Let $ed=1+k(p-1)(q-1)$, then we have:   $C^d \equiv (M^e)^d \equiv 0\ (\textrm{mod}\ p) \equiv M\ (\textrm{mod}\ p)$ $C^d \equiv (M^e)^d \equiv M\cdot M^{k(p-1)(q-1)} \equiv M\cdot1^{k(p-1)} \equiv M\ (\textrm{mod}\ q)$   Since $gcd(p,q)=1$, $C^d \equiv M\ (\textrm{mod}\ pq)$ by Chinese Remainder Theorem. $\mathbf{Q.E.D.}$    This is an exercise in my text book Discrete Mathematics and it's Application, Rosen, page 305, section 4.6. And I don't have the solution...


I have a custom button on my Account detail page called Change. I need to call a public method which is in a public with sharing class. What I have learned is that we can access the method using sforce.apex.execute if and only if the method is web service of a global class.

I have a javascript button on my product layout named "ListToEbay" and I have written a controller to invoke the EndItem()  service method of ebay api.  Below is the method:--  public void  removeItemFromEbayList() {   HttpRequest req = new HttpRequest();   Http http = new Http();   sEnvelopHandlerForEndingList='Request XML';   req.setBody(sEnvelopHandlerForEndingList); }   I want to execute this method directly on clicking that button, without going or opening a VisualForce Page. How can I accomplish that?


I am looking for a way to perform weighted total least squares in R. I know one can use PCA for this as described nicely in the following post.    However, I need a weighted version of total least squares, i.e. I want to account for measurement error in my data, where the error $(\Delta x_i, \Delta y_i)$ can be different for each data point $(x_i, y_i)$. Any suggestions? Specifically, I want to do the following:  x = rnorm(10,0,2) x.se = rnorm(10,0,0.7) y = 20*x y.se = rnorm(10,0,1) r <- prcomp( ~ x + y ) slope <- r$rotation[2,1] / r$rotation[1,1] intercept <- r$center[2] - slope*r$center[1]   However, here I am not accounting for the varying measurement errors in $x$ and $y$. Is there any R package which I can use to account for the x.se and y.se vectors?

I made $n$ measurements of two variables $x$ and $y$. They both have known uncertainties $\sigma_x$ and $\sigma_y$ associated with them. I want to find the relation between $x$ and $y$. How can I do it?   EDIT: each $x_i$ has a different $\sigma_{x,i}$ associated with it, and the same with the $y_i$.    Reproducible R example:  ## pick some real x and y values  true_x <- 1:100 true_y <- 2*true_x+1  ## pick the uncertainty on them sigma_x <- runif(length(true_x), 1, 10) # 10 sigma_y <- runif(length(true_y), 1, 15) # 15  ## perturb both x and y with noise  noisy_x <- rnorm(length(true_x), true_x, sigma_x) noisy_y <- rnorm(length(true_y), true_y, sigma_y)  ## make a plot  plot(NA, xlab="x", ylab="y",     xlim=range(noisy_x-sigma_x, noisy_x+sigma_x),      ylim=range(noisy_y-sigma_y, noisy_y+sigma_y)) arrows(noisy_x, noisy_y-sigma_y,         noisy_x, noisy_y+sigma_y,         length=0, angle=90, code=3, col="darkgray") arrows(noisy_x-sigma_x, noisy_y,        noisy_x+sigma_x, noisy_y,        length=0, angle=90, code=3, col="darkgray") points(noisy_y ~ noisy_x)  ## fit a line  mdl <- lm(noisy_y ~ noisy_x) abline(mdl)  ## show confidence interval around line  newXs <- seq(-100, 200, 1) prd <- predict(mdl, newdata=data.frame(noisy_x=newXs),      interval=c('confidence'), level=0.99, type='response') lines(newXs, prd[,2], col='black', lty=3) lines(newXs, prd[,3], col='black', lty=3)     The problem with this example is that I think it assumes that there are no uncertainties in $x$. How can I fix this?


When running  sudo apt update, I got the following errors:  Err:16 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease           The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F Err:20 https://xpra.org bionic InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 18ADB31CF18AD6BB   and sudo apt upgrade doesn't install or upgrade xpra. (I am not sure about wine)  For xpra, before sudo apt update, I just followed , to create /etc/apt/sources.list.d/xpra.list with following content:  deb https://xpra.org/ bionic main   I was wondering if I miss something?  Where can I get the public keys for xpra and wine?   Thanks.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


If Ubuntu supports files from windows, doesn't this defeat the "security" of Ubuntu? Obviously not a technie How to install and "replace" Windows 7 entirely, and get Microsoft out of my desktop.   Appreciate your help very much.

I would like to see a full how-to guide on how to install Ubuntu.


which one of the two is more spread? I want to read out the version number from  but I want to use the one which more people have.  If you know another way to get the latest stable version number from mysql please tell me ;)

I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality.  I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parsers you've used?


When using the word "which" is it necessary to still use "one" after asking a question or do "which" and "which one" have the same meaning? Where do you draw the line on the difference between "which" and "which one" when asking a question that involves more than one answer?  Example:  How much is 1 + 1?     Which (one) is the right answer?:      A. 2      B. 11

Recently I've come across sentences that doesn't have "one" in it and it looks like odd to me because I'm used to say "which one...?" The sentences must be correct because they are from a grammar.  Examples:     Which do you prefer - meat or fish?      You can have tea or coffee - which do you prefer?   To me,"which one" would be more correct. I don't know. Perhaps sometimes "which" and "which one" can be interchangeable.


I just read a  which showed that probability density functions do not always have a limit of zero as a variable approaches infinity because they don't always have a limit at infinity.   Given that a probability density function has a limit at infinity, is that limit always zero? If so, is there a rigorous and formal proof that shows this property?    Update:  I just found another , which is a generalization of what I'm asking to the multivariate case. In a mathematical sense, this makes my question a duplicate.

Could someone point out a good source or provide justification as to whether the limit of a multivariate probability density function, as one or more or all variables tends to positive or negative infinity, goes to zero.  $$\lim_{x_{1}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2},...,x_{n}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  I have found this related question for the univariate case:


I have been speculating upon this: we say that a conic-section is a curve made by the intersection of a plane and a double cone. On the same lines can we say that a conicoid is a surface made by the intersection of a 3-dimensional space and a 4-dimensional double hypercone? If so, can both the results be derived analytically , for instance, we have the equations of a double cone and a plane and hence we show that the locus of their intersection is a conic-section? Any help is welcome. Thanks! Edit Okay. By now I have learnt that my guessing is right( that a conicoid is a surface made by the intersection of a 3-dimensional space and a 4-dimensional double hypercone) but I still desire to have a rigorous treatment for the general case of intersection of an n-dimensional hyperspace with a (n+1) dimensional hypercone. I mean some reference where I can find related theorems.

In my high school multivariable calculus class, we recently learned of quadric surfaces. Since they appeared to be a generalization of conic sections to 3 dimensions, I wondered if they could be generated by finding the intersection of a 3-dimensional plane with a 4-dimensional cone similarly to how a conic section is the intersection of a 2-dimensional plane with a 3-dimensional cone. What follows is my attempt at experimenting with this idea. Although I was able to obtain some interesting results, I was not entirely successful in my endeavour which is why I am posting here.  I was able to deduce that a fourth dimensional equivalent of a circular cone is:  $$x^2+y^2+z^2=w^2$$  With this, I was able to get a few quadric surfaces with minor effort by simply plugging in a constant for one of the variables. For example, by setting $w=3$, I got the equation of a sphere:  $$x^2+y^2+z^2=9$$  And by setting $z=3$, I was able to derive the equation of a hyperboloid of two sheets:  $$x^2+y^2+9=w^2$$ $$w^2-x^2-y^2=9$$  I wanted to see if I could get the rest of the quadric surfaces by picking less mundane planes than just those aligned with the axes. So then I attempted to define a 3-dimensional plane in a 4-dimensional space with a point and a normal. I remembered that one definition for a plane is:  $$\vec{n} \cdot (\vec{P_0} - \vec{P})=0$$  Where $\vec{n}$ is the normal of the plane, $\vec{P_0}$ is the initial point, and $\vec{P}$ is any arbitrary point that lies on the plane. Armed with this knowledge, I plugged in  $\vec{n}=\langle A,B,C,D \rangle$ and $\vec{P}=\langle x,y,z,w \rangle$ to arrive at:  $$Ax+By+Cz+Dw=\vec{n} \cdot \vec{P_0}$$  Since the cone should have rotational symmetry (admittedly I am not sure what this means in four dimensions so this could be a faulty assumption), I figured that any point would yield the same results as long as it does not lie on the plane $w=0$. With this knowledge, I picked the point $(1,0,0,1)$ because it seemed to be easy to work with.  Then, I tried various normals that I thought would yield interesting results. With this method, I was able to generate most quadric surfaces (including elliptic paraboloids). However, no matter what I tried, I was not able to generate a hyperbolic paraboloid or a hyperboloid of one sheet. Am I not picking the right normals for this? Or is my reasoning flawed? Could it be the case that it is actually not possible to generate these quadric surfaces by cutting a 4-dimensional cone with a plane?


Is it possible within SFDC to identify which reports are using a specific object?  I would like to obsolete the reports but don’t know how to identify short of looking up each individual report

I am trying to hunt down Reports on a specific object and having trouble finding this information anywhere. The  object does not seem to have any fields that indicate the Report Type, nor any other indicators as to what object the Report is built on.  Is this information accessible? Is there any way to find all reports of a specific type, or on a specific object?


If I've counted correctly, there are ten published adventures for D&D 5e, but many more from earlier editions. I would like to make use of these adventures from previous editions; however, given my lack of experience, I don't know what issues may be encountered in the process of trying to run such adventures using the 5e rules.  What are the barriers to running published adventures from previous editions in 5e?

Before I get into the details I just want to mention that I'm working in a remote area right now and don't have access to the 5e Starter Set, just the downloadable PDFs.  I'm looking for advice on how to upgrade adventures/encounters from older versions of D&D to 5e.  This looks like it would be fairly straightforward for 3e and Pathfinder, although I'm not really familiar with them.  For these cases the CRs of the creatures look to be fairly similar so I think you could almost use them as is. Upgrading from 4e seems like it would be much trickier since the combat mechanics of 5e are so different.    For example, look at the case of encounters A2 and A3 from Keep on the Shadowfell.  A2 has a total of 13 kobold warriors, 10 minions, 1 slinger, 1 skirmisher, and 1 dragon shield.  This looks like it would be way too much for a 1st level party of 5 to handle.  To upgrade this to 5ed I was thinking I could just cut back the number of kobolds to something more reasonable, say 8, maybe give one or two of the kobolds some different weapons for a bit of colour, and I would have an encounter that would rate as medium difficulty.    Encounter A3 is a bit trickier because in addition to 15 various kobolds it also includes a priest and Irontooth.  This is the part that I'm really struggling with, how to deal with the boss type characters so that they are still interesting and challenging but not too powerful to handle.  As written just Irontooth and the wyrm priest would probably wipe out a 1st level party in a couple of rounds.  I wouldn't want to just drop them from the encounter because they add something interesting and provide some hooks for moving the story along.


At the login screen, I type my password, then hit enter and I see a quick black screen with some text, as if something crashed, and it goes back to the login screen..  Help?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I have to close my browser to make it stop. If I try to go to  it redidects me to  What's going on??

All of a sudden I am getting redirected to  when I am trying to access . The other Stack Exchange websites are working perfectly and I already tried it on a different computer as well. What is going wrong?


Do While Cells(i, 1).Value <> ""     ....      End If     i = i + 1 Loop End Sub   Right. It works fine with numbers and stop perfectly. But With Text. It does not stop.  Ideally I want to stop at the last row of my content rather than my last row in Excel. I manage to make it work fine with numbers, but I cannot fix it with Text.  Any help would be great as I am a beginner in VBA.  Sub checkRoutine() Dim i As Integer Dim LastRow As Long  i = 1   Do While Cells(i, 1).Value <> ""     If IsNumeric(Cells(i, 1).Value) Then Cells(i, 2).Value = Cells(i, 1).Value & " " & Cells(7, 5).Value      If Not IsNumeric(Cells(i, 1).Value) Then         LastRow = Range("A" & Rows.Count).End(xlUp).row + 1         ActiveSheet.Cells(LastRow, "A").Value = Cells(i, 1).Value & " " & Cells(7, 5).Value     End If     i = i + 1 Loop End Sub

How can I find the last row that contains data in a specific column and on a specific sheet?


I installed Ubuntu 18.04(LTS) just yesterday. I am trying to install packages using sudo apt-get install , but I am getting the below error (this example is for 'make') :  Package make is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'make' has no installation candidate  I tried googling it, found something related to mirrors and sources, but not able to figure out what to do. Please help.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


A troop of monkeys _____ coming towards us.   Which auxiliary verb should be here (is / are)?

Isn't the following sentence grammatically correct?     The group of fifty people are going to arrive Thursday.   What's wrong with it? Someone said it should be      The group of fifty people is going to arrive Thursday.   Why? People is plural so why is people is better than people are?


I made a material, added a bump before but it didn't worked at all. where do I need to put the 'Bump' option on my nodes? Which is the correct place? I'm pretty new about using this.  Please help me!

I have a simple diffuse shader. I would like to add some bump to it. How can I do this in Cycles? Where do I plug in my checkered texture.


I'd like to show that $\Vert f(t + x) - f(x) \Vert_p \rightarrow 0$ as $t \rightarrow 0$, where $f \in L^p([0, \infty))$ and $\Vert \cdot \Vert_p$ is the usual norm on $L^p$. First I thought of using the Lebesgue-Dominated-Convergence theorem but I can't quite see how to estimate the function $f(t + x) - f(x)$.   Any hint is appreciated!  Thanks!

I am having a hard time with the following real analysis qual problem.  Any help would be awesome.  Suppose that $f \in L^p(\mathbb{R})$, where $1\leq p< + \infty$. Let $T_r(f)(t)=f(t−r)$. Show that $\lim_{r \to 0} \|T_rf−f\|_{L_p} =0$, that is $$ \lim_{r\to 0} \left( \int_{\mathbb R} |f(t-r) - f(t)|^p \mathrm d t\right)^{1/p} =0.$$


"The dark brown coat will match the light brown pants perfectly"  Do 'dark' and 'light' function here as adjectives modifying 'brown' or are they adverbs informing us to the manner of degree? I've always read them as adjectives, but a Cingletree grammar resource listed them as adverbs.

"Bright" is listed in the OED as an adjective. However, in front of a color being used as an adjective, it performs as an adverb since adverbs(not adjectives) modify adjectives.     Ex. "The bright red car..."   In this situation, what part of speech is "bright"?


I am to find all the generators of the cyclic group $Z_{n}$. I know that $Z_{n}$ is a cyclic group because it can be generated by $\{1 \}$. However I think that $Z_{n}$ can be generated not only by $\{1\}$ but by $\{1, 2, 3,4,...,n-1\}$. Unfortunately I don't know how can give the proof of that.

A cyclic group is a group that is generated by a single element.  That means that there exists an element $g$, say, such that every other element of the group can be written as a power of $g$.  This element $g$ is the generator of the group.  Is that a correct explanation for what a cyclic group and a generator are? How can we find the generator of a cyclic group and how can we say how many generators should there be?


How does one solve $$ x = \arccos(x) $$ for $x$?  Is there an exact solution achievable by hand? I tried wolfram|alpha, but it only spits out the solution  $$ x = \text{ root of }\quad x-\cos^{-1}(x) \quad \text{ near } x = 0.739085 $$

I would like to know how can we solve the equation $\cos x = x$, without graphing. I know that  there would only be one solution, that is obvious, that too in between $0$  and $\frac{\pi}{2}$. Is there any real expression in finite terms [perhaps we call that closed form, I am not sure] that could give $x$ or $\cos x$. Although I have not studied Taylor series, I know that it only gives an infinite series, which is not what I want. I suspect that it could not be done, but can anyone explain me why?  Just for completeness, Wolfram Alpha, gives the approximate answer $x = 0.7390851332151606416553120876738734040134$, but fails to give a exact solution.


I want to prove this fact that if X is a topological space which is covered by a family of open subsets {U_i} than dimX=supdimU_i  One direction I can see that the RHS is less than or equal to the that of LHS...but the other direction is I have not been able to prove..any help is appreciated

Can someone give a hint or a solution for showing that a scheme has Krull dimension $d$ if and only if there is an affine open cover of the scheme such that the Krull dimension of each affine scheme is at most $d$, with equality for at least one affine scheme in the cover?


I am struggling with a part of my textbook can anyone help me? It states: $$ \frac{\sin(2m+1) \theta}{\sin \theta} = 1 + 2 \cos2\theta + 2\cos4\theta+\dots+ 2\cos2m\theta$$  Why is this obvious? Do I have to perform a Taylor series?  Any help appreciated

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


Every time you connect a device Photos.app opens and you have to disable it for every device one by one.   How do you disable this for all devices you connect?

How can I prevent iPhoto/Photos/Image Capture from launching everytime I plug in my iPad/iPhone?


I'm new to Linux so I may ask some simple or stupid questions.  I want to set up a file & web server. Can this be done on the same machine or do I need to have separate machines?  I have downloaded both the desktop ISO & Server ISO versions but cannot get either one to install correctly.  I have created a bootable CD of the server version.   During installation I am asked to select country / keyboard & language, then get an error that the CD cannot be mounted.  Why is it trying to mount the CD? and does this mean I need to have a CD burner in my machine?  The machine has clean / wiped & formatted HDD so no conflicts with any other op sys or software.  Starting to pull my hair out as I have been trying to install for a week now.  When trying to create a bootable CD of the desktop version it failed as it is 707mb and a CD is only 700MB.  My system is 32x Dual P3 processors and 512mb ram 160gb HDD. This is my test system prior to reconfiguring an existing windows machine.  Suggestions / advice please.  Thanks.

I would like to see a full how-to guide on how to install Ubuntu.


I confronted a problem, that is  $$ \lim_{x \to 0,y \to 0} \frac{x^2y^2}{x^3+y^3} $$  I tried to use $x=r\cos(\theta) , y=r\sin(\theta)$ to solve the problem, and I got  $$\lim_{r \to 0}r(\frac{\cos^2(\theta)\sin^2(\theta)}{\cos^3(\theta)+\sin^3(\theta)})$$ And no matter what value $\theta$ takes, we all have the limit is zero.  My question is: (1) Am I right? Or (2) If we can change the limit into such "$rf(\theta)$" form, when r goes to zero, will the limit go to zero?

I want to know whether $\lim_{(x,y)\to (0,0)}\dfrac{x^2y^2}{x^3+y^3}$ exists or not. I tried to approximate to (0,0) from different "paths" and the result was always 0. For example,  $f(x,mx^2) = \dfrac{m^2x^3}{1+m^3x^3}$  But that doesn't show that the limit is 0.


If $f(x)$ is a real function with all roots real and $f(x)$ has all its coefficients $1$ or $-1$. (Some can be 1 and others can be -1 but no other value) . Then we have to find the constraint on degree of $f(x)$.  My attempt : Let $f(x)$ be   $a_{0}x^{n} +a_{1}x^{n-1} + ....+ a_{n-1}x +a_{n}$ So we have sum of roots(S) = $+1$ or $-1$ , Similarly product of roots taken two at once(P)= $+1$ or $-1$. So sum of squares of roots = $S^2 - 2P$ .This must be greater than 0.Solving this we get sum of squares of roots is equal to $3$. (Excluding the case when degree is$1$).But after this I couldn't arrive at any satisfactory result.  Note :: We have not been taught calculus yet.

So I was going through  my 11th class package on Quadratic equations and I saw a question to prove that a polynomial of $4$th degree with all real roots cannot have $\pm 1$ as all its coefficients.   I tried proving it using calculus, by showing that at least one consecutive maxima  and minima will lie either above or below the x axis, but couldn't solve it using that.  I also tried using Descartes Rule of Signs but couldn't solve it with that too. Any help?


Prove that $\sqrt{2} + \sqrt{7}$ is irrational using contradiction.  I would appreciate if you could go over the proof in as much detail as possible.  Thanks in advance.

Can the expression $\sqrt{n} + \sqrt{m}$ be rational if neither $n,m \in \mathbb{N}$ are perfect squares? It doesn't seem likely, the only way that could happen is if for example $\sqrt{m} = a-\sqrt{n}, \ \ a \in \mathbb{Q}$, which I don't think is possible, but how to show it?


I use the mybatis and springMVC,and the database is the MySql,I know the configuration of the SpringMVC and mybatis are right ,but when I want to write a demo of the blob ,it does't work,this is the code. FileMapper.java public interface FileMapper {     //插入文件     int insert(ContractFile file);     //读取文件     ContractFile selectByFileName(String fileName); }  FileMapper.xml <insert id="insert" parameterType="com.beebank.test.model.ContractFile">     insert into t_base_file     (fileId, fileName, fileContent)     values     (#{fileId,jdbcType=INTEGER},     #{fileName,jdbcType=VARCHAR},     #{fileContent,jdbcType=BLOB}) </insert>  ContractFile.java public class ContractFile {     private Integer fileId;     private String fileName;     private byte[] fileContent;     // getter() and setter()... }  TestFile.java(the main code) String fileName = input.nextLine(); File file = new File(fileUrl + fileName); FileInputStream fis = new FileInputStream(file); byte[] fileContent = new byte[(int)file.length()]; fis.read(fileContent); ContractFile contractFile=new ContractFile(); contractFile.setFileId(1); contractFile.setFileName(fileName); contractFile.setFileContent(fileContent); mapper.insert(contractFile); fis.close();  This is my first time to ask and my English is not good, so Hope we learn from each other。

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I travelled from Chennai to Sydney, Australia last year in July. I brought a smartphone and personal laptop with me while leaving to Australia and didn’t declare them as they are for my personal use. I have now purchased an iPhone and a MacBook here in Sydney as I am leaving back to India in a few days. Could someone please let me know if there will be any customs cost incurred on carrying these two laptops and two mobile phones in carriage luggage.  Please suggest if there is any way that I can manipulate this situation to get rid of the customs.

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


In other words, are there any historical reasons that set mains supply voltage to 120, 127, 220, 240Vrms per phase, and 50/60Hz? These are the most common voltages/frequencies, there are many others, depending on country. Here in Brazil a single phase is always 127Vrms/60Hz.

It just struck me that Utility Companies world-wide supply domestic users at either 50/60Hz. It could have been selected to be 10 Hz, or 100 Hz ... whatever  Was 50/60 chosen at random? Is there some rationale involved (efficiency, easier to construct/control etc) in restricting domestic supply to either 50/60 Hz?  In other words, if I were designing a power system, why would I pick 50/60 Hz instead of some other frequency?


i get the following error while running a packet sniffer code:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at ps.MainGUI.startbtnActionPerformed(MainGUI.java:399)     at ps.MainGUI.access$000(MainGUI.java:26)   what could be the reason??the program code is give below :   // TODO add your handling code here:  startPacketbtn();  ps.startUpdating();   and   public class MainGUI extends javax.swing.JFrame {  public DefaultTableModel dtmPacket = new DefaultTableModel(); PSCaptor ps; /** Creates new form MainGUI */ public MainGUI(int bufsize,boolean mode,int deviceno) {     initComponents();     System.out.println("HERE");


I just installed Lubuntu on an old HP Envy 17 with Radeon 6850M The machine boots up using the integrated Intel GPU. How do I switch to the Radeon GPU? I haven't manually configured X since the XFree86 days :)

I just installed Oibaf's graphics driver, on my laptop, and also Lutris (with Wine and all that) beacuse I want to play games like Diablo 3.  Everything worked fine, I also installed vulkan, and  The output of lshw -c video is :    *-display                     description: VGA compatible controller    product: HD Graphics 5500    vendor: Intel Corporation    physical id: 2    bus info: pci@0000:00:02.0    version: 09    width: 64 bits    clock: 33MHz    capabilities: msi pm vga_controller bus_master cap_list rom    configuration: driver=i915 latency=0    resources: irq:45 memory:d3000000-d3ffffff memory:c0000000-cfffffff ioport:7000(size=64) memory:c0000-dffff  *-display    description: Display controller    product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430]    vendor: Advanced Micro Devices, Inc. [AMD/ATI]    physical id: 0    bus info: pci@0000:0d:00.0    version: 83    width: 64 bits    clock: 33MHz    capabilities: pm pciexpress msi bus_master cap_list rom    configuration: driver=radeon latency=0    resources: irq:46 memory:b0000000-bfffffff memory:d5000000-d503ffff ioport:4000(size=256) memory:d5040000-d505ffff   My video card is AMD R5 M430, and the laptop is HP 250 G5  Also here is the output of lspci -k | grep -EA3 'VGA|Display|3D'  00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)         Subsystem: Hewlett-Packard Company HD Graphics 5500         Kernel driver in use: i915         Kernel modules: i915 -- 0d:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (rev 83)         Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520]         Kernel driver in use: radeon         Kernel modules: radeon, amdgpu


I'm working on trying to create a website, and I want an image to appear to the right side of the title I have picked, but I cant find any way to align them that properly works.    .title {   background-color: white;   color: black;   width: 680px; }  .logo {   width: 100px;   height: 100px; }

     Computer Science A-Level Notes

     can anyone tell me what I can do?

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I have a mixed effect model to model crop yield as a function of rainfall and temperature:   mdl <- lmer(yield ~ rainfall + I(rainfall^2) + I(temperature^2) +        (1|location) + (1|year))   I look at the predicted values and the some values of predicted yield are negative. Now realistically, yield can never be negative. So what do I do:  (1) make all the predicted negative values of yield equal to 0. Does this makes sense?  OR  (2) log the observed yield value.    mdl <- lmer(log(yield) ~ rainfall + I(rainfall^2) + I(temperature^2) +         (1|location) + (1|year))   Backtransforming the logged predicted yield value will always be positive and hence my predicted yield will never be zero. However, taking the log of yield makes my residuals more skewed and violate the normality assumption.   Any advise?  I can provide data and plots if needed.

I'm using linear regression to predict a price which is obviously positive. I have only one feature which is gross_area. I standardized it (z-score) I got this kind of value:  array([[ 1.        , -0.48311432],        [ 1.        ,  0.68052306],        [ 1.        ,  2.1426852 ],        [ 1.        , -1.17398593],        [ 1.        , -0.16265712]])   Where the 1 is the constant for the intercept term. I predict the parameters(predictors) and I got this:  array([[ 31780004.85045217],        [ 27347542.4693376 ]])   Where the first cell is the intercept term and the second cell correspond to the parameter found for my feature gross_area.  My problem is the following, when I take for example the fourth line and I compute the matrix multiplication XB to get my prediction, I got this:  In [797]: np.dot(training[4], theta) Out[797]: array([-325625.35640697])   Which is totally wrong since I cannot have negative value for my dependent variable. It seems like because of my normalization where I got negative value for my feature, I ended up with a negative predicted value for some tuple. How can is it possible and how can I fix this ? Thank you.  This is what I have predict graphically:   with y=price , x =gross area


I created a "path" curve and add geometry using "Bevel object". How to turn this object into a simple mesh?

Is is possible to remove the curves and only have the mesh of a tree that was created with the saplings add-on?   I'd like to apply a decimate modifier to have a few low-poly trees, but this doesn't work because of the curves. I get this message: "Cannot apply constructive modifiers on a curve."


 close openId

   I want to remove the li element when click a.close.The li is generate dynamic, which means each time a new li was generated, I will do something like this.  $("a.close").unbind("click").click(function(){     console.log("close click"); })   however, it didn't work as expected, when I type $("a.close").click() in chrome console, it print "close click" as expected, but when I click the a.close area with mouse, it didn't show anything, which means the event didn't trigger.  what is the difference between js's click function and mouce click using hands?

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.