Numbering of compounds in the order it appears in the schemes (bpchem or similar)

I am using chemstyle and bpchem to number my compounds. I save my chemdraw drawings as eps and use TMP and TMP2 as markers that will replaced by the compound numbers. As long as \CNlabel is used before the scheme is inserted, it works fine, but if the text is below the picture as in the following example, the labeling in the text is different from the labeling in the schemes.   \documentclass{article}  \usepackage[runs=2]{auto-pst-pdf} \usepackage{bpchem} \usepackage[journal=rsc, tracking=bpchem]{chemstyle} \usepackage[version=3]{mhchem}   \begin{document}  \begin{scheme}     \begin{center}         \schemeref[TMP]{1}         \schemeref[TMP2]{2}         \includegraphics{Reactions_MSC/I010}     \end{center} \end{scheme}  \begin{scheme}     \begin{center}         \schemeref[TMP]{3}         \schemeref[TMP2]{4}         \includegraphics{Reactions_MSC/I012}     \end{center} \end{scheme}    Text where I mention the compounds in a different order than in the schemes: \CNlabel{2}, \CNlabel{3}, \CNlabel{4}, \CNlabel{1}  \end{document}    Additionally, I would prefer to have the numbering in the order the compounds appear in the schemes instead of in the order they appear in the text. Is there a good solution to do this? One possible workaround I can think of would be to add a list like this in the beginning of the document:   \CNlabelnoref{1} \CNlabelnoref{2} \CNlabelnoref{3} \CNlabelnoref{4}   To do this manually, however, would be quite tedious. Is there a way I could generate such a list automatically?


Question about finite ring with more than one element; division ring

A finite ring with more than one element and no zero divisors is a division ring. (Hungerford, Algebra, Exercise 6, Chapter 3, Section 1.)   This a problem taken from Hungerford's graduate algebra text. Hungerford defines left and right zero divisors and then says that an element is a zero divisor if it is both a left and right zero divisor. I took a peek at a solution to the exercise and the author of the solution says that for $r \in R-\{0\}=R^*$, $rR^*=R^*=R^*r$. I might be missing something.   Say I want to show $rR^*=R^*$. Pick $ry \in rR^*$. If $ry=0$ then this implies that $r$ is a left zero divisor and $y$ is a right zero divisor.      $R$ has no zero divisors, but I am assuming this doesn't exclude the possibility of elements being a right zero divisor or a left zero divisor. I am thinking correctly here?    Just answering this step is fine, I think I can try to continue working on the problem from this point. Thanks.


How might I prove that an n-length subset of {1,2,..2n-2} must have at least 2 consecutive members?

I am trying to prove that at least 2 members of an n-length subset of {1,2,...2n-1} will be relatively prime. The way I am thinking about it is that if 1 is included, then 1 is relatively prime with any other member. If 1 is not included, then there are only 2n-2 choices. Because of spacing, two of these must be consecutive and since any two consecutive numbers are relatively prime, this proves the original theorem. I will prove that any two consecutive numbers are relatively prime with Euclidean algorithm, but I don't know how to prove that there must be consecutive numbers even though I know its true.


How to upgrade a package to the latest version?

I am using Ubuntu 18.04.3 LTS (Bionic Beaver) and I installed patroni using command sudo apt-get install patroni.  The version of patroni that got installed is 1.61 but I found that this version has a bug and therefore wanted to upgrade to the latest version of the patroni but through apt  So I looked here  and found that the latest stable version that I could install is Patroni 1.6.4  My question is how can I install this latest version of patroni ?  When I try to look for available versions of patroni I get the following output:  sudo apt list -a patroni Listing... Done patroni/bionic-pgdg,bionic-pgdg,now 1.6.1-1.pgdg18.04+1 all [installed] patroni/bionic,bionic 1.4.2-2ubuntu1 all


I have created a T test in R and got the below output.  t.test(casein,mu=pw,alternative="greater")  ##  One Sample t-test ##  ## data:  casein ## t = 3.348, df = 11, p-value = 0.003251 ## alternative hypothesis: true mean is greater than 261.3099 ## 95 percent confidence interval: ##  290.1791      Inf ## sample estimates: ## mean of x  ## 323.5833    Here as you can see the P-value is 0.003, which is less than the significant value of 0.05. Hence shouldn't the alternative hypothesis be rejected in this case? How is true?


Please look at the following relation.  $$\forall k \in \mathbb{N}, \ \ \ \ \ \sum^k_{n=0}\frac{(k-n)^k(-1)^n}{(k-n)!n!}=1$$  I don't know a proof of this relation.   I tried mathematical induction. But it didn't work.


Question. Let $~f \in C^1[-\pi,\pi]$ such that $f(-\pi)=f(\pi)$ . Define, for $n\in \mathbb{N}$, $$b_n=\int_{-\pi}^{\pi}f(t) \sin nt~ dt$$ Which of the following statements are true? a. $b_n \to 0$ as $n\to \infty$. b. $nb_n \to 0$, as $n\to \infty$. c. The series $\sum n^3 b_n^3$ is absolutely convergent.  My Solution. a. True. Since by Riemann-Lebesgue Lemma we know for any $f \in L(I)$ and any $\beta \in \mathbb{R}$ we have:$$ \lim_{\alpha \to +\infty}\int_I f(t) \sin (\alpha t+ \beta)=0$$ b. True. Using integration by parts we get $~nb_n=\int_{-\pi}^{\pi}f(t) \cos nt~ dt$. Again using Riemann-Lebesgue Lemma we have the results. c. I can't figure out how to conclude (c). Please help. Thank you.


I'm looking for a book about digital photography that is dealing with the technical stuff in an exhaustive way. It maybe something like explaining from  what is a histogram to describing how sensors work, optic formulas etc... I had such a book for Video so I hope it exists for photography but I can't find anything. Thanks!


Run Unity on external monitor with Bumblebee

I realise there are lots of other questions about this, but they are all about the basic setup. I have gotten most of the way there but I have a very specific question: I want to run full Unity on the external (HDMI) monitor, and I don't care if the laptop display is unusable.  I have a Dell XPS 15 with Nvidia GT 540M with Optimus. (DAMN OPTIMUS!!!!) I have Bumblebee installed. I am able to run the system on the laptop display, and I can use optirun to run programs like glxspheres in high-performance mode. When I plug in the external monitor, I see nothing, and xrandr does not detect it ("HDMI1 disconnected (normal left inverted right x axis y axis)").  Here's what I've done so far (working from Bumblebee's  guide). I followed the "extra screen" advice there, so I have edited bumblebee.conf and xorg.conf.nvidia as instructed. Now, if I run:  export DISPLAY=:8 LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH optirun glxspheres   I see the glxspheres demo on the external monitor (without any window dressing). Woohoo!  Now the next step is to shut down Unity on the laptop display and test that glxspheres still works. So I hit Ctrl+Alt+F1 to go to the non-graphical terminal. Then:  sudo service lightdm stop export DISPLAY=:8 LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH optirun glxspheres   Again, I see glxspheres on the external monitor.  Now the Bumblebee guide tells you to do "optirun wmii& (or other like startlxde)" but I don't want to change to another window manager. How can I run Unity on the external monitor?  I tried optirun unity and I got most of the way there. This starts up Unity on the external monitor. I can see the desktop, and the mouse works. I can run other programs inside Unity. There are just a couple of problems:   Certain keyboard combinations don't get detected by Unity -- looks like anything involving Ctrl as well as the Fn key. (e.g.: Ctrl+Alt+T didn't work to get a terminal; Fn+F11 didn't work to change the volume.) Keyboard strokes appear in the terminal as well as Unity. I don't want that since there may be passwords being typed. If I switch to another screen (e.g., Ctrl+Alt+F8), the audio stops working, so this is not a viable solution to #2.   I feel like these three issues are related. I think the main problem is that I shouldn't be directly running Unity, but instead, running lightdm. I've tried optirun lightdm but it doesn't work at all. Hoping someone knows. If not, hopefully at least this question will help people almost-run Unity on an external monitor.


Is the set $E$ is open, closed, compact in $\mathbb{Q}$

Question: regard $\mathbb{Q}$ as a metric space with $d(p,q)=|p-q|$.   Let $E$ be the set of all $p\in \mathbb{Q}$ such that $2<p^2<3$. Show   that $E$ is closed and bounded, but $E$ is not compact. Also show that   $E$ is open.   My attempt: given set $E$ is,   $$E=\{p\in \mathbb{Q} : 2<p^2<3\}$$  Clearly, $E=(\sqrt 2, \sqrt 3)\cap \mathbb{Q}$ where $(\sqrt 2, \sqrt 3)$ is open set in $\mathbb{R}$. Hence $E$ is open in $\mathbb{Q}$.   Similarly $E$ is closed because $E=[\sqrt 2, \sqrt 3]\cap \mathbb{Q}$.  $E$ is bounded is obvious.   I don't know ** how to show $E$ is not compact in $\mathbb{Q}$ **. I know I have to find an open cover of $E$ which do not have finite subcover. But, is there is any other easy way to show $E$ is not compact in $\mathbb{Q}$?   Further, is my solution for showing $E$ is open, closed in $\mathbb{Q}$ is correct?   Please help.


Why is Google reporting no authorship when I created the link?

I wrote a guest blog post that's located here:    At the bottom I have my name linked to my G+ profile with the author relationship, as specified by Google to establish relationship:  J. Pablo Fernández   I assume the onclick and target is added by their CMS. Could that stop G+ authorship from being detected?  I'm testing whether G+ authorship is being detected or not here:   For other pages that I'm the author of, not only the authorship works but also a search result displays my picture and name, for example:


Gravitational boson violating relativity

Currently doing a introductory degree level physics course, they were talking about how changes in gravity/gravitational field cause changes so quickly that if you assigned it the "graviton" said boson would have to be breaking the speed of limit in order for the changes to be possible.  My question, is there any research or current theory's that are at all successful in resolving this issue ?


I would appreciate if somebody could help me with the following problem  Let $|x|\leq1, |y|\leq 1$. Show that  $$ 0  \leq x^{2}+y^{2} -2x^{2} y^{2}+2xy  \sqrt{1-x^{2}}  \sqrt{1-y^{2}} \leq 1 $$


What is a quick and easy way to make a file that is, say, 2 GB in size?


What would be the symbol for 'multiplication on division'?

The symbol I would like to obtain ought to be like the symbol '\pm'.


In the United States, Bank of America credit cards have both a "total credit line" and a "cash credit line". Why is the "cash credit line" lower than the "total credit line"? (I don't know if that's the case for other/all banks in the United States)  My understanding is that:   total credit line  () The total amount of credit available on your credit card account. cash advance  cash credit line  () The cash credit line available is a portion of the total credit available on your credit card, and is the maximum available credit for bank  () transactions. Generally, bank cash advances consist of ATM cash advances, over the counter (OTC) cash advances, same-day online cash advances, overdraft protection cash advances, cash equivalents, and applicable transaction fees.   It's not obvious to me why the "cash credit line" lower than the "total credit line". Maybe cash advances carry more risk for the bank than other types of credit?


