I need to create an algorithm that extracts one of the largest possible  subsets from a list, in which all elements are ordered. This subset can  be non-consecutive, but must preserve the order from the original list. For example:  Input:                   Possible Output: [1,2,8,3,6,4,7,9,5]  ->  [1,2,3,6,7,9]   One might rephrase the question as "which elements do I at least have to remove so that the remaining list is sorted".  I'm not looking for an implementation, but just for ideas for a simple algorithm. My best approach so far would be to build a tree with nodes for each number, and their children being all larger numbers following in the list. Then the longest path down the tree should equal the sorted subset. However, that seems overly complicated.  Context: this is to check student's answers on a test where they have to order items by size. I want to find out for how many they got right, relative to each other.

How can I find the largest increasing (non-contiguous) subset of an array? For example, if A= array(50,1,4,9,2,18,6,3,7,10) the largest increasing non-contiguous subset is either (1,4,6,7,10) or (1,2,6,7,10). I can intuitively see how to find the subset, but I don't know how to design the algorithm.


Einstein's equation is  $$8πT_{ab}=G_{ab}$$  where the left side contains the stress-energy tensor and the right side contains the Einstein tensor.   Is there exactly one unique stress-energy tensor corresponding to a given spacetime curvature? Or is it possible for one curvature (i.e. one spacetime metric) to be produced by multiple different mass configurations

Einstein's equation is  $$8 \pi T_{ab} = G_{ab},$$  where the left side contains the stress-energy tensor and the right side contains the Einstein tensor.  Is there exactly one unique stress-energy tensor corresponding to a given spacetime curvature? Or is it possible for one curvature (i.e. one spacetime metric) to be produced by multiple different mass configurations?


Especially in the beginning of the first movie, Thor is brash and often petulant. He seeks the glory of king-hood without understanding or accepting the self-sacrifice and responsibility that such a role requires. He is brave, yet selfish.   My question is Why was Thor worthy? I would think that some nice, selfless guy should be able to lift Mjolnir, but it is portrayed as some rare trait of extreme virtue that only Thor and perhaps a couple others possess.  Because Thor himself doesn't appear to be excessively virtuous, it seems like the power to lift Mjolnir was endowed on him, not earned by him, so why all this pretense about worthiness?

Consistently across the Marvel version of Thor's various incarnations only the 'worthy' may lift Mjolnir, his enchanted hammer.  The inscription reads, "Whosoever holds this hammer, be he worthy, shall posses the power of Thor."  In the movie, of course, a large part of the story is centered upon Thor       becoming worthy.   In the comics and crossovers, many people have been able to wield Mjolnir, including Storm, Captain America, Beta-Ray Bill, Conan, a random paramedic (who hands it to an astonished Thor, laying on a stretcher), and Wonder Woman.  However, Superman wields it briefly in one crossover, but then can't lift it.  Thor says Odin had briefly lifted the enchantment to allow Big Blue to use it.  So what determines one's 'worth' to the hammer?  I know  and all, but that  is hardly canon.


Should one use an apostrophe to indicate that ABC's is plural or is it incorrect?

When I was in high school back in the 1970s, I was taught that to make a plural of an acronym, a letter, or a number, one should add an apostrophe and "s". Like I would have written this sentence, "... back in the 1970's ..." I would write "one CD, two CD's". Etc. I followed this rule faithfully for years until a co-worker told me it was wrong. Now I can't find any source that agrees with what I was taught.  Is this a rule that has changed over time? Was the convention in the 70s that one should use an apostrophe but this has changed and now we do not? Or were my high school English teachers just confused?


I am new to Ubuntu and I have been researching and doing practice but I couldn't figure out exactly the correct command to help me solve my problem. I would be very grateful if someone could help me out here. I want to know how I could use nano command to add the line "dns-servers" to the /etc/network/interfaces.

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)


If I have $f: \mathbb{R}^{n \times m} \times \mathbb{R}^{n} \to \mathbb{R}^{m}$ And $f(K,t) = Kt + h$ where $h \in \mathbb{R}$ How would I find $\frac{\partial f}{\partial K}$ and $\frac{\partial f}{\partial t}$?

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


Have a bag of potatoes about maybe 3 weeks old. Still firmish, not green but with little small sprouts (maybe barely 1 cm) VERY small.  Are these ok to eat? I trimmed off the sprouts and the inside looked fine, and they are not green. Slightly softer but still firm.

I'm talking about potatoes that have gone somewhat soft and put out shoots about 10cm long.   Other online discussions suggest it's reasonably safe and the majority of us have been peeling and eating soft sprouty spuds for years. Is this correct?


I am writing a command which is given below.  if ["$avg" -ge "80"]; then echo "PASS" else echo "FAIL"   I am getting an error like:   x.0000000000000000 integer expression expected  and the result of if -else statement is always wrong.   Pls help and suggest necessary changes.

Let's say I have a coordinate (x,y), I want to make two categories: good or bad.  I have no idea how to put it into words or keywords, so I created an example of what I want.  I have created a bash script like this:  x=3.5 #(example) y=-2.5 #(example) if [ $x -ge 0.1 -a $x -le 5.5 ] && [ $y -ge -5.9 -a $y -le -0.1 ]; then cat="good"; elif [ $x -ge 5.5 -a $x -le 10.5 ] && [ $y -ge -10.9 -a $y -le -5.9 ]; then cat="bad"; fi echo "$cat"   On that script I want to know if x is within range 0.1 till 5.5 (0.1 < x < 5.5) and y within -5.9 till -0.1 (-5.9 < y < -0.1) are true then it gives result as good. With different boundaries it should give a bad result.  I've run it and it gives the result as integer expression expected.  When I try to replace the operator -ge (or -le) with operator > (or <), or try to add a square bracket and anything I could think of, it gives the same error or no results are given.  How should I approach this?


I made this template class:  //Elenco.h  #pragma once #include "Tipi.h" #include <vector>  template <typename T> class Elenco { public:     //constructor     Elenco() : Elenco::Elenco(std::vector<T> {})     { }      Elenco(const std::vector<T>& _list) : list{ _list }     {         sort();     }      //setter     T add(const T&);      //viewer     const std::vector<T>& view() const;  private:     std::vector<T> list;      void sort(); };     //Elenco.cpp  #include "Elenco.h" #include <algorithm> #include <iostream>  //setter template<typename T> T Elenco<T>::add(const T& item) {     list.push_back(item);      sort(); }   //viewer template<typename T> const std::vector<T>& Elenco<T>::view() const {     return list; }   //private template<typename T> void Elenco<T>::sort() {     for (unsigned short n = 0; n < list.size(); n++)         for (unsigned short m = 0; m < n; m++)         {             std::cout << list[m] << "-" << list[n] << ": " << bool(list[m] > list[n]) << std::endl;             if (list[m] < list[n]) std::swap(list[m], list[n]);         } }       //main.cpp      #include "Elenco.h"     #include <iostream>      int main()     {         using namespace std;          vector<Player> elenco{ {"carlo", 11}, {"mario", 3}, {"franco", 5}, {"paolo", 1}, {} };         Elenco<Player> a{ elenco }; //<---- same if I use an int or any other type          for (auto it : a.view()) cout << it << endl; //<---- operators<< and < have been overloaded in Player.h          return system("pause");     }   The problem is that when I try to create an object I get these errors:     unresolved external symbol "public: class std::vector > const & __thiscall Elenco::view(void)const " (?view@?$Elenco@VGiocatore@@@@QBEABV?$vector@VGiocatore@@V?$allocator@VGiocatore@@@std@@@std@@XZ) referenced in function _main        unresolved external symbol "private: void __thiscall Elenco::sort(void)" (?sort@?$Elenco@VGiocatore@@@@AAEXXZ) referenced in function "public: __thiscall Elenco::Elenco(class std::vector > const &)" (??0?$Elenco@VGiocatore@@@@QAE@ABV?$vector@VGiocatore@@V?$allocator@VGiocatore@@@std@@@std@@@Z)        2 unresolved externals   I found in another post that you can fix this by including Elenco.cpp in my main.cpp file, or by including it at bottom of Elenco.h excluding the file from the project.  Both solutions work, but they doesn't seem great because I lose the main purpose of an header: allowing to modify my definition without re-compiling my projects...  So I could I fix that? And (above all) why do I get there errors?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Podcasting seems to be exploding these days but I was wondering if anyone has come across a podcast or podcasts explores the stuff that is happening out there in the geospatial world?  I have found one that a really like "" but I would love to hear if anyone out there that has any other recommendations.

I would like to make a list of podcasts related to geospatial technologies.  Do you listen to any that you find interesting and informative?


After researching into how spell effects stack, I find some ambiguity regarding certain spells that have multiple possible effects. Notably,  contains updated information from the :  Combining Game Effects (p. 252). This is a new subsection at the end of the “Combat” section:  Different game features can affect a target at the same time. But when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap. For example, if a target is ignited by a fire elemental’s Fire Form trait, the ongoing fire damage doesn’t increase if the burning target is subjected to that trait again. Game features include spells, class features, feats, racial traits, monster abilities, and magic items. See the related rule in the ‘Combining Magical Effects’ section of chapter 10 in the Player’s Handbook.   There are, however, no references in deciding how to determine what "the most potent one" may be when not using raw numbers (such as with paladin auras). This is also applicable to spells like , which inflicts a "natural disease" (and you can be afflicted by multiple natural diseases). If both effects of  cannot influence a character at the same time, how do you determine which one takes effect (assuming both casts are at the same spell level)?

