In this program I want to be able to remove the minimum and maximum values from the array but I don't know how to do it.  public class Average {    public static void main (String [ ] args)    {      double [] weights = {39.5, 34.8, 22.6, 38.7, 25.4, 30.1, 41.8, 33.6, 26.2, 27.3};     double minimum = Integer.MAX_VALUE;     double maximum = Integer.MIN_VALUE;      for(int i = 0; i &lt; weights.length; i++){         if(minimum &gt; weights [i])             minimum = weights[i];     }      for(int i = 0; i &lt; weights.length; i++){         if(maximum &lt; weights [i])             maximum = weights[i];     }   }  }
Given an array of n Objects, let's say it is an array of strings, and it has the following values:  foo[0] = "a"; foo[1] = "cc"; foo[2] = "a"; foo[3] = "dd";   What do I have to do to delete/remove all the strings/objects equal to "a" in the array?
VLC will not install How do I configure Nautilus to open at my Documents folder instead of my home folder?  I've scoured this site and found answers instructing users to edit the /usr/share/applications/nautilus.desktop file, replacing %U with the path to the desired default directory. I've edited all the variants of nautilus.desktop in the said directory, but none of the edits has an effect. I've checked all the files after editing them to make sure that I saved the edit effectively, and all look good to me.   I've edited every file to read as follows:  Exec=nautilus --new-window /home/judy/Documents   I've also edited the org.gnome.Nautilus.desktop file, just to be sure, with no joy.   I'm running Ubuntu 15.10.  Note: if I enter nautilus /home/judy/Documents from the command line, Nautilus properly opens in the desired directory.  Is there a simple way that I can configure an icon in the launcher bar to run this command and have the Nautilus icon that looks like a metal file drawer?  Thanks. I'm pulling my hair out over this one. I'm trying to find a way of building a new power supply for my workshop, in order to keep it small and not so hot I will be using a spare xformer to step down mains to 24v and then a variable buck converter to adjust it (and CC mode, displays and blinky stuff).   I thought it would be a good idea to use a linear regulator on the output stage to smooth things out, but I can't seem to think of a control scheme that allows me to change the voltage using only one potentiometer. The buck stage is this topology but with a external PNP transistor.(It has already been prototyped, it works alright, I know the mc34063A is old)   The only idea I got that ""works"" is using the buck converter output as a reference for a linear regulator (IC or discrete parts), but using a SMPS output as reference for anything is a bad idea, due to the amount of noise and fluctuations.   This is the sort of output stage I can and have built (or bought) over time. Just a big discrete regulator.  In short: How to control a MC34063A step down (buck) converter so it follows the output stage +1-3 V of headroom. Unit testing code which has logic around the CreatedDate An example of the problem would be trying to test a trigger on a case which will fire on update, and look for time differences between when a case was created and now. Ideally in the unit tests I want to create a case with a CreatedDate in the past. The problem here is that CreatedDate is an audit field and not writeable[1]. Is there a standard work around to this problem?  [1] I know you can get audit fields turned on to be writeable temporarily when doing data migration. This is not a viable solution for every time you want to get your code coverage up for deployment. Is there any way to get a specific angle using the knife tool? Instead of the constrained 45 degrees that happens when you press C, is there a specific angle I can get for example 35 degrees instead?   It's currently cut at 45 degrees in the attached image and I need it to be 35. Simple Past vs. Present Perfect: "was" vs. "has been" Every function on $\mathbb{R}^n$ that is continuous in each variable separately is Borel measurable. I'm trying to solve exercise 2.11 from Folland's Real Analysis.    Firstly, how do we show that $f_n$ is Borel measurable on $\mathbb{R} \times \mathbb{R}^k$? I really have no idea how to show this when we have separately Borel measurable functions.  Next, I can't show that $f_n\to f$ pointwise.   For any $(x,y)\in \mathbb{R}\times \mathbb{R}^k$,   $f_n(x,y)=n[f(a_{i+1},y)(x-a_i)-f(a_i,y)(x-a_{i+1})]=n[x[f(a_{i+1},y)-f(a_i,y)]+\frac{1}{n}[f(a_i,y)-f(a_{i+1},y)]]$,   but because of the $n$ outside the bracket, I can't show that this converges to $f$. How can I show this? Also, how can I conclude from this fact that every function on $R^n$ that is continuous in each variable separately is Borel measurable?  I would greatly appreciate any suggestions, hints, or solutions. Multicollinearity when individual regressions are significant, but VIFs are low I have 6 variables ($x_{1}...x_{6}$) that I am using to predict $y$. When performing my data analysis, I first tried a multiple linear regression. From this, only two variables were significant. However, when I ran a linear regression comparing each variable individually to $y$, all but one were significant ($p$ anywhere from less than 0.01 to less than 0.001). It was suggested that this was due to multicollinearity.  My initial research on this suggests checking for multicollinearity by using . I downloaded the appropriate package from R, and ended up with the resulting VIFs: 3.35, 3.59, 2.64, 2.24, and 5.56. According to various sources online, the point you should be worried about multicollinearity with your VIFs is either at 4 or 5.   I am now stumped about what this means for my data. Do I or do I not have a multicollinearity problem? If I do, then how should I proceed? (I cannot collect more data, and the variables are parts of a model that aren't obviously related) If I don't have this problem, then what should I be taking from my data, particularly the fact that these variables are highly significant individually, but not significant at all when combined.  Edit: Some questions have been asked regarding the dataset, and so I would like to expand...  In this particular case, we're looking to understand how specific social cues (gesture, gaze, etc) affect the likelihood of someone producing some other cue. We would like our model to include all significant attributes, so I am uncomfortable removing some that seem redundant.  There are not any hypotheses with this right now. Rather, the problem is unstudied, and we are looking to gain a better understanding of what attributes are important. As far as I can tell, these attributes should be relatively independent of one another (you can't just say gaze and gestures are the same, or one the subset of another). It would be nice to be able to report p values for everything, since we would like other researchers to understand what has been looked at.  Edit 2: Since it came up somewhere below, my $n$ is 24. Setting background-image using jQuery CSS property How do I select background music for my RPG campaign? Music is an essential component of my games. When running games set in the Star Wars universe, the music of John Williams adds a new dimension to the experience, both for me and for my players. Now that I'm starting a fantasy campaign, I'm a bit more uncertain about which music to use.  How do I create a soundtrack suitable for using in a fantasy campaign?  Specifically:   What sort of characteristics make for good back ground music? What makes for bad background music? What should I look for to get a fantasy feel? Which genres/sub-genres support fantasy games? What are good sources for fantasy background music?   A few notes:   Because the music will be used in the background of game sessions, most of the tracks should be one minute or longer, to avoid repetitive loops. Likewise, soundtracks with a variety of themes are preferred, so that they can easily support different modes of the game: exploration, combat, and chases, to name a few. Orchestral or acoustic music is preferred over music with vocals or electric instruments. What license does Ubuntu fall into (GPL, MIT, a mix)? Would it be legal to modify it and redistribute my modified version? What happens to the energy when waves perfectly cancel each other? Title pretty much sums it up.  The external style sheet has the following code:  td.EvenRow a {   display: none !important; }   I have tried using:  element.style.display = "inline";   and  element.style.display = "inline !important";   but neither works. Is it possible to override an !important style using javascript.  This is for a greasemonkey extension, if that makes a difference. I have a PHP script that can encode a PNG image to a Base64 string.  I'd like to do the same thing using JavaScript. I know how to open files, but I'm not sure how to do the encoding. I'm not used to working with binary data. I know this sounds like a stupid question, but I just wanted to confirm if they are the same thing. In new canon, anti-gravity is never mentioned. I have already read the question about  but this is not what I want, I want to be able to click on the file in Dash or in Nautilus and be able to open it with the specified app.  For example I have this case right now:  When I click on an EXE file it does not get executed by Wine, instead I get the following:    If I try to look for Wine in the Open With context menu option it is there. I am fine executing it from there the first time, but then the following times Wine does not appears selected in the main Context menu:    I then went to Properties to the Open With Tab to look for Wine. It was not in the Default apps nor was it in the Recommended ones when I clicked and search on Show other applications    This is not limited to EXE extensions. It also has happened with MKV files, MP4 files, JPG, PNG, MP3 and even SVG and CSS. So instead of trying to find a way of solving it for one, I want a way that can be done to any type of extension that can:   Make the app the default of that extension Appear on the context menu in Nautilus when I right click on the file Appears on the "Open With" tab on the Property window of the file Correctly executes the specified app when I click on the file with Dash   This might sound like it should be common sense for an app to execute the file but it does not always work like that. So for the cases where it actually does not work, how to fix it. A reset of the extension?, An update of the files that can open said extension?, an addition of the app via a command line or GUI tool? Is it possible to prove a null hypothesis? I am asked to complete my withdrawal transaction with COT fee of 1200 dollars I was marketed by a lady online on some investment packages in bitcoin. ($200 to become $2500 in one week of trade). I indicated interest in this. She took me to a trading website to sign up.  I deposited $200 at the start. After trading for 2 days with earnings, they called me to upgrade the account with $450 which I did. They then traded for 1 week and the account balance became $6786.    I requested to withdraw $6000 from my account and they told me to bring a COT fee of $1200 to complete my withdrawal.  Please help me do a background check on them. Are they real or fake? Check the registration of the company if it is real. The marketer told me the company will pay her from the COT fee. "dev/sda1: clean, ..." This message appears after I startup my laptop, then it won't continue booting dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there. Crossthread operation not valid... - VB.NET