Windows file copy dialog: Why is the estimation so... BAD?

I know that the Windows copy dialog (in Windows XP) stores the copy in memory first, and it is still copying after the dialog closes, so the time is off, but why is the estimation of the time it will take to make a copy so inaccurate, even when memory copying has been disabled (in Vista and Windows 7)? It seems so arbitrary! How does the whole copy procedure work, and why can't Windows estimate it correctly?


Do students wear muggle clothing while not in classes at Hogwarts (like they do in the films)?

In the Harry Potter films, Harry, Ron, Hermione, and the other students wear muggle clothing while not in classes at Hogwarts:    Even "purebloods" like Draco Malfoy wear muggle clothes, albeit more expensive and distinguished ones:    In the books, do students wear this kind of clothing while not in classes at Hogwarts?


Why didn't the Rebellion use any ion guns to defeat the AT-ATs at the Battle of Hoth, as we saw in Rogue One?

In Rogue One, we see the Rebellion taking down AT-ACTs by using ion guns (about the size of a carbine) to disable its legs until it falls over. Why were these tactics not used at the Battle of Hoth in The Empire Strikes Back?  Sure it's cold rolling down the window of a snowspeeder to fire the gun, but it works. While the harpoons and tow cables that Luke suggested were effective, it seems strange that the Rebellion didn't use these tried and true tactics. I see no reason to think that the Rebels didn't have ion guns if their arsenal had them before.


Let $f:\mathbb C\to\mathbb C$ is entire function. And $f(z+1)=f(z)$ and $f(z+i)=f(z)$ then what can you say about $f$?

Let $f:\mathbb C\to\mathbb C$ is entire function. And $f(z+1)=f(z)$ and $f(z+i)=f(z)$ then what can you say about $f$ ?  I guessed that it must be a constant because evaluating the function on a translation of $z$ by 1 unit and $i$ result the same. so it must be a constant. But I need a concrete argument. Thanks in a bunch.


How to wire a SessionFactory into a Hibernate Interceptor with Spring?

So, I am following the Hibernate documentation to configure interceptors (). Then, I am registering my interceptor in the AnnotationSessionFactoryBean as follows:  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="entityInterceptor"> <bean class="domain.interceptor.AddressInterceptor"/> </property> </bean>   What I want to achieve is to insert a row in my log table when something is caught in my Interceptor. Though, this introduces a cyclical configuration dependency: the Interceptor needs the SessionFactory and the SessionFactory needs the Interceptor. How could I wire in the SessionFactory in my Interceptor?


As digitally is to digital, is analogously or analogically to analog(ue)?


How can I install .ipa file to my iPhone simulator?

I need to install .ipa file to my iPhone simulator.   I tried to change the extension .ipa to .zip and extracted it.  And I got the Payload folder and moved the application inside to my iPhone simulators applications folder found at: /Library/Application\ Support/iPhone Simulator/6.1/Applications/.   Application appears on iPhone Simulator, But the application did't running. How to solve the problem then how to run the app.


Nvidia driver installation keeps failing, diversion issues

I've had Nvidia drivers work successfully before.  I switched to Nouveau for a little while since a game wasn't working properly, then switched back to Nvidia only to be notified of an error.  I have uninstalled and re-installed the Nvidia driver multiple times now but keep getting the same errors.  diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340 dpkg-divert: error: mismatch on package   when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'   found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64-linux-gnu/libGL.so.1.distrib by nvidia-340' dpkg: error processing archive /tmp/apt-dpkg-install-JJFsm3/13-libnvidia-gl-390_390.48-0ubuntu3_amd64.deb (--unpack): new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2  Errors were encountered while processing:  /tmp/apt-dpkg-install-JJFsm3/13-libnvidia-gl-390_390.48-0ubuntu3_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Installation method is sudo ubuntu-drivers autoinstall


jQuery Datepicker with text input that doesn't allow user input