The Player's Handbook states that when cast as a 3rd level or higher spell, Blindness/Deafness can target additional targets equal to the difference between the spell slot the spell is cast at and its base spell slot level of 2.  My question is, would it be legal to cast Blindness/Deafness as a 3rd level spell, but instead of having either effect (blindness OR deafness) target two creatures, have it target one creature with both effects (blindness AND deafness.)  I'm having a hard time deciding whether this would provide an overpowered effect, as it increases the amount of disabilities one creature will suffer from, but lessens the number of creatures affected by the spell.  Perhaps it could be legal provided the targeted creature gets to make a separate CON save against each effect?


I'm looking for a rigorous introduction to probability to help prepare me for a future course I plan on taking, "Advanced Introduction to Probability". Something possibly like Spivak's, where proofs are key.  Any help is appreciated.

what are some good books on probabilities  and measure theory? I already know basic probabalities, but I'm interested in sigma-algrebas, filtrations, stopping times etc, with possibly examples of "real life" situations where they would be used  thanks


I want to make a tree with some branches out of a curve like this simple one (I've created this with the ALT+C, convert to curve:    When I set the depth to a non zero value and set the Fill settings to full, it looks like a tree with branches. But when I change the radius on the joined point, only half of the "tree" is getting bigger/smaller. When I look inside, the problem is obvious: There are essentially two separate pieces stuck together:    What can I do to get a nicely connected mesh I can work/modify on? Is there something I do fundamentally wrong? Is it bad practice to stuck connected parts of a mesh together?

I want to extrude a curve in two directions.    Or join both curves into one, is it possible? I've tried copying it and then join segments, but I don't see Remove Doubles option while working with curves.


Assume n people who are initially assigned seats from 1 t0 n but they don't know their seat number, now they randomly pick up a seat on their own and what would be the probability that no one is seating to its assigned seat?

I am trying to figure out how many permutations exist in a set where none of the numbers equal their own position in the set; for example, $3,1,5,2,4$ is an acceptable permutation where $3,1,2,4,5$ is not because 5 is in position 5.  I know that the number of total permutations is $n!$. Is there a formula for how many are acceptable given the case that no position holds its own number?


I have a csv file with list of client details. I am pulling out a particular column from that file with this code: import csv  details = [] with open("userlist.csv", "r", encoding="utf8") as csv_file:     csv_reader = csv.reader(csv_file, delimiter=',')     for lines in csv_reader:       description.append(lines[27]) print (details)  I am getting this output in a list for multiple rows:'[Description]sentence1[Issue Details] *** Bunch of other data """timestamp":12:42PM,emailaddress:xyz@gmail.com', '[Description]aaa[Issue Details] *** Bunch of other data """timestamp":10:12AM,emailaddress:mmm@gmail.com' Now I want to extract the emailID of the user. So how should I do that?

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I have a pretty simple setup:    button: toggles “toggled” class on the nav li is simplified holder for submenu: it should change aria attribute on click, but only when the nav has .toggled class on it   But for some reason this line doesn't work:  $('.toggled .has-children').on('click', function(e){   Is it because the class is added dynamically to the parent? How would I overcome this?     $(function() {       var container = $('.nav');   var button = $('.menu');      //add remove class to nav   button.on('click', function () {       if(container.hasClass('toggled')) {           container.removeClass('toggled');       } else {           container.addClass('toggled');       }   });    // doesn't work?   $('.toggled .has-children').on('click', function(e){     e.preventDefault();     $(this).attr('aria-expanded', 'true');   })    }); .toggled {   color: blue; }  .has-children[aria-expanded=true] {   color: red; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <nav class="nav">  <button class="menu">Menu</button>    <ul>     <li class="has-children" aria-expanded="false">       Has children     </li>          </ul>    </nav>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have been trying to understand the difference between different references but the theory does not provoke any ideas for me to visualize the same.  Could anyone please explain in brief the different references?  An example for each would do better.


I have two events in a class  public event AcquiredDataEvent OnNewAcquiredData; public delegate void AcquiredDataEvent(int[] newData);  public ScanStartedEvent ScanStarted; public delegate void ScanStartedEvent();   I just realized that ScanStarted does not have the keyword event before it. Most likely the result of a typo by me, though it still works as expected.   What is the difference between the two events if any?

What are the differences between delegates and an events? Don't both hold references to functions that can be executed?


I'm looking for a word that would fit this description, or something close to it: To harm or disrupt another person despite the fact that your actions also harm or disrupt yourself.

When you are so mad at someone that you make a bad decision, even though you will be harmed by it as well, in order to harm that person; is there a good term for this?   For example burning $100 because he owns $20 of it.


I am trying to uninstall every single package I installed and I'm almost sure that it is possible with one command, but I don't know it. What can you suggest, please?

I installed a plain Ubuntu 10.10 on my computer and installed some software via apt-get. Last week I managed to break everything and just started from scratch, and I need to reinstall my software. Is there some way to create a list with all the packages that I have installed manually?  So that it would give me a list like texlive, ... and not texlive, texlive-dep1, textlive-dep2, ... and all the standard packages removed?  If I could somehow figure out which programs out of the regular install I have removed, that would be awesome too!    Update 2015-05-23: I now use Ansible as configuration management on my systems. There I specify the packages to install. This serves the goal, installing all the programs on a fresh system, even better. So this question might be the entry into some light configuration management.


Formally, one can arrange the quark flavors in a $SU(n)$ fundamental representation. One can then do tensor products for flavor and spin to construct other representations like baryons and mesons. An example: $2⊗2=3⊕1$ for spin $SU(2)$ gives scalar and vector mesons, $3⊗\overline3=8⊕1$ for flavor $SU(3)$ gives the eightfold way for both scalar and vector mesons. My question is easy: how do you get $3⊗\overline3=8⊕1$? Or for baryons: $3⊗3⊗3=10⊕8⊕8⊕1$?

I am dealing with the tensor product representation of $SU(3)$ and I have some problems in understanding some decomposition.  1) Let's find the irreducible representation of $3\otimes\bar{3}$  we have that this representation trasforms like   $${T^\prime}^i_j=U^i_k {U^{\dagger}}^l_j T^k_l $$  hence I observe that  $$Tr(T)=\delta^j_iT^i_j$$ is an invariant and so  $$T^i_j=\left(T^i_j-\frac{1}{3}\delta^j_iT^i_j\right)+\frac{1}{3}\delta^j_iT^i_j$$  allows me to write $$3\otimes\bar{3}=8\oplus1$$ Here comes my questions: I have heard that this $8$ representation is an "$8_{MA}$" where MA is for "mixed-antisymmetric". The meaning of "mixed-antisymmetric" shold be: "the tensor $\left(T^i_j-\frac{1}{3}\delta^j_iT^i_j\right)$ should be antisymmetric for an exchange of 2 particular indexes but not for a general exchange of 3 indexes". What does this mean? I see only 2 index in that tensor.  2) Consider this representation: $$3\otimes3\otimes3=3\otimes(6\oplus\bar{3})=3\otimes6_S\oplus3\otimes\bar{3}=3\otimes 6_S\oplus8_{MA}\oplus1$$  and now on my notes I have $$3\otimes6_S=10_S\oplus8_{MS}$$  Where "MS" is for "mixed symmetric": symmetric for an exchange of 2 particular indexes but not for a general exchange of 3 indexes.  I could not demonstrate this last decomposition using tensor method. I started noticeing that: $$3\otimes6_S=q^iS^{k,l}$$ where $S^{k,l}$ is a symmetric tensor But then I am not able to proceed in demonstrating the above decomposition (note: I would like to demonstrate this decomposition using only tensor properties, not Young tableaux). I tried to look on Georgi, Hamermesh, Zee and somewhere online but I have not found any good reference which explains well this representatin decomposition...  EDIT: the demonstration should not include the use of Young diagrams...my professor started the demonstration by writing $\epsilon_{\rho,i,k}q^i S^{k,l}=T'^l_\rho=8_{MS}$ and then stopped the demonstration.


I had installed Lubuntu in my old computer. It's so old that I think I should not use any desktop environment.   Is there any way to boot without Any desktop environment? I had only Lubuntu on my computer thus I didn't install grub or boot loader. I don't want to remove the desktop environment for testing reasons or start single application as posted . I want to boot into my Lubuntu normally, just without any desktop environment (e.g: LXDE), I want it like Ubuntu server.

Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.


convert subtitle MKS to SRT in terminal ?   How to ? because I can not edit my mks subtitle in ubuntu software that I use. just suport srt only

The problem is that videoplayers in Ubuntu have a problem with integrated central european subtitles.The solution is to extract them. Does anyone knows if there is a command in the terminal or a program to extract the subtitle from a mkv file?


I just want to generate 6 digit random number, and the range should be start from 000000 to 999999.  new Random().nextInt(999999) is returning me number but it is not in 6 digit.

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


In the movie Donnie Darko, where does the jet engine in the beginning of the movie come from originally?

In the film Donnie Darko, a jet engine lands on Donnie's room in the beginning of the movie. I thought that it was the engine of the plane in which his mother and sister were travelling, which gets crashed and was sent from the future by Donnie through the portal as an act of self sacrifice to save others. If this was the case, he had successfully altered the future and the crash should not have happened in the future. If the crash itself had not taken place, how did he send the engine? Or did he transfer that object from tangent universe to the primary universe (I think this is highly unlikely).


I am not able to sudo apt-get update after trying to get lynis. Is there a way to undo this? (error 10) W: GPG error: https://packages.cisofy.com/community/lynis/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F873450D48C4F9C E: The repository 'https://packages.cisofy.com/community/lynis/deb stable InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


How can I manually install gcc tarball file in Ubuntu 12.04?

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


I want to calculate burden resistor for a 1000:5 current transformer. I want to output 5V variation. How do I calculate this burden resistor?  I using burden resister 220orm .this is out put .input primary 20A and out vmax 43.2 and freq 50.

I have 1:50 wound current transformer and I don't have the datasheet. Could anybody help me to calculate the burden resistor?    Maximum current to be measured: 2A  Max output voltage to ADC: 5V


