Let $x_1,x_2..x_n$ be real numbers in $[-1,1]$ with $\sum_{i=1}^{n} {x_i}^3=0$ then find maximum value of :$A=\sum_{i=1}^n x_1$
If the sum of $n$ cubes is zero, then the sum must be no larger than $\frac n3$.
First off, this is a question about a desktop application using Windows Forms, not an  question.  I need to interact with controls on other forms. I am trying to access the controls by using, for example, the following...  otherForm.Controls["nameOfControl"].Visible = false;   It doesn't work the way I would expect. I end up with an exception thrown from Main. However, if I make the controls public instead of private, I can then access them directly, as so...  otherForm.nameOfControl.Visible = false;   But is that the best way to do it? Is making the controls public on the other form considered "best practice"? Is there a "better" way to access controls on another form?  Further Explanation:  This is actually a sort of follow-up to another question I asked, . The answer I got was great and solved many, many organizational problems I was having in terms of keeping the UI straight and easy to work with both in run-time and design-time. However, it did bring up this one niggling issue of easily controlling other aspects of the interface.  Basically, I have a root form that instantiates a lot of other forms that sit in a panel on the root form. So, for instance, a radio button on one of those sub-forms might need to alter the state of a status strip icon on the main, root form. In that case, I need the sub-form to talk to the control in the status strip of the parent (root) form. (I hope that makes sense, not in a "who's on first" kind of way.) Can I mask an input text in a bat file? How to boot from iso with Grub2/Burg boot loader I'm sure there is a really simple explanation to this but haven't found any pointers on this forum or elsewhere. I seem to have lost the 'processing' menu from QGIS and can't figure out how/why!? Any ideas what I might have done to make this happen?  I'm running QGIS 2.8 built against GDAL 1.10 on Ubuntu 14.04. How do I run a Perl script from within a Perl script? I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed in when it's run standalone (the first script runs periodically, and executes the second script under a certain set of system conditions).  Preliminary Google searches suggest using backticks or a system() call. Are there any other ways to run it? (I'm guessing yes, since it's Perl we're talking about :P ) Which method is preferred if I need to capture output from the invoked program (and, if possible, pipe that output as it executes to stdout as though the second program were invoked directly)?  (Edit: oh, now SO suggests some related questions.  is close, but not exactly the same as what I'm asking. The second program will likely take an hour or more to run (lots of I/O), so I'm not sure a one-off invocation is the right fit for this.) python: restarting a loop i have:  for i in range(2,n):     if(something):        do something     else:        do something else        i = 2 **restart the loop   But that doesn't seem to work. Is there a way to restart that loop?   Thanks Correct spelling of "program" I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application.  It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanaged code.  Does anyone know of a fairly clean tutorial or example of how to do this? I have a situation very similar to the ones depicted in two previous questions I found ( and ), but still different (I address why my situation is different later on in the question).  The problem  I am really panicking, my computer has been in unbootable status for two days now and because of coronavirus lockdown, in Italy there is no any opened tech shop, at this point I do not know what to do and any help is very much appreciated.  I had a ~50 GB linux partition on the SSD (total ~250 GB) of my 15” Macbook Pro mid-2015. I created this partition to boot ubuntu back in 2016 and I used it regularly alongside macOS. About one year ago I updated to Mojave 10.14, and this is the macOS version my computer is running now (I am mentioning it because I suppose that the update changed the file system of my macOS partition to APFS, keeping unmodified the ubuntu partition, I guess).  Today I decided to remove the ubuntu partition, I started the computer on macOS, opened Disk Utility, find the ~50 GB partition assigned to ubuntu on the pie chart, I clicked on the “-“ sign to remove the partition and then “Apply”. Disk Utility returned to me instantly with an error (not remember exactly the text, but I remember that no error code was given) saying it could not perform the operation, so I googled a bit some solutions (MY COMPUTER WAS PERFECTLY WORKING) and I found a post suggesting to perform some operations from ubuntu, so I decided to restart my computer in order to open ubuntu - I repeat, it was perfectly working, many apps opened and fully working, etc. - and...  It booted into “GNU GRUB version 2.02”  I tried to restart my mac keeping “option” pressed, but it could only find the “EFI Boot” disk (picture attached) which is the one I usually select to boot Ubuntu. Also, Ubuntu now doesn’t even work anymore, because if I select “EFI Boot” it starts “GNU GRUB version 2.02”.  Now I really started panicking, I don’t care about data of the ~50 GB ubuntu partition, but so foolishly I haven’t backed up the ~200 GB macOS data, and I am just so affectionate to them, I would really like to recover them.  Data Recap   15” Macbook Pro mid-2015 Right now I am booting from the network. 256 GB SSD partitioned in: ~200 GB APFS macOS partition - FileVault encrypted - running Mojave 10.14 ~50 GB ubuntu partition - don’t remember the file system (data here doesm’t matter to me)   Photos Attached   diskutil list gpt -r show /dev/disk1 disk1 information from Disk Utility Disk Utility overview of the physical disk booting situation with only the “EFI Boot” partition   Why my situation is different  My situation is different from other questions because of 3 reasons:   The ~50 GB ubuntu partition is disappeared, maybe corrupted, indeed if you add up all the disk's size in diskutil list, you still miss ~50 GB. I have 2 disks at the same time (index 2 and index 3) that are in the FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF status When I call gpt -r show /dev/disk1 I don't get any "Suspicious MBR at sector 0" message unlike others users that wrote other questions.   Update 1  I just wanted to confirm that I am booting the mac from Network Recovery and also my Disk Utility version. Disk Utility Version is: "Version 13 (606)" - "Copyright 2002-2014 Apple Inc.". Is seems, indeed, pretty old. USB is a popular standard and I was wondering whether there is some way to connect two or more computers using USB ports rather than the Ethernet ports. The roots of the equation $z^n=(1+z)^n$... The complex roots of the equation      $$z^{n}=(1+z)^{n}$$   $A.$ are vertices of a regular polygon  $B.$ lie on a circle  $C.$ are collinear  $D.$ none of these  Don't know where to start.. Please help.!  NOTE:  $z$ is a complex number. This or That person Today I heard a speaker use the phrase "this person", referring to the subject-person of the story they were telling, and I heard it as (that person). Between the words “this” or “that” in context with the phrase and story-tense, which should you use. Maximum weight an average bicycle can carry? A few years ago, I've bought  (see edit) bike. At that time I was around 90 kgs and I didn't have any problems.  Today I'm around 120 kgs and I was considering (among other things) starting cycling again. Is this bike "good" enough to carry me? What should I expect? Any tips?  EDIT! Apparently, Drag have renamed some of their bikes in the last few years, so the above information is a bit wrong.  seems to be my bike. At first I didn't recognize much difference, but this one has suspension on the front which mine also has. Does this change anything I'm running the following script on Ubuntu 14.04:  #!/bin/bash  apt-get purge -y nginx apt-get install -y nginx  date   When I run it like cat /tmp/script | bash, apt-get starts installing, then "date" is printed (not the actual date, but the command name), then the remaining apt-get output is printed.  If however I run the script like /tmp/script, it works as expected: printing the date after apt-get finished.  Why does this happen and how can I force bash to work when being piped to the same way it does when invoked directly? I lost a couple hundred lines of a Vim plugin I wrote and continue back up every so often because I extracted a tar file containing an older version. I decided not to use source control management when I wrote the plugin, since I only update it periodically.  Why doesn't tar ask before overwriting existing files by default? I'm guessing that there's some rationale behind why the default behavior is to overwrite files silently, since we usually want safety over speed and convenience. For example, we usually use #ifdef NDEBUG, not #ifdef DEBUG; similarly, I would expect tar ask me before overwriting any files, and for it to have some flag which I can use to tell it to overwrite files without asking me. Also, how can make it so that tar does ask me by default, without me having to give it any flags? I'm fine with using tools other than tar, if they support this safer default behavior.  Thank you for your time! Is $f(x,y) = |xy|$ differentiable in $(0,0)$? I have no idea how to approach this problem. A sequence includes $a_p=\sqrt2$, $a_q=\sqrt3$, $a_r=\sqrt5$ for some $1\leq p<q<r$. Can these be terms of an arithmetic progression? harmonic? At the start of the movie it says:      "A long time ago in a galaxy far, far away...."   Does this mean that the entire Star Wars saga takes place in a single galaxy? To my understanding a galaxy isn't very big compared to the universe itself. Star Wars has many different sentient races, and the way they are presented suggests that most planets are host to only one of them (some exceptions like naboo). This strongly leads me to believe there should actually be more galaxies in the Star Wars universe (hehe).   Another thing, I think it's safe to assume that even if the entire saga takes place in one single galaxy, their researchers can observe other galaxies (I think we started doing that in the 1600s, and they are a lot more technologically advanced than we were back then). When Obi-wan is looking for Kamino (the rain planet with the cloners) the librarian says something like "If it's not in our records, it doesn't exist", so she must be convinced that the entire universe has been explored.    If the entire universe has been documented, why wouldn't they go to those other galaxies? The technology seems to be advanced enough to hop to another galaxy. Is there any canon material that suggest that traveling between galaxies is done? If not, is there a canon explanation why they don't? How to make listings code indentation remain unchanged when copied from PDF? So I am using  package for code examples. But there is a problem. When I copy the code examples from the final PDF document, they are usually not the same - the indentation is gone, there are random spaces after parenthesis, etc. Does anyone know how to make sure that the code that I copy from the final document is the same as I wrote it in the LaTeX document?  Here is what I mean. Compile this document:  \documentclass[12pt,oneside]{memoir}  \usepackage{listings} \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{textcomp}  \definecolor{codebg}{HTML}{EEEEEE} \definecolor{codeframe}{HTML}{CCCCCC}  \lstset{language=Awk} \lstset{backgroundcolor=\color{codebg}} \lstset{frame=single} \lstset{framesep=10pt} \lstset{rulecolor=\color{codeframe}} \lstset{upquote=true} \lstset{basicstyle=\ttfamily} \lstset{showstringspaces=false}  \begin{document}  This code example prints out all users on your system:  \begin{lstlisting}[language=c] #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt;  #define MAX_LINE_LEN 1024  int main() {     char line[MAX_LINE_LEN];     FILE *in = fopen("/etc/passwd", "r");     if (!in) exit(EXIT_FAILURE);      while (fgets(line, MAX_LINE_LEN, in) != NULL) {         char *sep = strchr(line, ':');         if (!sep) exit(EXIT_FAILURE);         *sep = '\0';         printf("%s\n", line);     }     fclose(in);     return EXIT_SUCCESS; } \end{lstlisting}  \end{document}   Now compile it, open it, select and copy the code example and paste it in a text editor. Here is the result I get:  # include &lt;stdio .h&gt; # include &lt;stdlib .h&gt; # include &lt;string .h&gt; # define MAX_LINE_LEN 1024 int main () { char line [ MAX_LINE_LEN ]; FILE *in = fopen ("/ etc / passwd ", "r"); if (! in) exit ( EXIT_FAILURE ); while ( fgets (line , MAX_LINE_LEN , in) != NULL ) { char * sep = strchr (line , ':'); if (! sep ) exit ( EXIT_FAILURE ); * sep = '\0 '; printf ("%s\n", line ); } fclose (in ); return EXIT_SUCCESS ; }   Jeez! What's this... The indentation is gone. There are spaces in included headers &lt;stdio .h&gt;, there are spaces after parenthesis [ MAX_LINE_LEN ].  Anyone knows how to fix this? I'd like the code examples in my book to be copy/paste-able into a text editor so people can try them out easily. Why do I get "Permission denied (publickey)" when trying to SSH from local Ubuntu to a Amazon EC2 server? I have an instance of an application running in the cloud on Amazon EC2 instance, and I need to connect it from my local Ubuntu. It works fine on one of local ubuntu and also laptop. I got message "Permission denied (publickey)" when trying to access SSH to EC2 on another local Ubuntu. It's so strange to me.  I'm thinking some sort of problems with security settings on the Amazon EC2 which has limited IPs access to one instance or certificate may need to regenerate.  Does anyone know a solution?