Is a diode needed for this simple mini solenoid circuit?

I am building a mini pinball machine, which is about 10x22cm.  To drive the flippers I plan to use this 5v mini push/pull solenoid:  , along with momentary SPST buttons and a 5V 2A wall power adapter.  Those are the only electronic components in the machine. I am not using an Arduino or any other controller.  In this scenario, is it advisable to use a diode (or any other components) to protect the power supply?  If diodes or other components are advisable, I will be grateful if you could explain at a very basic level why they are needed and where they should be inserted into the circuit.  The schematic below is pretty much the current extent of my electronics knowledge.  I am interested in expanding my knowledge but find many of the technical terms used on this site overwhelming.  Here is the circuit that I have so far:


Code Analysis Issue: CA 2214 Don't call overridable methods in constructors

I have a WPF application. I have written the application in MVVM design pattern & calling My main View model from App.xaml.cs.      public partial class App : Application     {       private MainViewModel myVM;       **other variables declaration...................       protected override void OnStartup(StartupEventArgs e)       {        udocVM = new MainViewModel(window, msgBoxService, udocBl, docBl);        mainWindow.DataContext = udocVM;        }     }   So I am getting Code Analysis Critical Error for this:--  MainViewModel.MainViewModel(IWindowFactory, IMessageBoxService, IBl, IDocCenterBL, AutoResetEvent)' contains a call chain that results in a call to a virtual method defined by the class.  So how to fix this issue? Do I need to move this code in Xaml code behind file (MainWindow.xaml.cs)?


Is a p-value of < 2.2e-16 in r the same as a p-value that is asymptotically 0?

I am getting a p-value of  < 2.2e-16 for my coefficient in R, but I was wondering if I can say in my write up that it is asymptotically zero? Do these have the same meaning? What would I need to say the later?


Let $r(t)=(x(t),y(t),z(t)),t\geq0$ be a parametric curve with $r(0)$ lies on cylinder surface $x^2+2y^2=C$. Let the tangent vector of $r$ is $r'(t)=\left( 2y(t)(z(t)-1), -x(t)(z(t)-1),  x(t)y(t)\right)$. Would you help me to show that :  (a) The curve always lies on ylinder surface $x^2+2y^2=C$.  (b) The curve $r(t)$ is periodic (we can find $T_0\neq0$ such that $r(T_0)=r(0)$).If we make the C smaller then the parametric curve $r(t)$ more closer to the origin (We can make a Neighboorhood that contain this parametric curve)  My effort:  (a) Let $V(x,y,z)=x^2+2y^2$. If  $V(x,y,z)=C$ then $\frac{d}{dt} V(x,y,z)=0$. Since $\frac{d}{dt} V(x,y,z)=(2x,4y,0)\cdot (x'(t),y'(t),z'(t))=2x(2y(z-1))+4y(-x(z-1))=0$, then $r(0)$ would be parpendicular with normal of cylinder surface. Hence the tangent vector must be on the tangent plane of cylinder. So $r(t)$ must lie on cylinder surface.  (b) From $z'=xy$, I analyze the sign of $z'$ (in 1st quadrant z'>0 so the z component of $r(t)$ increasing and etc.) and conclude that if $r(t)$ never goes unbounded when move to another octan ( But I can't guarante $r(t)$ accros another octan.). I also consider the case when $(x=0, y>0), (x=0, y<0,z>1), (x>0, y=0,z>1$and so on)  and draw the vector $r'(t)$.  Thank you so much of your help.


Someone setup a clone of our company website - why?

We recently discovered a clone of our website and I've found several mentions of other people having had the same problem , , and .  We're taking the necessary steps to have the site taken down so I'm just curious as to what these people are gaining out of spoofing our website.  They even got a DV cert for the domain.    Is it just for SEO and PageRank gains?  Is this a new tactic or something that's been going on for a while?  Forgot to mention: the link to checkout is removed leaving only our "Checkout with PayPal" button, but that still leads to our actual PayPal landing page.  So it doesn't seem that there's anyway someone could pay them money.


I have the following problem when using \footcite: it frequently happens  that the same citation (same author, same title, same page) appear in the footnotes of the same page –  something like :        H. Melville. Moby Dick, p. 78.   H. Melville. Moby Dick, p. 90.   H. Melville. Moby Dick, p. 78.      Is there a way to obtain only :        H. Melville. Moby Dick, p. 78.   H. Melville. Moby Dick, p. 90.      i.e. the second reference to p.78 of Moby Dick is again ¹ instead of ³ ?


Grow two Ubuntu partitions using unallocated space before them

I want to merge the unallocated space with my Ubuntu partitions. I want to add 80GB more to sda7 partition and allocate the remaining space to the sda8 partition. How can I do this with GParted?   Below is a screenshot of the disk structure.


What is the real number of results in Google Images Search

Anyone know why when I search images in Google Image Search, in this example, the input is "Google", it says there are about 872.000.000 results. Then some images are thumbnails display together with a "Show More Results" button. But even when I click on that button, the results turn out only a thousand images only.  Any way for me to get the full results?


Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. \"File\r\n\"

I am trying to edit an existing page with this code. When I am setting a publishComment it is throwing this exception.  item["Title"] = pageTitle; item["PublishingPageContent"] = pageContent; item.Update(); SharePointTools.ClientContext.ExecuteQuery(); item.File.Publish(publishComment); SharePointTools.ClientContext.ExecuteQuery();   What am I doing wrong? I need your help guys.


Evaluate $\int \frac{1}{1+x^4}dx$.   I am finding it very difficult to evaluate this integral. I do not know any standard formula for this integral. I cannot think of a suitable substitution. I tried to evaluate the integral by partial fractions but it become a bit messy and integration by parts does not result in a simpler integral. How can you evaluate this integral without using partial fractions?


Calculate the tendency of a set of samples