The question is to evaluate $S=\sum_{k=0}^{n} \frac{(-1)^k}{k+1} {n \choose k}$  $\textbf{My Attempt:}$ I have considered the generating function $$ f(x)=\sum_{k=0}^{n} {n\choose k} x^k = (x+1)^n$$Integrated and divided by $x$, $$\frac{1}{x} \int f(x) = \int \frac{{n \choose k}}{k+1} x^k = \left( \frac{1}{x} \right) \frac{(x+1)^{n+1}}{n+1}$$  Finally I considered the value for $x=-1$ which turns out to be $$\frac{1}{-1} \int f(-1) = \left( \frac{1}{-1} \right) \frac{(-1+1)^{n+1}}{n+1}=0$$ Which is wrong.  I cannot spot my error

Other than the general inductive method,how could we show that $$\sum_{r=0}^n \frac{(-1)^r}{r+1}\binom{n}{r} = \frac1{n+1}$$  Apart from induction, I tried with  to check the validity, but I can't think of an easy (manual) alternative.  Please suggest an intuitive/easy method.


I had applied for a visa for PLAB 2, which got refused based on the grounds that I wasn't employed for one year after my graduation and was unemployed. The fact was I was doing my internship which finished in August (I applied for my visa in December). I was not having my internship certificate at that time which I have now. So they were not satisfied that I will return back.    I have my internship certificate now, showing that I have been working as an intern for the past year, though I am unemployed now (as we require internship certificate for applying for jobs in UAE and for getting registration, basically for everything). I also will take the residency entrance examination for UAE but the applications for this only open in April and I intend to apply for that too when the dates are announced but meanwhile want to clear my PLAB 2 examination.  Can anyone guide me on now how to progress further so that my visa application doesn't get rejected?

I am a medical doctor in Pakistan. I have been on a career break to allow myself to study full time for the IELTS exam (from which I recently got the required band score) and PLAB 1. I have now registered and paid for the PLAB 1 exam in UK for June 2016, as the next sitting in Pakistan is in November 2016 and I feel like I am ready to do the exam sooner.  Due to having no current employment, my savings are limited (around 25,000 Pakistani Rupees) but I live with my parents and do not have any financial commitments at home.  My savings have depleted in the past ten months whilst I have taken a career break and the money has been used for my own personal expenses. My trip to the UK is being funded by my grandfather who is a British citizen. He is a retired doctor with a good NHS pension. He has provided me with:   6 months bank statements which clearly show his pension deposits   Letter from NHS Pensions stating his pension   Sponsorship letter stating that he will pay for my PLAB exam fee, travel, accommodation and subsistinence costs whilst in the UK   Copy of British passport  Document confirming that he owns the house he lives in mortgage-free Confirmation email from GMC stating he has paid the PLAB exam fee.   Without large personal savings and no current job (but I have job offers now) would my application be rejected or is the strong sponsorship going to be good enough?  Are there any other documents I should consider submitting that may help me get a visa?


We have automated build bash script where at the beginning executed command  apt-get update; apt-get upgrade -q -y -u    --allow-downgrades --allow-remove-essential --allow-change-held-packages    --allow-change-held-packages --allow-unauthenticated;   but it keeps asking this question with popup in terminal     A new version (/tmp/grub.xC3mMKP0zx) of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.     which is reason that automated script execution is hanging and i can't force skip it somehow with --allow* or -y options  our ubuntu is 16.04  how i kan avoid that popup appearce ?  Please help, Thanks  -- UPDATE --  I have tried many solutions  also this one:  which was mentioned as duplicate to this question   apt-get -o DPkg::Options::=--force-confdef upgrade -q -y -u --force-yes   it still the same promt popup asking for choose default option

I am installing packages on remote server, using ssh:  ssh root@my-host "DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get --quiet --yes install w3m"   even though I have set DEBIAN_FRONTEND=noninteractive, the installation gets stuck on following question, and I have to press enter manually:  Configuration file '/etc/w3m/config'  ==> File on system created by you or by a script.  ==> File also in package provided by package maintainer.    What would you like to do about it ?  Your options are:     Y or I  : install the package maintainer's version     N or O  : keep your currently-installed version       D     : show the differences between the versions       Z     : start a shell to examine the situation  The default action is to keep your current version. *** config (Y/I/N/O/D/Z) [default=N] ?    I suspect, the question is being asked by dpkg --configure -a and not by apt-get and therefore noninteractive is ignored.  How can I automate this and have default option selected automatically, without being asked ?


Method parameter sd & ed is LocalDate, I need return date object, but sd & ed return null. My define a private method:  private void setQuarter(LocalDate sd,LocalDate ed,LocalDate today){             switch (getQuarter(today.getMonthValue())){                 case 1:                     sd=LocalDate.of(today.getYear(),1,1);                     ed=LocalDate.of(today.getYear(),3,31);                     break;                 case 2:                     sd=LocalDate.of(today.getYear(),4,1);                     ed=LocalDate.of(today.getYear(),6,30);                     break;                 case 3:                     sd=LocalDate.of(today.getYear(),7,1);                     ed=LocalDate.of(today.getYear(),9,30);                     break;                 case 4:                     sd=LocalDate.of(today.getYear(),10,1);                     ed=LocalDate.of(today.getYear(),12,31);                     break;                 default:                     sd=LocalDate.of(today.getYear()+1,1,1);                     ed=LocalDate.of(today.getYear()+1,1,1);             }         }   Invoke this method:  LocalDate sd=null; LocalDate ed=null;  setQuarter(sd,ed,today);  log.info("==> sd:{},ed:{}",sd,ed);   Output message: ==> sd:null,ed:null

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I want to animate a camera from a ortho view to a perspective view.  Is this possible and if so, how.  Seems you can only have one or the other but not both.

I want to animate between perspective and orthographic camera views. How can this be done?  I found where people talk about successfully animating between orthographic and perspective camera views in Unity with code, so fundamentally this must be possible. But I don't know Python, so I wouldn't be able to figure it out manually with code in Blender.


I am a high school student interested in studying mathematics at university. I've been doing some independent study and have found the Gaussian Integers $\mathbb{Z}[i]$ particularly interesting. I was thinking about primes in $\mathbb{Z}[i]$, and came across the following results: First, considering which primes $p$ in $\mathbb{Z}$ remain prime prime in $\mathbb{Z}[i]$, I think the following is true:  If $p \equiv 3 \bmod{4}$, then it remains prime in $\mathbb{Z}[i]$. If $p \equiv 1 \bmod{4}$, then $p$ is not prime in $\mathbb{Z}[i]$. This is because $p$ can be written as a sum of two squares: $p = a^2 +b^2$, and so factorizes in $\mathbb{Z}[i]$ as: $p = (a+ib)(a-ib)$, where neither $a+ib$ nor $a-ib$ are units (the latter is true because $p \neq 1$).  However, I realized that this is not the end of the story, as there could be primes in $\mathbb{Z}[i]$ of the form $a +ib$, where neither a nor b equals zero. In this case, the only result I could find was that if $a^2 + b^2$ is prime (e.g. in the case of $1+i$) then $a+ib$ is prime in $Z[i]$. But this does not determine all the primes in $\mathbb{Z}[i]$. My question is: Is there a known necessary and sufficient criterion for a Gaussian Integer $a+ib$ to be prime in $\mathbb{Z}[i]$? If not, are there any additional primality tests known in $\mathbb{Z}[i]$? Any help and guidance would be greatly appreciated.

I am trying to prove the following: Let $R=\mathbb{Z}[i]$, $a, b \in \mathbb{Z}, ab \neq 0$. Show that $a+bi$ is an irreducible element in $R$ if and only if $a^2 + b^2 ∈ \mathbb{Z}$ is prime. Since $R$ is a Euclidean domain, irreducible elements are prime. I think this is relevant, but am stuck on where to go from here.


I'm making a vocabulary practice program using arrays (I know, not Lists, but I need array practice). However, everything goes well until the program evaluates if the typed answer (when the program quizzes the user) is the actual definition. I always get the answer wrong, and I don't know why. Here's the whole program:  import java.util.Scanner;  public class organ { public Scanner input = new Scanner(System.in); public String language; public int temp;  public static void main(String[] args){     organ organObject = new organ();     organObject.greeting();     organObject.ending(); }  public void greeting(){     System.out.println("Hello! Do you want to practice vocabulary in English or Spanish?");     //Need to fix this grammar.     System.out.println("!Hola! ?Quieres practicar el vocabulario en ingles o espanol?");     language = input.nextLine();     checkLanguage(language); } public void checkLanguage(String answer){     if (language.equals("English") || language.equals("ingles")){         englishTree();     }     else{         spanishTree();     } } public void englishTree(){     System.out.println("How many words do you want to practice using?");     int temp = input.nextInt();     String[] wordStorage = new String[temp];     String[] meaningStorage = new String[temp];     String answer;         for(int counter = 0; counter < wordStorage.length; counter++){              System.out.println("What is word number " + (1 + counter) +   "?");             wordStorage[counter] = input.next();              System.out.println("What is def number " + (1 + counter) + "?");             meaningStorage[counter] = input.next();         }     if (wordStorage.length > 10) {         System.out.println("Stop. Now.");     }     System.out.println("Alright, let's get to the good stuff.");     for(int counter = 0; counter < wordStorage.length; counter++){         System.out.println("What is the meaning of " + wordStorage[counter] + "?");         answer = input.next();         if (answer == meaningStorage[counter]){             System.out.println("Correct!");         }         if (answer != meaningStorage[counter]){             System.out.println("Wrong. The answer is " + meaningStorage[counter] + ".");         }     } } public void spanishTree(){     System.out.println("Espere."); } public void ending(){     System.out.println("This is the ending of the program for now. Bye!"); }   } The problem is under "Alright, let's get to the good stuff."

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am preparing myself for ISTQB exam and I came across this question.     For the code fragment given below, which answer correctly represents   minimum tests required for statement and branch coverage respectively?  Discount rate=1; Fare = 1000; If ((person == “senior citizen”) and (“travel month = January”)) Bonuspoints = 100+Bonuspoints If (class==”first”) discountRate = .5; Fare = fare * discountRate;          a. Statement Coverage = 1, Branch Coverage = 2   b. Statement Coverage = 2, Branch Coverage = 2   c. Statement Coverage = 1, Branch Coverage = 3   d. Statement Coverage = 2, Branch Coverage = 4      Answer is A  But my answer is C the reason is flowchart I draw for it given below.    Straight forward from start to end One false for 1st 'if' second false for 2nd 'if'     My question is:   Should we draw an edge 'explicitly' for 'false' condition, if it is not given in question itself. How branch coverage is 3 here ?