How do I use the jQuery Datepicker with a textbox input:  $("#my_txtbox").datepicker({   // options });   that doesn't allow the user to input random text in the textbox. I want the Datepicker to pop up when the textbox gains focus or the user clicks on it, but I want the textbox to ignore any user input using the keyboard (copy & paste, or any other). I want to fill the textbox exclusively from the Datepicker calendar.  Is this possible?  jQuery 1.2.6 Datepicker 1.5.2


when I click the button nothing happens, I can't find my error:  <html> <head>     <script type="text/javascript" src="jquery-3.2.1.min.js" /> </head> <body>  <script type="text/javascript">     $(document).ready(function(){   $("#btnSubmit").click(function(){       alert("button");   }); });  </script> <input id = "btnSubmit" type="submit" value="Release"/> </body> </html>   can you give me a hing?


Table of content shows incorrect page number of reference

I add the "Reference" section into my table of content using the following command:  \addcontentsline{toc}{chapter}{References}  However, the page number of Reference shown in table of content is incorrect, and is 1 less than the real page number.  For example, if in the table of content, it shows: References          114 Then Reference actually starts from page 115.  How should I fix this error? Thank you.


Why can't I say “She died from drinking 18 cans of Coca-Cola”? Instead, the correct sentence would be “She died of drinking 18 cans of Coca-Cola”. Why does that happen?


I am using openSuse 12.3.  I have created a new user using:  linux-amvn:~ # useradd -m -G users,dev -s /bin/bash -p pass123 harbir-PC   The user harbir-PC is not able to login, when I try to log using ssh. I went ahead and looked into the /etc/passwd file and I see the following:  harbir:x:1000:100:harbir:/home/harbir:/bin/bash kdm:x:489:487:KDM Display Manager daemon:/var/lib/kdm:/bin/false harbir-PC:x:1001:100::/home/harbir-PC:/bin/bash   There is a difference between the user harbir and harbir-PC.  I have no problem with the user harbir (who I have created during installation), but I need to login using the user harbir-PC.  I also checked the /etc/shadow, and passwords are encrypted.


"A student who is researching" vs "a student researching"

Can I shorten the sentence like this?  1- This is Peter, a student who is researching nuclear physics at a university .   2- This is Peter, a student researching nuclear physics at a university.


Does this analogy accurately explain stock ownership?

Let's imagine I have a house which makes me profit because I have tenants. Would you buy a part of the house (less than 50%), if I keep all the profit myself and you know I would never sell it? Is't it would be a same that buying a share in a company with no dividend paid? --Edit: Let's reframe the question a bit, what if owning the house and lease out made by as a company. I own the company and then decide to sell the 49% of it. (I keep 51% so can keep the control) I (as a main stakeholder) would decide that I'm the CEO and I would take all the profit as a wage. So no profit, no dividend. What would happen with the share value? Would someone buy it?


How to delete empty deleted user home folder?

I have a deleted user home folder in  the "Users" folder that does not contain anything and cannot be deleted. Can anybody suggest any ideas?


Getting some kind of ID when querieng the field in soql

For below query:  System.debug([SELECT  ContactMobile FROM Case]);   I'm getting:     15:13:52:137 USER_DEBUG [1]|DEBUG|(Case:{Id=5003C000001YKoSQAW}, Case:{Id=5003C000001YKoNQAW}, Case:{Id=5003C000001YKoIQAW}, Case:{Id=5003C000001YKoDQAW}, Case:{Id=5003C000001YKo8QAG}, Case:{Id=5003C000001YKo3QAG}, Case:{Id=5003C000001YKnyQAG}, Case:{Id=5003C000001YKntQAG}, Case:{Id=5003C000001YHQLQA4}, Case:{Id=5003C000001YH0RQAW}, ...)   Now how to access that. In soql query editor the same query is giving blank rows.


An array in C# has some space overhead: it stores its sync block, its array type, possibly its element type (for reference types), its length...  Some quick tests indicate that the array's elements actually start at a cache line boundary. For example, in a byte[] it is faster for two separate threads to simultaneously update index 63 and 64, respectively (as they are on different cache lines), than for them to update index 62 and 63 (as they are on the same cache line).  I'm curious to know where the metadata is stored. Does it go at the end, possibly residing in the same cache line as the last few elements? Or is it stored elsewhere altogether?  This could be useful when trying to cache-optimize the usage of some array. If the metadata is stored in a separate cache line, then there is probably nothing we can do to avoid that extra cache line fill whenever the array is used. However, if it is stored in the last cache line, then the array size could be optimized to leave precisely enough room for the metadata, and the elements in that cache line could be probed first, as it is available anyway.


Are Melkor's dead Maiar imprisoned with him?

We know that Maiar are immortal - when their physical body dies, they return to their Valar who can resurrect them, as we can see in this threat from Luthien to Sauron:     Ere [Sauron's] spirit left its dark house, Luthien came to him and that he should be stripped of his raiment of flesh, and his ghost sent quaking back to Morgoth; and she said 'There everlastingly thy naked self shall endure the torment of his scorn, pierced by his eyes, unless thou yield to me the mastery of thy tower   or from Gandalf's memories:     "Naked I was sent back—for a brief time, until my task is done. And naked I lay upon the mountain-top. There I lay staring upward, while the stars wheeled over, and each day was as long as a life-age of the earth."   But Luthien's threat was made in the First Age, when Melkor was free and powerful, and now he is banished. Does this mean that his Maia followers (like Balrogs or Sauron) that didn't attach themselves to some objects like the One Ring are really, irrecoverably dead when they die? Do they cease to exist or maybe get imprisoned with their master?  Please note that Sauron is a special case: his spirit is bound to the One Ring, and he can't be destroyed while the Ring exists.  He has been killed three times since the First Age: first during the fall of Númenor, after which his spirit fled to Mordor; second at the end of the Second Age, when he was separated from his ring; again he fled somewhere just to finally perish at the end of the Third Age with the destruction of the Ring. All those resurrections were done without Melkor's help.


I would like to get all nodes that are of my_custom_type type in Drupal 8.  I know I can get all the nodes (of any type) with  and the list of all types by \Drupal\node\Entity\NodeType::loadMultiple().   But how to get only the nodes of given node type?  I really don't want to use specialized module for it (if it's possible), just keep it as simple as possible. I will use the solution in my custom module.  And loading all the nodes with \Drupal\node\Entity\Node::loadMultiple() and then check their type in foreach would hit the performance too much.


Should I use 'is' or 'are' with this complex subject?

What form of to be would be right to use in this case?     Why drug abuse in general and cannabis consumption in particular is/are dangerous for your health.


I would like to ask a question about affine matrix transformations, specifically an explanation about why these two ways to interpret them are equivalent.  Suppose I have (in 2D for simplicity) an usual translation matrix T and a rotation matrix R as follows: $$ T=\begin{bmatrix}1 & 0 & tx\\0 & 1 & ty\\ 0 & 0 & 1\end{bmatrix} R=\begin{bmatrix}\cos \theta & -\sin\theta & 0\\\sin\theta & \cos\theta & 0\\ 0 & 0 & 1\end{bmatrix} $$  Suppose for example: $$ tx=0,ty=2,θ=45∘ $$  Now if I transform a quad applying translation and rotation to every vertex in this order: R * T * Vertex (Column vector), I obtain this:      Reading the transforms left-to-right both translation and rotation transforms are done around the origin, considering T first and R after. However this is equivalent to considering the same equation reading it right-to-left R first and T after, transforming the quad relative to itself and not the origin:      The result is the same. What is a mathematical explanation about why these two ways of reading the same affine transform composition are equivalent?


How did the Wights get the chain for doing this?

In Game of Thrones Season 7 Episode 6, after      the dragon was killed/injured by Night King and fell into water,    the wights lifted it out using chains.  From where did they get the chains?


Why would a bank refuse to open a bank account?

About 4 years ago, I try to open a bank account for my wife and they refused to open an account after they ran her passport. I asked the manager lady why, but she wouldn't tell me why or she refused to even give me a hint. I try to take peek at her computer screen, but she quickly turned it away from me. My wife moved to the United States back in 2004 and has been living in the USA since then. She is not an US citizen but lives on Green card. I am still confused as to why no one wants to tell me why. She is clean as far as police record goes.  Does anyone have any idea?


Is oracle case sensitive in ddl statements

Following fails to execute  create table product_instance (   "ID" number(19,0),   constraint pro_instance_pk primary key ("id") )   giving the output  SQL Error: ORA-00904: "id": invalid identifier 00904. 00000 -  "%s: invalid identifier"   However the changing "id" to "ID" works fine  create table product_instance (   "ID" number(19,0),   constraint pro_instance_pk primary key ("ID") )   Following also works fine  create table product_instance (   ID number(19,0),   constraint pro_instance_pk primary key (id) )   Appreciate if someone could answer the effect of specifying "ID" instead of just id in the DDL statements. Is oracle case sensitive or insensitive


I have seen people using both Gray and Grey but I wonder which one is correct and when to use one?


How do I get a really wide tilde?  I need to cover at least  abcdefghijklmnopqrstuvwxyz  The \widetilde command does not work. Nor using \stackrel with \sim.


Is it possible to insert an "independent" slide in a frame, and going back?

is there a possibility, while displaying an itemize, to go to an independent frame (or something like that) to show an example for example, and then go back to the itemize ?  something like... that :  \begin{frame}[first]  \begin{itemize}   \item<1> foo   \item<2> bar   % go to [second] and then go back here to see 3rd point   \item<3> baz  \end{itemize} \end{frame}  \begin{frame}[second]  % Some examples \end{frame}   (I don't care if the example second frame is not a real "frame", I'd just want to know the best way to this kind of stuff)


Reference non-included chapters in large document

I have a large document that contains many different chapters which reference each other. The body of the main latex file looks something like:  \maketitle \tableofcontents  \include{chapter1} \include{chapter2} ... \include{chapter10}   I wish to create several documents that only contain selected chapters (i.e. chapters 3 and 8). These chapters should be numbered the same as they are in the main document so the nice latex auto-numbering is less than helpful in this case. I know I can use \setcounterdepth to make sure the chapters are numbered as I wish so that's not a problem. However, once I am no longer including a chapter, latex doesn't know where to point the reference to.   Is there any solution where the compiler looks at all of the files but only actually includes some in the compiled document?   I also want only the included chapters to be in the TOC. Not sure if that would complicate the problem at hand.


"Problem with MergeList /var/lib/apt/lists/repository.spotify.com" while updating the list

Everything was working fine just yesterday. Today I wanted to update and it failed with the following error:  Pakketlijsten worden ingelezen... Fout! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en E: De pakketlijsten of het statusbestand konden of niet ontleed, of niet geopend worden.   I got Dutch localisation, so I'll try to transate here.. (hopefully it makes sense..)   first line: Reading package list... error! Last line: The packagelist or the status file couldn't be parsed or opened.   Does someone know what happened and how I can correct this issue?


Having a UV maping problem, does anyone know what this is, and how to fix it?

I have been looking all aver for this problem and haven't run in to what this is... Normally I mark my seems and I get a nice UVMap ready to texture but sometimes I get this and it is just kicking my butt trying to find a fix.   Sorry if someone already asked this. I just couldn't find what this is and why it only happens sometimes and what is causing this.


I want to completely delete everything I have with Stack Exchange, but I can only delete the accounts on specific communities. The main stackexchange.com account doesn't seem to have an option to delete it. I just see this:   (No, the "Update profile info" doesn't show any more options)


I have the same problem. but after succelsfull logging in with ctr+alt+F1 I can't use sudo. I got the message:  owner of /usr/bin/sudo must be user number 0 and the setuid bit must be set. Can anyone tel me how i should do this?


If my bike currently has 24 inch wheels, will 26 inch wheels fit?   I have a cruiser with 24 inch wheels an I want to put 26 inch wheels on it, I am not sure they will they fit.


call function not working with cd command

I am trying to execute some shell commands using python :  The command is cd /home/n1603031f/Desktop/parsec/wd/  It works fine through the shell, but when executed through python it does not work :  path_to_wd = "/home/n1603031f/Desktop/parsec/wd/" call(["cd",path_to_wd])   Error :  Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/usr/lib/python2.7/subprocess.py", line 522, in call     return Popen(*popenargs, **kwargs).wait()   File "/usr/lib/python2.7/subprocess.py", line 710, in __init__     errread, errwrite)   File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child     raise child_exception   I need this command to work as the original command I want to execute is :  cd ./parsec/wd/ && tar -cf ../abcd.tar *   which works correctly only when you change directories to not create the top-level folders in the .tar file


Consider two csv files:  $ cat given.csv 123,John 246,Paul 369,George 987,Ringo  $ cat family.csv 246,McCartney 123,Lennon 987,Starr 369,Harrison   Note that the lines are not ordered! How might I use awk, grep, and other bash tools to get a combined output file (order unimportant):  123,John,Lennon 246,Paul,McCartney 369,George,Harrison 987,Ringo,Starr   I was thinking about running a for loop over the first file, then using awk to get the id and then grepping the second file for the relevant record. Is there a more straightforward way to do this in Bash? I find that often bash has  to handle text files that I'm not yet familiar with.


How to override derived functions after extraction from std::vector?

I need to store different types of objects in a single container. All the objects that go in the container will have a void continueExecution() function with the same purpose, but the implementation is totally different. I found this question to be very helpful . I tried to implement the answer, but c++ is crushing me. Can you please suggest how to call the derived functions rather than the base functions after getting the object from std::vector? I was really hoping that any calls to base.continueExecution() would call derived.continueExecution(). please see below: Base class: - I created a base class strictly to make all my classes with the same function name be the same type. I will never create an object out of this class. The base class header file: class DelayCommandBase {     public:         DelayCommandBase();         void continueExecution(); };  The cpp file for the base class is just a print statement, and if it’s running that is bad for me (and it is running): void DelayCommandBase::continueExecution()  {     Serial.println("DelayCommandBase continueExecution function... why is c++ so hard?!"); }  Derived class - I have a bunch of these types of files, lets stick to tst.h with a TST class. : class TST : public DelayCommandBase {     // …code...     public:     void continueExecution();     //…code... };  The derived class .cpp file is implementing the continueExecution() and a bunch of other functions. I don't think the issue is there. A third class - this is what manages many objects that are constructed  using the derived classes. In the header file I am creating a vector of base type. I think this is how I can store all the derived classes in a single container (assuming I don't use boost, which I don't want to use). Header file: private:     std::vector<DelayCommandBase> midFlightCommandObjects;  In the .cpp file (all in a single function) an object is created from a derived class, is started via a function call, and is stored: int hardwarePin = 13; int delay = 1000; TST tstCommandObj(hardwarePin, delay); //a working object... Yay  //the object is executed, and all is so happy so far: tstCommandObj.start();  //Then I store it in the vector of base type: if(tstCommandObj.commandIsFinished() == false) {                midFlightCommandObjects.push_back(tstCommandObj);     Serial.println("TST object saved"); }  So far no issues. Now in a different function, in the same manager class I try the following: midFlightCommandObjects.at(i).continueExecution();  and the function in the base class runs, not the derived class with the implementation. I tried making the function virtual, but that didn’t fly. I tried using → instead of . but that gave errors that bend my mind. I tried passing the derived class as a pointer to the base class object and that didn't do anything different. I am not a programmer, and c++ is crushing my belief that I am a competent human. What do I need to do to call the derived class instead of the based class once I pull the objects out of the container?


Book recommendation for self study of General relativity

I am a second year Chemical Engineering student. However out of interest I wish to learn General theory of relativity. Can anyone please suggest some books for learning this subject?


How can I have my GPU do some of my processor's work?

I want my GPU to be able to do some of my processor's work when I'm playing games or doing tasks like that.  My processor is an   AMD FX-4200 running at 4.1 GHz and my GPU is a  NVIDIA GeForce GTX 1060 6GB.  Obviously, I have a very powerful GPU, and when I'm running less graphic-demanding games such as Star Wars Battlefront, I want to be able to have my GPU (assuming it has free processing space) do some of the processor's work. Is this possible? If so, how could I do it?


Is "The 7 Essential Meta Questions of Every Beta" still actual / up to date?

Is  still actual / up to date? In particular, are the points about the elevator pitch, and the site design still necessary to discuss in a site in beta phase? So far, I have not seen any site using an elevator pitch; English Language & Usage has a blog, but I don't see any elevator pitch in the blog, nor in the main site. The design is decided when the site is going to graduate, and the designer who works in that already open a question on the meta site to show a preview of how the site will appear; the same question is normally used to point out things that would need to be changed, or that could be changed.


Thaw / Brine partially frozen turkey at the same time

I’ve found sites that say it’s ok to start a brine for a partially frozen turkey. My question is, when you thaw a turkey using the cold water method, they say to change the water every 30 minutes. If you’re brining a partially frozen turkey, do you have to change the brine (including all the herbs and whatnot) every 30 minutes as well?


I am an artist, and I have heard that white is a 'tint' and black is a 'shade' in the artist world. I have also heard that they are colours in the normal world/scientific world. Which is correct and why?


I need to use appendChild() or jQuey's append() to append some <script> tag stuff into the document. From what I can tell, this is getting stripped out. Anyone know how to do it?


I would like to know whether a warlock can directly confront his patron without risking to lose his powers. And generally in which case the patron is allowed can take his "gift" back. I've tries searching for relevant lore but couldn't find anything. I'm playing the 5th edition.  The backstory:  I'm going to introduce a warlock into a campaign that is already running. During previous events the party has accidentally released a devil into the mortal plane and now is on a quest to kick him back. We've decided with DM that it would be interesting if that devil were my character's patron. It makes the new character a good lead to find the devil and the party wouldn't know whether to trust the new member, making things even more interesting.  However, I can't have a character that is directly allied with the party's enemy. I have a backstory that would support antagonistic relationship between my warlock and his patron so that his interests are aligned with party's. But at the same time the warlock wouldn't risk losing his powers, hence my question – can a patron take back the powers given to a warlock?  In my case I want to follow the 5th edition handbook so that the character mades a pact/contract with the devil himself.    As @Theik mentioned in the comments, in previous editions warlocks were able to inherit the power from some ancestor who made the pact, and I bet our DM would allow it. But I'd prefer to not to take this path as the character making the pact himself works better for the rest of the background I made for him.      In the end we went with the inherited powers that the devil cannot revoke.


How do I find the curve for which the area of the triangle formed by a tangent at any point and by the coordinate axes is constant?

Find the curve for which the area of the triangle formed by a tangent at any point and by the coordinate axes is constant.  For generic points $(x,y)$ the x intercept $x-\frac{dx}{dy}y$ and the y intercept $-\frac{dy}{dx}x+y$. Hence if these need to be constant we derive the equation: $$(-xy'+y)(x-y\frac{1}{y'}) = C \rightarrow -x^2y'+2xy-y^2\frac{1}{y'} = C$$ To solve this differential equation, I am tempted to substitute $y' = p$ to get the form: $$ -x^2p+2xy-y^2\frac{1}{p} = C$$ But differentiating will yield a $2yy'$ term, which is not easily dealt with in a Lagrange form. In general, if I have a lot of $y'$ but can not get it exactly into the form $y = xf(p)+g(p)$ (d'Albembert's form), what substitution should I use?