I develop an application in which I constantly get samples of heart pulse.  I defined an interval of $t$ seconds.  In each $t$ seconds I have $n$ samples.  In every interval, I want to calculate the tendency of those $n$ samples. For example, lets say I have $n = 5$, and I have samples with values $\{70, 88, 95, 103, 115\}$. I want to recognize I have a growth in the heart pulse, and I want to have some measure for the rate of grows/decrease/almost no change.  I thought on two approaches for solving this problem.   I calculate the linear approximation for the $n$ samples using linear regression by applying least squares implemented by the normal equations. (I treat each sample as two coordinates vector with $x$ coordinate as time and $y$ coordinate as heart pulse). I get from the normal equations a linear function of the form $y = mx+b$ and my measure for the tendency is the slope, i.e. the $m$ value. The second approach is to calculate the correlation (pearson's correlation) between vector $x$ and vector $y$ when $x$ is the time and $y$ is the heart pulse.   I'm asking which approach do you think is better for my problem (determining the tendency of heart pulses). Or, do you have a better algorithm for solving this problem?


How to choose an antenna for an FM transmitter?

Ok guys I can't understand something.  Say that I have this circuit:    Assuming that I apply at the antenna 5V, how can I calculate how much power I will trasmit?  I found on internet that the current that will flow on the antenna radiation resistance, but if for example I go on ebay for try to find antenna no one quote the antenna radiation resistance, so how can I choose my antenna?  Moreover I want to know what  capacitor C1 and C2 do in this circuit.


How to install Windows 7 from the network?

Is it possible to install Windows 7 (Current RTM Version) on a computer without using removable media like DVD or USB?  The first thing that comes to my mind is through the network, but I don't have experience of doing a fresh install of Windows 7 via the network.  How to install Windows 7 via the network without any removable media?  P.S. I know some may think that doing so, is just a waste of time and it's easier to do it with removable media, but in the current situation the target PC neither has CD/DVD Drive nor supports booting from USB. And in addition to that, the target computer is connected to the network via a wireless connection (I don't know if it will cause any problems with the installation).


How to find dynamically created elements in drop-down list based on input entered using Webdriver and c#?

I'm trying to test a page that has an input but really its a drop down list. The user enters text and then a dropdown appears based on what the user inputted. They are groups that are in the database. If I look for these elements before typing anything they dont exist but once I start typing they do exist.  The problem is I cant just type the whole name and then press enter or return because an option has to be selected from the list.  I can press arrow down to get the focus on the item from the list but then if I say enter it doesnt select, it sends that enter to the original element and nothing gets selected.  I can find the select element:  var ddList = driver.FindElement(By.CssSelector(".ui-autocomplete-input")); ddList.SendKeys("Admins");   This is the first time the list appears in the html.  It looks like this:  <li class="ui-menu-item" role="presentation">


proving the distributive law of matrices

let $A$, $B$ and $C$ be three matrices, such that $A$ and $B$ can be multiplied, $A$ and $C$ can also be multiplied, and we can add $B$ to $C$. Prove that $$A(B+C)=AB+AC$$ This is my proof (it's probably wrong.) since we can add $B$ to $C$ this implies that if $B:n\times s$ then $C:n\times s$ and $A:m\times n$ let $$\cases{A=(a_{ij}) \\ B=(b_{jk}) \\ C=(c_{jk})} \implies B+C=(b_{jk}+c_{jk}), \text{ } i=1,..,m\text{ and } j=1,..,n$$ and using the definition of matrix multiplication $$ A(B+C)= \sum_{j=1}^n a_{ij}(b_{jk}+c_{jk})=\sum_{j=1}^n a_{ij}b_{jk}+\sum_{j=1}^n a_{ij}c_{jk}$$ $$=AB+AC$$ I've interpreted $a_{ij}$ and $b_{jk}$ as numbers so that I can apply the distributive rule between them, but i suspect that $a_{ij}$ and $b_{jk}$ are matrices, so I can't do that, is there any method to make this proof rigorous enough?


Python library to implement Hidden Markov Models

What stable Python library can I use to implement Hidden Markov Models? I need it to be reasonably well documented, because I've never really used this model before.  Alternatively, is there a more direct approach to performing a time-series analysis on a data-set using HMM?


Other than cost, is there a reason to not use higher rated components than called for by design?

(Apologies upfront if this question seems too vague, I'm trying to formulate the problem statement as I ask this)  I'm thinking about circuit assembly in a high component variability / low MOQ environment, from the standpoint of passive components. Assuming identical footprints, I'd like to be able to substitute:  Resistors   tighter % tolerance for looser higher wattage for lower   Capacitors   Higher voltage for lower   What I'm getting at is - if I'm prototyping lots of different designs, parts inventory management becomes a substantial issue. If I could aggregate by component value, and use the same parts where possible, inventory requirements go down, likely enough to offset the potentially higher cost of the individual items.  Does an approach like this work, or would I break designs by doing this? If this works, what other components can I try to standardize?


What does this red background dialog means?

Recently i saw a dialog with red background appeared in my SO page in Web Browser.  What does it mean? and because of this dialog my SO site is not loaded questions properly..


I want to convert a mathematics document to pdf, but I am getting missing $ errors.  Here is my code:   \documentclass{article} \begin{document} 1. All prime numbers are odd  Universal Statement: For all x \in \mathbb{N} such that for any a,b \in \mathbb{N} x = ab where a or b must be equal to 1 and for any k \in \mathbb{N}, x = 2k + 1  Counterexample will comprise of: A counterexample will be an x \in \mathbb{N} such that there exists a k \in \mathbb{N} such that x = 2k  Counterexample: 2   6. For all real numbers x, we have x^2-2x+2 > 1  Universal Statement: For all x \in \mathbb{R}, we have x^2-2x+2 > 1  Counterexample will comprise of: A counterexample will be an x such that x^2-2x+2 < 1  Counterexample: 1   14. For all functions f : \mathbb{R} \rightarrow \mathbb{R}, if f is not increasing, then it must be decreasing.  Universal Statement: For all functions f : \mathbb{R} \rightarrow \mathbb{R} for all x_1, x_2 if x_1 < x_2 and f(x_1) \ngeq f(x_2) then f(x_1) \leq f(x_2)  Counterexample will comprise of: A counterexample will be a function f such that for all x_1, x_2 if x_1 < x_2 and f(x_1) \ngeq f(x_2) then f(x_1) \nleq f(x_2)  Counterexample: None, the statement is true  \end{document}


How can I determine if the current version of Windows is either 32-bit or 64-bit from the command line?

What's the command line to find out if the OS is running a 32-bit version or 64-bit of Windows?


Recently, we’ve seen several questions related to the topic of Arcane Spell Failure, and how to get around it. I have answered these ( and ), but neither question is directly about Arcane Spell Failure in general. At the request of some posters, I’m creating a question that directly addresses the issue.  So, the question:  What methods can one use to avoid or mitigate Arcane Spell Failure in Dungeons & Dragons 3.5?


How to set a path variable without root acess?

My college currently uses a very old (like 3 years old) openJDK 1.7 distribution. And being a student, obviously I don't have  root privileges. I wanted to use a much later version downloaded a much more recent version from their official website since one of my app (solr) requires it.  I downloaded the JRE 1.8 and checked the interpreter using  saikrishnac@chervil:~/jre18/bin$ ./java -version java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode) saikrishnac@chervil:~/jre18/bin$    It turned out to be just as expected. Now I want to direct all the java calls made by the app to this bin. But, by default, this is what the university has running  saikrishnac@chervil:~$ java -version java version "1.7.0_91" OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-1~deb8u1) OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode) saikrishnac@chervil:~$    So, I'm guessing I need to change the JAVA_PATH variable in /etc/profie. But I've only read only access and hence I cannot add the following.  export JAVA_HOME="path" export PATH=$JAVA_HOME/bin:$PATH   The above was suggested at:   Summary  So, is there any workaround for changing the path for just my user account. I mean, when i run java in my account I wish it  executed with the jre18 binary.


Why am I still being asked for an ssh password when I'm using private key authentication?

I have Linux mint on my pc.   I have a public/private key pair to ssh into my router without having to type the password.  It works on Windows using putty, but Mint isn't when I run it from terminal.  ssh -i privkey.ppk root@10.12.1.1


Putting two images right after a particular text

I know how to get two images side by side within minpages environment. Suppose I have a paragraph followed by the two side by side images and an equation about two or three lines. The issue I'm having is even when I put the code in the right place after the paragraph, I still get the two side by side images after the equation. How can I adjust the order the way I want. Thank you for any help.


Does a size large or larger creature killed by Negative Energy Flood rise as a medium sized zombie?

The spell  (XGtE pg. 163) states:  A target killed by this damage rises up as a zombie at the start of your next turn.  And also,  Statistics for the  are in the Monster Manual.  This seems to imply that the creature killed rises as a zombie with exactly the statistics stated in the Monster Manual. If I kill a gargantuan (or anything larger than medium) creature with Negative Energy Flood, does it rise as a medium sized zombie?


The derivative of a holomorphic function on the boundary of the unit circle

Let $f$ be holomorphic on $D(0,1)\cup \{1\}$, and $f(0)=0$, $f(1)=1$, $f(D(0,1))\subset D(0,1)$. Prove that $|f'(1)|\geq 1$.  I have no idea. Maybe $f'(\xi)=[f(1)-f(0)]/(1-0)$ for some $\xi \in (0,1)$, and the maximal modules principle applies? This is not exact.


Can I get to a post in the iOS app with its URL or ID?

I was looking at an SE site on which I have an account in my mobile browser, and I found an answer I wanted to upvote. I wasn't logged in, though. Ugh; that's two or three other pages to load, and my password is a pain to type out on this keyboard. The iOS app has me logged in already, though, so maybe I could just grab the link?  Is there any way to do that? Can I launch the iOS app, armed with either a URL or a site name and post ID, and get directly to that post?  If not, please consider this a feature request.


The hobby examples given on TEX.SX don't seem to be working with texlive 2013 (at least for me. For example, copying an MWE produces an error:   \documentclass[tikz,border=2bp]{standalone} \usetikzlibrary{calc,trees,hobby}  \newcommand{\hobbyconvexpath}[2]{ [        create hobbyhullnodes/.code={         \global\edef\namelist{#1}         \foreach [count=\counter] \nodename in \namelist {             \global\edef\numberofnodes{\counter}             \node at (\nodename) [draw=none,name=hobbyhullnode\counter] {};         }         \node at (hobbyhullnode\numberofnodes) [name=hobbyhullnode0,draw=none] {};         \pgfmathtruncatemacro\lastnumber{\numberofnodes+1}         \node at (hobbyhullnode1) [name=hobbyhullnode\lastnumber,draw=none] {};     },     create hobbyhullnodes ] ($(hobbyhullnode1)!#2!-90:(hobbyhullnode0)$) \pgfextra{   \gdef\hullpath{} \foreach [     evaluate=\currentnode as \previousnode using int(\currentnode-1),     evaluate=\currentnode as \nextnode using int(\currentnode+1)     ] \currentnode in {1,...,\numberofnodes} {     \xdef\hullpath{\hullpath       ..($(hobbyhullnode\currentnode)!#2!180:(hobbyhullnode\previousnode)$)   ..($(hobbyhullnode\nextnode)!0.5!(hobbyhullnode\currentnode)$)}     \ifx\currentnode\numberofnodes     \xdef\hullpath{\hullpath .. cycle}     \else     \xdef\hullpath{\hullpath   ..($(hobbyhullnode\nextnode)!#2!-90:(hobbyhullnode\currentnode)$)}     \fi } } \hullpath }  \begin{document}  \begin{tikzpicture}[     every node/.style={black},     every path/.style={red},     scale=3,     transform shape,     use Hobby shortcut ]  \node at (0,0) (a) {A};  \node at (2,0) (b) {B};  \node at (3,0) (c) {C};  \node at (2,-1) (e) {E}; \node at (3,-1) (f) {F};   \node at (0,-1) (d) {D};   \draw \hobbyconvexpath{a,b,c,f,e}{12.5pt};  \end{tikzpicture} \end{document}   The error says,   Use of \tikz@curveto@double doesn't match its definition \draw \hobbyconvexpath{a,b,c,f,e}{12.5pt}   And I can't find the error reported anywhere. The same problem is showing for all hobby convex path examples. Is this known or probably some error with my configuration?


Why is NON DISCRETE logarithm problem not hard as the DISCRETE logarithm problem (so computationally hard)?

I've already read  question about the difference between discrete and non discrete logarithms. But I still have problems to clarify my mind about why the Discrete Logarithm Problem is computationally hard while the NON Discrete Logarithm Problem is not, as I read in my Cryptography and Security book.  What are the computation differences? Why can I, for example, easily break a non discrete logarithm cipher but not a discrete one?


Why can't I delete certain content types?

I have a Drupal 7 site, and under the Content Types menu, only certain types have a 'delete' link under the 'Operations' column.   All of the content types have the links for 'edit', 'manage fields', and 'manage display', but only some have 'delete', while others don't.   I checked my permissions for my user, and I do have Administer content types -- but that appears to be one global permission for all content types, so I still don't understand why some are deletable while others aren't.   Why do only certain content types have a delete operation?


If $R[x]$ and $R[[x]]$ are isomorphic, then are they isomorphic to $R$ as well?

There are examples of commutative rings $R \neq 0$ such that $R[x]$ is isomorphic to $R[[x]]$ (see ; an example would be $R=S[x_1, x_2, \ldots][[y_1, y_2, \ldots]]$, with $S \neq 0$ any commutative ring). This is false, see Martin Brandenburg's answer.  The following question was asked as a comment on the thread linked above: if $R$ is such that $R[x]\cong R[[x]]$, must we have that $R\cong R[x] \cong R[[x]]$?   This is clearly true for the example above, which is (essentially) the only family of examples I could come up with.


How Was Nearly Headless Nick affected by the Basilisk?

When he saved Justin by letting him see the Basilisk through his own body, Nearly Headless Nick was also affected. Did he see the Basilisk directly to eye?   What would have happened if he saw a Basilisk indirectly?


Suppose F has four elements Prove that $1+1=0$  I know that for $F=\{0,1\}$, $1+1 =0$ because if $1+1 =1$, then $1=0$, which is not true, by the definition of field


I Have 1.6Ghz Processor. What Happen if i keep run to install ubuntu desktop on virtual box

Hello Everyone I am a new user and beginner in Linux. I want to install Ubuntu desktop on VirtualBox. I have 4GB of RAM and 17GB of unallocated space. I have a 1.6GHz processor. What happens with my laptop if I install Ubuntu desktop on VirtualBox? Will my laptop blow up?


Need help in installing 2 plugins   GStreamer ffmpeg video plugin  Codecs to play mpeg, divx, mpeg4, ac3, wmv and asf files GStreamer plugins for mms, wavpack, quicktime,musepack Codecs to play   Need to manually download these plugins and install


How to tell if data is "clustered" enough for clustering algorithms to produce meaningful results?

How would you know if your (high dimensional) data exhibits enough clustering so that results from kmeans or other clustering algorithm is actually meaningful?  For k-means algorithm in particular, how much of a reduction in within-cluster variance should there be for the actual clustering results to be meaningful (and not spurious)?  Should clustering be apparent when a dimensionally-reduced form of the data is plotted, and are the results from kmeans (or other methods) meaningless if the clustering cannot be visualized?


I encountered the use of // opertor in place of / in a python tutorial I was going through. What is the difference between / and // operator in Python?


Convert string to long gcc version 4.6.2

I need to convert string to long in gcc version 4.6.2 JUST in this version.\ I googled it but all functions that I found is not available in the above version.  Regards


When do I get a bigger office and can employ more people?

In Game Dev Story the number of people is limited by the size of your office, so in the beginning you can only employ 4 people. At some point I was asked if I wanted to move into a bigger office and I'm now wondering what triggers it.  So, what do I have to do to get a bigger office?


Detect or Generate Regular Expression from String

I was wondering if there were any Python packages out there that detects a regular expression from a string. Conceptually this is easy enough to do but I wanted to see if there was anyone else who has solved this problem.  To the extent that I looked around on my own, I've read the re package docs and didn't find it, and I read the best hits I could find on Stack Overflow and couldn't find one either. I've googled it and the hits I find are how to use regex to parse strings. I've searched through PyPI but the only hit I could find is 'regexgen 1.0' and that didn't seem to lead anywhere...  To be clear, what I am looking for is something to the effect of:  def detect_regex(some_string):     [does stuff..]     return regular_expression   Thoughts would be greatly appreciated. If there aren't any, I can write this myself. I just didn't want to waste time re-creating what's already been done. Thanks!  Edit: I may not have been very clear in my question; the regex 'foo' does match the string 'foo' but my goal is the following -- given the three strings with values foo123abc, abc078963bar, and xyz8940baz, the return would be ^[a-z]+[0-9]+[a-z]+$... hypothetically. So the regex would be "general" to some extent.


Show that $f(x) =\frac{1}{1+x^2}$ is Lipschitz continuous on $\mathbb{R}$?

Show that $$f(x) = \frac{1}{1+x^2}$$ is Lipschitz continuous on $\mathbb{R}$?  I know $0<f(x)<1$ but $x$ and $y$ are any number in $\mathbb{R}$. How do you find a constant $c$ such that $$|f(x) - f(y)| < c |x - y| \ ?$$


multi-user access to windows server 2012 via Remote Desktop?

I have a windows server 2012 in the office.  I want 5 users to be able to access it and work on it at the same time.  They are each connecting from their computers, in the same network, via Remote Desktop (Some windows, some mac).  Right now when we try to do it, the active user gets kicked out by the incoming user.  do I need to purchase CAL? which are the correct CAL to purchase?


I want to download and run this,    But I'm not 100% sure where to run it from. I've downloaded it to my DOWNLOADS folder in my home directly but I've heard that it's bad form to run things from your home directory.


What is difference between: "I have been married with (was married with, married) her for three years."

What is the difference between the three sentences below?   I have been married with her for three years. I was married with her for three years. I married her for three years.


Residence has changed - Must I re-apply for ESTA?

I have an old, but still valid ESTA, with the country of residence showing my home country. However, I have recently moved for education in the UK. Do I have to apply for a new one?  Nothing else has changed - country of citizenship, passport, names etc


Show that absolute value satisfies triangle inequality, how?

I wish to show that given $a,b,c \in \mathbb{R}$, the following holds:  $|a - c| \leq |a-b| + |b-c|$  Using the definition $| x |  = \max\{x, -x\}$  I can't seem to be able to show that  $|a - c| \leq |a-b| + |b-c| \Rightarrow \max\{(a - c), -(a - c)\} \leq \max\{(a - b), -(a - b)\} + \max\{(b-c), -(b-c)\}$  Is there a trick to show that this can be satisfied? Is there a workaround?


I have created two files:  sample.txt and sample.txt  (the second file contains some hidden characters, e.g. a space). How can I remove the latest modified file? I'm using Linux.


I developed my website under /var/www/html (for the development part) so I can consult the website when I enter the server's IP address into my web browser. On the same server I have the same products under /var/www/example.com and it's this domain than I want indexed on Google.  My problem is that Google has indexed both. So sometimes the goods appears in Google with example.com and sometimes Google displays the IP address of the server.  So I added meta robots noindex nofollow, and also disallow: / into robot.txt to remove the IP address version of the site from Google search console.  However, the IP address was still showing up in Google.  So I decided to remove completely all files under /var/www/html and left just the nginx html page. However, I still have the same problem. The IP address is always displayed in Google. I noticed than the meta description is ignored too. Google takes the old description.  Can you tell me if I did something wrong or what I have to do to remove this IP from google search. How long do we need to wait to see changes?


So I've discovered there are a number of things to be kept up to date in OS X:   built-in Software Update, obviously Individual programs, which typically check for updates automatically and the 'update' option can usually be found under the program's menu (to the right of the Apple menu in the menu bar). Gem, which comes preinstalled in OS X (correct me if I'm wrong), should be periodically updated with sudo gem update --system and then the gems updated with sudo gem update - see Greg's answer for why you should not update Ruby. MacPorts, if installed, should be periodically updated with sudo port selfupdate and then sudo port upgrade outdated   Are there any other update processes I'm missing? I've only been using OS X for a few weeks so I want to make sure to keep everything up to date in my system and already I feel like most Mac users don't even know about all of the above (especially the Gem update command).  Am I somehow wrong in thinking I need to do all of the above?


Do light experience Doppler shift along and against frame dragging?

Imagine 2 photons traveling along the equator in opposite directions, of course I'm not suggesting light goes into orbit I'm just wandering if these photons will be blue and red shifted ever so slightly as massive body such as Earth spins in general relativity?


Adding new repositories to obsolete distribution?

I don't even know if what I'm asking is doable, but suppose I loved one EOL version of Ubuntu and wanted not to upgrade to a supported version but rather add/replace the old repositories with the most current one. Will my EOL system break down as soon as I start updating and/or upgrading?  To illustrate, take ubuntu 10.04. Will adding new 16.04 repos kill it?


MVC how to serve images to response stream

In my controller I retrieve a list of products along with an image name, then scale the image down to the size needed by the view.  The images are now in memory, ready to be written to the response stream.  I know the client will send a response for each image but I have no idea how to hook into it to provide the image.  View code:      @foreach (var product in Model.Products)     {        @product.Name        <img src="@product.Thumbnail"/>        Priced From $@product.LowestPrice     }   Controller:      model.Products =        DataContext.Products.Where(p => p.Category.Name             .Equals(id)).Select(m => new ProductListItem                 {                    Name = m.Name,                    Thumbnail = ImageResizer.Resize(m.Image, 75, 100, <normally I put the output stream here>),                    LowestPrice = SqlFunctions.StringConvert( m.PriceSet.Prices.Min(p =>p.Price1))                 }     );   Where ImageResizer.Resize() signature is  Resize(string imageName, int width, int height, Stream outputStream)   So my question I think should be- what do I put in for the image name and how do I listen for requests for each image that can be written to the stream?


This question is related to:   I want to see the exact difference between cases (1) and (2). It seems they are the same. But they are not!. I want to see where I missed some thing in the analysis.


Is it weird to visit a scientific conference as an undergraduate student?

I'm an undergraduate (Bachelor's) student and I'm thinking about attending a conference which exactly matches the topic of a research project that I'm working on at the moment. I have never attended a real conference.  I wouldn't go to present anything, but just because I have a great personal interest in the topic and because I would like to know about the recent developments. Would it be weird if I attend this conference alone? It is a small conference but there is a special student's price, which makes me think that I might be welcome.


In php, I often need to map a variable using an array ... but I can not seem to be able to do this in a one liner. c.f. example:  // the following results in an error: echo array('a','b','c')[$key];  // this works, using an unnecessary variable: $variable = array('a','b','c'); echo $variable[$key];   This is a minor problem, but it keeps bugging every once in a while ... I don't like the fact, that I use a variable for nothing ;)


To evaluate $e^{\sin(x)}$ I use the standard series $e^t$ and $\sin(t)$, combining them gives me:  $e^t = 1+t+\dfrac{t^2}{2!}+\dfrac{t^3}{3!}+\dfrac{t^4}{4!}+O(t^5)$  $\sin(t) = t-\dfrac{t^3}{3!}+O(t^5)$  $\therefore e^{\sin(x)} = 1+\sin(x)+\dfrac{\sin^2(x)}{2!}+\cdots+O(x^5)$  $\iff e^{\sin(x)}=1+\left(x-\dfrac{x^3}{6}\right)+\dfrac{\left(x-\frac{x^3}{6}\right)^2}{2}+\dfrac{x^3}{6}+O(x^5) = 1+x +\dfrac{x^2}{2}-\dfrac{x^4}{6} + O(x^5)$  In the last step, I only evaluate up to $\sin^3x$ term, everything above has a grade equal to or greater than $x^5$  However, I'm wrong. According to Wolfram, the series expansion for $e^{\sin x} = 1+x+\dfrac{x^2}{2}-\dfrac{x^4}{8}+O(x^5)$.  What did I do wrong? I can't seem to find what or where.


I am using Ubuntu 12.04 and I have installed redmine service for users who are working in php and testing. While they are using it, some of them are getting "internal server error".  Actually my home directory space is too small when I checked the properties of redmine. It shows me as 0kB after cleaning cache by typing sudo apt-get autoclean & sudo apt-get clean.  After that size of the directory increase to 20MB but it is not sufficient for 15 users.  My question is do, I need to increase /home directory size? Is it possible to do it? What are the ways to do that without losing data?


When does the 301-redirected URL gets indexed?

I had a page on my website like example.com/dir/page but now I have moved it to example.com/page.   The old URL 301-redirects to the new URL.   When will it get updated in Google?  I asked the bot to fetch it via Google Webmaster Tools, but when will it get effect?


what is meant by vi and emacs editing modes

What is meant by "Enabling command line editing and vi and emacs editing modes"?  I know vi is an editor and have used it as well, but what and how is it related to command line editing bamboozles me. I am using bash shell and a Red Hat system essentially in command line mode to learn.


What to call a small restaurant which serves only a single type of food?

In my location, there are many small restaurants that each serve only a single type of food, e.g., noodles, noodle soup,... mainly noodles but only 1 single type. It's not a café, not a cafeteria, not a restaurant (many types of foods), not a stall because it's in a house,... Should it be called a "noodle shop"?


Italicized small caps words in fancy header?

The following piece of code set the header (chapter names) of my text (report class) in small caps:  \fancyhf{} \fancyhead[RE]{\footnotesize\scshape\nouppercase{\leftmark}} \fancyhead[LO]{\footnotesize\scshape\nouppercase{\rightmark}} \fancyhead[LE,RO]{\footnotesize}   Only problem is that words that are italicized in chapter names are not showed as italicized small caps in the respective headers but instead as "regular" italicized text!  Is there any easy way to fix this? Thanks very much in advance!


I am relatively new in latex and would like to create a table which is built as follows in the picture.    Would be nice if I could get support for my concern


This is my first time working on modeling; but for some reason, there are edges connected inside the modeling and I'm not sure how to delete these.


Why does a star beyond a certain mass limit (Chandrasekhar limit) only become a black hole?

Why does a star beyond a certain mass limit () only become a black hole?   A star is first made of hydrogen, it undergoes nuclear fussion reaction combining into helium and releasing a large amount of energy. This process continues till star is made up of iron core as iron has largest value of binding energy per nucleon, after this if mass of the star is above the value of Chandrasekhar limit it becomes a black star, what is the reason for this and why is certain mass limit required?


Proving that sum of two measurable functions is measurable.

Suppose $f$ and $g$ are Lebesgue measurable, we want to show $f+g$ is measurable. So, the hint is to consider the continuous functions $F : \mathbb{R}^2 \to \mathbb{R} $ given by $h(x) = F(f ,g ) $. If we can show $F$ Is measurable, then Taking $F = f +g $ would solve our problem.  In other words, I want to show that the set $R = \{ (f,g) : F(f,g) > a $ } is lebesgue measurable.. But this set is just a rectangle in the plane. And since $F$ is continuous, then $R$ must be open, and hence a union of open rectangles which are measurable and hence $R$ must be measurable. Is this a correct approach to the problem? Can someone help me to make this formal? thanks


In the nodes we use checker texture and it creates checker (square) pattern. Is there anyway to have some circle, or polygon type of pattern. Any suggestion or help. Thanks


Best way to run scheduled tasks in ASP.NET CORE

What would be the best way of running scheduled tasks in asp.net 5, mvc 6 app.  It will be ideal if I could use the built-in dependency injection in scheduled tasks. I will be running this application under dnx.  I know this question have been ask for earlier versions of asp.net but those solutions might not be the best way in asp.net 5. As it has a different runtime.


UEFI machine doesn't boot Ubuntu through NVRAM bootcatalog. How to fix?

An answer posted here should:         Avoid to require the user to download and install additional packages or PPAs.   Be as quick and simple as possbile. (I tried boot-repair and it didn't qualify.)   Probably provide a script for users who don't have much experience with the terminal.      Similar issues like these have been posted several times to the site:   A recent release of Ubuntu has been successfully installed on a UEFI-capable machine that came with a preinstalled copy of Windows 8 or later.   The output of efibootmgr -v shows that /efi/ubuntu/shimx64.efi has been registered as ubuntu. (These new boot entries are usually added with the highest priority. See also ) After rebooting, no OS selection menu (GRUB) was shown and the machine booted directly to Windows.  When  (formerly called BIOS):   There is no indication of how to change the boot order for indivual operating systems or there are no operating systems (like Windows Boot Manager) displayed at all, only devices. The Secure Boot feature is turned off in firmware settings.  Ubuntu was installed by , not by running the WUBI-Installer in Windows. The Windows installation itself was not modified, replaced or erased.   The drive contains a GPT partition table. Windows Diskmanagement shows that at least the following 3 partitions exist on the disk:   EFI System Partition Windows partition an unreadable RAW partition that could be the Ubuntu installation   You tried removing the \EFI\BOOT\ directory entirely, before(!) backing it up.   This usually indicates an issue with the default bootloader or bootprocess being somewhat hardcoded to boot Windows. In most cases this can easily be fixed by replacing \EFI\BOOT\BOOTx64.EFI with another file that also allows for booting other operating systems.


When your sample size is large enough and your estimator is asymptotically normal distributed $\sim N(0,1)$, how can you calculate the p-values? Can we use $2\times\text{pnorm}(-\text{abs}(Z))$?


How can I take input text and replace each character with a solid (and/or hollow) rectangle representing the bounding box for that character? In the case where two characters are closer together from kerning (e.g. microtype) the boxes would overlap. The addition of the boxes should not change the spacing of the text - I'm looking for a "draft mode" for the letters.  Solutions and Problems  Both solutions presented by Yiannis Lazarides and egreg seem to do a reasonable job for single words, though as mentioned, it seems that kerning was not completely respected. Below are the results (without markup/egreg/Yiannis):    Both solutions fail however when multiple words are involved. One of the answers completely eats a space while the other overcompensates. Both of them seem to choke on a line break as well.


How does this return statement with multiple values (variables) works?

I am trying to get some understanding about how pass by value & return are happening in C functions. I cam across a piece of code as follows:  #include <stdio.h>  int fun(int ii, int jj) {  int kk, ll;  kk = ii + jj;  ll = ii * jj;  return (kk,ll); }  int main() {  int i=4, j=5, k, l;  k = fun(i, j);  l = fun(i, j);  printf("%d %d\n", k, l);  return 0; }   Now apparently I am not getting any errors when I am trying to return 2 values through fun().  Also, the value that is returned by fun() is ll i.e 20 (=4*5) and not kk. Further, If I rewrite the return statement as :  return (ll,kk);   the value returned is that of kk ie. 9 (=4+5).   Query: Why this is so?


Font size setting is missed in iPhone application

Can you add a setting for choosing font size in iPhone mobile app?   It's hard to read questions.


I had this question at the start of my number theory class so I think it is supposed to be an easy one but I did not receive a solution. Here is the problem: Let $n\in \mathbb{N}$ be arbitary. Prove that there exists a number $k\in\mathbb{N}$, such that $k + 1, k + 2, k+3, . . ., k+n\;$ are not primes. I read somewhere that the gaps between the consecutive primes do not tend towards infinity so is this not a wrong statement? This is what confused me. Can someone shed some light on this?


How to get constant information about my battery?

I'm considering exchanging my laptop battery, but figured that it makes sense to know which capacity it had initially.  I don't have the /proc/acpi/battery/ directory and sudo acpi -i only prints the charging state. sudo lshw-gtk doesn't contain any information other then "Unknown".  I'm using Ubuntu 17.04.


Is it possible to completely brick your Android phone by using a Custom ROM?

I understand that you can completely "brick" (render unusuable) your iPhone by attempting to Jailbreak incorrectly.  Whether or not this is actually the case, is it possible to do the same with your Android phone?  Or is the nature of that operating system and the handsets such that you can always install a new ROM on it if everything goes pear-shaped?  I assume there could be a difference due to how closely the iPhone is tied to iTunes, compared to how independent Android phones seem.


Is it possible to translate this type of view field, Or use t() in this field for single words? I'm using the  and the  modules, but I can't translate these fields.


I installed 16.04 recently and every time I turn it on and I log in it flickers constantly. I can't connect to wifi but I can still access the terminal. What can I do to fix this?


pgfplots: How to set “axis on top” only for abscissa and ordinate, but not for grid?

I try to format a ybar diagram nicely.    Minimum Working Example (MWE):  \documentclass{standalone} \usepackage{pgfplots}  \begin{document}     \begin{tikzpicture}     \begin{axis}[     ybar                    = 1.5mm,     ymin                    = 0,     ymax                    = 300, %   set layers              = true, %   axis on top             = true,     symbolic x coords       = {Blub, Blab, Blop},     ymajorgrids             = true,     nodes near coords,     nodes near coords align = {vertical},     nodes near coords style = {text=black},     every node near coord/.append style={rotate=90, anchor=west},     ]     \addplot[fill=red, draw=red] coordinates {(Blab,180) (Blop,180) (Blub,180)};%     \end{axis}     \end{tikzpicture} \end{document}     Screenshot of the result:      Screenshot of the issue:      Description of the issue:  As you can see, the ybars are positioned in a visibility layer above the abscisse, therefore the abscisse is partly hidden by ybars. Well, I could easily activate set layers = true as well as axis on top = true, but in this case also the grid will be moved to the foreground layer while then hiding the node label texts. However, the node label texts should remain in the foreground above the grid lines (like seen here):    Therefore it is not possible to just activate the upper commands.  Is there an option available to only put abscisse (x-axis) and ordinate (y-axis) to the foreground layer of visibility while keeping the grids in the background?  The user  has posted an approach on how to keep the node text labels in the foreground, even when setting set layers = true and axis on top = true. Would it be possible to do something similar for abscisse and ordinate only while keeping grid in background?


Vertically centered and right/left/center horizontal alignment in tabular

I understand that vertically centering columns can be achieved by using the array package with the m{} column. How do I also specify horizontal alignment?  \documentclass[12pt,letterpaper]{article}  \usepackage{array}  \begin{document} \begin{tabular}{m{5em} m{5em} m{5em}} left & center & right \end{document}


I have array like this  <?php $sliders=array( 1=>array('url'=>"url1.com",'image'=>"img1.jpg"), 2=>array('url'=>"url2.com",'image'=>"img2.jpg"), 3=>array('url'=>"url3.com",'image'=>"img3.jpg"), 4=>array('url'=>"url4.com",'image'=>"img4.jpg"), 5=>array('url'=>"url5.com",'image'=>"img5.jpg") ); foreach($sliders as $sKey=>$sVal) {     echo $sKey.'=>'.$sVal['url'].' image=>'.$sVal['image'].'<br>'; } ?>   And  my sorting key  is   $sort[]='2,4,5,3,1';   And I want result like this.  array( 1=>array('url'=>"url2.com",'image'=>"img2.jpg"), 2=>array('url'=>"url4.com",'image'=>"img4.jpg"), 3=>array('url'=>"url5.com",'image'=>"img5.jpg"), 4=>array('url'=>"url3.com",'image'=>"img3.jpg"), 5=>array('url'=>"url1.com",'image'=>"img1.jpg"));   How can I sorting Array like this?  Thanks.


Can I pause while downloading the Ubuntu iso?

I was going to download Ubuntu 19.04 but I have a question: sometimes my net speed becomes real slow. So can I pause it and then resume it after some hours?  Is pausing safe for the iso file? Or will pausing the download break or corrupt it?


How do you make already prepared sauce less spicy? I must have used too many hot chili peppers or cooked them too long. Is there something to off set it from being so hot? The sauce is for General Tso's Chicken


Is it possible to have Blender render rays of light that fade away?

I was wondering if it's possible to have Blender render visible light that fade away the farther it gets from the light source in Cycles render?


stop HTML/Javascript and SQL injection on website

I own an online game where you have a status box. Which you can update it on how you're feeling.  The problem I have had was that users were putting java script tags into messages and into status. So when another user came to their page, a pop up box would pop up saying haha or whatever they wanted.  I then stopped that by using  $status = mysql_real_escape_string($_POST['status']); $foo = preg_replace('/[^a-z]/i', null, $status );   That has now stopped any JavaScript being ran but now when someone sends someone a message, it takes the spaces out so for the message  "how are you "  It will show "howareyou". Of course this is safe but users can't read messeges.  Is there any other way from stopping script tags being inserted into the virable but still allow spaces?  I'm also real scared of someone hacking me with XSS. Because before, I was told a user could enter something in a message then when the other user opens it, it will send them there password.....


Compile latex-document with pstricks to HTML

I have a document that I'm currently compiling with pdflatex that contains pstricks-pictures (using \usepackage[pdf]{pstricks} and \usepackage{auto-pst-pdf})  To publish the document online I want it to be compiled to HTML and the pstricks-pictures to be converted to SVG.  Is there an automated way to do so?


How can I send an unknown type to T in a Function(TI item) where T : class?

I am in a situation where I am inside the following function:  CreateSomething<TI>(TI inputInterface) {     Type unknownType = SettingsSystem.GetTypeBasedOnInterface(inputInterface);     object otherInformation = SomeClass.GetInformation();     return base.CreateSomething<TI, T>(inputInterface, otherInformation); }   where  base.CreateSomething  returnObject CreateSomething<TI, T>(TI interface, object otherInformation = null)     where TI : class     where T : class {     return externalDll.DoStuff<T>(interface); }   What I need is a way to pass into T the class of the type unknownType like so:  return base.CreateSomething<TI, unknownType>(inputInterface, otherInformation);   instead of something like this  if(version == v1)     return base.CreateSomething<TI, MyClassV1>(inputInterface, otherInformation); if(version == v2)     return base.CreateSomething<TI, MyClassV2>(inputInterface, otherInformation);


Permalink will not change - it wants to have -2 slug

The issue was described in 1 or 2 post already but my case goes little more, since none of the mentioned causes are not my case:  I do not have trash  I checked my media and galleries  Putting a ridiculous name (like: "2015555555" in stead of 2015) still produce "2015555555-2" Do not know what to do next...


Will ArcGIS for Desktop run on Windows 10?

Will ArcGIS 10 run on the new windows 10 technical preview?  I am setting up an interface on my Mac and there is the free option of downloading the Windows 10 technical preview, some sort of beta version, I'm assuming.   Just wanted to see if 10.1 will run ok on Windows 10 (ignoring the Mac aspect), as this is all I am using my windows interface for?


I wanted to include the following into my title: $\mathbb{R^{2}}$ and expected the following output:     but I instead keep getting this:     If I copy the weird symbol in the superscript over R, it gives me a "2" in the notepad, but doesn't render it properly.  How can I fix it?


I am learning Mean value property (MVP) of the heat equation. MVP of Laplace equation was relatively easy to understand I think it is because of the spherical symmetry. But I am not able to appreciate the MVP of heat equation. It's not very easy to imagine the "heat ball" in the following theorem from a :        Here are questions:        How do I define a heat ball?    How does it actually look like?


Execute action every x milliseconds in while loop

I have a while loop that runs for a long number of times. I have some writelines in there that serve as debug statements. I use a verbosity flag to determine when I want to see those statements written to the console. Is there a way I can also specify to output every x milliseconds , instead of all the time.  while {    //logic here    if(verboseMode)        Console.Writeline("some status message") }   With the way the code is right now, the writeline executes all the time when verboseMode is set to true. What id like to do is output the line if verboseMode is set to true and the last time I output something it was x milliseconds ago


How can I get a complete list of fields for a standard object?

I am new to Apex, but it is apparent to me that most (if not all) standard objects probably have an ID field. However, this field does not appear in the reference for the standard objects in the Soap API Developer's Guide. Instead, it reads:     To verify the complete list of fields for an object, you can use a   describe call from the API, or inspect with an appropriate tool, for   example, inspecting the WSDL or using a schema viewer.   If I want to find out for sure whether an object has an ID field, or what the field is named (is it ID, Identifier, id, etc), it sounds like I need to use a "describe call" or "an appropriate tool" or inspect the "WSDL" using a "schema viewer".  Now, I am an experienced software developer, but those solutions are so ambiguous I have no idea where to look next to figure out how to get an object's ID. Can anybody either refer me to more specific documentation, or explain how to find the complete field documentation via a "describe call", "appropriate tool", or "schema viewer"?


How to install OS X Mavericks if disk only has Windows on it?

I have a MacBook Pro  How can I install OS X Mavericks if my HDD only has Windows on it?


Theil-Sen estimation, more than one independent variable

Is the  in robust regression only limited to a two dimensional problem or can you use it for more than one independent variable as well?


Did Bellatrix Lestrange have any affection towards Voldemort?

In Harry Potter and the Deathly Hallows, when Voldemort tries to kill Harry Potter and Harry Potter travel to the Deathly hallows, that is, Kings Cross Station and he later comes back. There it has been mentioned that Voldemort had also fallen down and Bellatrix tried to support him to stand up as if she has some affection towards him.  “My Lord . . . my Lord . . . ” It was Bellatrix’s voice, and she spoke as if to a lover.  Is it true that Bellatrix Lestrange had some affection towards Voldemort?


Python - Use of Asterisk in a dictionary parameter for a reduce/lambda

I am trying to understand the code below:  from functools import reduce reduce(lambda d, i: (i[0] < 7 and d.__setitem__(*i[::-1]), d)[-1], [{}, *{1:2, 3:4, 5:6, 7:8}.items()])      The part that I don't understand is the *.   [{}, *{1:2, 3:4, 5:6, 7:8}.items()]   returns:  [{}, (1, 2), (3, 4), (5, 6), (7, 8)]   Now if i run in isolation  *{1:2, 3:4, 5:6, 7:8}.items()   it returns an error : "File "cell_name", line 4 SyntaxError: can't use starred expression here".  However I am able to run the code without * just fine as a one-line code and returns:  dict_items([(1, 2), (3, 4), (5, 6), (7, 8)])   I have googled it and in  it seems related to unpacking containers, but this one is used in arrays.  However in the full lambda, the * seems necessary and throws an error "'dict_items' object does not support indexing" without the *.  Anyone understand this syntax jargon?  Thanks for any help.


Cannot right click with synaptics touchpad

I have a Sony VAIO E14. The touchpad detects all clicks as Left clicks. In Windows 7, pressing on the right side of the touchpad is recognised as a right click.  How can I enable right clicking?  greg@greg-SVE14A1C5E:~$ xinput ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)] ...  greg@greg-SVE14A1C5E:~$ grep "TouchPad: buttons:" /var/log/Xorg.0.log [    23.112] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left double triple


Can I install bionic beaver in desktop with 2gb ram with Intel i3 6th gen processor? I am currently using Windows 7 in it


Can anyone help me with my code, I just cant seem to see the problem. I am new yo programming so it probably really easy to see.  I am using 4 birthday gifts as an example.  x = input("How many birthday gifts do you need to buy? ") list = []  for gifts in range(int(x)):     name= input("Enter Name: ")     list.append(name)  print(list)  def budget (a,b,c,d):     return budget(a,b,c,d*10)  a = len(list[0]) b = len(list[1]) c = len(list[2]) d = len(list[3])  budget(a,b,c,d*10)  print("The Budget for",list[0],"s gift is: ",a) print("The Budget for",list[1],"s gift is: ",b) print("The Budget for",list[2],"s gift is: ",c) print("The Budget for",list[3],"s gift is: ",d)   my error code  How many birthday gifts do you need to buy? 4 Enter Name: lee Enter Name: lee lEnter Name: ee Enter Name: lee Traceback (most recent call last): ['lee', 'lee', 'lee', 'lee']   File "C:/Users/Ethan/PycharmProjects/untitled1/Birthday Gift List.py", line 18, in <module>     budget(a,b,c,d*10)   File "C:/Users/Ethan/PycharmProjects/untitled1/Birthday Gift List.py", line 11, in budget     return budget(a,b,c,d*10)   File "C:/Users/Ethan/PycharmProjects/untitled1/Birthday Gift List.py", line 11, in budget     return budget(a,b,c,d*10)   File "C:/Users/Ethan/PycharmProjects/untitled1/Birthday Gift List.py", line 11, in budget     return budget(a,b,c,d*10)   [Previous line repeated 995 more times] RecursionError: maximum recursion depth exceeded


Travelling with US H1B visa on old cancelled indian passport

I renewed my Indian passport before its expiry. My old passport is marked cancelled. I have a valid H1b visa till Jan 2019 on my old cancelled passport, do I need a new H1B stamp on new passport or can I use valid visa in my old cancelled passport?


Converting relative path to absolute path without symbolic link

Is there a Unix command to get the absolute (and canonicalized) path from a relative path which may contain symbolic links?


Disadvantages to publishing outside field of projected study?

As a recent B.S. recipient interested in pursuing a PhD in molecular biology in the future, are there any disadvantages to publishing outside of that field? I have a strong background in computer science and have been approached separately by a public health professor and a linguistics professor who are interested in collaborating on their respective projects and perhaps working towards a paper over the summer.  While I enjoy solving computational problems, I'm not sure whether this is a good idea professionally. Does publishing papers in other fields take away from the research I've already done?  I've so far only contributed to two papers in my "field of expertise".  What are the downsides to collaborating on a paper outside of one's field? Is this frowned upon by the academic community/graduate admission programs?  Related question --


Get excerpt using get_the_excerpt outside a loop

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work?   This code is inside a plugin called "WP Facebook Open Graph protocol". Here's the part i want to change:  if (is_singular('post')) {   if (has_excerpt($post->ID)) {     echo "\t<meta property='og:description' content='".esc_attr(strip_tags(get_the_excerpt($post->ID)))."' />\n";   }else{     echo "\t<meta property='og:description' content='". [?] ."' />\n";   } }else{   echo "\t<meta property='og:description' content='".get_bloginfo('description')."' />\n"; }   Here, has_excerpt always fail, and get_the_excerpt($post->ID) don't work anymore (deprecated).  So, how can i display the excerpt there?  ps: I'm using "Advanced Excerpt" plugin as well


how to merge unallocated space to drive c?

I am trying to merge unallocated space to drive c but unfortunately not able to do so.  The drive c option is not showing extend option.


Ensuring non-italicization of a character

I would like square brackets to never be italicized, even in a \textit environment.  That is, I would like to type [ but have it always replaced with \textup{[}, and similarly for the right bracket. Apparently \newunicodechar doesn't work for the standard ASCII characters.   Is there some other way?


Show that no group can have its automorphism group cyclic of odd order.   I have shown it only if $G$ is cyclic, but I could not do that if $G$ is not cyclic. Can you help?


Pinging different IP address than what I entered

Can anyone please explain why CMD pings a different IP address than the one I am searching for?


Is the usage of "from where" correct in these sentences?

I would like to know if I have used "from where" and "from which" in the following sentence correctly.   China, from where foreign companies are shifting their operations away, has been hurt badly this year by the tariffs.   China, from which most investors shy away, is not a fast-growing market anymore.


How to build linear order on $\mathcal P({\bf N})$?  Had idea about inclusion relation, but it does not satisfy linearity.


Prove using the formal definition of a limit that

How would I go about proving this limit?  $\lim_{x\to\infty}\frac{1}{x^4+x^2+5}=0$  so far I have:  $|f(x) -L|< ϵ$ wherever $x > N$  $|\frac{1}{x^4+x^2+5} - 0| < ϵ $ wherever $x > N$  $|\frac{1}{x^4+x^2+5}| < ϵ  ,\; x > ∞$, assuming, $x > 0$  taking the absolute value $\frac{1}{x^4+x^2+5} < ϵ$  ${x^4+x^2+5}$ > $\frac{1}{ϵ}$  i am not sure whether this is correct, but what would be the next step?


Regex - find various strings from an HTML file

I have an html file called basic.html and what my task is, is to create a small Java program using regular expressions to output various strings. My program should display the line number of all of the occurrences of each of the strings below:   div tag div class="menuItem" tag span tag class=”emph”  Any string beginning with < and ending with >, i.e. all tags. The contents of the body tag. The contents of all divs All divs that make menus   I must also use start and end methods to display index values.  I have started my code as follows:  import java.io.IOException; import java.util.Arrays; import java.util.regex.Pattern; import java.util.regex.Matcher;  public class RegexHTML {    public static void main(String[] args) throws IOException {        // Input for matching the regexe pattern        String file_name = "basic.html";             ReadFile file = new ReadFile(file_name);            String[] aryLines = file.OpenFile();              String asString = Arrays.toString(aryLines);              // Regexe to be matched                String regexe = "<div>";             int i;            for ( i=0; i < aryLines.length; i++ ) {            System.out.println( aryLines[ i ] ) ;            }          // Step 1: Allocate a Pattern object to compile a regexe       Pattern pattern = Pattern.compile(regexe);       //Pattern pattern = Pattern.compile(regexe, Pattern.CASE_INSENSITIVE);  // case-    insensitive matching        // Step 2: Allocate a Matcher object from the compiled regexe pattern,       //         and provide the input to the Matcher       Matcher matcher = pattern.matcher(asString);        // Step 3: Perform the matching and process the matching result       int count = 0;       // Use method find()       while (matcher.find()) {     // find the next match          System.out.println("find() found the pattern \"" + matcher.group()                + "\" starting at index " + matcher.start()                + " and ending at index " + matcher.end());           count++;        }       System.out.println("\nFound the pattern "+count+ " times.\n");        // Use method matches()       if (matcher.matches()) {          System.out.println("matches() found the pattern \"" + matcher.group()                + "\" starting at index " + matcher.start()                + " and ending at index " + matcher.end());       } else {          System.out.println("matches() found nothing");       }        // Use method lookingAt()       if (matcher.lookingAt()) {          System.out.println("lookingAt() found the pattern \"" + matcher.group()                + "\" starting at index " + matcher.start()                + " and ending at index " + matcher.end());       } else {          System.out.println("lookingAt() found nothing");       }     }  }   My biggest problem is how exactly am I going to be able to display all those occurrences, my code so far only gives me the index value of the div tag but I would like to have all the occurrences listed above displayed in the output.  My second problem of course is how to display the line every string occurs but I haven't really researched this yet as I'm thinking about the first question at the moment. However If you could give me a hint as to where to get started on this one too, I would appreciate it.


I have setup file *.sh, I installed Ubuntu 14. I have tried terminal mode its not working.  How to run GUI mode.  Please let me know the commands and any other samples


"Holmby hall" or "The Holmby Hall", does the hall have to be capital in either of them?

Holmby Hall is a landmark site in Los Angeles. The Wikipedia page doesn't use "the" before Holmby Hall, but has used the before The Fox Theatre.


Time complexity for lookup in dictionary.values() lists vs sets

In Python, we know that looking up a key in a dictionary takes O(1) run time, but what is the run time to look up in the dictionary.values() ?  dictionary = {'a':[66,77,88], 'b':[99,100]} key = 'a' if key in dictionary: # takes O(1) run time   number = '99' if number in dictionary.values():  # What is the run time here?   Edit #1: The values for the keys could be either lists or sets. Many folks have responded that if the values are lists the run time is O(1).     Will it be O(N) if values are sets?  dictionary = {'a':(66,77,88), 'b':(99,100)} number = '99' if number in dictionary.values():  # What is the run time here?


In the Framing Frame heist for the Elephant in Payday 2 you must steal select paintings from an art gallery, sell them to the senator's people and then frame the senator.   If you raise the alarm or get spotted at any point during day one or three of this heist you'll have to fight off five minutes of waves of law enforcement while the alternative mission objective completes itself.   How do I stealth the 'Framing Frame' heist?


Regenerating health on "Death March" difficulty can take a while if you have a rather big health pool and no perk to regenerate health (e.g. using Quen).  Apart from potions I use food to regenerate health. However, it can take quite a long time if I have to eat Dried Fruit And Nuts 5 times. I eat one, wait 5 seconds, open the inventory again (or use the quick slot) and wait 5 more seconds.  Therefore I'd like to know if vitality regeneration stacks by eating multiple foods.  For example (numbers not accurate):     I eat 1 "Dried Fruit and Nuts"   100 vitality restored over 5 seconds.  I eat 2 "Dried Fruit and Nuts" then leave the inventory screen. What is the outcome?   Regenerate 100 vitality over 5 seconds. Regenerate 200 vitality over 5 seconds.    Which way does it work? Assuming it works like 1. I would have to keep opening the menu, eating 1 piece of food, opening the menu again and eat the next. I don't like placing food in my two quick slots because I usually save those slots for my most important potions.    Edit 1:  After having a look at the question to which this question is flagged as a duplicate I concluded that there are contradictions on how the stacking works.  Two theories that need proof (proven in Edit 2):   Vitality regeneration does stack, no matter what you eat/drink. Vitality regeneration only stacks if the foods consumed are not of the same type (e.g. 2 x Nuts do not stack, but 1 x cow milk + 1 x nuts will stack).   I will test this when I get home looking at the numbers (vitality information on the inventory screen).  Right now, everything points to theory 2 since theory 1 would make you invincible for a short time if you stuff 20 roasted chickens down Geralt's throat.    Edit 2:  I can confirm theory 2.  Eating one raw meat regenerated 508 hp over 5 seconds.  Eating one raw meat and one cow's milk added two regeneration indicators to the UI and regenerating 1432 hp over 30 seconds. The timer for raw meat ran 5 seconds while the cow's milk timer ran 30 seconds.  This also confirms that different foods have different intensities of regeneration. While raw meat regenerates 508 hp over 5 seconds, cow's milk regenerated 924 hp over 30 seconds.  Oddly, drinking cow's milk without eating at the same time regenerated 931 hp.   Raw meat: 508 hp Cow's milk: 931 hp 1 x raw meat + 1 x cow's milk: 1432 hp (instead of predicted 508 + 931 = 1439 hp)   I did the tests at level 30.


javascript function to determine if an array contains a value

I'm getting 'false' for the first test and 'true' for the second test. I'm suppose to create a function that will evaluate to these values. I thought I executed my code in the function correctly but I'm not getting what I'm suppose to be getting. I don't understand what I could be doing wrong here. Any help will be so appreciated. Thanks. // - Given the arrayOfNames, determine if the array contains the given name. // - If the array contains the name, return true.  If it does not, return false. // - Hint: Use a loop to "iterate" through the array, checking if each name matches the name parameter. //  // Write your code here 👇  function contains(arrayOfNames, name) {   for (index = 0; index < arrayOfNames.length; index++) {     if (arrayOfNames[index] === name) {       return true;     } else {       return false;     }   }  }  //  -------TESTS--------------------------------------------------------------- //  Run these commands to make sure you did it right. They should all be true. console.log("-----Tests for Exercise Five-----"); console.log("* Returns true when the array contains the name."); console.log(contains(["bob", "nancy", "john", "shawnie", "waldo", "shaquon", "julie"], "nancy") === true); console.log("* Returns false when the name is not in the array"); console.log(contains(["bob", "nancy", "john", "shawnie", "waldo", "shaquon", "julie"], "fred") === false);


How many different numbers can you make with the following digits?

How many different numbers can you make with the following eight digits?   $1, 2, 2, 3, 3, 3, 0, 0$  The problem I encounter is how to include numbers that aren't 8 digits long? For instance the number 12.   I know the answer for 8 digit numbers (assuming zero can be a starting digit):   $\frac{8!}{2!3!2!}$  But I can't seem to figure out how to include all the other numbers that aren't 8 digits long.


I would like to draw an arrow like this using TikZ:    This is taken from . I didn't succeed in reproducing the arrow; is somewhat beyond my (extremely limited) TikZ abilities. I don't need all the workflow stuff. I simply want to draw such an arrow at a certain place in my text, e.g. -->  \documentclass{article} \usepackage{<???>} \usepackage{tikz} \usetikzlibrary{<???>} \begin{document} Donec vehicula augue eu neque. Pellentesque habitant morbi \tikz <???code for the arrow???> ; tristique senectus et netus \end{document}   PS: Some explanations in your solution would be much appreciated, otherwise it will be difficult to customize it.


Someone made the comment for an Ising model that:     When finite  length  is fixed for a rectangular Ising model, there still is no phase transition.   How do they know this?  EDIT: To make the question more precise, taken from a comment of the OP below:     Sorry, let me state the question explicitly: for a ferromagnetic Ising model with length and width of N and f(N)=N spins, respectively, Tc > 0. But for width of f(N)=constant, Tc=0. So for f(N)=N^x, at what value of x does Tc become > 0. If the answer is x=infinity, then why would x=1 result in Tc > 0, since f(N)=N^1=N and Tc > 0 for this case?


Post fix file name with SML on windows using command prompt

I have GUID based Image files such as    ff568205-e82c-4be8-aca8-18f40ec64e5a.PNG 1f91e4e9-c163-4f28-acbc-dbb7693ef2e5.JPG   I have thousands of images folder and i need to rename all these file and add SML at the end of each image so that all my image will be renames to    ff568205-e82c-4be8-aca8-18f40ec64e5aSML.PNG 1f91e4e9-c163-4f28-acbc-dbb7693ef2e5SML.JPG   I tried using few commands but got them all wrong one such command is  *.* *SML.* this renames the files but adds SML to the file extension  I am looking for resource which can help me do it using cmd prompt on windows.


hi, i was recently refused uk tourism visa

"i have considered you personal and economic circumstances, however i note that your partner is funding for this trip, you state that your partner is providing xxamount for the trip but i notice he only has XX amount in bank, which is less than the amount u have stated, so we refuse this visa under V 3 (c).  i had provided my partner's as well as my bank statement, my partner had transferred money into my account for the trip, but i had written that my partner will be supporting the trip; hence they refused saying that your partner doesn't have enough money in the bank to support me. but the money has already been transferred into my bank.. how can i correct this mistake next time? i am a student and my partner is also a masters student .he gets monthly stipend from college while i dont get, how can i apply next time?


Conservation of angular momentum in a planetary system

Why is angular momentum conserved when a planet revolves about sun in an elliptical orbit? Why is linear momentum not conserved in this case?  Please use the minimum amount of equations and try to explain using pure physics logic if possible.


Select mirror during installation from live mode

Without customising the Ubuntu live image, is it possible to select a mirror during installation? If not, what are the options available? I can think of customising the image, or somehow using preseeding with Ubiquity. The annoying thing is that I am booting live Ubuntu over the network (via PXE booting), so the network connectivity is assumed. This causes Ubiquity to try to fetch some things from the mirror, even though, by its admission, it doesn't have "internet connectivity", since we are behind a campus proxy. Because of this, it spends a lot of time trying to fetch something and we have to manually skip that part. We do have a (official) mirror within campus, so we would like to use that. I'd like a way that doesn't involve customising the live environment, so that I can suggest that as a way for students who use their own USB drives. (Here is, for example, a question about another problem from live booting over the network that I am facing: ) Here are a couple of screenshots from a test on a VM:   Here are a couple of screenshots from a test on a laptop: Note the usage of in.archive.ubuntu.com, even though, following @noleti's advice, I had set ftp.iitb.ac.in as the mirror:


How could I produce such an image in code?    I'd also like to draw vector arrows by the end of the lines, in order to see the order of the calculations. I saw a TikZ solution on other answer that didn't work for me. Not only the code gave me an error, it's not fully what I want (I want it to look like a parentheses matrix, and I'd also like to have a convenient macro to produce it with just some few inputs). Here's this partial solution (given by Andrew ) I'm talking about:  Here is a quick hack using a matrix of math nodes and :    Code   \documentclass[border=5mm,tikz]{standalone}  \usepackage{tikz}  \usetikzlibrary{matrix}  \begin{document}      \begin{tikzpicture}[auto]        \matrix (M)[matrix of math nodes,row sep=1cm,column sep=16mm]{         a & b & c & a & b\\ d & e & f & d & e\\ g & h & i & g & h\\&&[blue]adi&[red]-bfg&[blue]cdh\\         };         \draw[blue](M-1-1)--(M-2-2)--(M-3-3)--(M-4-3);         \draw[blue](M-1-2)--(M-2-3)--(M-3-4)--(M-4-4);         \draw[blue](M-1-3)--(M-2-4)--(M-3-5)--(M-4-5);      \end{tikzpicture}  \end{document}   Also, that little product he put just below the lines showing the multiplication results are pretty awesome. Any way to implement it with what I've asked?


Less common probabilities and expected values related to the coupon collector problem

A company brings out a new set of $n$ collectible cards. The cards are made in equal number, so there is the same probability of any given card being in a random set. They are purchased one-by-one. Question 1: If I buy $x$ cards, on average how many unique cards $(k)$ will I have? $k$ does not need to be a whole number. Question 2: How large does x need to be that k/n is over y%? Question 3: If I buy $x$ cards, what is the probability that I have $j$ unique cards. $j$ is a whole number.  EDIT: Thank you to all who have replied! As a first time poster, it is amazing to get so many helpful responses so quickly. I have learnt that this known as the coupon collector's problem. There is a very straightforward answer to the question, "What is the expected value of x needed to complete the set on n cards" \begin{align} E[x]={}&x\sum_{i=1}^n\frac1i\;. \end{align} I am struggling to find equations as simple as this to questions 1 and 2, so will post a second edit once I have them. On question 3 "user 4" kindly gave what I think is the right answer: \begin{align} \frac{n!}{(n-j)! n^x}{x \brace j} \end{align}


How can I edit my bash script to account for whitespace entries?

I made a script to automate ffmpeg conversion from mkv > m4v > open the m4v in Subler.app to import the metadata manually, at which point I'll move the file into my iTunes library.  I use iTunes because I have two Apple TVs on the network and use a 2007 iMac to function as my media server. I locally ssh into this machine in order to execute this script.  This script fails if I enter a path with whitespace(s), or enter title for the movie that includes whitespace. How do I fix this script to accommodate whitespace? I know the syntax is sloppy, I’m very new to scripting, so any other pointers to make it run better would be appreciated :)  Here it is:      #! /bin/bash  #ffmp4  function convert {     ffmpeg -i $REPLY -strict -2 -c:v copy -c:a copy -c:s copy $PWD/out.m4v }  function rename {     echo "Please Provide the Title:"     read -e; mv $PWD/out.mp4 $PWD/$REPLY.m4v }  function subler {     open -a Subler.app $REPLY.m4v     }   cd ~/Public/ && while read -e; do     if [ ${REPLY: -4} == ".mkv" ];      then convert;         rename;         subler;         exit      else      echo "Error: This is not a valid response" && exit 1     fi done   —————————  EDIT:   Question may still be a possible duplicate, but I’ve tried to use the syntax  (both attempting “$REPLY” and “$(REPLY)”) in  and still failing to execute. The errors return either bad substitution for the […bracketed...] statement or my echo statement... Error:This is not a valid response…


Can variables refer to equations and what are the operations governing said variables.

Now, I know that equations are generally thought of as relationships between variables. They can refer to functions (in the case of differential equations), numbers (in the case of algebraic equations), or boolean values (in the case of logical equations). However, can one say something like:  "Let $a$ be an arbitrary differential equation and let $y$ be the set of solutions that satisfy it."  Of course, the above is just an example. Furthermore, there are many different types of equations. Is there any standard sense of algebra for equations? I know that equations can obviously be manipulated in numerical algebra, but is there a more direct sense of algebraic manipulation of actual equations rather than numbers in equations (i.e. some kind of operations upon equations and the manipulation of them).  I know this is kind of two questions in one, but I think they kind of go hand in hand. After all, if equations can be referred to by variables then one should naturally conclude how those variables can be manipulated rigorously in an operational setting.


i have created two classes A and B so i have 5 files , main.cpp , A.h , A.cpp , B.h , B.cpp   i have included all headers as it should be and im trying to create a object of class A in class B and i get the following error : error: A doesn't name a type  and if i to it repeated like i define object B in class A it works ,,, whats wrong?  this is how my B.h looks like >  #ifndef B_H #define B_H  #include <iostream> #include "A.h"  using namespace std; class B {     public:         B();     protected:     private:         A instance;  };  #endif // B_H   and now A.h  #ifndef A_H #define A_H  #include <iostream> #include "B.h"  using namespace std; class A {     public:         A();     protected:     private: };  #endif // A_H


RSA problem if i choose two specific small prime numbers?

I know that rsa normally is made to make it with big integers, but i trying to make the algorithm myself (with the help of wikipedia) and I´m making it with small numbers to track the problems easily.  The problem is that sometimes the decryption of the crypted message is wrong! Exactly when I choose p=11 and q=5, the rest goes like this:  n=55 euler(n)=40 = (p-1)(q-1) e=13 d=37   the crypted message (using message=65) is:  c=10   and using the chinese reminder theorem (wikipedia´s advise):  Dp=7 Dq=1 Qinv=9 m1=10 m2=0 h=2   and the decrypted message is:  message=10 !!!!!   It´s a problem of the choosen prime numbers? I think that the rest I made it fine, I also check it with rsa calculator:   I know also that to choose d and e there are more options, but the choosen ones they would be fine too. Maybe there is some other condition that is not in the wikipedia?


How does Outliers affect logistic regression?

I see this is answered here :     But I am not able to understand how does it affect logistic regression , can anyone take a step back and explain in a bit more simple and detailed manner.


Trouble with Landau & Lifshitz's expansion of the Lagrangian with respect to $\epsilon$ and $v$

Hello I have a quick question on what I have been reading in Landau & Lifshitz's book on classical mechanics. I am in the very beginning of the book and I am having trouble with his derivation on the Lagrangian of a free particle. At the very top of page 7, he equates two Lagrangian by   $$\mathrm{L}'=\mathrm{L}(v'^2)=\mathrm{L}(v^2+2v \cdot \epsilon+ \epsilon^2).$$  Then he goes to to say that you can expand this in powers of $ \epsilon$ and neglect all terms above the first order to get   $$\mathrm{L}(v'^2)=\mathrm{L}(v^2)+\frac{\partial \mathrm{L}}{\partial v^2}2v \cdot \epsilon.$$  How do you expand in terms of $\epsilon$ to get this result? This Lagrangian seems to me to be a function of three variables and I am looking at the multivariable Taylor expansion and I am not seeing how Landau could get his result.


There has been much written on getting the beep sound from Ubuntu releases over the years.  Example:   My needs are slightly different in that I do not want to ensure sound card beeps are functioning.  Instead, I want PC speaker beeps, the kind produced by the original built-in speaker because I believe they will produce less CPU load.  I have confirmed that my computer has the PC speaker by unplugging the external speakers and shutting down Ubuntu.  At some point in the shutdown and restart process a beep is heard even though the external speakers have no power.    I have tried the following:  In /etc/modprobe.d/blacklist.conf, turn these lines into comments:  #blacklist snd_pcsp #blacklist pcspkr   In .bashrc  /usr/bin/xset b on /usr/bin/xset b 100   Enable in the gnome terminal: Edit > Profile Prefs > General > Terminal Bell   Ensure no "mute" selections in: System > Prefs > Sound > various tabs (uncheck them all).  Select "Enable window and button sounds" in: System > Prefs > Sound > Sound Effects  In gconf-editor desktop > gnome > sound, select the three sound check boxes.  In gconf-editor apps > metacity > general select the audible bell check box.  Still I get no PC speaker beeps when I send code 7 to the console via my Java program or use   echo -e '\a'   or equivalently  echo -e "\a"   on the bash command line. (The -e option means enable escape sequence interpretation.) What else should I try?  Update Since my goal is to minimize load on the CPU, here is a comparison of elapsed times.  Each test is for 100,000 iterations.  Each variant was performed three times so three results are presented for each.  printwriter.format("%c", 7);  // 1.3 seconds, 1.5 seconds, 1.5 seconds  Toolkit.getDefaultToolkit().beep();  // 0.8 seconds, 0.3 seconds, 0.5 seconds  try { Runtime.getRuntime().exec("beep"); } catch (IOException e) { }  // 10.3 seconds, 16.3 seconds, 11.4 seconds   These runs were done inside Eclipse so multiply by some value less than 1 for standalone execution.  Unfortunately, Toolkit's beep is silent on my computer and so is code 7.  The beep utility works but has the most cost.


(This is exercise 2.2.28 from Hatcher) Consider the space obtained from a torus $T^2$, by attaching a Mobius band $M$ via a homeomorphism from the boundary circle of the Mobius band to the circle $S^1\times \{x_0\} \subset T^2$.   We set $A=T^2$, $B=M$, $X:=A\cup B $, $A\cap B\simeq S^1$, so the (reduced) Mayer-Vietoris sequence yields  $$ 0\to \tilde H_2(T^2)\oplus\tilde H_2(M)\to \tilde H_2(X)\to \tilde H_1(S^1)\to \tilde H_1(T^2)\oplus \tilde H_1(M)\to \tilde H_1(X) \to 0$$ and replacing the homology groups we already know we have $$0\to \mathbb Z\overset{\alpha}{\to} \tilde H_2(X) \overset{\beta}{\to} \mathbb Z \overset{\gamma}{\to} \mathbb Z^2\oplus \mathbb Z\overset{\delta}{\to} \tilde H_1(X)\to 0$$  Now, I have to figure out what the maps $\alpha,\beta,\gamma,\delta$ do, and this is where I'm stuck. I'd appreciate a detailed explanation.


I'm designing a digital I/O module which isolated with optocouplers. I'm done with the outputs, but having a confusion about input side.     I will have some switches and sensors to read as inputs, but I don't know how to do the connections, can someone show me as a schematic?  Which pin should be GPIO pin for example?


Showing that the square root is monotone

I've shown the existence of unique square roots of all positive rational numbers, so now I want to prove that the square root is monotone:   $0<a<b$ if and only if $\sqrt{a} < \sqrt{b}$


graph-theory problem about outdegree and indegree

Let $G$ be a directed graph with $n$ vertices. Assume that if we forget the directions of the edges of $G$, then we obtain the complete undirected graph $K_n$. Let $v_1, v_2, \ldots, v_n$ be the $n$ vertices of $G$. Prove that: $(od(v_1))^2+(od(v_2))^2+ \cdots + (od(v_n))^2 = (id(v_1))^2+(id(v_2))^2+ \cdots + (id(v_n))^2$  Here, "od" means "outdegree" and "id" means "indegree".


Question: Prove that $$\lim_{n\to\infty}(n!)^\frac1n=+\infty.$$  Solution 1: Let $\{a_n\}_{n\ge 1}$ be such that $$a_n:=(n!)^\frac{1}{n}, \forall n\in\Bbb N.$$ Now clearly $a_n>0, \forall n\in\Bbb N$. Also, $\{a_n\}_{n\ge 1}$ is a strictly increasing sequence. This implies that either $\lim_{n\to\infty}a_n=L,$ where $L\in\mathbb{R}^+$ or $\lim_{n\to\infty}a_n=+\infty$. Let us assume that $\lim_{n\to\infty}a_n=L,$ where $L\in\mathbb{R^+}$. Now $\forall n\in\mathbb{N},$ $$(2n)!\ge \prod_{k=n}^{2n}k\ge n^{n+1} \\\implies \sqrt[2n]{(2n)!}\ge \sqrt[2n]{n^{n+1}}=n^{\frac{n+1}{2n}}\ge n^{\frac{n}{2n}}=n^\frac{1}{2}=\sqrt{n}.$$ Therefore, we can conclude that, $\forall n\in\mathbb{N}, a_{2n}\ge \sqrt n$. Now we know that every subsequence of a convergent sequence converges to the same limit as that of the original sequence. Thus $$\lim_{n\to\infty}a_{2n}=L\ge \lim_{n\to\infty} \sqrt{n}=+\infty,$$ which is a contradiction to the fact that $L\in\mathbb{R^+}$. Therefore, we must have $$\lim_{n\to\infty}a_n=+\infty.$$ Solution 2: We know that for any sequence $\{a_n\}_{n\ge 1}$ of positive numbers, if $$\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=l, 0\le l\le \infty, \text{ then }\lim_{n\to\infty}\sqrt[n]{a_n}=l.$$ Thus defining $a_n:=n!, \forall n\in\mathbb{N},$ we have $$\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\lim_{n\to\infty}\frac{(n+1)!}{n!}=\lim_{n\to\infty}(n+1)=+\infty.$$ Thus we must have $$\lim_{n\to\infty}\sqrt[n]{a_n}=\lim_{n\to\infty}\sqrt[n]{n!}=+\infty.$$ Hence, proved. Are these solutions correct? What are the other ways to solve the problem? I was looking for a solution using the Stolz-Cesaro Lemma and also one which uses the formal definition of $$\lim_{n\to\infty}a_n=+\infty.$$ Can someone provide me with the same?


Checking via ArcPy if ArcMap is in edit session?

I've created a Python add-in button that helps speed up my coworkers workflow by copying one feature class attribute to another. It uses the arcpy.UpdateCursor function to update a row in the target feature class. As it exists now, this button script can be run regardless of the editing mode. Obviously when its run in an edit session, the user can choose to stop editing and not save changes, but this is not the case when the script runs outside of an edit session.  How can I add a check to the script that will stop the script from running if ArcMap is not currently in an edit session?  This concerns ArcMap 10 & 10.1    I also want to check with other ArcMap users to verify that updates to tables is not normally allowed without being in an edit session.   So how is this script running outside of an edit session?   This script also brings up another question about the seemingly serendipitous selection order ArcMap performs that just happens to work for me when I update the 2nd feature class table from a list, but that's for another day.  Here's the script as it works now (without any 10.1 editor implementation):  How to add a check to ensure the user is in an edit session?  def onClick(self):     #Reference mxd     mxd = arcpy.mapping.MapDocument("CURRENT")     #Reference the main Data frame     mm = arcpy.mapping.ListDataFrames(mxd, "MainMap")[0]     #Reference the Water System Valve feature class     waterValves = arcpy.mapping.ListLayers(mxd, "Water System Valve", mm)[0]     #Reference the fire hydrant feature class     fireHydrants = arcpy.mapping.ListLayers(mxd, "Water Hydrant", mm)[0]      #Use the extent of the main DF to select all valves in the current view     dfAsFeature = arcpy.Polygon(arcpy.Array([mm.extent.lowerLeft, mm.extent.lowerRight, mm.extent.upperRight, mm.extent.upperLeft]), mm.spatialReference)     arcpy.SelectLayerByLocation_management(waterValves, "WITHIN", dfAsFeature,"", "NEW_SELECTION")      arcpy.SelectLayerByAttribute_management(waterValves, "SUBSET_SELECTION", "LOCATIONID IS NULL")      fields = ["LOCATIONID"]      row, rows = None, None     rows = arcpy.UpdateCursor(waterValves,fields)     row = rows.next()     valveList = []     append = valveList.append      #Loop through the valves table to update LocationID     while row:         builder = str(row.QSNO)+"-"+ str(row.VALVESEQNO)         row.setValue("LOCATIONID", builder)         append(builder)         rows.updateRow(row)         row = rows.next()      del row, rows      #New selection for fire hydrants     arcpy.SelectLayerByLocation_management(fireHydrants, "WITHIN", dfAsFeature,"", "NEW_SELECTION")     arcpy.SelectLayerByAttribute_management(fireHydrants, "SUBSET_SELECTION", "LOCATIONID IS NULL")      row, rows = None, None     rows = arcpy.UpdateCursor(fireHydrants,fields)     row = rows.next()      #Loop through fire hydrant table to update LocationID     while row:         for locID in valveList:             construct = str(locID) + "-FH"             #print construct             row.setValue("LOCATIONID", construct)             rows.updateRow(row)             row = rows.next()      del row, rows, valveList, mxd


I am inserting data in database dynamically without assigning column in code. This works fine if I don't bind. But, when I tried to bind, it doesn't work    Working fine      $id = $_POST["id"];     $text = $_POST["text"];       $column_name = $_POST["column_name"];       $result = $con->query("UPDATE menu SET $column_name=$text WHERE id=$id") OR die($con->error);       echo "Data updated";   But it doesn't work.  $result = $con->prepare("UPDATE menu SET :column_name=:text WHERE id=:id")or die($con->error);             $result->bindparam(':id',$_POST['id']);             $result->bindparam(':text',$_POST['text']);             $result->bindparam(':column_name',$_POST['column_name']);             if($result->execute()){                 echo "Data Updated";             }


We are trying to evaluate the potential performance improvements that could be gained by switching an existing applications .mdf files to a RAID10 LUN vs. the existing RAID5 LUN they are living on right now. The transaction log already lives on a RAID10 LUN.   So the question is, if we move data files to RAID10 would the end user see performance improvements in the GUI? or would it be just faster writes to the data files when a checkpoint occurs and the changes get written to the data file but no improvement would be seen at the end user level?


Are we to use any with plurals or singulars?

What are the circumstances in which any can be used with a singular and with a plural?        Do you have any car?   Do you have any cars?      For example, commenters have indicated both     You cannot use any with a countable singular. You can use it with a plural, or with a mass noun — “do you have any milk,” for example.’        "You don't have a Ford. You don't have a VW. You don't have a Chrysler. Do you have any car?" is perfectly reasonable.   Clearly the rules are quite complex.


My question is, we can calculate distance of free falling objects with the equation of $d = \frac{1}{2}gt^2$ where $d$ is distance in meter, $t$ is time in seconds, but I wonder how we achieved this equation. I know that the object's velocity isn't constant, the object is accelerating. So we can't calculate it via $x = vt$. So, can anyone explain me this equation? Thanks in advance! :)


what are these different in array initializing in c?

My struct is as follow.  typedef struct user {    char *name;    int age; } User;   Now when I am creating an array, I wonder what is the different between below both statments.  User users[10];   vs  User users[10] = {};


I downloaded Ubuntu 64-bit for Windows 8.1, and on that little .exe file where it said restart to test and see Ubuntu, I restarted and nothing happened. I'm confused.


I had dual booted windows 8.1 and lubuntu. Recently i had refreshed windows 8.1 and since then i am unable to see Grub menu while i boot. However if i go to BIOS settings and then select the UBUNTU only then the GRub menu appears.


Mirror Modifier creates the other part of model far away from the original

I'm doing a girl here (the concept is not mine, I'm just training) and when I click on mirror modifier Blender creates the other part of the model far away from the first one, not close like it should    I have no idea how to change that, does someone know what is the reason it works that way?


How are the Error Function and Standard Normal distribution function related?

If the Standard Normal PDF is $$f(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2}$$  and the CDF is  $$F(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x e^{-x^2/2}\mathrm{d}x\,,$$  how does this turn into an error function of $z$?


I would love to have a nice tikz-version of this drawing of a binomial tree.  and my lines are not that nice, can anybody help me So far I've made the following: \documentclass{standalone} \usepackage{graphicx} \usepackage{subfig} \usepackage{pgf,tikz} \usetikzlibrary{positioning} \begin{document}   % Set the overall layout of the tree \tikzstyle{level 1}=[level distance=2cm, sibling distance=2cm] \tikzstyle{level 2}=[level distance=2cm, sibling distance=2cm] \tikzstyle{level 3}=[level distance=2cm, sibling distance=2cm]  % Define styles for bags and leafs \tikzstyle{bag} = [text width=2em, text centered] \tikzstyle{edge from parent}=[draw] \tikzstyle{end} = [text width=3em, text centered] %\tikzstyle{every node}=[fill=red!30,rounded corners]    % The sloped option gives rotated edge labels. Personally % I find sloped labels a bit difficult to read. Remove the sloped options % to get horizontal labels.   \begin{tikzpicture}[grow=right, sloped, edge from parent] \node[bag] {$S_{0}$} % First bag child{node[bag] {$S_{0}d$} % Step 1 down    child{node[bag]{$S_{0}d^{2}$} % step 2 down        child{node[end]{$S_{0}d^{3}$}} % step 3 down        child{node[end] {}} % step 3 up        }    child{node[bag] {} % step 2 up        child{node[end]{}} %step 3 down        child{node[end] {}} %step 3 up            }   }    child {node[bag] {$S_{0}u$} % step 1 up       child{node[bag]{$S_{0}ud$}           child{node[end]{$S_{0}ud^{2}$}} % step 3 down           child{node[end]{}} % step 3 up           } % step 2 down         child{node[bag ]{$S_{0}u^{2}$} % step 2 up            child{node[end]{$S_{0}u^{2}d$}} % step 3 down            child{node[end]{$S_{0}u^{3}$}} % step 3 up        }   };   \end{tikzpicture}    \end{document}


I have a raster and a vector point file. I need to generate another raster of same resolution showing how many points are inside the corresponding pixels of the original raster.  Something like that:   Is there a way of doing that in QGIS?   I just want the number of points, no attributes involved.


Does this sum involving the central binomial coefficient have a closed form expression?

Since Lehmer we know that $$ \sum_{n\geq1} \binom{2n}{n}^{-1} = \frac{2\pi\sqrt3}{27} + \frac43, $$ which is due to the identity $$ \sum_{n\geq1} x^n \binom{2n}{n}^{-1} = \int_0^1 \frac{x(1-t)}{(1-xt(1-t))^2} dt. $$ Substituting different values of $x$ above gives a variety of remarkable formulae.   However, I have not found similar expressions for any $\sum_{n\geq1} \binom{2n}{n}^{-k}$ with $k>1$. In particular, I am interested in $\sum_{n\geq1} \binom{2n}{n}^{-2}$. Unfortunately I cannot get a better ''closed form'' expression for this sum than the hypergeometric series $\frac14{}_3F_2(1,2,2;\frac32,\frac32;\frac{1}{16})$.     Does a closed form expression exist for $\sum_{n\geq1} > \binom{2n}{n}^{-2}$?


How can I drill a grommet hole in my Ikea desktop?

I have a computer setup that I would like to improve. My plan is to drill a hole through pretty much the MIDDLE of the desk in order to pass wires and make my overall setup look cleaner.   What I'd like to know is if I can drill a proper hole without damaging the desk when the table top is made of: particleboard, Ash veneer, Stain, Clear acrylic lacquer, Foil, Clear acrylic lacquer, and ABS plastic. To be specific, this is the .


GRUB not appearing after upgrade to Windows 8.1

I had previously dual-booted Ubuntu 13.10 with Windows 8. Then I upgraded it to Windows 8.1. Since then my GRUB has not been appearing. I started Ubuntu from my bootable USB drive and ran boot repair. It initially restored the GRUB. I even upgraded it to 14.04. The GRUB appears as long as I keep using Ubuntu. Even if I once start Windows from the GRUB, the GRUB menu does not appear on the next boot. It directly loads Windows.  Here is the link to my boot info summary


What does "setting up" and "proccessing triggers" mean in apt-get?

When apt-get is setting up a package or processing triggers for a package what actually happens in the background?


In quantum mechanics, why position and momentum are related by Fourier Transformation (only)?

We know that if we take Fourier transform of momentum we go to position space. But why Fourier transform only.


Deleting all but one record of duplicate entries

I am using SQL Server 2005 and would like to delete duplicate records that have the oldest dates.  For example, I have a training database that captures an employee number, class name and date.  Some folks have taken the class more than once, but we only need to keep the record of the latest class attendance.