I am preparing for a testing certification. These types of questions are asked frequently.  Example 1: Read P Read Q IF P+Q > 100 THEN Print “Large” ENDIF If P > 50 THEN Print “P Large” ENDIF   Example 2:  READ X  READ Y  I F X>Y THEN Z = 0  ENDIF   Example 3: 1 READ X  2 READ Y  3 Z =X + 2*Y  4 IF Z> 50 THEN  5 PRINT large Z  6 ENDIF     What are Nodes and Edges in the flowchart?  Statement Coverage: 1A-2C-3D-E-4G-5H = 1 Branch Coverage: 1A-2C-3D-E-4G-5H , 1A-2B-E-4F = 2 Path Coverage: 4 1A-2B-E-4F 1A-2B-E-4G-5H 1A-2C-3D-E-4G-5H 1A-2C-3D-E-4F   Please explain , how the answers came by?  In these example, how do we identify that which is a statement, branch and condition? How do we measure coverage? Please give detailed explanations of ALL 3 examples.


Scenario: I have  and a  with 9 spore counters. My opponent attacks with a 10/10 and I block with my Thallid (also 10/10). I want to block and kill his 10/10, and then create 3 saprolings before Thallid hits the graveyard.  My assumption is that during  I assign 10 points of damage to my opponents creature, as his creature assigns 10 to my Thallid. Then during the  I can activate it's ability to create saprolings because damage was already assigned.   Am I correct?

Rules Question:     Player A attack with 1/2 creature Player B block with  with 1 +1/+1 counter And now can player B use Walking Ballista activation ability, after combat damage but before it go to graveyard, to kill 1/2 creature?


I am trying to find raw benchmark numbers between any fairly modern desktop processor and the Raspberry Pi 4gb/8gb, but I am struggling to do so. I understand that there are architectural differences meaning that some benchmarks can not be run on both an x86 instruction set and an Arm based instruction set. What I hope to determine from the raw performance numbers is if the Pi 4 is powerful enough to replace a dual/quad core desktop CPU based VPS with a similar amount of RAM.

From my personal experience with my tablet, and from the benchmarks and articles I've read, it always seems ARM processors, as seen in virtually all mobile devices, deliver incredible performance for the amount of power they consume.  It really seems like ARM is inherently more power-efficient than x86.  To me, it looks like that this is because x86 is a  while ARM is a . However, Intel Atom processors deliver very good performance relative to their power consumption as well.  In addition, having studied computer architecture, it is my understanding that in modern processors, the complex x86  is internally translated into simpler  that use an internal instruction set that is closer to the simpler ARM or MIPS ISAs than x86 proper.  As such, the ISA as presented to the programmer is little more than an interface to issue commands to the processor, rather than a representation of the actual low-level operations the chip performs.  Then again, implementing this translation layer requires additional silicon space on the chip...  That said, assuming that they are implemented using the same semiconductor process, is ARM inherently more efficient than x86? With a properly designed , is it possible for an x86 processor to deliver the same performance per watt as an ARM processor?  Remember, I'm looking for a well-written technical answer in the spirit of Stack Exchange and not mere speculation.


Questions like this have been asked before, but I just want some quick clarification on something.    Suppose that $G$ is the sum of its Sylow $p$-subgroups.  Then each Sylow subgroup must be normal, and of course we have the other direction.  If each Sylow subgroup is normal, then $G$ is the product of its Sylow subgroups.    My question that I need clarified is, "if $G$ is a sum of its Sylow subgroups, when will this be abelian, non-abelian?"

Proposition II.7.5 of Hungerford's Algebra goes     Proposition 7.5. A finite group is nilpotent if and only if it is the direct product of its Sylow subgroups.   Let $G = (\mathbb{Z}_6, +)$. $G$ is abelian, so it is nilpotent and thus by the proposition is the direct product of its Sylow subgroups.  The Sylow subgroups of $G$ are $H = (\mathbb{Z}_3, +)$ and $K = (\mathbb{Z}_2, +)$, so the proposition says $G = H \times K$. In particular, $0 \in H$ and $0 \in K$, so $(0,0) \in H \times K = G$... but that's not true, since $G = \{0,1,2,3,4,5\}$.  Where is/are my misunderstanding(s)?


If you back up your transaction log every hour through a maintenance plan, why does your log file continue to grow? I would think the system would delete or shrink the log after the backup. Is this something I want to do?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


My wife and I  bought our  current house about a year ago.  We love it. The location is great with many new projects coming to the area, including a train station, a shopping plaza and a marina by the Potomac River.  I am a dentist. This year I bought a practice in downtown Washington DC.  This is considered my small business investment.  It's a good 45 minutes to 1 hour commute each way.  I am pretty energetic but  I  wake up very early and I  am feeling the burnout.  In a few years we might move closer to my office  and it will be closer to where my older son will go to college if he goes  locally.  I have an FHA ARM on my house that's 3.2%. I  paid around 5% down and the current principal is around $540K. I pay around $3400,  including interest, PMI, etc.  My house value went up to around $600K but  it can rent for only $3,000 to $3,200 a month. I am not worried about finding tenants. I am more concerned about a negative cash flow.   I know how to run a dental practice but not real estate. It's likely that I will hire management company until  I learn more about this type of investment.    I hope to be working in my practice for the next 20 years. By then, hopefully  this house is paid off and I can realize  a good passive income.  Do you think that I should rent or sell my current house?

I have recently purchased a home which will presumably be my long-term residence. I have not yet sold my original home, and I am trying to decide whether I should rent it out, or sell it.  The 1st home has a mortgage remaining of $175,000, with a 5/5 ARM at 2.5% The next adjustment is in 4 years, and the maximum it could go up to is 4.5% This home was purchased 10 years ago for $203,000 - just before the real estate bubble burst.  The home I just purchased has a 1st mortgage of $608,000 @ 4.25% for 30 years fixed. It also has a second mortgage of $76,000 @ 5.5% for 15 years.  I think I can rent out the 1st house for $1500, and after property management fees, take home about $435 per month. That is not including any additional taxes on that income, or deductions based on repair work, etc.   I think I could sell the first house for about $227,000 which after fees and loan payoff nets me $35000  If I sold the house, I could use my existing cash reserve and the net proceeds to pay off the 2nd mortgage. I could also pay off some, or none of the 2nd mortgage, and try to beat that 5.5% by investing the $35000  If I do not sell the house, I could use the $434 to almost pay off the 2nd mortgage per month/invest the $434 into an IRA or something, and try to beat the 5.5% over time.     According to this website, the S&P500 has gained 6.6% over the last 10 years, or 10.3% since 1970. At 6.6%, over 7 years, I would have $46,000 dollars in the account, which would be enough to make up the $35000 sale proceeds, and additionally cover any upcoming repairs to that house.  Should I sell the house now, or hold onto it and rent it out?


I have been using Ubuntu for about a year now. And the main reason that's pulling me back to windows is the bad battery life (about 60% lesser "100% to 20%" time for the battery to discharge).  I've come to the conclusion that this is because of GENERIC DRIVERS by ubuntu for a general-purpose OS and Windows doesn't have that because the manufacturers find the right drivers.  My question is how can I find the OPTIMAL DRIVERS for my system?  Also, if my assumption is wrong about drivers causing the bad battery life, could you please give a better explanation.  My specs:  2TB HDD  8GB RAM  Intel i5-8250  Nvidia MX150

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


I was wondering how was the formula for Doppler effect in light i.e. $f=\sqrt{\frac{(1-v/c)}{(1+v/c)}}f$ was derived. I understood how it is derived for sound but I am unable to understand how it is derived for light . I read a few books but they were difficult for me to comprehend.A little hint of derivation would also do.

This is about a step in a derivation of the expression for the relativistic Doppler effect.  Consider a source receding from an observer at a velocity $v$ along the line joining the two. Light is emitted at frequency $f_s$ and wavelength $\lambda_s$. The frequency $f_0$ and wavelength $\lambda_0$ received by the observer will be different.  Some textbooks now argue that the wavelength received by the observer is given by $\lambda_0=(c+u)T_0$, where $T_0$ is the time period of the wave in the observers frame. The argument given is that the successive "crests" will be an extra distance $uT_0$ apart due to movement of the source. Upon relativistically transforming the time period in the source frame to the observer frame, the correct result $f_0=f_s\sqrt{\frac{c-u}{c+u}}$ is obtained.  But the argument for the wavelength seems reminiscent of the classical Doppler effect for sound. Is it really applicable here through this argument? And is there a way to show the same result for $\lambda_0$ mathematically?