Limit of a particular variety of infinite product/series

I was musing about a particular limit,  $L = \prod\limits_{n > 0} \bigl(1 - 2^{-n}\bigr)$:  we may bound 0.288 < L < 0.308, which we may show by taking the logarithm:    $\ln(L) = \ln \bigl( \frac{315}{1024}\bigr) + \sum\limits_{n > 4} \ln\bigl(1 - 2^{-n}\bigr) > \ln\bigl(\frac{315}{1024}\bigr) - \sum\limits_{n > 4} 2^{-n} =\; \ln\bigl(\frac{315}{1024} \cdot \mathrm e^{-1/16}\bigr)$.    I was wondering if this type of infinite product (or the corresponding sum of logarithms) has a name, and whether there are techniques for obtaining a closed form expression for the limit.


I have list:  [     {'name': 'peter', 'age': 41, 'value': 1},     {'name': 'jon', 'age': 31, 'value': 5},     {'name': 'alan', 'age': 23, 'value': 3} ]   How to sort this list by 'age'?


Using recordtypes of the same name across multiple SObject types

I have one recordtype named 'India' in both Account and Contact Objects.My requirement is whenever i create a new account record of type 'India' a new contact record of type 'India' should be created automatically.  i tried with the following code:  trigger AccRecTypeTrigger on Account (before insert) {     List<RecordType> recType = [select id,name from RecordType where sobjectType = 'Account' and isActive = true];    Map<String,Id> m = new Map<String,Id>();    for(RecordType r : recType){      m.put(r.name,r.id);    }     List<Contact> conlst = new List<Contact>();    for(Account a : trigger.new){        a.recordTypeId = m.get('India');        Contact con = new Contact();        con.accountId = a.id;        con.recordTypeId = a.recordTypeId;        con.recordType.name = a.recordType.name;         conlst.add(con);       }    insert conlst; }   But i am getting following error when i try to save     Apex trigger AccRecTypeTrigger caused an unexpected exception, contact   your administrator: AccRecTypeTrigger: execution of BeforeInsert   caused by: System.NullPointerException: Attempt to de-reference a null   object: Trigger.AccRecTypeTrigger: line 14, column 1   Please help me how to achieve this......


A question about the "open source advertising" on Stack Overflow

