I have the following class with auto properties:  class Coordinates {     public Coordinates(int x, int y)     {         X = x * 10;         Y = y * 10;     }      public int X { get; set; }      public int Y { get; set; } }   As you can see from the constructor I need the value to be multiplied by 10. Is there anyway to do it without removing autoproperties?  I tried the following not thinking that it causes recursion and then everything goes fubar  public int X { get {return X;} set{ X *= 10;} }   I would like to assign values to X and Y multiplied by 10.  Coordinates coords = new Coordinates(5, 6); // coords.X = 50 coords.Y = 60 coords.X = 7; // this gives 7 to X but I would like it to be 70.
I would like to know if there is any way to add custom behaviour to the auto property get/set methods.  An obvious case I can think of is wanting every set property method to call on any PropertyChanged event handlers as part of a System.ComponentModel.INotifyPropertyChanged implementation.  This would allow a class to have numerous properties that can be observed, where each property is defined using auto property syntax.  Basically I'm wondering if there is anything similar to either a get/set template or post get/set hook with class scope.  (I know the same end functionality can easily be achieved in slightly more verbose ways - I just hate duplication of a pattern)
How can I get the source directory of a Bash script from within the script itself? How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'? I think these terms almost refer to the same thing, when used loosely:   terminal shell tty console   What exactly does each of these terms refer to? Graph with $k$ components. Let $G$ be a simple graph on $n$ vertices. If $G$ has $k$ components and every component is complete prove that: $$|E| \le \frac{(n-k)(n-k+1)}{2}$$ I'm asking for advice. How do I extract all the external links of a web page and save them to a file? I want to shade the area of overlap for adjacent normal curves, shown in the lower graph. I can get shading between the first two curves but not for subsequent curves. I need shading at overlapping areas indicated by the arrows. I applied the "logic" of the first fill for the subsequent curves but that does not work.   The arrows and letters in the example image are not part of the MWE.   \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{ticks=none} \pgfplotsset{compat=1.7}  \usepgfplotslibrary{fillbetween}  \pgfmathdeclarefunction{gauss}{2}{%normal distribution where #1 = mean and #2 = sd}     \pgfmathparse{exp(-((x-#1)^2)/(2*#2^2))}% }  \pgfplotsset{baseplot/.style={%     no markers,      domain=1:4.5,      samples=100,     smooth,     axis lines*=left,     height=5cm, width=12cm,     enlargelimits=upper, clip=false, axis on top,     xlabel = near ticks,     xlabel={Resource} }}  \begin{document}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(2.7,0.4)};   \addplot+[name path=B]{gauss(3.2,0.4)};   \fill[gray!20, intersection segments ={of= B and A}]; \end{axis} \end{tikzpicture}  \vspace*{3\baselineskip}  \begin{tikzpicture}   \begin{axis}[baseplot]   \addplot+[name path=A]{gauss(1.7,0.15)};   \addplot+[name path=B]{gauss(2.2, 0.15)};   \addplot+[name path=C]{gauss(2.7, 0.15)};   \addplot+[name path=D]{gauss(3.2, 0.15)};   \addplot+[name path=E]{gauss(3.7, 0.15)};   \fill[gray!20, intersection segments ={of= B and A}];   \fill[gray!20, intersection segments ={of= C and B}];   \fill[gray!20, intersection segments ={of= D and C}];   \fill[gray!20, intersection segments ={of= E and D}]; \end{axis} \end{tikzpicture}  \end{document} Is there any web browser with NPAPI plugins support? As per  article, Mozilla has dropped the support of NPAPI plugins from Mozilla Firefox version 52. Is there any web browser with NPAPI plugin support? I have to use a website frequently, which uses Oracle Java plugin. I'm using Ubuntu 16.04 64 bit with Java JDK 8u121. Helps are much appreciated. Thanks. Edit1: After 3 years of asking this question, Java plugin still works fine in Palemoon v28.9.2-1 64 bit on Ubuntu 20.04 LTS. Java version is JRE 8u251 64 bit Edit2: As of 20th October 2020, Oracle completely removed Java Plugin from 8u271 JRE and JDK packages mentioned in  article. But 8u261 or prior versions works just fine. Running Synaptic I get the following error message:  E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.   Upon accepting the message, Synaptic quits. stab(S) is isomorphic to $ S_k \times S_{n-k} $ Show that the group $S_n$ (right) acts on the set of subsets of $\{1,2,\ldots n\}$ by $\rho(S,\sigma)=S\sigma$. Show that there are $n+1$ orbits, one for each possible value of $|S|$. Show that if $|S|=k$ then $\mathrm{Stab}(S)\cong S_k\times S_{n-k}$.  I have shown that there are n+1 orbits but now I am stuck with the last bit. my initial thought is that if I let $S =\{1,2,3,...,k\}$ then $\mathrm{Stab}(S)$ would involve $(1)(2)(3)...(k)$ i.e. mapping to itself and then $k+1$ to $n$ mapped in any ways ($S_{n-k}$) I feel like $\mathrm{Stab}$ is isomorphic to $S_{n-k}$ what am I misunderstanding here? How would I prove the last part? Thanks a lot is the Turkish version of mancala, with its own set of rules.  I am planning on doing a project in it. Are there any game engines that either specifically play it, or universal Mancala players that plays it after supplying the options?  EDIT:  I am not looking for an app, but for a game engine. For example in chess,  is a playing app, while  is an open-source engine. How are local variables referenced in closures? What are the ways to solve cubic equations? Cubic equations of the form $ax^3+bx^2+cx+d$ can be solved in various ways. Some are easy to easy to factor in a pair, for some the roots can be found out by trial-and-error, some are one-of-a-kind, some can be reduced to a quadratic equation. A compilation of all possible ways to solve cubic equations would be very helpful for students and learners. Why do neural networks need so many training examples to perform? A human child at age 2 needs around 5 instances of a car to be able to identify it with reasonable accuracy regardless of color, make, etc. When my son was 2, he was able to identify trams and trains, even though he had seen just a few. Since he was usually confusing one with each other, apparently his neural network was not trained enough, but still.  What is it that artificial neural networks are missing that prevent them from being able to learn way quicker? Is transfer learning an answer? How do I check the series $\sum_{n=2}^{\infty} \frac{(-1)^n }{n+(-1)^n}$ for absolute convergence/conditional convergence ?  How can I solve this problem? Is it possible to reference the most recently modified file in a command line argument? I frequently download PDF files with heinous numeric file names from my browser.  These automatically go into ~/Downloads.  Ideally I would like to just be able to open these files with:  evince "the most recently modified file"   without having to open ~/Downloads to find the file name.  Is there a simple way to specify "the most recently modified file" in bash?  NOTE: I know that it is possible to do this, but ideally I am looking for a solution that would be simpler than ls -t'ing ~/Downloads to check the name. Prove that for any piecewise smooth curve it is possible to find the parametrisation $\phi$ that is consistent with its length, ie.  length of a curve segment between $\phi(a)$ and $\phi(b)$ is equal to $|b-a|$.  It seems intuitive, but I don't have any idea how can I show this in the formal way. What is the number of invertible $n\times n$ matrices in $\operatorname{GL}_n(F)$? External hard disk detection issue what exactly happened:  I have a Seagate 1 TB external hard disk.It was working fine till now.The problem started when I plugged it in my android phone and then back in my pc then simply it does not showup anywhere and :  It does not appear in file explorer   It does not appear in disk management   It is not listed in Diskpart command   It only appears in Device Manager under disk drives   It does not appear in BIOS  only makes sound when plugged and unplugged.  disk spins and light is also showing.   . What I already tried:   updated usb drivers.  used new cable also.  plugged in another pc  usb mass storage is also enabled in BIOS  no issue in any usb port  Anything else i can do? How can I remove duplicate rows? I am not asking about the two factor authentication process where the user needs to enter both a password and a one-time-password.  Gmail recently (I don't know from when exactly) changed their login process which is depicted in the following screenshot:     So, the new steps are as follows:   Enter email   Click Next  Enter password   Click Sign In    as opposed to the previous and usual way of logging in:   Enter email and password   Click Sign In    Isn't the new process non-user friendly requiring extra user interactions?  Since, Google does not usually make UX blunders can you explain the reasoning behind the new process? I'm looking for details like user interaction simplicity or any other hidden advantages.  Note: The question  doesn't cover the reason behind the change while Mervin Johnsingh's answer cites Google's reason. Is there a way I can see a list of all my YouTube comments over time? I posted something the other day and wish I could find the video again. Is there a way I can see all of my comments?