When I list /proc/<PID>, works as expected. But when I use ps or ls /proc | grep <PID>, the process is hidden. How & Why is this possible?  [user@host ~]$ ls /proc/12263 attr             cpuset   limits      net            projid_map  statm autogroup        cwd      loginuid    ns             root        status auxv             environ  map_files   numa_maps      sched       syscall cgroup           exe      maps        oom_adj        sessionid   task clear_refs       fd       mem         oom_score      setgroups   timers cmdline          fdinfo   mountinfo   oom_score_adj  smaps       uid_map comm             gid_map  mounts      pagemap        stack       wchan coredump_filter  io       mountstats  personality    stat [user@host ~]$ ls /proc | grep 122 12230 12231 12260 12297 [user@host ~]$ ls /proc/12263 attr             cpuset   limits      net            projid_map  statm autogroup        cwd      loginuid    ns             root        status auxv             environ  map_files   numa_maps      sched       syscall cgroup           exe      maps        oom_adj        sessionid   task clear_refs       fd       mem         oom_score      setgroups   timers cmdline          fdinfo   mountinfo   oom_score_adj  smaps       uid_map comm             gid_map  mounts      pagemap        stack       wchan coredump_filter  io       mountstats  personality    stat [user@host ~]$ ls /proc | grep 122 12230 12231 12260 12297 [user@host ~]$ ps -fp 12263 UID        PID  PPID  C STIME TTY          TIME CMD [user@host ~]$

[root@datacenteronline ~]# ssh root@192.168.1.172 Last login: Wed Apr 17 09:55:45 2013 from 192.168.1.187 [root@localhost ~]# ls /proc/ | grep 2266 [root@localhost ~]# cd /proc/2266 [root@localhost 2266]# ls attr             cpuset   limits      net            root       statm autogroup        cwd      loginuid    numa_maps      sched      status auxv             environ  maps        oom_adj        schedstat  syscall cgroup           exe      mem         oom_score      sessionid  task clear_refs       fd       mountinfo   oom_score_adj  smaps      wchan cmdline          fdinfo   mounts      pagemap        stack coredump_filter  io       mountstats  personality    stat [root@localhost 2266]# ls -al /proc/2266 total 0 dr-xr-xr-x   7 apache apache 0 Apr 17 09:45 . dr-xr-xr-x 266 root   root   0 Apr 17 09:11 .. dr-xr-xr-x   2 apache apache 0 Apr 17 09:45 attr -rw-r--r--   1 root   root   0 Apr 17 09:45 autogroup -r--------   1 root   root   0 Apr 17 09:45 auxv -r--r--r--   1 root   root   0 Apr 17 09:45 cgroup --w-------   1 root   root   0 Apr 17 09:45 clear_refs -r--r--r--   1 root   root   0 Apr 17 09:45 cmdline -rw-r--r--   1 root   root   0 Apr 17 09:45 coredump_filter -r--r--r--   1 root   root   0 Apr 17 09:45 cpuset lrwxrwxrwx   1 root   root   0 Apr 17 09:45 cwd -> / -r--------   1 root   root   0 Apr 17 09:45 environ lrwxrwxrwx   1 root   root   0 Apr 17 09:45 exe -> /usr/local/apache2/bin/httpd dr-x------   2 root   root   0 Apr 17 09:45 fd dr-x------   2 root   root   0 Apr 17 09:45 fdinfo -r--------   1 root   root   0 Apr 17 09:45 io -rw-------   1 root   root   0 Apr 17 09:45 limits -rw-r--r--   1 root   root   0 Apr 17 09:45 loginuid -r--r--r--   1 root   root   0 Apr 17 09:45 maps -rw-------   1 root   root   0 Apr 17 09:45 mem -r--r--r--   1 root   root   0 Apr 17 09:45 mountinfo -r--r--r--   1 root   root   0 Apr 17 09:45 mounts -r--------   1 root   root   0 Apr 17 09:45 mountstats dr-xr-xr-x   6 apache apache 0 Apr 17 09:45 net -r--r--r--   1 root   root   0 Apr 17 09:45 numa_maps -rw-r--r--   1 root   root   0 Apr 17 09:45 oom_adj -r--r--r--   1 root   root   0 Apr 17 09:45 oom_score -rw-r--r--   1 root   root   0 Apr 17 09:45 oom_score_adj -r--r--r--   1 root   root   0 Apr 17 09:45 pagemap -r--r--r--   1 root   root   0 Apr 17 09:45 personality lrwxrwxrwx   1 root   root   0 Apr 17 09:45 root -> / -rw-r--r--   1 root   root   0 Apr 17 09:45 sched -r--r--r--   1 root   root   0 Apr 17 09:45 schedstat -r--r--r--   1 root   root   0 Apr 17 09:45 sessionid -r--r--r--   1 root   root   0 Apr 17 09:45 smaps -r--r--r--   1 root   root   0 Apr 17 09:45 stack -r--r--r--   1 root   root   0 Apr 17 09:45 stat -r--r--r--   1 root   root   0 Apr 17 09:45 statm -r--r--r--   1 root   root   0 Apr 17 09:45 status -r--r--r--   1 root   root   0 Apr 17 09:45 syscall dr-xr-xr-x  29 apache apache 0 Apr 17 09:45 task -r--r--r--   1 root   root   0 Apr 17 09:45 wchan   Cound anyone tell me what it is?


caller below when linking saids undefined reference...  in base.h file:  class tempc {     public:     int a; } ; class base                 // base class {     public:                // public     template<T> int func(T*);     //  template defined here };   in base.cpp file:  template<T> int base :: func(T*) {     std::cout << "base::func called" << std::endl;     return 0; }   in derived.cpp file  class derived : public: base    // class defined {      void  caller()     {          tempc a;         func<tempc>(&a);    // template used here         base::func<tempc>(&a);     } }; int main() {     derived d;     d.caller(); }   the error is : undefined reference to `void base::func(tempc*)'  base is the base class  derived is the derived class from base  this caller saids undefined reference...  //sorry,because my source code is reaaaaly too large to show up

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm using Leaflet JS with a modified GeoJSON file of world contries to display a choropleth, like this:    Is there any way to display the far-eastern part of Russia as a contiguous entity? Rather than it being split to due to its coordinates.

I am having the issue where the International Dateline is splitting a polygon I am working with.  I have a layer of the "Federal Districts" of Russia, and the eastern most federal district is being "cut" by the international dateline.   I currently have the data frame's coordinate system set to Asia Lambert Conformal Conic and this places the two "cut" polygons next to each other (how they should be).  I really need the polygon to not be cut and show as a continuous polygon.   I've researched up and down, tried changing the projection/coordinate system, but with no luck.  I've attached a screenshot of the one multi-part polygon that is being split by the international dateline.  I would like it so that there is no cutting of the polygon, and therefore no boundary line going through the polygon.  I've even tried transforming this multi-part polygon into separate, single-part polygons, then merge them back together, but anytime any part of any polygon crosses this line, it gets cut.  Layout View:    Data View:


I have an Ubuntu VM (running in VMWare Fusion) and I can no longer update my apps - software updater tells me I must update from 15.10  When I try to Upgrade the machine does nothing - I never see any upgrade happen and I seem to be stuck on 15.10

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Please check if my method is correct. Solution : Let $$f(x) = x^8 - x^7 + x^2 -x +15 $$ Now, let $g(x)= x^8 -x^7=x^7(x - 1)$ and $h(x)= x^2 -x=x(x-1)$. Thus, $$f(x)=g(x) + h(x) + 15$$  On analyzing $g(x)$ and $h(x)$ we see that both the functions are negative between $0$ and $1$  and the maximum negative value of both the functions do not exceed $-1$. Thus, the minimum value of $f(x)$ is not less than $13$. Hence, $f(x)$ has no real root. Q.E.D

Let $ P(x)=x^8 - x^7 +x^2 -x +15 $, Descartes' Rule of Signs tells us that the polynomial has 4 positive real roots , but if we group the terms as $$ P(x)= x(x-1)(x^6+1) +15 $$ we find that $ P(x) $ does not have any positive roots.  Where did I err ?


For the past couple of weeks, I've been getting near-constant error notifications from Ubuntu (18.04 Cinnamon)  Network service discovery disabled Your current network has a .local domain, which is not recommended and incompatible with the Avahi network service discovery.  The service has been disabled.  I had never heard of Avahi in my life until these showed up.  According to , this is some sort of network software used for things like iTunes.  I have never used iTunes on this computer.  I haven't installed any programs that correlate to when these started to appear, as far as I can recall.  The last things I can think of that I installed are the Spotify and Discord clients for Linux, both a couple of months ago, at least. I'm prepared to disable it as outlined in the post I linked to, but I have to assume that it's there for a reason and some program is using it.  Is there any way for me to know why Avahi is active on my system so that I don't break something by disabling it?

Every time at boot I get a message “Network service discovery disabled. Your current network has a .local domain, which is not recommended and incompatible with the Avahi network service discovery. The service has been disabled.”    What does this mean for me?  Wi-Fi is disabled.


When I tried to install android studio on my 14.04 LTS Ubuntu system on opt directory as according to mentioned on by clayton (Ubuntu user) but I could not install it as accordingly.   Unpack android studio zip on download directory Then open terminal fetch the file through cd ~/Downloads Then I enter sudo -i After then I tried to move android studio to opt directory mv android-studio /opt Then it says:      mv: cannot stat ‘android-studio’: No such file or directory   And I installed Qt creator5.3.2 on /opt directory for third party installation policy.It works fine except I could not fetch the examples on Qt creator and it is not showing the version of Qt.  If anybody could help me how to solve this problem. I would be really thankful in advance.

Please tell me the full process of installing Android Studio and its necessary dependencies.


1) A and B are sets of natural numbers. They are the same, so they have the same cardinality.  2) Set B is transformed into set of rationals. This can be done only by adding new numbers e.g. 1/2, 1/4, 5/6, ... to this set.  3) Set B now contains the same amount of numbers as set A, with extra numbers from step 2. Therefore, set of rationals has greater cardinality than set of naturals.