As I can see in , the program is still active. But according to the Stack Exchange blog post , the voted banners have to be demonstrated on the Stack Overflow main site. But I never saw any of these banners there. I know that the statistics show some clicks on the banners, but I am sure I saw these banners on a open source related blog (sorry I can't find the link just now) and this means that these clicks can be collected from some 3rd party sites that like to advertise open source projects. What is the reason? Is it a bug? Did someone ever saw at least one of the mentioned banners on the Stack Overflow front page?


Grass algorithm r.neighbors doesn't work in Qgis 3.4. How can I solve this?

When I try to run the algorithm it gives me this error:     Traceback (most recent call last): File   "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py",   line 411, in processAlgorithm Grass7Utils.executeGrass(self.commands,   feedback, self.outputCommands) File   "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py",   line 372, in executeGrass for line in iter(proc.stdout.readline, ''):   File "C:\OSGEO4~1\apps\Python37\lib\codecs.py", line 322, in decode   (result, consumed) = self._buffer_decode(data, self.errors, final)      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 50: invalid continuation byte


Status of my revised manuscript: editor decision changed to under review

Two monts ago, I submitted a manuscript (Scholarone Manuscripts). I got major revisions and implemented ALL of them. Then I re-submitted my manuscript. After two days the status changed to under review. Then after five days the status changed to awaiting editor decision and then after two more days I saw my status change to under review again (today is the 3rd day with this status).  Any idea what is happening?


relation between Schrodinger equation and wave equation

I have always been confused by the relationship between the  and the .  $$ i\hbar \frac{\partial \psi}{\partial t} = - \frac{\hbar^2}{2m} \nabla^2+ U \psi  \hspace{0.25in}\text{-vs-}\hspace{0.25in}\nabla^2 E = \frac{1}{c^2}\frac{\partial^2 E}{\partial^2 t} $$  Because of the first derivative, the Schrödinger equation looks more like the .    Some derivations of the Schrodinger equation start from  for light and argue that matter should also exhibit this phenomenon.    In some notes by , it was derived by comparing the  $\delta \int n \;ds = 0 $ and Maupertuis  $\delta \int 2T(t) \; dt = 0 $.  Was this ever clarified?  How can we see the idea of a matter-wave more quantitatively?    To summarize, I am trying to understand why the Electromagnetic wave equation is hyperbolic while the Schrodinger equation is parabolic.


Can I restore an SQL 2016 database mdf at an SQL 2014 Sp1 instance?

I have a database file .mdf created in SQL server 2016. I am planning to move at a new web hosting provider who supports 2014sp1 version. Should I proceed or this is out of specs? Can I restore an 2016 version at a 2014 one?


I've got this little chunk here, but I was wondering if I could use GetTile() using a specific variable within the array. EDIT: my entire script is: using System.Collections.Generic; using UnityEngine; using UnityEngine.Tilemaps;  public class walltilemap : MonoBehaviour {     public TileBase Ground_tiles_3;     public Vector2Int size;     void Start(){         Vector3Int[] positions = new Vector3Int[size.x * size.y];         TileBase[] tileArray = new TileBase[positions.Length];          for (int index = 0; index < positions.Length; index++){             positions[index] = new Vector3Int(index % size.x, index / size.y, 0);             bool iswalltile() {                 if (Tilemap.GetTile(positions[index])){                  }                 return true;             }                          tileArray[index] = iswalltile() == true ? Ground_tiles_3 : null;         }         Tilemap WallTileMap = GetComponent<Tilemap>();         WallTileMap.SetTiles(positions, tileArray);     } }


How to print barcodes from a website based on a template?

We currently generate our own barcodes and generate a page using the barcode images; however, we also want to print these barcodes onto a . So far we have tried simply matching the margins and spacing (with CSS) using the measurements in the template above, but each browser is just too inconsistent. Does anyone have an idea how this can be done, preferably on the client side?


Is there a way in Excel 2010 to have a formula in one cell and show in a different cell?

I want the formula to be in one cell, and the result in another cell.  I do not want the answer to populate the cell that contains the formula.


Errors from whatis command. Unable to rebuild database with makewhatis?

How can I update the whatis database?  $ sudo /usr/libexec/makewhatis Password: makewhatis: /usr/share/man/whatis.tmp: Read-only file system   I believe being able to update this database will solve some other issue I'm having. My path to discovery as follows...  I recently started noticing that fish shell completions were annoyingly slow on my machine, possibly shortly after upgrading to Catalina.  I did a little profiling with fish -d5 and noticed that the majority of the time was spent on the apropos command. I did some reading and learned that the tools apropos, whatis and makewhatis are all related. They index man pages and make them searchable. Fish shell is (correctly) using them to offer helpful completions.  When I run whatis or apropos standalone, I get the following output:  $ whatis man hugo-gen-man(1)          - Generate man pages for the Hugo CLI groff_man(7)             - groff `man' macros to support generation of man pages groffer(1)               - display groff files and man~pages on X and tty man(1)                   - format and display the on-line manual pages man.conf(5)              - configuration data for man zshall(1)                - the Z shell meta-man page xml2man(1)               - MPGL to mdoc (man page) translator makewhatis: /usr/lib/./libgutenprint.2.dylib: No such file or directory makewhatis: /usr/lib/libsasl2.2.0.1.dylib: Not a directory makewhatis: /usr/lib/libldap.dylib: Not a directory makewhatis: /usr/lib/libsqlite3.0.dylib: Not a directory makewhatis: /usr/lib/libcom_err.dylib: Not a directory ...   Followed by at least 100 more lines of the "Not a directory" messages. I believe it is all these useless lines that are slowing things down.  So I thought maybe I just need to rebuild the whatis database (perhaps after the Catalina upgrade?). However, it doesn't seem to work:  $ sudo /usr/libexec/makewhatis Password: makewhatis: /usr/share/man/whatis.tmp: Read-only file system   So this part is a little disturbing. How can I rebuild the whatis database? I have a hunch this will solve my issues if I can figure it out.


Tag editing appears to be fairly random. It seems to me that the point of tags is to help me find stuff.  For instance, I use the [c#] tag to find questions on C# - one of my specialities.  Why do people keep editing tags to say [subjective] or [off-topic]? Why would I ever want to search for subjective questions?  Is this just the (still unattainable) Librarian badge calling? I'm sure we'll all get it eventually.  I tend to edit tags in the following circumstances:   The tag might help the asker get a useful answer - for instance if they've missed a C# tag on a clearly C# question. The tag might help those answering - for instance if they've failed to specify .Net 3.5 but are asking about Linq (only added in 3.5) They've put one tag where another different one might be appropriate - for instance "sql" and "2005" instead of"sql2005".   I'm not sure of the point in:   "subjective", "off-topic", etc - why bother with a tag? "duplicate" - there's a close option for this. "coding", "programming", "software" - aren't they all? "meta-discussion", etc - surely the "stackoverflow" tag already states that?   There seems to be some fairly pointless tag editing going on - with no agreement on when we should edit them.  What rules do you follow? When would you re-tag? When wouldn't you? Am I missing something? Do some people find [subjective] a really useful tag?  I've split the debate on subjective out into a .


GeoTools and PostGIS coordinate transformation gets different result

I've got a problem transforming coordinates. The result differs in PostGIS and GeoTools.  I want to transform from EPSG:4326 to EPSG:3398.   PostGIS:  indicia=> select ST_AsText(ST_Transform(ST_GeomFromText('POINT(13.387527 54.094434)', 4326),3398)) as converted;                 converted                  ------------------------------------------  POINT(4590768.20978302 5996697.68142438) (1 row)    CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326"); CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3398"); WKTReader wktReader = new WKTReader(new GeometryFactory(new PrecisionModel())); WKTWriter wktWriter = new WKTWriter(); MathTransform mathTransform = CRS.findMathTransform(sourceCRS, targetCRS, true); Geometry geom = wktReader.read("POINT(54.094434 13.387527)"); Geometry transformed = JTS.transform(geom, mathTransform); System.out.println(wktWriter.write(transformed));   Returns: POINT (5996634.451525969 4590769.450296965)  This means the GeoTools result is about 60m south of the PostGIS result.  rgdal for R is giving the same result as PostGIS.  Am I doing something wrong in using geotools/jts?


Check what kind of array this is via php

I am looking for a simple way to see if this array:  array('apples', 'bananas');  is associative or not, that is key=>value. Now PHP will give you something like:  array(2){     [0]=>'apples'     [1] => 'bananas' }   if you var_dump the above array. So in theory I have my associative array. But what I am looking for is to see if array('key' => 'some value', 'some_other_key' => 'some other value'); is a "true" associative array or if its just a regular array.  I have seen a couple posts on this through out stack but a lot of their answers are really complicated or poorly written or not even OO at all.


Find all integer solutions of equation $y = \frac{a+bx}{b-x}$

How to find all integer solutions for the equation $y = \frac{a+bx}{b-x}$, where a and b are known integer values? P.S. x and y must be integer at the same time


What does it mean for a vaccine to be "90% effective"?

It seems like a stupid question: does it "just" mean that 90% of the population won't be infected?  But if only 10% of the population would have been infected without the vaccine, then it's not effective. Thus, does "90% effective" mean that only 1% (10% of 10%) will now get infected?


Want to print multiple times in single line Python

I want to make a program which outputs the text as if it is typed live. For that, I am printing a word and waiting for 0.2 seconds and then other. I have saw this website:  But the thing is print() keeps on collecting the characters that are to be printed and then flush them after the loop is over. So I am not able to get the result that I want. This is the code: import time  time.sleep(2)  welcome = "Welcome. We will plot a graph in this program"  for i in range(len(welcome)):     time.sleep(0.2)     print(welcome[i], end="")  Please help me. Thanks.


How do electrons move in a lightning strike?

I know that a common lightning strike is an electric current and I believe air has high electrical resistance comparatively, detail is not important however I think friction caused a build up of charges (ions start to accumulate) inside the cloud and voilà... let there be light!  I like to know how do these electrons carrying a vast amount of energy and transfer it to the ground in split seconds?


Why does the for in loop reverse output the object entries?

So I have the following JS code.     const romanNumeral = {     1000: "M",     900: "CM",     500: "D",     400: "CD",     100: "C",     90: "XC",     50: "L",     40: "XL",     10 : "X",     9: "IX",     5: "V",     4: "IV",     1: "I"   }    for (const key in romanNumeral) {     console.log(romanNumeral[key])   }    Why on earth does the loop start to output from the bottom entry of the object? This doesn't make any sense to me. Is the FOR IN loop implementing some kind of sorting when looping through entries?


Should I post another answer if it is different from my other one?

I've just stumbled upon this situation: Background I saw a question and posted my answer. It's got some upvotes. Some comments were made on my answer stating that it isn't the best solution (and I agreed). I check and there is indeed a posted answer with a better solution (that has got accepted). I upvoted that better answer. Now I thought on a slightly better solution, but it is similar to the accepted answer. Question Should I post another answer, edit my answer and add the other solution or not post the answer at all? Edit 1: As raised by @Bathsheba, one could say that posting a similar answer is plagiarism. This made me search and as by Merriam-Webster's, it is  if:   one steal and pass off (the ideas or words of another) as one's own : use (another's production) without crediting the source one commit literary theft :  present as new and original an idea or product derived from an existing source   So by refering to another answer and stating that mine offers an improvement, would not be plagiarism. Question 2: Would the new answer be well-received by the community?


How to understand omniscience and omnipotence in order both can go side by side?

My question is based on what I know from this  where the question is     Are omniscience and omnipotence mutually inconsistent?   And in the link there is The God Delusion by Richard Dawkins, where in short :     If God is omniscient then He is not omnipotent.   To be honest I agree with Richard's conclusion above IF I use the understanding of omniscience and omnipotent like this :   A. Omniscience = know all things happen absolutely B. Omnipotent = a power to do anything if desired   Since (to me) if the understanding is like A and B then A and B cannot go side by side ....so, how to understand Omniscience and Omnipotent (which is not like A and B) in order Omniscience and Omnipotent can go side by side ?  Thank you.


I got sample shapefiles with the following *prj file content:     PROJCS["RGF93_Lambert_93",GEOGCS["GCS_RGF_1993",DATUM["D_RGF_1993",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",700000.0],PARAMETER["False_Northing",6600000.0],PARAMETER["Central_Meridian",3.0],PARAMETER["Standard_Parallel_1",44.0],PARAMETER["Standard_Parallel_2",49.0],PARAMETER["Latitude_Of_Origin",46.5],UNIT["Meter",1.0]]   Trying to convert the projection using the shp2pgsql command shp2pgsql -s 4326 kept the original projection and didn't convert it as requested.  I also check spatial_ref_sys table srtext field for similar known projection unsuccessfully.  How can I convert it to WGS 84 projection?


Nullpointerexception in accessing interface method in retrofit calling  Userservice.class  public interface UserService {      @POST("login")     Call<ResUser> login(@Body login login); }   RetrofitClient.class  public class RetrofitClient {      private static Retrofit retrofit=null;      public static Retrofit getClient(String url){          if(retrofit==null){             retrofit=new Retrofit.Builder()                     .baseUrl(url)                     .addConverterFactory(GsonConverterFactory.create())                     .build();         }          return retrofit;     } }   login.class      private void doLogin(String username,String password){     Call<ResUser> call=userService.login(new login(username,password));     call.enqueue(new Callback<ResUser>() {         @Override         public void onResponse(Call<ResUser> call, Response<ResUser> response) {             if(response.isSuccessful()){              Log.e("succes");             }         }          @Override         public void onFailure(Call<ResUser> call, Throwable t) {          }     });  }   ApiUtils.class  public class ApiUtils {      public static final String BASE_URL="";      public static UserService getUserService(){         return RetrofitClient.getClient(BASE_URL).create(UserService.class);     } }   i have nullpointerexception in this line    Call<ResUser> call=userService.login(new login(username,password));


How exactly does a single laser pulse from LiDAR act?

I'm trying to understand the behavior of a single laser pulse in a traditional airborne lidar. I understand that the multiple return values are representative of the surface that reflected the initial pulse. However, does a single pulse from the laser, return each reflection individually to the sensor? Or does a single pulse from the laser continue through it's path, capturing each reflection along it's way until returning to the sensor? So if a system can capture 300k pulses per second, are those 300k pulses released and captured? Or is that 100k +/- pulses returning 300k values?  Example photo: Does each disturbance in the waveform return it's own pulse to the sensor? If so, how the sensor understand the laser is continuing? And if that is also true, where does the energy come from to continue the pulse further?


Kids Story Question: Ointment gives kid wings, loses them when seen

I remember a book from my youth (1979) in my elementary school library, about a kid with a 'cool' uncle that had an elixir. When the boy applied this elixir to his back he grew wings for the night. But when he was seen by someone, the elixir would never work for him again. I remember it being hardback (but that could be wrong) with no picture on the cover.  Does anyone know what book this is?


Why does an author use a comma in the sentence?

I need your help. I’ve been learning English for now almost 3 years and can say with confidence that I’m quite good at it – although sometimes struggle with punctuation. I’ve got two sentences (taken from a newspaper and a book):  Alito and Thomas repeated a position on mandatory jurisdiction (,) and said they would not stop the Electoral College from voting Monday. He got a Maine newspaper called the Portland Press-Herald ()  and watched it for items concerning a small southern Maine town…  I can't put my head around it – why there’s a comma in the first phrase but no comma in the second one? What am I missing about it? I would really love to know why it is so. Thanks.


Can anyone help me with this question: I know it before, but I have tried to solve it myself and didnt succeed. what is the regular expression for this language: L=all words that have 00 or 11 but not both.  Thank you!


How to write an integral (not in italic) in LaTeX

I wanted to know how to write in LaTeX an integral but not in italic. Please!


how to estimate confidence interval when p is close to 0 for binomial distribution?

I was trying to get confidence interval for $\hat{p}$. However, the estimated p in the population is close to zero. So I am wondering how I can calculate the confidence interval when p is that small? ()  Thanks!


How can i make a countdown timer in C# that accounts for hours, minutes and seconds?

I am not a good programmer, it's rather my hobby. So please don't judge me for being bad at programming. This is my current code ive made for the countdown timer.  int i = 000000; private void timer1_Tick(object sender, EventArgs e) {    {             i++;             textBox1.Text = i.ToString() + "00:00:00";    } }   When I run the timer. then the TextBox1 isn't showing 00:00:01, but it's showing 100;00;00. Thank you for reading my post and again, sorry for having soo bad programming knowledge.


ZFC works as a foundation because it can prove many sentences that are "translations" of theorems from "standard" mathematics into the language of ZFC.  But there's a subtlety. When we say, "ZFC can found most of mathematics," what do we really mean?  Do we mean   ZFC proves most theorems (suitably translated into the language of sets) in the mathematics literature A metatheory that makes sense of "consistency" + the assumption that ZFC is consistent can be used to prove most theorems (suitably translated into the language of sets) in the mathematics literature A metatheory that makes sense of "models" + the assumption that ZFC has a model can be used to prove most theorems (suitably translated into the language of sets) in the mathematics literature A metatheory that makes sense of "models" + the assumption that ZFC has a standard model can be used to prove most theorems (suitably translated into the language of sets) in the mathematics literature Something else?


How to enable bluetooth when there is no hardware switch

My laptop Thinkpad Edge e320 got out of standby with bluetooth and wireless disabled. WiFi got enabled normally in unity but bluetooth says that "bluetooth is disabled by hardware switch".  There is no hw switch on my laptop. I tried:  # echo 1 > /sys/devices/platform/thinkpad_acpi/bluetooth_enable  bash: echo: write error: Operation not permitted   but as you see no results.  Fn-F9, which is radio control, does not work. Any help?


I'm trying to run the fix_bad_unicode found  with the addition:  if __name__ == '__main__':     A = fix_bad_unicode(u'hell€')     print A   I get an error at the print statement:   UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 4: ordinal not in range(128) in sublime text's console  and  UnicodeEncodeError: 'charmap' codec can't encode character u'\u20ac' in position 4: character maps to <undefined> in the windows command prompt  I have tried changing to lucida console font.  Any suggestions?  EDIT: Also, print "€" in the python prompt gives ?


To prove: If a graph is k-colorable, then it must have a k-complete graph as it's subgraph

The above is kind of my conjecture. Please help me prove it.


"No suitable context info for active keying set"

I m trying to make an animation using keyframes.When I press on "I"and location nd rotation,this error comes up no suitable context info for active keying set. Plz provide a solution in a simple manner.I am new to this,so I need a descriptive answer.I need to know exactly what to do,what to press,where to find.


TL;DR Should users with short attention spans be catered to? Ooh, is that a squirrel? The Question Should users be encouraged to begin their question with a TL;DR summary, rather than end with it? Explanation If the question is sufficiently complex to warrant a summary, I'd think that it should be placed at the top of the question so it could be seen in the preview. I'm wondering if that's a change I should start making when editing posts.


How can one get the eccentricity of the orbit of the Sun around center of the Milky Way? Can it be measured?


"Have you ever been" to France? vs. "Have you ever gone" to France? vs. "Did you ever go" to France?

Which of the grammatical constructions above is (or are) more typical of what is commonly said and heard in colloquial AE?  If all three options work, is there any difference to them meaningwise?  Also -- excluding grammar rules and switching to nonstandard -- what would be the typical response(s) from John & Jane Doe in casual speech to the question:  [FYI I'm asking this question in consideration of the following source  focusing on the various ways to respond to a present tense question starting with "Have you got..." in casual speech, and so I wish you could tell if the same ungrammatical "rule" might also apply with present perfect questions.]     Have you ever been (or gone) to France?      Would it be:         Yes, I have/No, I haven't.   Yes, I do (have been to...)/No, I don't (have been to...).   Yes, I did/No, I didn't.      -     How about if I say: Have you been to the dentist?      Would the usual, most commonly heard response(s) be:         Yes, I have/No, I haven't.   Yes, I do (have been to...)/No, I don't (have been to...).   Yes, I did/No, I didn't.      If all of these options are possible, is there any difference to them?


Integral $\int_{\frac{1}{2}}^1 \frac{\ln x}{\sqrt{x^2+1}}dx$

I am trying to evaluate $$I=\int_{1/2}^1 \frac{\log(x)}{\sqrt{x^2+1}}\,dx$$ My attempt was to integrate by parts with $u=\log(x)$ and $v=\log{(x+\sqrt{1+x^2}})$ to get$$I=-\log{\frac{1}{2}}\log{\left(\frac{1}{2}+\sqrt{1+\frac{1}{4}}\right)}-\int_{1/2}^1 \frac{\log{(x+\sqrt{1+x^2}})}{x}\,dx$$ so simplifying the integral is $$I=\log{(2\phi)}-I_1$$ where $I_1=\int_{\frac{1}{2}}^1 \frac{\sinh^{-1}(x)}{x}\,dx$ If possible I would love to get some help in evaluating those.  I also thought about considering $I(k)=\int_{\frac{1}{2}}^1 \frac{x^k} {\sqrt{x^2+1}}\,dx$ writting the denominator as a binomial series, integrate it then derivate and plug $k=0$ to get the answer but the series is not nice.


Problem with exporting blender materials to unity

I need to export this model to unity with its materials:  This model uses a few different materials in different slots:  The green and grey materials have a random color from a color ramp in each face, which is done with the use of a lightmap pack in UV editing (like in this tutorial ).  Is there any way for me to somehow get these materials working in Unity? I thought that maybe I should somehow bake them but I don't know if it's possible with many materials in one object and if the material itself uses a lightmap pack. I'd really appreciate any help as I really need to have the same look in Unity. Thanks!


Suppose xand y are real numbers and that $x^2 +9y^2 -4x +6y+4=0$ then we have to find the maximum vale of 4x-9y  I found that the equation given is that of ellipse .  I can consider a line $4x-9y=0$ which cut the ellipe .  bt by doing this its getting very comlicated .


Important things to do after installing Ubuntu Server

I just installed Ubuntu Server on a VPS.  To configure the server I'm reading the Ubuntu Server Guide. But the Ubuntu Server Guide doesn't tells me everything.  E.g. The Ubuntu Server Guide doesn't tell me about how to secure SSH, which is, in my opinion, an important thing to do after installation of a server.  I know that I've to secure SSH access, but I might forget things to configure. Because I don't know what I don't know.  Does a complete guide exists which tells me which important things I've to after installing Ubuntu server? If not, can anyone tell me those things?


Why did J.K. Rowling use such odd fractions for wizarding currency subunits?

“The gold ones are Galleons,” he explained. “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sickle, it’s easy enough.”      Harry Potter and the Philosophers Stone – Chapter 5 – Diagon Ally   The fractions 17, and 29 are not only odd (unusual, bizarre, eccentric), and odd (uneven), they are primes. Clearly this is not a well thought out system, and thus produces a really humorous effect on the text.  I initially thought that this is a diss on the imperial measurement system, because I was under the () impression that Hagrid had a southern US accent.  Has JKR ever said why she chose these fractions for the wizarding currency subunits?


I am trying to get sort the data based on the user input. But the orderby clause is not executed in LINQ. How do i do that ?? Here is my code...    [HttpGet]     public JsonResult SortData(String colName , String sortorder)     {         using( EmployeeDB db = new EmployeeDB( ) )         {             if( sortorder == "desc" )             {                 var JsonData = new                 {                     Data = (from emp in db.Employees                             orderby colName descending                             select new                             {                                 EId = emp.EId ,                                 EmployeeName = emp.EmployeeName                             }).ToList( )                 };                 return Json( JsonData , JsonRequestBehavior.AllowGet );             }             else             {                 var JsonData = new                 {                     Data = (from emp in db.Employees                             orderby colName                             select new                             {                                 EId = emp.EId ,                                 EmployeeName = emp.EmployeeName                             }).ToList( )                 };                 return Json( JsonData , JsonRequestBehavior.AllowGet );             }         }     }


Why is there a magnetic field around a magnet if there are no charges moving?

From what I understand, the magnetic force is just a relativistic effect of the electric force, and I understand how this is can be the case when considering the magnetic field generated by a current- carrying wire (length contraction of space between the electrons so they appear to be more concentrated than the positively charged ions to a 'stationary' observer, so the observer sees the wire as being negatively charged). However I do not understand why there would be a magnetic field around a permanent magnet. My teacher's explanation of permanent magnets involved there being permanent dipoles inside the magnet, however If you have two oppositely charged particles close to each other you will have an electric field around them, and not a magnetic field. I don't quite understand how lined up dipoles will produce a magnetic field if there is no motion of charges?


How do I change my Chrome language back to English?

Suddenly, my Chrome language has been changed to Tamil. I didn't make this change manually. I don't know how to change this setting to English.


Power analysis for Kruskal-Wallis or Mann-Whitney U test using R?

Is it possible to perform a power analysis for the Kruskal-Wallis and Mann-Whitney U test? If yes, are there any R packages/functions that perform it?


I have a regexp, it works fine in Chrome/Firefox, but get null in Edge.    var regexp = new RegExp("<header.*(?=)(.|\n)*?", "g"); var str = "
Title
footer";  var result = regexp.exec(str); console.log(result[0]);     JSFiddle demo:   Please open it in different browsers. It's weird in Edge.


Get system memory and CPU usage from within C++11 code

How can I get the total percentage or volume of memory usage and CPU consumption from within C++11 code on ubuntu (or any other linux-based system)?  The usage I want to get is for the whole system, not just for current thread or process.


Global variable being modified inside function

I might be getting things wrong, but I know at least that I don't want this behaviour.  I have a while loop in JS, inside a function. Global vars are passed into the function.  Yet when the loop runs, the global variables are changed, alongside the ones inside the function.  Example  var arr = [0, 1, 2, 3, 4, 5]; var i = 0;  function test(myArr) {     while(i < 2)     {         myArr.pop();         i++     }      console.log(arr);     console.log(myArr); }  test(arr);   The console spits out  [ 0, 1, 2, 3 ] [ 0, 1, 2, 3 ]   Why is the global being affected?


Why can't I execute mysql without the full path?

At my terminal, I can't cd to the folder containing mysql and call it.   TimsMacBookAir:/ tim$ cd /Applications/MAMP/Library/bin/ TimsMacBookAir:bin tim$ mysql -bash: mysql: command not found   If I execute the file by using the whole path, it works  TimsMacBookAir:bin tim$ /Applications/MAMP/Library/bin/mysql Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.5.38 Source distribution   Why is that?


I'm trying to make an abstract Object Factory and I tryied a few things and none of them worked.  What I would like to have is something like this that could be overrided:  public abstract ObjectFactory<Obj extends GameObject> {      public abstract <Type extends Enum> Obj createObject (Type t) ;  }   that I could extends ObjectFactory and have:  public AntFactory extends ObjectFactory<Ant> {       @Override      public Ant createObject(AntType t) { } }   but everything I tryied did not override the createObject method. The only thing that worked for me was:  public abstract ObjectFactory<Obj extends GameObject, Type extends Enum> {      public abstract Obj createObject (Type t) ;  }       Theres something that I'm not understanding about this concept or it doesn't work for enum.  Is there a way to keep the extends of enum only in the method and still override it?


I have Ubuntu 12.04 running on VirtualBox under Windows 8. I've had it for about a year now and have had no problem whatsoever. A few nights ago, out of nowhere and while I was in the middle of working on my windows machine, I saw Ubuntu (which is running on a 2nd monitor) crash. Basically the screen went black, tons of text appeared and disappeared before I could read any of it.  After a restart it asked me to check the file system and then it boot up to a login screen I've never seen before, as I always had it log in automatically. Now, when I type my password, the screen turns black for a second and then brings me back to the login screen.  I know my password (I am able to login when pressing ctrl+alt+f1), but I don't really know where to go from here. I was able to follow some instructions on uninstalling VBox Additions but that did not help. It's important to specify that nothing changed on the host or the VM for a long time (it was probably running for a month straight when that happened).   Any help would be appreciated. I don't want to upgrade to 13 or 14 unless it's absolutely necessary.  thanks in advance!  Update: I'm also unable to log in with Guest. I have tried different desktop environments (2D, Unity, etc) and the same happens in all of them.


How to figure out total number of zeros to append to String

Setup:  I have a number that is 10 positions.  The number counts up from 0000000000 so that the first number would be 0000000001 followed by 0000000002 and so on.  So i know the total number of positions in the string.  I want to figure out how to get the total number of zeros i need to append to the beginning of the string.  For example, i can look at the ID of an item and see it is "123" and i know that the "name" of the item is "0000000123".  So im trying to figure out the best way to get the total number of zeros that need to be added to the beginning of the String to make it 10 characters long in total.    I know that i could use if, else if and go through every single position but i know there has to be a "better" more efficient way.  My coding knowledge is sub par so off the top of my head i am not sure where to start.  Any help in the right direction would be appreciated.  I am also googling for ways but wanted to get this posted here in case anyone wants to give me some pointers.


(sorry for my english) why c# does not have dll protect so after compile no one can access to code that programmer Created it? after i created a simple program and then use dnspy for see i can see my code or not as a result i see every thing i writed in my program. for example if i wanted to encrypt some text with private key anyone can see my private key and then decrypt it. or can created a program without need license or etc. just a request please only show me the program or any other way that's are free (i can't pay for anything ). i only find this in nuget:  is it good?


Is There a Limit to Lightning Formula Parameters?

As I use the client side to enforce various pieces of business logic with aura:if statements, I'm finding that a given formula operator cannot handle more than two parameters.  For example, this works:  <aura:if isTrue="and(v.myAttributeString == 'Open', v.myAttributeBoolean == true)">     //do some stuff </aura:if>   But the following does not work (or at least the third "v.myAttributeSecondString" is not evaluated):  <aura:if isTrue="and(v.myAttributeString == 'Open', v.myAttributeBoolean == true, v.myAttributeSecondString == 'Yes')">     //do some stuff </aura:if>   Has anyone seen the same effect occur? Any documentation on this? Am I crazy and this actually does work, just not for me?  Thanks!


20px gap between top of ImageView and bottom of status bar after returning from iAd animation

I am using IB to place a UIImageView (top) ADBannerView (bottom) and within the same View. When running in the Simulator, if I click on the ad, after dismissing the ad screen, the UIImageView is pushed 20px down, leaving a gap between the status bar and UIImageView.   I've tried playing with all of the AutoResizing settings in the Inspector with no luck. Strangely, other objects, like UITextViews that are superimposed over the UIImageView also shift, but respond to AutoResizing settings such that after setting the struts appropriately, the UITextViews stay in place after returning from the ad animation. ??  This issue seems to be similar to . However, adding  self.view.frame = [[UIScreen mainScreen] applicationFrame];   to viewDidLoad is unsuccessful. (I think that's probably because in 3022773 the subview is created programmatically, whereas here its part of the nib)  Also, this post  implies that my parent View (the view holding both UIImageView & ADBannerView) must be a "fullscreen view", but I can't figure out how that applies when using IB. (I don't see ANY settings in Inspector that allow me to tell XCode that the parent View should have that property)  Any ideas out there?   Much appreciated!


Understanding proof of completeness of $L^{\infty}$

I'm reading page number 4 here. In particular the section where it deals with the case $p=\infty$, that is , showing that $L^{\infty}$ is complete.    Two questions:  1) Why is the convergence uniform? where it says "for $x \in N^{c}$ , $f_{n}$ is a Cauchy sequence of complex numbers. Thus $f_{n} \rightarrow f$ uniformly. Clearly we have pointwise convergence but why is it uniform?  2) I don't see why $||f_{n} - f||_{\infty} \rightarrow 0$. Can you please explain this step?  Thanks.  (3/2015) Edit: The original link appears to be broken.  seems to provide a similar (maybe even identical) proof to the one the OP talks about with slight notational differences.


Is there any benefit in typedef-ing the same identifier as shown below:  typedef struct Struct_name {   //something.... } Struct_name;   I have come across this style mostly with struct


I am looking for training app installed inside QGIS, which can be used for training purposes.      I mean, a plugin like an e-learning software than can drives you directly inside the QGIS software and can check your result automatically.      I looked under python plugin repository with tutorial or training keys but with no good result.      I think it should be better integrate with a C++ plugin or a specific QGIS standalone App than a python plugin, but I could be wrong.     I am also interest about project which use a kind of tutorial module, like step by step, with highlighting zone, mouse move, button action, setting parameters directly under QGIS.      If I am still not clear enough, this kind of app are usual on web, for e.g., when you launch openstreetmap editor on their website, there is a kind of "beginner tutorial". I would know if someone develop something similar under QGIS desktop, never mind if it's on a totally different way. it´s a kind of state of art about tutorial existing tools under QGIS.


prove that in a cyclic group of even order, there is exactly one element of order 2. Please prove the requirements.


Geometric multiplicity of the largest eigenvalue

Let $$ A= \begin{bmatrix}  a  &  2f  &  0  \\  2f &  b   & 3f  \\   0 &  3f  &  c   \end{bmatrix}, $$ where $a$, $b$, $c$, $f$ are real numbers and $f\neq 0$. Find the geometric multiplicity of the largest eigenvalue of $A$.  I don't think I have to use the characteristic equation. Or do I?


In Spivak's Calculus 3rd Edition, there is an exercise to prove the following:  $$x^n - y^n = (x-y)(x^{n-1} + x^{n-2} y + ... + x y^{n-2} + y^{n-1})$$  I can't seem to get the answer. Either I've gone wrong somewhere, I'm overlooking something, or both. Here's my (non) proof:  $$\begin{align*} x^n - y^n &= (x - y)(x^{n-1} + x^{n-2}y +\cdots+ xy^{n-2} + y^{n-1}) \\           &= x \cdot x^{n-1} + x \cdot x^{n-2} \cdot y + \cdots + x \cdot x \cdot y^{n-2} + x \cdot y^{n-1}\\ &\qquad + (-y) \cdot x^{n-1} + (-y) \cdot x^{n-2} \cdot y + \cdots + (-y) \cdot x \cdot y^{n-2} + (-y) \cdot y^{n-1}\\           &= x^n + x^{n-1} y + \cdots + x^2 y^{n-2} + x y^{n-1} - x^{n-1}y - y^2 x^{n-2}  - \cdots- x y^{n-1} - y^n \\           &= x^n + x^2 y^{n-2} - x^{n-2} y^2 - y^n  \\           &\neq x^n - y^n \end{align*}$$  Is there something I can do with $x^n + x^2 y^{n-2} - x^{n-2} y^2 - y^n$ that I'm not seeing, or did I make a mistake early on?  EDIT:  I should have pointed out that this exercise is meant to be done using nine of the twelve basic properties of numbers that Spivak outlines in his book:     Associate law for addition   Existence of an additive identity   Existence of additive inverses   Commutative law for additions   Associative law for multiplication   Existence of a multiplicative identity   Existence of multiplicative inverses   Commutative law for multiplication   Distibutive law


How do I go about simplifying this:  $$\sum_{k=1}^nk \cdot k!$$  Wolfram alpha tells me it's the same as $(n+1)!-1$ but I don't see how.


After the training phase, is it better to run neural networks on a GPU or CPU?

My understanding is that GPUs are more efficient for running neural nets, but someone recently suggested to me that GPUs are only needed for the training phase. Once trained, it's actually more efficient to run them on CPUs.  Is this true?


Find the Vector Equation of a line perpendicular to the plane.

Question: Find the vector equation $r(t)$ for the line through the point $P = (-1, -5, 2)$ that is perpendicular to the plane $1 x  - 5 y + 1 z = 1$. Use $t$ as your variable, $t = 0$ should correspond to $P$, and the velocity vector of the line should be the same as the standard normal vector of the plane.  This one is really giving me a hard time.  I know that to find the plane perpendicular to the line I can use the vector n between two points on the line and and the plane.  I cannot wrap my mind around how to reverse this process, particularly because the plane is equal to 1 and not zero.  Any help would be greatly appreciated.


I get a transmission over the network that's an array of chars/bytes. It contains a header and some data. I'd like to map the header onto a struct. Here's an example:  #pragma pack(1)  struct Header {     unsigned short bodyLength;     int msgID;     unsigned short someOtherValue;     unsigned short protocolVersion; };  int main() {     boost::array<char, 128> msgBuffer;     Header header;      for(int x = 0; x < sizeof(Header); x++)         msgBuffer[x] = 0x01; // assign some values      memcpy(&header, msgBuffer.data(), sizeof(Header));      system("PAUSE");          return 0; }   Will this always work assuming the structure never contains any variable length fields? Is there a platform independent / idiomatic way of doing this?  Note:  I have seen quite a few libraries on the internet that let you serialize/deserialize, but I get the impression that they can only deserialize something if it has ben previously serialized with the same library. Well, I have no control over the format of the transmission. I'm definitely going to get a byte/char array where all the values just follow upon each other.


User clicks to place circles that cannot overlap. My program freezes when they overlap

The game is supposed to allow the user to click and place circles within the panel. If they overlap or are out of bounds, it's not supposed to draw a circle. The code I have so far allows the user to place circles, but when I attempt to overlap them it freezes. Can anyone please tell me what I'm doing wrong and point me in the right direction?  Here is the section of code so far that handles this:  protected void handleMouseClick(MouseEvent e) {     clickX = e.getX();     clickY = e.getY();      disk = new Disk(clickX, clickY, radii[diskCount], DiskColor.values()[diskCount % 15]);     disks[diskCount] = disk;     for(int i = 0; i < disks.length; i++) {         if(disks[i].overlaps(disk) == true) {             diskCount++;             repaint();         }         diskCount+=0;         repaint();     } }


For the ideal $p$ = ($xz - y^2, yz - x^3, x^2y - z^2$), is $p^2$ a $p$-primary ideal?

Let A = K[x,y,z] and let p be the ideal ($xz - y^2, yz - x^3, x^2y - z^2$). Is $p^2$ a $p$-primary ideal?   I'm still trying to get used to the idea of p-primary modules and I am having some trouble with this example.   From what I understand, p$^2$ will be p-primary if and only if for every $a \in$ p, the map $A/{p^2} \rightarrow A/{p^2}$ given by multiplication by $a$ is injective if $a \notin p$ and nilpotent if $a \in p$.  Here the ring $A/p^2 = $ $\frac{K[x,y,z]}{((xz - y^2)^2,(yz - x^3)^2,(x^2y - z^2)^2, (xz - y^2)(yz - x^3),(xz - y^2)(x^2y - z^2),(yz - x^3)  )(x^2y - z^2))}$  It may or may not be reasonable to make this simpler since basically two of the three polynomials must be zero and the sqaure of the third must be zero. But regardless, I don't see why this map should be injective / nilpotent at for the appropriate multiplication. (Or if p$^2$ is not p-primary, then I don't see any counterexample or why this should be the case).  Aside: This is an unrelated question, but I was trying to show that p is a prime ideal and I believe that it is the kenel of the m


Discrete vs Continuous spectra of operators

Why is it that if an operator $Q$ has a discrete spectra, that the eigenfunctions are all in Hilbert space? Why is it that if the spectrum is continuous we automatically know that the eigenfunctions are not normalizable?   I was reading this in Griffith's but I didn't quite understand it. Is it because in the discrete case, the expectation value of the operator for a system in that eigenstate returns the scalar q? I can see how that would mean the inner product converges and so doesn't present a problem, but I'm having trouble seeing what goes wrong when the spectrum is continuous.


Missing elements? Electron shell filling after argon

I am confused about shell fulfillment after argon.   Argon is 2, 8, 8  1s2  2s2  2p6 3s2 3p6  why is their not elements hear that are starting to filling the 3d shells  Potassium 2, 8, 8, 1 1s2  2s2  2p6 3s2 3p6  (why is 3d shell missing?)  4s1(how can this shell fill with nothing underneath it)  calcium 2, 8, 8, 2 1s2  2s2  2p6 3s2 3p6 (again 3d shell missing?)  4s2  scandium 2, 8, 9, 2?  1s2  2s2  2p6 3s2 3p6 3d1 4s2(why is their not a element between calcium and scandium that has   1s2  2s2  2p6 3s2 3p6 3d1 4s1)   titanium 2, 8, 10, 2? 1s2  2s2  2p6 3s2 3p6 3d2 4s2(why is their not a element between scandium and titanium that has   1s2  2s2  2p6 3s2 3p6 3d2 4s1)  vanadium 2, 8, 11, 2? 1s2  2s2  2p6 3s2 3p6 3d3 4s2(why is their not a element that has   1s2  2s2  2p6 3s2 3p6 3d3 4s1)   chromium 2, 8, 13?, 1? 1s2  2s2  2p6 3s2 3p6 3d5(why is their not two elements 3d4 4s1 and 3d4 4s1) 4s1(the fact that 4s has only 1 electron in it makes me think it that we are missing elements.)  manganese 2, 8, 13, 2 1s2  2s2  2p6 3s2 3p6 3d5 4s2  what is the pattern that it follows? there are many more in the higher elements that follow this pattern of not filling some shells.  don't shells have to fill up bottom up if not why not? Why do the subatomic partials make it do this?


Why doesn't my if statement initialize when scanner reads and stores "r" in value?

I am new to Java and trying to learn by practicing. I am not sure where I am going wrong in my if statement, it seems that after I type r (I believe scanner is storing this in value) the first part of the if statement does not initialize and instead the else statement initializes.  import java.util.Scanner; import java.util.concurrent.ThreadLocalRandom; public class T2 { public static void main(String args[]){     Scanner input = new Scanner(System.in);     T2_2 T2_2Object = new T2_2();      System.out.println("What is your favorite color? (Enter 0 if unsure) ");     String value = input.nextLine();      if (value == "r"){         int value2;          value2 = ThreadLocalRandom.current().nextInt(1,10);          String value3 = Integer.toString(value2);         System.out.println(value3);


Like the command \notin, I want to create a \notBox.   So far I have made $\Box\!\!\!\!\diagdown$, but it does not look good.   May be I need to raise the \diagdown by a little.   Please help making such a symbol.


How to display Font Awesome icons in select options using tag helper or html helper?

I have followed the answers in , but I just get the character codes, e.g. &#xf007; in plain text in my <option>s. In my controller, I populate the items for the SelectList: public IActionResult Create() {     ViewData["Icons"] = IconsDropdown();     return View(); }  private SelectList IconsDropdown() {     List<ListItem> list = new List<ListItem>()     {         new ListItem{ Text = "&#xf007;", Value = "fa-user" },         new ListItem{ Text = "&#xf508;", Value = "fa-user-tie" },         // and so on...     };     return new SelectList(list, "Value", "Text"); }  class ListItem {     public string Text { get; set; }     public string Value { get; set; } }  And then I assign the list items to the select in the view: <select asp-for="Icon" class="form-control select-fontawesome" asp-items="ViewBag.Icons">     <option selected disabled value="">Choose icon</option> </select>  I tried removing the class form-control too, but it's the same result. The CSS to set the font: .select-fontawesome {     font-family: 'FontAwesome', 'sans-serif'; }  If I try to display FontAwesome icons in normal text, it works:   Update Thanks to @MBaas for pointing out that I need the fa-class on the <select> and style="font-weight:900;" on the <option>s. But using the tag-helper, there is no way of setting style on the <option>s, so the solution isn't working. I have been looking for a way of using @Html.DropDownListFor() instead of the tag-helper, but so far I haven't found that it will let me add css styling to the <option>s. I can set a class on the <select>-tag, but that's all: @Html.DropDownListFor(m =>      m.Icon,      ViewBag.Icons,      "Choose icon",      new { @class= "form-control fa" })


How not have page numbers when there is \maketitle

After translating in pdflatex  \documentclass[12pt]{article}  \pagestyle{empty}   %  no page number  \begin{document}  \title{Article name} \author{Author}  \maketitle  \end{document}   the first page is numbered.  How do I remove the numbering? Or is there another tool for having no page numbers?


Who was the orc who wanted to leave Mordor and have his own band of brigands?

In The Lord of the Rings there was a conversation between two orcs, where one of them expressed the desire to leave Mordor and return to a life of small scale brigandry.  Who was this orc, and in which book did this conversation occur?


AWK: Sum of values in a column based on entries in another column

I would like to sum numerical values listed in the third column of the table below based on entries were given in the first column of the same table. The table content is as follows:  John|Login|2 Mary|Login|10 Mary|Payroll|100 John|Login|200 John|Logout|10 Mary|Payroll|10   The expected outcome is as follows:  John|Login|202 John|Logout|10 Mary|Login|10 Mary|Payroll|110   How can I use awk to get this output?


How is it possible to mass update a broken link accross SO?

Sometimes, links point to sites which are dead, or not what they used to be, thus are broken.  Sometimes, those sites do have mirrors.  Is it possible to update all broken links in the various comments, questions and/or answers massively, to change to the still working mirror?


Calculating thevenin voltage with two voltage supplies

I can't seem to find out how to get the thevenin voltage with two parallell voltage sources. I have calculated thevenin resistance to be 2.67Ω. It is my understanding that I need to calculate the voltage between A and B. Could someone please help me out with this one.


Find $F$-related vector fields on $M\times N$, where $F(x)=(x, f(x))$

I am reading Lee's book on Differential geometry. In Chapter 4, Lee has this exercise.  Let $M$, $N$ be smooth manifolds, and let $f:M\to N$ be a smooth map. Define $F : M\to M \times N$ by $F(x) = (x, f(x) )$. Show that for every smooth vector field $V$ of $M$ , there is a smooth vector field on $W$ on $M \times N$ that is $F$-related to $V$.  I can understand that we must have $W_{(x,f(x))}=V_x\oplus Df(x)V_p$ for all $x\in M.$ The set $\{(x,f(x)):x\in M\}$ is a closed set in $M\times N.$ Therefore, if we can show that for all $(p,f(p))\in M\times N$ there is a neighbourhood $U_p$ and a smooth vector field on $U_p$ extending $V_x\oplus Df(x)V_x$ we are done by partition of unity. But I cannot show that. Can someone help me out?


I'm trying to help my nephew who all of the sudden can't log in to his account.  He downloaded the game with an Australian account before it came to Denmark, and have been playing for a while.  Today he accidentally preset something about starting a new game, and then everything he had been working on disappeared.  He says that to log in, he used the option to log in with gmail and with Pokemon trainer account and he always chose the gmail option. Now the gmail option is gone, and when he tries to log in using the Pokemon trainer log in, is says that his username does not exist.   Does this make sense to anyone, and does anyone know if he can he retrieve his old data??


Dark fantasy book where a farm was attacked by a necromancer and a farmer accused of incest

It’s so dumb cause I’ve just got bits and pieces of the first book. Like I remember they were a farming family and her family was killed by a necromancer (?) but then she and her brother were nearly killed by the village on charges of incest which weren’t true. There was a villainess who carried spiders in her womb, and then there was a plague forest. And that’s all I remember, I just want to read it again. It was a paperback, it was at least 15 years ago that I read it, and it was part of a series. I don’t remember how magic works in the story. I remember there being no modern setting or modern technology. I feel like it was components though.


Issue when Sending Data from BatchA to BatchB

I having an issue when I trying to pass params from one batch to another (BatchA --> BatchB).  In the constructor of BatchB, I can see the values that I passed from BatchA, but in the execute method, Only the first chunk is having the values but from the second to the last, it's not.  What can be the issue??  Batch A :    global class BatchA implements Database.Batchable<sObject>, Database.Stateful {     Map<Sobject,Set<String>> pMap = new Map<Sobject,Set<String>>();     Set<String> bigSet = new Set<String>();     String query;      global BatchA() {      }      global Database.QueryLocator start(Database.BatchableContext BC) {         query = 'SomeQuery FROM SobjectA';          return Database.getQueryLocator(query);     }      global void execute(Database.BatchableContext BC, List<SobjectA> scope) {             Set<String> intrersts;             for(Sobject ifr : scope){                 intrersts = new Set<String>();                 intrersts.add(ifr.SomeField_1__c);                 intrersts.add(ifr.SomeField_2__c);                 intrersts.add(ifr.SomeField_3__c);                  bigSet.addAll(intrersts);                  porposalToInternstsMap.put(ifr,intrersts);                }           }       global void finish(Database.BatchableContext BC) {          Id batchJobId = Database.executeBatch(new BacthB(this.pMap,this.bigSet), 200);     }   BatchB :   global class BatchB implements Database.Batchable<sObject> , Database.Stateful {     Map<SobjectA,Set<String>> pMap  = new Map<SobjectA,Set<String>>();     String query;     List<String> bigSet = new List<String>();     // Map<ContactDetails,Set<Call_for_proposal__c>> contactToProposal = new Map<Contact,Set<Call_for_proposal__c>>();      global Matching_Proposal_Intersts_Batch(Map<Sobject,Set<String>> interstedMap,set<String> bigSet) {          this.bigSet.addAll(bigSet);         this.pMap .putAll(interstedMap);          System.debug('pMap   => ' + this.pMap ); // Work - give me exactly what I passed from the first batch.     }      global Database.QueryLocator start(Database.BatchableContext BC) {            this.query = 'SomeQuery FROM SobjectB';         return Database.getQueryLocator(query);     }      global void execute(Database.BatchableContext BC, List<SobjectB> scope) {          for(SobjectB b : scope){              for(SobjectA curPmap : pMap.keySet()){                  System.debug('pMap values   => ' + this.pMap.values() ); // Work only in the first chunk! From the Second chunk to the last the Values of the Map Is null .                 System.debug(pMap.get(curPmap)); // in the first chunk it work fine! in the second to the last chunck It getting null.             }          }     }      global void finish(Database.BatchableContext BC) {      }   I tried to send A Map of Map<Id, Set<String>> In BatchA and retrive the records in a SOQL inside the contructor of BatchB, If the problem is in with the hashing when Sobject is a key in a map - But the issue is remaining.  Thanks!