I am currently working on a rather simple Windows Form that lets me type in information such as name and number into text fields and then add that to a list view. The information is entered in another Form and I had some issues figuring out how to access the listView in Form1 from Form2. I found the following code to work just fine Form1: private void button1_Click(object sender, System.EventArgs e) {      Form2._Form1 = this;      Form2 form2 = new Form2();      form2.Show(); }  Form2:     public static Form1 _Form1;  Now, I simply wonder 2 things. What does this actually do? and do I HAVE to use static? Sorry if this is a very vague question, just wanna know what I'm actually doing.
So I understand what a static method or field is, I am just wondering when to use them. That is, when writing code what design lends itself to using static methods and fields.   One common pattern is to use static methods as a static factory, but this could just as easily be done by overloading a constructor. Correct? For example:  var bmp = System.Drawing.Bitmap.LoadFromFile("Image01.jpg");   As for static fields, is creating singelton-objects their best use?
How to edit files in a terminal with nano? Sometimes, a graphical text editor like gedit or kate cannot be used (because you're in a virtual console for example). Luckily, there are text editors for the terminal. An easy one is nano, but I cannot understand how to work with it.  If I start nano by running nano, the bottom text is supposed to help me but all I see are things like ^G Get Help    ^O WriteOut.   How can I open text files for editing? How can I save the file? How can I quit the editor without saving the changes? How to edit? I heard that you've to enter some commands to begin editing in vi, is this true for nano too? Sometimes, if I manage to open a file, the text is unreadable due to its colors. How can I disable these colors? (see the image below) In the some files, lines are truncated because those do not fit in the screen. How can I prevent that from happening? (see the image below) Python, Unicode, and the Windows console Ragged Right linebreaking, such that the last line is fullest, and the first most empty About free quarks and confinement I simply know that a single free quark does not exist. What is the reason that we can not get a free quark?  If we can't get a free quark then what is single-top-quark? Impact of deleting 100GB table on Mirroring I'm about to delete a large table which is approximately 100GB in size.  I'd like to understand the impact on the mirroring that's in place on this db.  Can anyone confirm? Open local folder from link Difference between "little" and "small" Is there a difference between them? If so, how and when are they used?  For example:     I fixed a little/small typo. Multivariable limit proof: $\lim\limits_{(x,y)\rightarrow (0,0)}\frac{\left|x\right|^a\left|y\right|^b}{\left|x\right|^c + \left|y\right|^d} = 0$ SSH welcome message on 17.04 shows notice about 12.04 I just did a do-release-upgrade going from Ubuntu 16.04 to 17.04. However, now when I login via SSH I have the following message   Welcome to Ubuntu 17.04 (GNU/Linux 4.10.0-20-generic x86_64)   * Documentation:  https://help.ubuntu.com  * Management:     https://landscape.canonical.com  * Support:        https://ubuntu.com/advantage  Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server  0 packages can be updated. 0 updates are security updates.   My question is, how can I remove the   Ubuntu 12.04 LTS end-of-life was April 28, 2017 -- Upgrade your Precise systems!  $ sudo do-release-upgrade -m server   it wasn't there prior the release-upgrade  I checked and I am on Zesty  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 17.04 Release:    17.04 Codename:   zesty   My question is not, how can I remove this message, this I found. My question is more, is there a reason why this appears after a release-upgrade? Is this message something generic not taking into consideration the current version of Ubuntu? Or maybe my system is not updated properly? If $\sigma_n=\frac{s_1+s_2+\cdots+s_n}{n}$ then $\operatorname{{lim sup}}\sigma_n \leq \operatorname{lim sup} s_n$ This is a question from the book Methods of Real Analysis by R. R. Goldberg.     If $(s_n)$ is a sequence of real numbers and if $$\sigma_n=\frac{s_1+s_2+\cdots+s_n}{n}$$ then prove that: $\operatorname{{lim sup}}\sigma_n \leq \operatorname{lim sup} s_n$.   I don't have any idea how to start working on this problem. Please help. Thanks. Strange character when using listings package I have terrible screen tearing, and I don't know how to go about trouble shooting it. I would LOVE to switch to Ubuntu completely, but with this tearing, it's just too irritating. It's only present on Ubuntu based distros, (including element OS). On Manjaro (Arch fork), it does not suffer from tearing.  PC Configuration:  Motherboard: Aorus Pro Wifi z390 CPU: Intel i7 9700k RAM: 32GB  GPU: Nvidia 1060 6GB DisplayPort output connects to monitor's HDMI  Monitor reported refresh rate 75hz, Ubuntu monitor settings reported refresh rate 74.97 (can change to 60hz, doesn't help). I'm trying to find a way to automatically clean/delete the temporary files from C:\Documents and Settings\user\Local Settings\Temp\ at shutdown/boot on my Windows XP Professional x64 SP2 machine.  The main reason for this is to clean Local Settings/Temp to remove old junk automatically. (I had thought I had this covered through Firefox settings, but I was only clearing temporary Internet files). Currently, there's around 3&nbsp;GB of temporary files, and I'd like to prevent this build up without having to remember to do anything on my part.  I have already looked at using  (explained in Super User question ), but it doesn't seem to touch that directory.  I'm aware of programs such as , but I would ideally like to use a solution that doesn't require additional software (so, I expect, something using a scheduled BAT/CMD script would be what I'm looking for).  One of the potential issues, I believe, is that there may be legitimate files in the Temp folder that may be needed on the next boot (for software installations or updates, for example) and the perfect solution would be able to distinguish those and leave them until they weren't needed (Note: I realise this perfect solution may not be reasonably possible).  I've already set up Disk Cleaner on a shutdown script, but when cleaning temporary files, Disk Cleaner doesn't clean this particular directory, and so I'm looking for alternative options (see Super User question  for a little more detail).  So, what are my options for automatically deleting the temp files from C:\Documents and Settings\user\Local Settings\Temp? How do I grep for all non-ASCII characters? Were I rich, I would live on Long Island.   If I were rich, I would live on Long Island.   Is the first sentence still used, or is used in particular contexts (in example, to give emphasis to the sentence)? Is it ethical to use a recommendation letter from a deceased professor? She was a really nice professor and she wrote me a good recommendation letter that resulted in a lot of good results with applications. Recently, this professor died from brain cancer, which was a fast and shocking death for me.  Tomorrow is the deadline for a grant. What should I do? Is it professional to use letters from the deceased? Multiple vs single field capture for phone number form input Working on a form dealing with phone numbers, I've seen two methods to capture user input .   In past practices example 2 (image below) has proved effective in controlling phone number lengths on forms.   However with responsive in mind it would seem example 1 is considered a more popular pattern on forms. I've researched both patterns with the findings below.     Example 1  Pros   1 input = less taps on mobile device 1 input = less coding   Cons   could be difficult to control phone number format (1-555-555-5555, +22444455555, and etc)   Example 2  Pros   easier to control phone format reduced user error   Cons   3 inputs = more taps on mobile device more inputs = more coding   Both inputs have pros and cons and I'm not such which method would provide the best user experience for responsive environments. Can anyone share some insight or provide a better way to use phone number inputs? Let $a, b, \&amp; \, m$ be integers. Prove that if $2a + 3b \geq 12m + 1$, then $a \geq 3m + 1$ or $b \geq 2m + 1$.   My Attempt: I don't conceive apace how to contrive, from the one inequality in the antecedent, the two inequalities in the consequent. So a proof by contraposition may be more facile. The contrapositive is: $\text{If }  \color{Green}{a &lt; 3m + 1} \; \&amp; \; \color{#0073CF}{b &lt; 2m + 1}, \text{ then } 2a + 3b &lt; 12m + 1 \tag{*}.$  From $(*)$, $\color{Green}{2a} + \color{#0073CF}{3b} &lt; \color{Green}{6m + 2} \; + \;\color{#0073CF}{6m + 3} = 12m +5$. But this doesn't prove $(*)$.     Given Solution:  Assume that $a &lt; 3m+1$ and $b &lt; 2m+1.$ Since a and b are integers, $a ≤ 3m$ and $b ≤ 2m.$ Therefore, $2a + 3b ≤ 2(3m) + 3(2m) = 12m &lt; 12m+ 1,$ as desired. $\blacksquare$   What went wrong in my attempt? I understand the given solution but I persisted with the more natural and direct green and blue, instead of deviating to weak inequalities. Shouldn't both solutions work?  Source: Problem 4.19 on P102 (related to P90, Result 4.8) of Mathematical Proofs, 2nd ed by Chartrand et al.    $\large{\text{Supplement to Cameron Buie and pritam's Answers :}}$  What overriding, catholic lessons can be extrapolated from this example to generalise about inequalities?   Moreover, in order to circumvent the problem here (ie the loss of information from the weaker inequalities), should I always start with the strictest inequality? If so, should I always rework any weak inequality into the equivalent strict inequality?   For example, define $r \in \mathbb{R} $ and $n \in \mathbb{Z}$ and $g(...) \neq h(...)$. Then $ f(r) &lt; h(r) \require{enclose}      \enclose{updiagonalstrike}{\iff} f(r) \leq g(r).$ But $ f(n) &lt; h(n) \text{ MAY OR MAY NOT }\iff f(n) \leq g(n).$ How to launch terminal on login How could I get the terminal to be launched once I have logged in, so that typing commands is much simpler? What is the difference between a tatkal and premium tatkal ticket in Indian Railways?