So I answered this question:  I believe my answer is correct, however one thing I couldn't explain fully, and which is bugging me, is why the rationals $\mathbb Q$, integers $\mathbb Z$ and naturals $\mathbb N$ all have cardinality $| \mathbb Q |=| \mathbb Z | = |\mathbb N| = \aleph_0$, when $\mathbb N \subsetneq \mathbb Z \subsetneq \mathbb Q$.  The basic proof of the other question, from my answer, is that for any $r$ in $\mathbb Q$ there is a single function $f(r)$ such that $f(r) \in \mathbb Z$, and the same holds between $\mathbb Z$ and $\mathbb N$. Because there is this 1:1 transformation possible, there must be the same number of numbers in the three sets, because otherwise there would be a number in one set for which the bijection could not produce a number of the other set, and this is not so.  Now, Belgi explained why $1<2$ in the other question by defining the value 0 as the cardinality of the empty set $\emptyset$, 1 as the cardinality of a set of sets containing only the empty set, and 2 as the set of sets containing the empty set and a set containing the empty set, then proceeding as follows:     Now that we have defined the natural numbers we can define when one number   is smaller than another. The definition is $x<y$ is $x\subset y$   and $x\neq y$ .      Clearly $\{\emptyset\}\neq\{\emptyset,\{\emptyset\}\}$ and $\{\emptyset\}\subset\neq\{\emptyset,\{\emptyset\}\}$   So this a proof, by definition, of why $1<2$.   ... however, by the same definition, because $\mathbb N \subsetneq \mathbb Z \subsetneq \mathbb Q$, then $| \mathbb N | < | \mathbb Z | < |\mathbb Q|$ and thus a maximum of one of these quantities can be the ordinal quantity $\aleph_0$.


Find upper and lower limit of $\cos(x^2)-\cos((x+1)^2)$.  In previous topic was shown that 2 cannot be attain. but how to find upper bound?

How to prove that upper limit of $\cos (x^2)-\cos (x+1)^2$ is $2$.   Can anyone show proof of this?


Sorry for asking a pretty shallow question, but I can't find the mistake that I made. I was trying to pass a template <typename T> in my header, but g++ threw a lot of errors that I don't know how to fix. Before this is marked as duplicate, I'd like to stress the point that I wasn't able to find such problems using template classes, as that's where the problem occurred in my case. Output: C:\Temp\cc52Nkf5.o:executesort.cpp:(.text+0x1cc8): undefined reference to `void Utils::message_input<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' collect2.exe: error: ld returned 1 exit status  utils.h: #pragma once #ifndef utils_h #define utils_h // inputs are appropriate  class Utils {     public:         // ...         template <typename T> void message_input(string, T&); };  #endif   utils.cpp #include "utils.h" // inputs are appropriate // ...  template <typename T> void Utils::message_input(string str1, T& into) {     cout << str1;     cin >> into; }  How I called: #include "utils.h" // #include blah, blah, blah  int multicnt; Utils uts; uts.message_input(">>> How many times to run? (positive whole number) ", multicnt);  Any help is greatly appreciated


I am planning to get my first wide angle lens. Nikon 16-35 F/4 is the one which is on top of my list now and when reading the , I noticed this question and answer.  Q : Can I use a Graduated ND filter with this lens( Lee Filter system)? A : It's not recommended to use a ND filter at a focal length less than 35mm. This will cause a black x or a line in the center of the frame. Not sure what the technical word for this is.  This confuses me. I was planning to get some ND filters so that i can take some long exposures on bright environments. Is this a true statement ? If yes, What are the focal lengths which people usually use NDFilters with (to photograph landscapes)

I bought a inexpensive variable neutral density filter,  ND2-ND400 variety. I wasn't expecting a whole lot because of the very low price point, but I think I'm either using it incorrectly or my unit is defective. Do I simply need to back off the maximum filtering setting until the results are acceptable? It seemed to provide very minimal filtering when I reached and acceptable point, maybe ND8 or so. Is this cheap ND filter only usable up to something like ND8? I am shooing with a full frame camera and a 17-40mm lens.  17mm, approximately maximum ND filtering:   40mm, approximately maximum ND filtering:   17mm, less then maximum ND filtering:


I have an Atomic PI and Ubuntu Server 20.04 installed on it. During shutdown it hangs with an error of "watchdog soft lockup" caused by DMA controller drivers called dw_dmac and dw_dmac_core  Reason is that "the HSUARTs on the SOC are not normally used on the AtomicPi, however they do appear on the 26pin connector". Solution described at the link below for 19.04 and 19.10    To be able to solve this issue the kernel modules dw_dmac and dw_dmac_core have to be unloaded.  To make this I've done the following steps without success:  1.) Checked whether these modules are running and check dependencies  lsmod | grep dw_dmac   Result:  dw_dmac                16384  2 dw_dmac_core           28672  1 dw_dmac   2.) Tried to unload with modprobe  sudo modprobe -r dw_dmac dw_dmac_core   Result:  modprobe: FATAL: Module dw_dmac is in use.   3.) Tried to unload with rmmod  sudo rmmod -v -f dw_dmac dw_dmac_core   Result:  rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'dw_dmac': Resource temporarily unavailable rmmod: ERROR: could not remove module dw_dmac: Resource temporarily unavailable rmmod: ERROR: ../libkmod/libkmod-module.c:799 kmod_module_remove_module() could not remove 'dw_dmac_core': Resource temporarily unavailable rmmod: ERROR: could not remove module dw_dmac_core: Resource temporarily unavailable   4.) Added the followings to /etc/modprobe.d/blacklist.conf  blacklist dw_dmac blacklist dw_dmac_core   And then updated initramfs:  sudo update-initramfs -u   Result: modules still loaded at startup  5.) Tried to modify GRUB settings at etc/default/grub to blacklist modules by adding  modprobe.blacklist=dw_dmac modprobe.blacklist=dw_dmac_core   Then sudo update-grub  Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 36: /etc/default/grub: modprobe.blacklist=dw_dmac: not found   6.) Another GRUB settings modification by adding to /etc/default/grub  dw_dmac.blacklist=yes dw_dmac_core.blacklist=yes   Then sudo update-grub  Result:  Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 39: /etc/default/grub: dw_dmac.blacklist=yes: not found   Could anyone help me how to unload these modules permanently?  Thanks.

How do I disable loading of unnecessary kernel modules. Kernel 3.2.4


very new here - first question in fact.  So, don't be fooled by the title of my question.  I understand that the Bell Paradox - and non-locality - prevents information being exchanged in a faster than light matter.  So, Spaceman A on Neptune, cannot send a morse-coded message to Earth using quantum entangled particles - the need to force a particle to choose a state releases the entangled particle at the other end from behaving (instantaneously) in a determined matter.  Information from Spaceman A cannot be sent from Neptune to Earth at faster than light.  But - my question is - who cares about spaceman - or any conscious entity sending information - -the fact is the entangled particles themselves are affected at faster than light speed.  Particle A observed on Neptune at midday will have the same state of spin as Particle B observed at an equal time on Earth.  The observation and confirmation of the fact takes place retrospectively - but this doesn't detract from the fact that the wavefunction will be demonstrated to have collapsed simultaneously across a vast distance - something is acting on them at faster than light speed.   Any thoughts, or comments to explain why this is wrong, greatfully recieved !!

According to the special theory of relativity, distant simultaneity depends on the observer's reference frame.  And, according to the quantum theory, in the case of two entangled particles, a measure on one of the particles simultaneously affects the second one. Under which reference frame is this simultaneous?


I know that $AB$ and $BA$ have the same non-zero eigenvalues, where $A$ and $B$ are rectangular matrices, but my question is: Is it necessary for $AB$ and $BA$ to have the same number of non-zero eigenvalues?  In other words, suppose $AB$ is a $8*8$ matrix and $BA$ a $6 * 6$ matrix. Then can $AB$ have eigenvalues of $0, 0, 0, 0, 0, 2, 3, 4$ when $BA$ has eigenvalues of $0, 0, 2, 2, 3, 4$?  Writer's edit.  Note that the question can be answered using the generalization of the Sylvester's Determinant Identity:  and the generalization process:  , meaning the answer to the original question, would be "True."

I know that if A and B are square nxn matrices, then AB and BA have the same characteristic polynomial and thus the same eigenvalues (and same algebraïc multiplicity).   I'm wondering though if this can be generalized: if A is a nxm matrix and B a mxn matrix, then AB is a nxn matrix and BA a mxm matrix.  So my question is: will the eigenvalues of AB and BA, that differ from zero, have the same algebraïc multiplicity?


I'm still learning the linux file system and understanding where everything is installed. I'm coming from windows mindset and would like to wrap my head around the following directory equivalents:  What is the following directory equivalent in ubuntu or just linux in general as im assuming its the same:  c:\program files  --- Where all the programs are installed. c:\windows --- Main OS core files. c:\Users --- Where all the users data reside c:\ --- All the startup / bootup files (config.sys / autoexec.bat)   --- What other important directories should I know about to fully understand the ubuntu/linux file system structure?

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from Windows folder and the “add remove program files” is good enough to handle the program files folder of Windows. Of course there’s a folder named Users where the users (who are not admins) can access only their folders.  Thus there’s a clear picture at some level in my mind of the Windows file system. In Ubuntu, when I reach the location /, there’s a huge list of folders, most of which I have no clue as to what they contain. The /bin folder seems to be the equivalent of the Windows folder in windows. The /usr folder seems like it’s the equivalent of the Users folder in Windows. But even the /home folder looks like it can fit the bill.  Please understand that I do understand, that Ubuntu (Linux) has a different character than that of Windows, i.e., there need not be exact equivalent of Windows functions, in Ubuntu. All I am looking for is a bit more clearer picture of the Ubuntu file system.   This question is a part of a bigger question which I am splitting up to make it more answerable. The original question can be found here:


I have a Iranian passport but I also have the biometrics visa from Ireland as well. Do I need a visa to have a connection flight from Amsterdam?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I want in a document of mine to keep a lot of notes so I would like to create a custom counter so every note to be numbered like this:  0001  0002  0003  0004  (They are deliberately bold as this is the style I would like)  I would like the counter to work like the enumerate environment so to add a keyword in front of the note I want to number and also to be able to reset it.  The reasons I don't use the enumerate environment are:   I want the numbers to be bold I want custom formatting of the numbers i.e. 0001 etc... I really want to see how I can create something like that.

I can output the value of a counter in a LaTeX document via:  \setcounter{mycounter}{1} \arabic{mycounter}   Which inserts a 1. But how do I format the output by, for example, adding a leading zero if mycounter is less than 10 in a way similar to what  lets you do by specifying %02d as your format string?


Why energy cannot be created nor destroyed if the Universe is still growing in size?There is creation of new space and infact this space is so energetic that causes 'Hubble flow' of matter...

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


I use ryte to analyze my webpage and it gives the following advice:  If the IP (173.###.###.###) of this domain gets called, it should redirect to the real homepage of this domain. Not redirecting requests on the IP can cause duplicate content issues.  Currently my server hosted multiple domains, but it has only one IP address. The main domain(most important domain) is www.example.com  So to improve SEO, should I let the access of the IP address, like below:  https://173.###.###.###   to be redirect to my main domain ?  Thanks

I have been told by an SEO company to redirect the site IP to the domain using a 301 redirect. This will apparently improve the SEO ranking of the site. The site has a dedicated IP address.   Is this worth doing and should it be done ?


Summary When I restart, applications that should reopen automatically afterwards do not do so.  I've checked all of the relevant steps that I can find, however none have any effect.  Basic information on this issue can be found in .    System Details Windows 10 Enterprise, version 1903, build 18362.267.  This is a fresh install (not an upgrade) of Windows 10 on a desktop that used to run Windows 7.  It's not connected to an Active Directory.    Problem Specifics When I restart, no applications reopen, although many should.  Examples include browsers (e.g. Chrome, Firefox, Edge) and Microsoft Office programs (e.g. Outlook).  As discussed in the comments below, the online documentation on this can be confusing since this feature in Windows has evolved over time, as have the applications that support it, but I am contrasting this problematic desktop with observed behavior on two other laptops, both of which received a clean Windows 10 Enterprise install.  On both of these laptops, applications reopen both when Windows performs an automatic update + restart and when I initiate the restart, .    In terms of problem diagnosis, I have run through a host of means of enabling/disabling this feature, however none have any effect on whether it occurs.     I have verified that the requisite setting is enabled (see ).   I have verified that the requisite registry key is set (see Option 2 ).   I have verified that the local computer policy is set to "Not configured" (see Option 3 in last link).     In all cases, toggling these has no effect on restart behavior, though the option in the Settings menu does disappear (as it should) when it is disabled by other methods.  Lastly, note that folders do reopen on restart of the misbehaving computer, which, as also noted in  mentioned at the start of this post, is a separate option from application restoring.    Down the Road For future readers, there is also some discussion in  about further evolution of this feature in future releases (starting in build 18963) about modification to the behavior.  Although this is a later build than mine, out of an abundance of caution, I did try adding the registry key described  (the setting doesn't appear in the Settings menu in my build, as it shouldn't), but this had no effect.

I have Windows 10 1809 Enterprise. When I restart Windows, the applications that were open are closed after restarting. Weren't they supposed to reopen automatically after 1709?


One of the interesting moments in Billions was the end sequence of season 3 episode 9. John Malkovich's character (Grigor Andolov) started to tell a story, ostensibly a memory from his own past. The thing is, the story was completely unrelated to what they were talking about at the moment. What's more, it didn't even have an ending. All in all, I enjoyed watching it, but couldn't make much sense of it.

At the end of Billions, Season 3, Episode 9, Grigor Andolov (John Malkovich) tells a story to Bobby Axelrod (Damian Lewis) about the Christmas market in Moscow. He asks a question about what happened to a boy:  Andolov: Many years ago, I was walking along the Moskva Christmas market. You ever seen Moskva Christmas market? Always a sense of good cheer, even during the lean years. I think it was the wine. They serve warm wine with the spices in it... cinnamon and... I was waiting on the line — everyone was always waiting on the line — and finally I got my cup, I turn, and there was this little boy. Runny nose. He looking at me so desirous of my cup of this warm, warm wine that I give him a sip. He stares at me with such a gratitude. And then I notice his mother. Plump breasts. She must have known someone. So I give him my cup of wine. And I take his mother away from the square. Behind the soldiers. And after, I leave her for the soldiers. And I walked back, and this little boy is staring at me with his greedy drunken eyes. Do you know what happened to him? Axelrod: No. Andolov: I always ask. No one ever knows.  What is the real meaning of this story? And how is it connected to the Axelrod – Andolov relationship?


How can I physically stretch the plot below both horizontally and vertically?  import pandas  import numpy import matplotlib from matplotlib import pyplot %matplotlib inline  df = pandas.DataFrame(numpy.random.randint(0,5,size=(10, 2)),          columns=list('AB'))  fig = matplotlib.pyplot.figure() ax = fig.add_subplot(111) ax2 = ax.twinx() ax.plot(df.index, df.A, color ='r') ax2.plot(df.index, df.B, color = 'b')

How do you change the size of figure drawn with Matplotlib?


I was trying to think of a situation and use combinatorics to solve the problem. Any other arithmetic solution is also appreciated.

I need help to prove that the quantity of this division :   $\dfrac{({10!})!}{{10!}^{9!}}$  is an integer number, using combinatorial proof


I have answered a question (); I then registered an account with my OpenID, but the answer has not been assigned to my current account. What went wrong?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


Am struggling with ArcPy.  Can someone help with a script to identify missing layers (red arrow in TOC) and then to search for the correct file locations & then update the mxd.

I want to list all the broken links in all mxds in a server drive. But whenever I try I get an error come up. Can someone use a specific example, say the drive is D drive, how would I put it into ESRIs script here:  import arcpy, os path = r"C:\Project" for fileName in os.listdir(path): fullPath = os.path.join(path, fileName) if os.path.isfile(fullPath):     basename, extension = os.path.splitext(fullPath)     if extension == ".mxd":         mxd = arcpy.mapping.MapDocument(fullPath)         print "MXD: " + fileName         brknList = arcpy.mapping.ListBrokenDataSources(mxd)         for brknItem in brknList:             print "\t" + brknItem.name del mxd   Also I'm not used to not having pythonwin, does anyone know where to d/l it? I googled it but it kept telling me to install it from the ArcMap cd (I'm just using a work computer).


I created view in database1 based on tables in database2. I gave SELECT permission to a user who has access only to database1. The user can't get this view to work because he doesn't have an account in database2. How can I solve this issue? I don't want to create an account in database2.

I have been asked by a client to implement some views for reporting purposes, the views will be accessed via PowerBI, Excel and SSRS. The designated user will only have access to the view and no underlying tables must be available to the user.  The problem I have encountered in that the SQL within the view touches 3 different schemas (All within the same database):   Pupil Provider  Security   The view is:  CREATE VIEW dbo.vTestPermissions AS SELECT a.Column1,        b.Column1,        c.Column1 FROM Pupil.Table1 a JOIN Provider.Table2 b ON a.Column1 = b.Column1 JOIN Security.Table3 c ON a.Column1 = c.Column1   The owners of the Tables/View are as follows:   Pupil.Table1 - Owner Pupil Provider.Table2 - Owner Provider Security.Table3 - Owner Security vTestPermissions - Owner dbo   When I select from the view I get an error:     The SELECT permission was denied on the object 'table3', database   'TEST', schema 'Security'   I have tried giving SELECT permission with and without the GRANT option to the schema, and the tables, but that makes the underlying tables available to the user.  Any help on this will be greatly appreciated.


I accidentally allowed this website to share info from my Yahoo! account. I don't feel safe doing this. How do I delete this Stack Overflow account? I can't see an option to close/delete an account from the options.

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I found no source on how to create an entry in Unity Control Center. Is it even possible? What languages can I use?  Edit: I'm searching for a method to have an entry appear in the Unity Control Center, and to write a component or whatever that lives INSIDE this window. Not a launcher only solution.

For example, how to add a "Startup Applications Preferences" launcher to this Window?


I have ssh'd into a ubuntu AWS box via terminal on mac. I have successfully setup the process I want to run in the box.  How do can exit out of terminal without killing the process running?  Can not run the  below command because terminal is running the script and not allowing me to even copy and paste the below command into terminal:  nohup long-running-process &   Thank you in advance.  P.S  New to linux and terminal on mac

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and later, after dinner, I want to check on the process that I started before leaving work. How can I do that with SSH? My understanding is that if you break your SSH connection you will also break your login session on the server, therefore killing the long running process.


I have an overnight flight from US to London for business in a few days but I have trouble sleeping on planes. The issue isn't about the environment that that I sleeping in, it is making my body more acceptable to fall asleep.

Some people have the amazing ability to doze off whenever and wherever they are. For the rest of us, sleeping on planes is a constant battle of trying to get comfortable in a cramped space. There are lots of options: special pillows, leaning against the window, folding over flaps on the headrest, leaning on the shoulder of a friend next to you, etc. Certainly something must work...  What have you found to be the best way to comfortably sleep on a plane (in a standard economy seat; first class is a whole different world)?


I want to monitor system metrics at my application. I use Spring Boot Actuator but it doesn't have any metrics for CPU usage. I know that such metrics at Spring Boot Actuator retrieve from here:  OperatingSystemMXBean   It has methods like:  getSystemLoadAverage getAvailableProcessors   There is another class:  MemoryUsage   at which you can retrieve such metrics:  getUsed getCommitted   However I could not see any metrics for CPU Usage of the Java application at java.lang.management. How can I retrieve it?

I would like to monitor the following system information in Java:   Current CPU usage** (percent) Available memory* (free/total) Available disk space (free/total)  *Note that I mean overall memory available to the whole system, not just the JVM.   I'm looking for a cross-platform solution (Linux, Mac, and Windows) that doesn't rely on my own code calling external programs or using JNI. Although these are viable options, I would prefer not to maintain OS-specific code myself if someone already has a better solution.  If there's a free library out there that does this in a reliable, cross-platform manner, that would be great (even if it makes external calls or uses native code itself).  Any suggestions are much appreciated.  To clarify, I would like to get the current CPU usage for the whole system, not just the Java process(es).  The SIGAR API provides all the functionality I'm looking for in one package, so it's the best answer to my question so far. However, due it being licensed under the GPL, I cannot use it for my original purpose (a closed source, commercial product). It's possible that Hyperic may license SIGAR for commercial use, but I haven't looked into it. For my GPL projects, I will definitely consider SIGAR in the future.  For my current needs, I'm leaning towards the following:   For CPU usage, OperatingSystemMXBean.getSystemLoadAverage() / OperatingSystemMXBean.getAvailableProcessors() (load average per cpu) For memory, OperatingSystemMXBean.getTotalPhysicalMemorySize() and OperatingSystemMXBean.getFreePhysicalMemorySize() For disk space, File.getTotalSpace() and File.getUsableSpace()   Limitations:  The getSystemLoadAverage() and disk space querying methods are only available under Java 6. Also, some JMX functionality may not be available to all platforms (i.e. it's been reported that getSystemLoadAverage() returns -1 on Windows).  Although originally licensed under GPL, it  to , which can generally be used for closed source, commercial products.


Which of the following is grammatically correct?  I am having OR I have. We/they/you are having OR we/they/you have.  For eg.  I have/ We have a problem that I/we can't seem get rid of.  OR  I am having/ We are having a problem that I/we can't seem get rid of.

I use Stack Overflow a lot and have noticed a certain trend that I myself got caught up in at one time of using the phrase "I am having a problem" in place of "I have a problem."  I would use this phrase for an event in the future, for example, "I am having a steak dinner tonight," but for a problem that I need solved and am asking for a solution, I'd use "I have a problem..."   What would force us to use this phrase? Is it even valid English for the present tense?


I was flicking through a book on perturbation methods and saw a simple question asking the reader to expand the following expression for $f$ in a power series (up to the first 2 terms):  $f = (1 + \epsilon \,x)^{1/\epsilon}$, where $\epsilon$ is a small parameter. I'm sure this is very simple, but I wasn't certain about the best way to approach this. A quick look at mathematica tells me the solution is $e^x - \frac{1}{2} (e^x x^2) \,\epsilon + ...$. How would I go about getting this answer - and more importantly, how would I systematically find series expansions for problems similar to this one?


Before I start this, I wanted to make it clear that I am NOT "ungrateful" of my parents in any way. I love them more than anything on the Earth, but I feel that they are way more strict than they have to be.  Basically, I cannot have my phone after school or on weekends. I cannot go out with friends or have friends come to me, I cannot walk to my school or gym and my parents tend to treat my other brothers better than me. When I ever I try to talk to them, they put me off with the same response "the rules are not up for discussion". As if this was not restrictive enough, I have no privacy whatsoever. My parents constantly check browsing history and check my messages in the middle of the night without my knowledge. I understand the precautions parents need to take when their kids have phones, but this is just too much. I cant even talk to my friends online (if I even talk that much with them in the first place because I never have my phone) without a manner that my parents would approve of. I also have a feeling that this lack of social interaction is getting to me.   Everything I do is repetitive and boring. I feel like a machine, doing the same thing over and over. In fact, I think this lack of social interaction is why I'm not as good as I used to be in school. Unless I have an incentive to work (ex. "Get good grades on this test and I will let you go out with your friends"), I wont try at all, therefore I would do badly since there was no reason for me to work. I try to explain this to them, but they just won't listen. You are probably thinking I'm delivering it the wrong way, but they end up being the immature ones who start getting mad while I stay silent, trying my best to convince them that social lives do not mean I fall into bad habits or bad influences.   I feel like I express more of my feelings with friends rather than family, and that does not sit right with me. I am ashamed of myself when somebody invites me to hang out with them and I respond with absurd excuses like "I have to catch up on a lot of homework". I am regularly known as the kid who never leaves his house, and the people who mock me for that have every right to do so, because I agree with the fact that this is a boring and repetitive life that I have.  Any good parent would know that this is a restrictive and boring life than the one I deserve. Please help me bring up points to use when I talk to my parents about these issues.

Before I start this, I just want to let everyone know that even though my parents can be completely clueless about parenting at times, I still love them very much, so don't go commenting that I'm "ungrateful" or whatever.  My parents are just really strict about everything. I'm 15 years old, a sophomore in high school, and I'm basically not allowed to do anything. I don't have a phone (and therefore no social media or Internet) and my parents refuse to buy me one (we can afford one quite well though) even though every single person in my high school has one, and has had one since they were 12 or 13.   I'm also not allowed to date and if my parents (especially my dad) ever see me talking to a guy they immediately interrogate me about who he is, what we were talking about, and then they remind me that I'm not allowed to date until I'm in college, and sometimes I feel like I can't ever talk to a guy without my parents sticking their noses into it.  Yet another thing I am denied is to hang out with friends. I am allowed to have friends but my parents never let me go out with them without parent supervision. I can't have birthday parties either, or sleepovers, or "girls' day outs". I can't wear makeup either (also not until I'm in college) and I can't wear tank tops, crop tops, shorts, or anything else like that.  I really don't know what to do anymore, I just don't think that I can live like this any longer. I've tried asking my parents to be a little less strict but they keep saying no. I am very responsible and mature, so it's not because of that. I know they have the best intentions for me but sometimes I think they're just taking it too far. For example, whenever I ask my dad if I can have a phone, he laughs in my face and says "Well there's the joke of the day!" or something along those lines. I also have to go to bed at 9:00 EVERY DAY, weekdays, weekends, and even during the summer! They don't allow me to stay up EVER, even if I have homework that I need to finish they say "Whatever, go to bed!" sometimes causing me to have to turn in assignments late. My bedtime is really just way too early and every day I just lie awake in bed and I don't fall asleep till like 11:00.  If there's any research out there that could help change their minds, I'd really appreciate it, really just anything that could help me convince my parents, so thanks for reading!


In python, if I use a ternary operator:  x = a if <condition> else b   Is a executed even if condition is false? Or does condition evaluate first and then goes to either a or b depending on the result?

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


Could anyone please suggest either a book or some reference material either online or as printed material for graph theory?

What are some of the best books on graph theory, particularly directed towards an upper division undergraduate student who has taken most the standard undergraduate courses? I'm learning graph theory as part of a combinatorics course, and would like to look deeper into it on my own. Thank you.


My compass was working. It was pointing to my bed when I went off exploring, and the compass seemed to work.  However, when I tried to go home it just took me to a random spot on the map, and now I'm lost.  How can I fix this and find my way home?

When I use a compass it does not seem to point towards my bed. I have heard that now compasses point towards North. Is this true?


The Eevee render mode has not been working properly for me. The objects just become transparent and have a gray thing in it (look at the picture). Also, when i render it, the object is just a transparent texture. When i go into Cycles, everything looks alright, no problem. My pc specs are: i7 5500u and AMD Radeon r9 m375. Can anyone help me?

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


OK, I rewrote my class,I rushed so the code is not clean yet anyway now it comipiles, and running mainMethod the problem is still there.     import java.util.*;      public class myClass {              public Random myRandom;             public HashMap<String, ArrayList<String>> myMap;             public ArrayList<String> ar;             public ArrayList<String> nexts;         //     ArrayList<String> follows;             public myClass(){                 myRandom = new Random();                    }               public void setRandom(int seed){                 myRandom = new Random(seed);              }             public HashMap<String, ArrayList<String>> buildHashMap(){               HashMap<String, ArrayList<String>> myMap = new HashMap<String, ArrayList<String>>();               ArrayList<String> ar = new ArrayList<String>();               ar.add("2");               ar.add("2");              String test = "test";              String anothertest = "anothertest";               myMap.put(test, ar);               myMap.put(anothertest, ar);                return myMap;               }             public ArrayList<String> arrayListGetter(String st){                 System.out.println("++++++++++++++++++++++++++++++++++");                   System.out.println(myMap.size());                 ArrayList ar = myMap.get(st);              return ar;           }              public void mainMethod(){                 HashMap<String, ArrayList<String>> myMap = new HashMap<String, ArrayList<String>>();                 myMap = buildHashMap();                 System.out.println("\n\nNumber of keys found: " + myMap.size());                  for (String st : myMap.keySet()){                 System.out.println(st + ": ");                 ArrayList<String> al = myMap.get(st);                      System.out.println(al.size());                       }                  StringBuilder sb = new StringBuilder();                 String test = "test";                 System.out.println(myMap.get(test));                  System.out.println(sb);                   System.out.println(myMap.get(test).size());                 System.out.println(myMap.get(test).size());         //         ArrayList<String> follows = getFollows(key);                 System.out.println("something");                int  index = myRandom.nextInt(myMap.get(test).size());                 System.out.println(index);         //         index = myRandom.nextInt(follows.size());                 String next = myMap.get("test").get(index);                 sb.append(next);                 System.out.println(sb);                   System.out.println(myMap.get("test").getClass());                 ArrayList<String> follows = new ArrayList<String>();<------new empty ArrayList                 System.out.println(follows.size() + " **********");                 ArrayList<String> nexts = new ArrayList<String>();                 nexts = arrayListGetter ("test");                 }             }   Am I missing something obvious? Thanks in advance for your time and patience.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?